From 772190e7b2e3f6ef0695ba54d9209324acdcb30a Mon Sep 17 00:00:00 2001
From: 艺术家 <10819716+q100102@user.noreply.gitee.com>
Date: 星期三, 04 六月 2025 13:57:17 +0800
Subject: [PATCH] 伸缩杆代码提交

---
 项目代码/伸缩杆/client/src/views/tts/UserManagement/Usermanagement.vue | 1721 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 1,509 insertions(+), 212 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/UserManagement/Usermanagement.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/UserManagement/Usermanagement.vue"
index 9dfa25e..3b86e55 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/UserManagement/Usermanagement.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\344\274\270\347\274\251\346\235\206/client/src/views/tts/UserManagement/Usermanagement.vue"
@@ -2,17 +2,39 @@
   <div class="Usermanagement">
     <div class="content">
       <div class="checkbox">
-        <div :class="['item', isactive == 1 ? 'isactive' : '']" @click="changeactive(1)">
+        <div
+          :class="['item', isactive == 1 ? 'isactive' : '']"
+          @click="changeactive(1)"
+        >
           鐢ㄦ埛鍒楄〃
         </div>
-        <div :class="['item', isactive == 2 ? 'isactive' : '']" @click="changeactive(2)">
+        <div
+          :class="['item', isactive == 2 ? 'isactive' : '']"
+          @click="changeactive(2)"
+        >
           鐢ㄦ埛瑙掕壊
+        </div>
+        <div
+          :class="['item', isactive == 3 ? 'isactive' : '']"
+          @click="changeactive(3)"
+        >
+          鐢ㄦ埛鐝粍
+        </div>
+        <div
+          :class="['item', isactive == 4 ? 'isactive' : '']"
+          @click="changeactive(4)"
+        >
+          鐢ㄦ埛鍗曚綅
         </div>
       </div>
       <div class="serch">
         <div class="time_box">
           <div class="time">鍒涘缓鏃ユ湡</div>
-          <el-date-picker v-model="queryForm.selectTime" prefix-icon="none" clear-icon="none" style="
+          <el-date-picker
+            v-model="queryForm.selectTime"
+            prefix-icon="none"
+            clear-icon="none"
+            style="
               font-size: 0.75rem !important;
               border: 0.06rem solid rgba(222, 222, 222, 1);
               border-radius: 0 0.25rem 0.25rem 0;
@@ -20,175 +42,593 @@
               width: 19rem;
               height: 2rem;
               border-left: 0;
-            " format="YYYY-MM-DD HH:mm:ss" type="datetimerange" range-separator="~" start-placeholder="璧峰鏃ユ湡"
-            end-placeholder="鎴鏃ユ湡" size="small" />
+            "
+            class="time_picker"
+            format="YYYY-MM-DD HH:mm:ss"
+            type="datetimerange"
+            range-separator="~"
+            start-placeholder="璧峰鏃ユ湡"
+            end-placeholder="鎴鏃ユ湡"
+            size="small"
+          />
         </div>
         <div class="serch_box">
           <div class="serchb">
-            <el-select v-model="queryForm.selectType" placeholder="璇烽�夋嫨" size="small"
-              style="width: 100%; font-size: 0.15rem">
-              <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value" />
+            <el-select
+              v-model="queryForm.selectType"
+              placeholder="璇烽�夋嫨"
+              size="small"
+              style="width: 100%; font-size: 0.15rem"
+              class="select"
+            >
+              <el-option
+                v-for="item in selectoptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              />
             </el-select>
           </div>
-          <input v-model="queryForm.selectInput" placeholder="璇疯緭鍏ュ叧閿瘝鎼滅储" style="border-left: 0.06rem solid #e2e2e2" />
+          <input
+            v-model="queryForm.selectInput"
+            placeholder="璇疯緭鍏ュ叧閿瘝鎼滅储"
+            style="border-left: 0.06rem solid #e2e2e2"
+          />
         </div>
-        <el-button @click="handleQuery" type="primary" size="small"
-          style="margin-left: 0.98rem; height: 2rem">鏌ヨ</el-button>
-        <el-button size="small" style="height: 2rem" @click="resetQuery">閲嶇疆</el-button>
+        <el-button
+          @click="handleQuery"
+          type="primary"
+          size="small"
+          style="margin-left: 0.98rem; height: 2.5rem"
+          class="text_btn"
+          >鏌ヨ</el-button
+        >
+        <el-button
+          size="small"
+          style="height: 2.5rem"
+          class="text_btn"
+          @click="resetQuery"
+          >閲嶇疆</el-button
+        >
       </div>
       <div class="btns">
         <div style="display: flex; align-items: center">
           <!-- 鐢ㄦ埛鍒楄〃鏂板缓 -->
-          <el-button v-if="isactive == 1" type="primary" size="small" @click="dialogVisible = true" style="
+          <el-button
+            v-if="isactive == 1"
+            type="primary"
+            size="small"
+            @click="dialogVisible = true"
+            style="
               width: 5.5rem;
               height: 2rem;
               font-size: 0.88rem;
               display: flex;
               align-items: center;
-            "><el-icon style="margin-right: 0.2rem">
-              <Plus />
-            </el-icon>鏂板缓</el-button>
+            "
+            class="text_btn"
+            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+            >鏂板缓</el-button
+          >
           <!-- 鐢ㄦ埛瑙掕壊鏂板缓 -->
-          <el-button v-if="isactive == 2" type="primary" size="small" @click="AddRole" style="
+          <el-button
+            v-if="isactive == 2"
+            type="primary"
+            size="small"
+            @click="AddRole"
+            style="
               width: 5.5rem;
               height: 2rem;
               font-size: 0.88rem;
               display: flex;
               align-items: center;
-            "><el-icon style="margin-right: 0.2rem">
-              <Plus />
-            </el-icon>鏂板缓</el-button>
-          <el-button size="small" style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
-            @click="printExcel">鎵归噺瀵煎嚭</el-button>
-          <el-button @click="deleteAll" size="small"
-            style="width: 5.5rem; height: 2rem; font-size: 0.88rem">鎵归噺鍒犻櫎</el-button>
+            "
+            class="text_btn"
+            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+            >鏂板缓</el-button
+          >
+          <!-- 鐢ㄦ埛鐝粍鏂板缓 -->
+          <el-button
+            v-if="isactive == 3"
+            type="primary"
+            size="small"
+            @click="AddGroup"
+            style="
+              width: 5.5rem;
+              height: 2rem;
+              font-size: 0.88rem;
+              display: flex;
+              align-items: center;
+            "
+            class="text_btn"
+            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+            >鏂板缓</el-button
+          >
+          <!-- 鐢ㄦ埛鍗曚綅鏂板缓 -->
+          <el-button
+            v-if="isactive == 4"
+            type="primary"
+            size="small"
+            @click="AddUnit"
+            style="
+              width: 5.5rem;
+              height: 2rem;
+              font-size: 0.88rem;
+              display: flex;
+              align-items: center;
+            "
+            class="text_btn"
+            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
+            >鏂板缓</el-button
+          >
+          <el-button
+            size="small"
+            style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
+            @click="printExcel"
+            class="text_btn"
+            >鎵归噺瀵煎嚭</el-button
+          >
+          <el-button
+            @click="deleteAll"
+            size="small"
+            style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
+            class="text_btn"
+            >鎵归噺鍒犻櫎</el-button
+          >
         </div>
       </div>
       <div style="margin-top: 1rem; height: 100%">
         <!-- 鐢ㄦ埛鍒楄〃 -->
-        <el-table empty-text="鏆傛棤鏁版嵁" height="450" v-if="isactive == 1" :data="tableData" style="width: 100%"
-          :header-cell-style="{
-            background: 'rgba(250,250,250,1)',
-            color: '#101010',
-            fontSize: '0.88rem',
-            height: '3rem',
-            border: 'none',
-          }" :row-style="{
-            color: '#101010',
-            fontSize: '0.88rem',
-            height: '3rem',
-          }" @selection-change="UserSelectionChange">
+        <el-table
+          empty-text="鏆傛棤鏁版嵁"
+          :height="isMin ? '950' : '450'"
+          v-if="isactive == 1"
+          :data="tableData"
+          style="width: 100%"
+          :header-cell-style="
+            isMin
+              ? {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '1.5rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+              : {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+          "
+          :row-style="
+            isMin
+              ? {
+                  color: '#101010',
+                  fontSize: '2rem',
+                  height: '3rem',
+                }
+              : {
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                }
+          "
+          @selection-change="UserSelectionChange"
+        >
           <el-table-column type="selection" align="center" min-width="1%" />
-          <el-table-column prop="userName" label="鐧诲綍璐﹀彿" align="center" min-width="2%" />
-          <el-table-column prop="userTrueName" label="鐪熷疄濮撳悕" align="center" min-width="3%" />
-          <el-table-column prop="phoneNo" label="鑱旂郴鏂瑰紡" align="center" min-width="3%" />
-          <el-table-column prop="role_Id" label="鐢ㄦ埛鍒嗙粍" align="center" min-width="2%" />
-          <el-table-column prop="roleName" label="鐢ㄦ埛瑙掕壊" align="center" min-width="3%" />
-          <el-table-column prop="address" label="浜鸿劯鐓х墖" align="center" min-width="3%">
+          <el-table-column
+            prop="userName"
+            label="鐧诲綍璐﹀彿"
+            align="center"
+            min-width="2%"
+          />
+          <el-table-column
+            prop="userTrueName"
+            label="鐪熷疄濮撳悕"
+            align="center"
+            min-width="3%"
+          />
+          <el-table-column
+            prop="phoneNo"
+            label="鑱旂郴鏂瑰紡"
+            align="center"
+            min-width="3%"
+          />
+          <el-table-column
+            prop="isLeader"
+            label="鐢ㄦ埛绫诲瀷"
+            align="center"
+            min-width="2%"
+          >
             <template #default="scope">
-              <el-image style="width: 5rem; height: 5rem" :src="'http://192.168.0.80:1598' + scope.row.headImageUrl"
-                show-progress :initial-index="4" fit="cover" />
+              <span v-if="scope.row.isLeader == 0">缁勫憳</span>
+              <span v-else-if="scope.row.isLeader == 1">缁勯暱</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="unit"
+            label="鍗曚綅"
+            align="center"
+            min-width="3%"
+          />
+          <el-table-column
+            prop="userteam"
+            label="鐝粍"
+            align="center"
+            min-width="3%"
+          />
+          <el-table-column
+            prop="address"
+            label="浜鸿劯鐓х墖"
+            align="center"
+            min-width="3%"
+          >
+            <template #default="scope">
+              <el-image
+                style="width: 5rem; height: 5rem"
+                :src="'http://192.168.1.103:9093' + scope.row.headImageUrl"
+                show-progress
+                :initial-index="4"
+                fit="cover"
+              />
             </template>
           </el-table-column>
           <el-table-column label="鏄惁鍚敤" align="center" min-width="2%">
             <template #default="scope">
-              <el-switch :disabled="(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
-              )
-                " v-model="scope.row.enable" :active-value="1" :inactive-value="0" @change="changeSwitch(scope.row)" />
+              <el-switch
+                :disabled="
+                  userInfo.userName == 'admin' || userInfo.roleId == '1'
+                    ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+                    : scope.row.userName == 'admin' ||
+                      scope.row.user_Id == '1' ||
+                      scope.row.userName != userInfo.userName
+                "
+                v-model="scope.row.enable"
+                :active-value="1"
+                :inactive-value="0"
+                @change="changeSwitch(scope.row)"
+              />
             </template>
           </el-table-column>
-          <el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" align="center" min-width="3%" />
+          <el-table-column
+            prop="createDate"
+            label="鍒涘缓鏃ユ湡"
+            align="center"
+            min-width="3%"
+          />
           <el-table-column label="鎿嶄綔" align="center" min-width="3%">
             <template #default="scope">
-              <el-button size="small" type="text" @click="Edit(scope.row)" :disabled="scope.row.isdisabled
-                ">缂栬緫</el-button>
-              <el-button size="small" type="text" :disabled="scope.row.isdisabled
-                " @click="Editpassword(scope.row)">淇敼瀵嗙爜</el-button>
-              <el-button size="small" type="text" @click="deletUser(scope.row)" :disabled="scope.row.isdisabled
-                ">鍒犻櫎</el-button>
+              <el-button
+                size="small"
+                type="text"
+                @click="Edit(scope.row)"
+                :disabled="scope.row.isdisabled"
+                >缂栬緫</el-button
+              >
+              <el-button
+                size="small"
+                type="text"
+                :disabled="scope.row.isdisabled"
+                @click="Editpassword(scope.row)"
+                >淇敼瀵嗙爜</el-button
+              >
+              <el-button
+                size="small"
+                type="text"
+                @click="deletUser(scope.row)"
+                :disabled="scope.row.isdisabled"
+                >鍒犻櫎</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
 
         <!-- 鐢ㄦ埛瑙掕壊 -->
-        <el-table empty-text="鏆傛棤鏁版嵁" height="450" v-if="isactive == 2" :data="grideData" style="width: 100%"
-          :header-cell-style="{
-            background: 'rgba(250,250,250,1)',
-            color: '#101010',
-            fontSize: '0.88rem',
-            height: '3rem',
-            border: 'none',
-          }" :row-style="{
-            color: '#101010',
-            fontSize: '0.88rem',
-            height: '3rem',
-          }" @selection-change="RoleSelectionChange">
+        <el-table
+          empty-text="鏆傛棤鏁版嵁"
+          :height="isMin ? '950' : '450'"
+          v-if="isactive == 2"
+          :data="grideData"
+          style="width: 100%"
+          :header-cell-style="
+            isMin
+              ? {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '1.5rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+              : {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+          "
+          :row-style="
+            isMin
+              ? {
+                  color: '#101010',
+                  fontSize: '1.88rem',
+                  height: '3rem',
+                }
+              : {
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                }
+          "
+          @selection-change="RoleSelectionChange"
+        >
           <el-table-column type="selection" align="center" />
           <el-table-column prop="roleName" label="瑙掕壊鍚嶇О" align="center" />
           <el-table-column prop="name" label="瑙掕壊鏉冮檺" align="center">
             <template #default="scope">
-              <span v-if="
-                !(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
-                )
-              " @click="toDetail(scope.row)" style="color: #4386ff; cursor: pointer">绠$悊</span>
+              <span
+                v-if="
+                  !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+                    ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+                    : scope.row.userName == 'admin' ||
+                      scope.row.user_Id == '1' ||
+                      scope.row.userName != userInfo.userName)
+                "
+                @click="toDetail(scope.row)"
+                style="color: #4386ff; cursor: pointer"
+                >绠$悊</span
+              >
+            </template>
+          </el-table-column>
+          <el-table-column prop="isLeader" label="缁勫憳绫诲瀷" align="center">
+            <template #default="scope">
+              <span v-if="scope.row.isLeader == 0">缁勫憳</span>
+              <span v-else-if="scope.row.isLeader == 1">缁勯暱</span>
             </template>
           </el-table-column>
           <el-table-column prop="deptName" label="澶囨敞" align="center" />
           <el-table-column label="鏄惁鍚敤" align="center">
             <template #default="scope">
-              <el-switch :disabled="!(userInfo.userName == 'admin' || userInfo.roleId == '1'
-              )
-                " v-model="scope.row.enable" :active-value="1" :inactive-value="0"
-                @change="changeRoleSwitch(scope.row)" />
+              <el-switch
+                :disabled="
+                  !(userInfo.userName == 'admin' || userInfo.roleId == '1')
+                "
+                v-model="scope.row.enable"
+                :active-value="1"
+                :inactive-value="0"
+                @change="changeRoleSwitch(scope.row)"
+              />
             </template>
           </el-table-column>
           <el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" align="center" />
           <el-table-column label="鎿嶄綔" align="center">
             <template #default="scope">
-              <span v-if="
-                !(userInfo.userName == 'admin' || userInfo.roleId == '1' ? scope.row.userName == 'admin' || scope.row.user_Id == '1' : scope.row.userName == 'admin' || scope.row.user_Id == '1' || scope.row.userName != userInfo.userName
-                )
-              " style="color: blue; font-size: 0.88rem; cursor: pointer" @click="EditRole(scope.row)">缂栬緫</span>
-            </template></el-table-column>
+              <span
+                v-if="
+                  !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+                    ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+                    : scope.row.userName == 'admin' ||
+                      scope.row.user_Id == '1' ||
+                      scope.row.userName != userInfo.userName)
+                "
+                :style="{
+                  color: 'blue',
+                  fontSize: isMin ? '1.88rem' : '0.88rem',
+                  cursor: 'pointer',
+                }"
+                @click="EditRole(scope.row)"
+                >缂栬緫</span
+              >
+            </template></el-table-column
+          >
+        </el-table>
+
+        <!-- 鐢ㄦ埛鐝粍 -->
+        <el-table
+          empty-text="鏆傛棤鏁版嵁"
+          :height="isMin ? '950' : '450'"
+          v-if="isactive == 3"
+          :data="departmentData"
+          style="width: 100%"
+          :header-cell-style="
+            isMin
+              ? {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '1.5rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+              : {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+          "
+          :row-style="
+            isMin
+              ? {
+                  color: '#101010',
+                  fontSize: '1.88rem',
+                  height: '3rem',
+                }
+              : {
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                }
+          "
+          @selection-change="TreamSelectionChange"
+        >
+          <el-table-column type="selection" align="center" />
+          <el-table-column prop="teamName" label="鐝粍鍚嶇О" align="center" />
+          <el-table-column prop="creater" label="鍒涘缓鑰�" align="center" />
+          <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" align="center" />
+          <el-table-column label="鎿嶄綔" align="center">
+            <template #default="scope">
+              <span
+                v-if="
+                  !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+                    ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+                    : scope.row.userName == 'admin' ||
+                      scope.row.user_Id == '1' ||
+                      scope.row.userName != userInfo.userName)
+                "
+                :style="{
+                  color: 'blue',
+                  fontSize: isMin ? '1.88rem' : '0.88rem',
+                  cursor: 'pointer',
+                }"
+                @click="EditTream(scope.row)"
+                >缂栬緫</span
+              >
+            </template></el-table-column
+          >
+        </el-table>
+
+        <!-- 鐢ㄦ埛鍗曚綅 -->
+        <el-table
+          empty-text="鏆傛棤鏁版嵁"
+          :height="isMin ? '950' : '450'"
+          v-if="isactive == 4"
+          :data="unitData"
+          style="width: 100%"
+          :header-cell-style="
+            isMin
+              ? {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '1.5rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+              : {
+                  background: 'rgba(250,250,250,1)',
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                  border: 'none',
+                }
+          "
+          :row-style="
+            isMin
+              ? {
+                  color: '#101010',
+                  fontSize: '1.88rem',
+                  height: '3rem',
+                }
+              : {
+                  color: '#101010',
+                  fontSize: '0.88rem',
+                  height: '3rem',
+                }
+          "
+          @selection-change="UnitSelectionChange"
+        >
+          <el-table-column type="selection" align="center" />
+          <el-table-column prop="unitName" label="鍗曚綅鍚嶇О" align="center" />
+          <el-table-column prop="creater" label="鍒涘缓鑰�" align="center" />
+          <el-table-column prop="createDate" label="鍒涘缓鏃ユ湡" align="center" />
+          <el-table-column label="鎿嶄綔" align="center">
+            <template #default="scope">
+              <span
+                v-if="
+                  !(userInfo.userName == 'admin' || userInfo.roleId == '1'
+                    ? scope.row.userName == 'admin' || scope.row.user_Id == '1'
+                    : scope.row.userName == 'admin' ||
+                      scope.row.user_Id == '1' ||
+                      scope.row.userName != userInfo.userName)
+                "
+                :style="{
+                  color: 'blue',
+                  fontSize: isMin ? '1.88rem' : '0.88rem',
+                  cursor: 'pointer',
+                }"
+                @click="EditUnit(scope.row)"
+                >缂栬緫</span
+              >
+            </template></el-table-column
+          >
         </el-table>
       </div>
-      <div style="
+      <div
+        style="
           display: flex;
           justify-content: right;
           align-self: flex-end;
           margin-bottom: 1.19rem;
           margin-right: 1.25rem;
-        ">
-        <el-pagination v-if="isactive == 1" size="small" background layout="prev, pager, next"
-          :current-page="pageQuery.page" :page-size="pageQuery.rows" :total="pageTotal" @size-change="handleSizeChange"
-          @current-change="handleCurrentChange" />
+        "
+      >
+        <el-pagination
+          v-if="isactive == 1"
+          size="small"
+          background
+          layout="prev, pager, next"
+          :current-page="pageQuery.page"
+          :page-size="pageQuery.rows"
+          :total="pageTotal"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
       </div>
     </div>
 
     <!-- 鐢ㄦ埛淇℃伅鏂板缓缂栬緫寮瑰嚭妗� -->
-    <el-dialog v-model="dialogVisible" title="" width="60%" :before-close="handleClose" :show-close="false"
-      :align-center="true" @close="resetForm(formUserRef)">
+    <el-dialog
+      v-model="dialogVisible"
+      title=""
+      width="60%"
+      :before-close="handleClose"
+      :show-close="false"
+      :align-center="true"
+      @close="resetForm(formUserRef)"
+    >
       <template #title>
-        <div style="
+        <div
+          style="
             height: 3.63rem;
             display: flex;
             border-bottom: 1px solid #e6e6e6;
-          ">
-          <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛淇℃伅</span>
+          "
+        >
+          <span
+            style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
+            class="font-title"
+            >鐢ㄦ埛淇℃伅</span
+          >
         </div>
       </template>
-      <el-form :model="formUser" label-width="auto" label-position="top" :rules="rules" ref="formUserRef"
-        :hide-required-asterisk="true">
+      <el-form
+        :model="formUser"
+        label-width="auto"
+        label-position="top"
+        :rules="rules"
+        ref="formUserRef"
+        :hide-required-asterisk="true"
+      >
         <el-row :gutter="20">
           <el-col :span="8">
             <el-form-item prop="username">
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鐧诲綍璐﹀彿</span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鐧诲綍璐﹀彿</span
+                  >
                 </div>
               </template>
-              <el-input size="small" v-model="formUser.username" placeholder="璇疯緭鍏�" />
+              <el-input
+                size="small"
+                v-model="formUser.username"
+                placeholder="璇疯緭鍏�"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -196,10 +636,18 @@
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鐪熷疄濮撳悕</span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鐪熷疄濮撳悕</span
+                  >
                 </div>
               </template>
-              <el-input size="small" v-model="formUser.usertruename" placeholder="璇疯緭鍏�" />
+              <el-input
+                size="small"
+                v-model="formUser.usertruename"
+                placeholder="璇疯緭鍏�"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -207,10 +655,18 @@
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鑱旂郴鐢佃瘽</span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鑱旂郴鐢佃瘽</span
+                  >
                 </div>
               </template>
-              <el-input size="small" v-model="formUser.phoneno" placeholder="璇疯緭鍏�" />
+              <el-input
+                size="small"
+                v-model="formUser.phoneno"
+                placeholder="璇疯緭鍏�"
+              />
             </el-form-item>
           </el-col>
         </el-row>
@@ -220,27 +676,52 @@
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鐢ㄦ埛瑙掕壊
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鐢ㄦ埛瑙掕壊
                   </span>
                 </div>
               </template>
-              <el-select v-model="formUser.roleid" placeholder="璇烽�夋嫨" size="small">
-                <el-option :disabled="item.roleId == 1" v-for="item in groupOptions" :key="item.roleId"
-                  :label="item.roleName" :value="item.roleId" />
+              <el-select
+                v-model="formUser.roleid"
+                placeholder="璇烽�夋嫨"
+                size="small"
+                @change="handleRoleChange"
+              >
+                <el-option
+                  :disabled="item.roleId == 1"
+                  v-for="item in groupOptions"
+                  :key="item.roleId"
+                  :label="item.roleName"
+                  :value="item.roleId"
+                />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item prop="rolename">
+            <el-form-item prop="userunit">
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鐢ㄦ埛绫诲瀷
-                  </span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鍗曚綅</span
+                  >
                 </div>
               </template>
-              <el-select v-model="formUser.rolename" placeholder="璇烽�夋嫨" size="small">
-                <el-option v-for="item in roleNameList" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model="formUser.userunit"
+                placeholder="璇烽�夋嫨"
+                size="small"
+              >
+                <el-option
+                  v-for="item in unitData"
+                  :key="item.id"
+                  :label="item.unitName"
+                  :value="item.unitName"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -249,52 +730,111 @@
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">鏄惁鍚敤</span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鏄惁鍚敤</span
+                  >
                 </div>
               </template>
-              <el-select v-model="formUser.enable" placeholder="璇烽�夋嫨" size="small">
-                <el-option v-for="item in isoptins" :key="item.value" :label="item.label" :value="item.value" />
+              <el-select
+                v-model="formUser.enable"
+                placeholder="璇烽�夋嫨"
+                size="small"
+              >
+                <el-option
+                  v-for="item in isoptins"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                />
               </el-select>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="8">
+            <el-form-item prop="userteam">
+              <template #label>
+                <div style="display: flex; align-items: flex-end">
+                  <span style="color: red; margin-right: 0.2rem">*</span>
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >鐝粍</span
+                  >
+                </div>
+              </template>
+              <el-select
+                v-model="formUser.userteam"
+                placeholder="璇烽�夋嫨"
+                size="small"
+              >
+                <el-option
+                  v-for="item in departmentData"
+                  :key="item.id"
+                  :label="item.teamName"
+                  :value="item.teamName"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
             <el-form-item>
               <template #label>
                 <div style="display: flex; align-items: flex-end">
                   <span style="color: red; margin-right: 0.2rem">*</span>
-                  <span style="font-size: 0.88rem; color: black; font-weight: bold">浜鸿劯鍥剧墖</span>
-                  <!-- <span
-                    style="
-                      color: rgba(255, 0, 0, 1);
-                      font-size: 0.75rem;
-                      margin-left: 0.5rem;
-                    "
-                    >娉細鏈�澶氬彲涓婁紶涓夊紶锛屽浘鐗囬渶瑕佹瑙勭殑浜哄儚璇佷欢鐓�</span
-                  > -->
+                  <span
+                    style="font-size: 0.88rem; color: black; font-weight: bold"
+                    class="from_title"
+                    >浜鸿劯鍥剧墖</span
+                  >
                 </div>
               </template>
-              <el-upload ref="uploadRef" name="files" class="avatar-uploader"
-                action="http://192.168.0.80:1598/api/User/SaveFiles" list-type="picture-card" limit="1"
-                :auto-upload="true" @before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess"
-                :file-list="fileList != [] ? fileList : []" :class="{ hide: showUpload }">
+              <el-upload
+                ref="uploadRef"
+                name="files"
+                class="avatar-uploader"
+                action="http://192.168.1.103:9093/api/User/SaveFiles"
+                list-type="picture-card"
+                limit="1"
+                :auto-upload="true"
+                @before-upload="beforeAvatarUpload"
+                :on-success="handleAvatarSuccess"
+                :file-list="fileList != [] ? fileList : []"
+                :class="{ hide: showUpload }"
+              >
                 <el-icon>
                   <Plus />
                 </el-icon>
                 <template #file="{ file }">
                   <div>
-                    <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+                    <img
+                      class="el-upload-list__item-thumbnail"
+                      :src="file.url"
+                      alt=""
+                    />
                     <span class="el-upload-list__item-actions">
-                      <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+                      <span
+                        class="el-upload-list__item-preview"
+                        @click="handlePictureCardPreview(file)"
+                      >
                         <el-icon size="15"><zoom-in /></el-icon>
                       </span>
-                      <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
+                      <span
+                        v-if="!disabled"
+                        class="el-upload-list__item-delete"
+                        @click="handleDownload(file)"
+                      >
                         <el-icon size="15">
                           <Download />
                         </el-icon>
                       </span>
-                      <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                      <span
+                        v-if="!disabled"
+                        class="el-upload-list__item-delete"
+                        @click="handleRemove(file)"
+                      >
                         <el-icon size="15">
                           <Delete />
                         </el-icon>
@@ -309,31 +849,59 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer" style="text-align: center">
-          <el-button size="small" @click="dialogVisible = false" style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+          <el-button
+            size="small"
+            @click="dialogVisible = false"
+            style="height: 2rem; font-size: 0.88rem"
+            >鍙栨秷</el-button
+          >
 
-          <el-button size="small" type="primary" @click="saveObj(formUserRef)" style="height: 2rem; font-size: 0.88rem">
+          <el-button
+            size="small"
+            type="primary"
+            @click="saveObj(formUserRef)"
+            style="height: 2rem; font-size: 0.88rem"
+          >
             淇濆瓨
           </el-button>
         </div>
       </template>
     </el-dialog>
 
-    <!-- 鐢ㄦ埛淇℃伅淇敼瀵嗙爜寮瑰嚭妗� -->
-    <el-dialog v-model="dialogVisible1" title="" width="30%" :before-close="handleClose" :show-close="false"
-      :align-center="true">
+    <!-- 鐢ㄦ埛淇敼瀵嗙爜寮瑰嚭妗� -->
+    <el-dialog
+      v-model="dialogVisible1"
+      title=""
+      width="30%"
+      :before-close="handleClose"
+      :show-close="false"
+      :align-center="true"
+    >
       <template #title>
-        <div style="
+        <div
+          style="
             height: 3.63rem;
             display: flex;
             border-bottom: 1px solid #e6e6e6;
-          ">
-          <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛淇℃伅</span>
+          "
+        >
+          <span
+            style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
+            >鐢ㄦ埛淇℃伅</span
+          >
         </div>
       </template>
-      <el-form :model="newobj" label-width="auto" label-position="top" ref="formpasswordRef" :rules="passwordrules">
+      <el-form
+        :model="newobj"
+        label-width="auto"
+        label-position="top"
+        ref="formpasswordRef"
+        :rules="passwordrules"
+      >
         <el-row>
           <el-col>
-            <div style="
+            <div
+              style="
                 height: 3.63rem;
                 display: flex;
                 align-items: center;
@@ -341,23 +909,42 @@
                 padding: 0 2rem;
                 box-sizing: border-box;
                 border-radius: 0.25rem;
-              ">
-              <span style="color: #51b820; font-size: 1rem">璐﹀彿锛歿{ formpassword.userName }}</span><span
-                style="color: #51b820; font-size: 1rem; margin-left: 2rem">鐢ㄦ埛锛歿{ formpassword.roleName }}</span>
+              "
+            >
+              <span style="color: #51b820; font-size: 1rem" class="formpassword"
+                >璐﹀彿锛歿{ formpassword.userName }}</span
+              ><span
+                style="color: #51b820; font-size: 1rem; margin-left: 2rem"
+                class="formpassword"
+                >鐢ㄦ埛锛歿{ formpassword.roleName }}</span
+              >
             </div>
           </el-col>
         </el-row>
         <el-form-item prop="newPwd">
-          <el-input style="margin-top: 1rem" size="large" v-model="newobj.newPwd" placeholder="璇疯緭鍏�" />
+          <el-input
+            style="margin-top: 1rem"
+            size="large"
+            v-model="newobj.newPwd"
+            placeholder="璇疯緭鍏�"
+          />
         </el-form-item>
       </el-form>
       <template #footer>
         <div class="dialog-footer" style="text-align: center">
-          <el-button size="small" @click="dialogVisible1 = false"
-            style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+          <el-button
+            size="small"
+            @click="dialogVisible1 = false"
+            style="height: 2rem; font-size: 0.88rem"
+            >鍙栨秷</el-button
+          >
 
-          <el-button size="small" type="primary" @click="savePassword(formpasswordRef)"
-            style="height: 2rem; font-size: 0.88rem">
+          <el-button
+            size="small"
+            type="primary"
+            @click="savePassword(formpasswordRef)"
+            style="height: 2rem; font-size: 0.88rem"
+          >
             淇濆瓨
           </el-button>
         </div>
@@ -365,44 +952,311 @@
     </el-dialog>
 
     <!-- 鐢ㄦ埛瑙掕壊鏂板缓 -->
-    <el-dialog v-model="dialogVisible2" title="" width="20%" :before-close="handleClose" :show-close="false"
-      :align-center="true" @close="resetForm1(formRoleRef)">
+    <el-dialog
+      v-model="dialogVisible2"
+      title=""
+      width="20%"
+      :before-close="handleClose"
+      :show-close="false"
+      :align-center="true"
+      @close="resetForm1(formRoleRef)"
+    >
       <template #title>
-        <div style="
+        <div
+          style="
             height: 3.63rem;
             display: flex;
             border-bottom: 1px solid #e6e6e6;
-          ">
-          <span style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold">鐢ㄦ埛瑙掕壊</span>
+          "
+        >
+          <span
+            :style="{
+              color: 'rgb(16, 16, 16)',
+              fontSize: isMin ? '2rem' : '1rem',
+              fontWeight: 'bold',
+            }"
+            >鐢ㄦ埛瑙掕壊</span
+          >
         </div>
       </template>
-      <el-form :model="formRole" label-width="auto" label-position="top" ref="formRoleRef" :rules="roleRules"
-        :hide-required-asterisk="true">
+      <el-form
+        :model="formRole"
+        label-width="auto"
+        label-position="top"
+        ref="formRoleRef"
+        :rules="roleRules"
+        :hide-required-asterisk="true"
+      >
         <el-form-item prop="roleName">
           <template #label>
             <div style="display: flex; align-items: flex-end">
-              <span style="color: red; margin-right: 0.2rem">*</span>
-              <span style="font-size: 0.88rem; color: black; font-weight: bold">瑙掕壊鍚嶇О</span>
+              <span
+                :style="{
+                  color: 'red',
+                  marginRight: '0.2rem',
+                  fontSize: '2rem',
+                }"
+                >*</span
+              >
+              <span
+                :style="{
+                  fontSize: isMin ? '2rem' : '0.88rem',
+                  color: 'black',
+                  fontWeight: bold,
+                }"
+                >瑙掕壊鍚嶇О</span
+              >
             </div>
           </template>
-          <el-input style="height: 2rem" size="small" v-model="formRole.roleName" placeholder="璇疯緭鍏�" />
+          <el-input
+            style="height: 2rem"
+            size="small"
+            v-model="formRole.roleName"
+            placeholder="璇疯緭鍏�"
+          />
+        </el-form-item>
+        <el-form-item prop="isLeader">
+          <template #label>
+            <div style="display: flex; align-items: flex-end">
+              <span
+                :style="{
+                  color: 'red',
+                  marginRight: '0.2rem',
+                  fontSize: '2rem',
+                }"
+                >*</span
+              >
+              <span
+                :style="{
+                  fontSize: isMin ? '2rem' : '0.88rem',
+                  color: 'black',
+                  fontWeight: bold,
+                }"
+                >缁勫憳绫诲瀷</span
+              >
+            </div>
+          </template>
+          <el-select
+            v-model="formRole.isLeader"
+            placeholder="璇烽�夋嫨"
+            size="small"
+          >
+            <el-option
+              v-for="item in rolekey"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item>
           <template #label>
             <div style="display: flex; align-items: flex-end">
-              <span style="font-size: 0.88rem; color: black; font-weight: bold">澶囨敞</span>
+              <span
+                :style="{
+                  fontSize: isMin ? '2rem' : '0.88rem',
+                  color: 'black',
+                  fontWeight: 'bold',
+                }"
+                >澶囨敞</span
+              >
             </div>
           </template>
-          <el-input style="height: 2rem" size="small" v-model="formRole.description" placeholder="璇疯緭鍏�" />
+          <el-input
+            style="height: 2rem"
+            size="small"
+            v-model="formRole.description"
+            placeholder="璇疯緭鍏�"
+          />
         </el-form-item>
       </el-form>
       <template #footer>
         <div class="dialog-footer" style="text-align: center">
-          <el-button size="small" @click="dialogVisible2 = false"
-            style="height: 2rem; font-size: 0.88rem">鍙栨秷</el-button>
+          <el-button
+            size="small"
+            @click="dialogVisible2 = false"
+            style="height: 2rem; font-size: 0.88rem"
+            >鍙栨秷</el-button
+          >
 
-          <el-button size="small" type="primary" @click="saveRole(formRoleRef)"
-            style="height: 2rem; font-size: 0.88rem">
+          <el-button
+            size="small"
+            type="primary"
+            @click="saveRole(formRoleRef)"
+            style="height: 2rem; font-size: 0.88rem"
+          >
+            淇濆瓨
+          </el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 鐢ㄦ埛鐝粍鏂板缓/缂栬緫 -->
+    <el-dialog
+      v-model="TreamdialogVisible"
+      title=""
+      width="20%"
+      :before-close="handleClose"
+      :show-close="false"
+      :align-center="true"
+      @close="resetForm2(formTreamdRef)"
+    >
+      <template #title>
+        <div
+          style="
+            height: 3.63rem;
+            display: flex;
+            border-bottom: 1px solid #e6e6e6;
+          "
+        >
+          <span
+            :style="{
+              color: 'rgb(16, 16, 16)',
+              fontSize: isMin ? '2rem' : '1rem',
+              fontWeight: 'bold',
+            }"
+            >鐢ㄦ埛鐝粍</span
+          >
+        </div>
+      </template>
+      <el-form
+        :model="formTeam"
+        label-width="auto"
+        label-position="top"
+        ref="formTreamdRef"
+        :rules="roleRules"
+        :hide-required-asterisk="true"
+      >
+        <el-form-item prop="teamName">
+          <template #label>
+            <div style="display: flex; align-items: flex-end">
+              <span
+                :style="{
+                  color: 'red',
+                  marginRight: '0.2rem',
+                  fontSize: '2rem',
+                }"
+                >*</span
+              >
+              <span
+                :style="{
+                  fontSize: isMin ? '2rem' : '0.88rem',
+                  color: 'black',
+                  fontWeight: bold,
+                }"
+                >鐝粍鍚嶇О</span
+              >
+            </div>
+          </template>
+          <el-input
+            style="height: 2rem"
+            size="small"
+            v-model="formTeam.teamName"
+            placeholder="璇疯緭鍏�"
+          />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer" style="text-align: center">
+          <el-button
+            size="small"
+            @click="TreamdialogVisible = false"
+            style="height: 2rem; font-size: 0.88rem"
+            >鍙栨秷</el-button
+          >
+
+          <el-button
+            size="small"
+            type="primary"
+            @click="saveTream(formTreamdRef)"
+            style="height: 2rem; font-size: 0.88rem"
+          >
+            淇濆瓨
+          </el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 鐢ㄦ埛鍗曚綅鏂板缓/缂栬緫 -->
+    <el-dialog
+      v-model="UnitdialogVisible"
+      title=""
+      width="20%"
+      :before-close="handleClose"
+      :show-close="false"
+      :align-center="true"
+      @close="resetForm3(formUnitRef)"
+    >
+      <template #title>
+        <div
+          style="
+            height: 3.63rem;
+            display: flex;
+            border-bottom: 1px solid #e6e6e6;
+          "
+        >
+          <span
+            :style="{
+              color: 'rgb(16, 16, 16)',
+              fontSize: isMin ? '2rem' : '1rem',
+              fontWeight: 'bold',
+            }"
+            >鐢ㄦ埛鍗曚綅</span
+          >
+        </div>
+      </template>
+      <el-form
+        :model="formUnit"
+        label-width="auto"
+        label-position="top"
+        ref="formUnitRef"
+        :rules="roleRules"
+        :hide-required-asterisk="true"
+      >
+        <el-form-item prop="unitName">
+          <template #label>
+            <div style="display: flex; align-items: flex-end">
+              <span
+                :style="{
+                  color: 'red',
+                  marginRight: '0.2rem',
+                  fontSize: '2rem',
+                }"
+                >*</span
+              >
+              <span
+                :style="{
+                  fontSize: isMin ? '2rem' : '0.88rem',
+                  color: 'black',
+                  fontWeight: bold,
+                }"
+                >鍗曚綅鍚嶇О</span
+              >
+            </div>
+          </template>
+          <el-input
+            style="height: 2rem"
+            size="small"
+            v-model="formUnit.unitName"
+            placeholder="璇疯緭鍏�"
+          />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer" style="text-align: center">
+          <el-button
+            size="small"
+            @click="UnitdialogVisible = false"
+            style="height: 2rem; font-size: 0.88rem"
+            >鍙栨秷</el-button
+          >
+
+          <el-button
+            size="small"
+            type="primary"
+            @click="saveUnit(formUnitRef)"
+            style="height: 2rem; font-size: 0.88rem"
+          >
             淇濆瓨
           </el-button>
         </div>
@@ -410,15 +1264,21 @@
     </el-dialog>
 
     <el-dialog v-model="imgdialogVisible" width="35%" top="3vh">
-      <div style="
+      <div
+        style="
           width: 100%;
           height: 100%;
           display: flex;
           justify-content: center;
           align-items: center;
-        ">
-        <img w-full style="width: 100%;
-          height: 100%;" :src="dialogImageUrl" alt="Preview Image" />
+        "
+      >
+        <img
+          w-full
+          style="width: 100%; height: 100%"
+          :src="dialogImageUrl"
+          alt="Preview Image"
+        />
       </div>
     </el-dialog>
   </div>
@@ -433,12 +1293,17 @@
   DelApi,
   ExportApi,
   ExportApi1,
-  UpdatePassword,
   UpdatePwd,
-  AddUserApi,
-  EditUserApi,
   DeleteUserData,
-  IsEnabled
+  GetDepartment,
+  GetUserTeam,
+  AddUserTeam,
+  EditUserTeam,
+  DeleteUserTeam,
+  GetUserUnit,
+  AddUserUnit,
+  EditUserUnit,
+  DeleteUserUnit,
 } from "@/api/user";
 import { useRouter } from "vue-router";
 import { formatTime } from "@/utils/index.js";
@@ -460,11 +1325,13 @@
 
 const tableData = ref([]);
 const grideData = ref([]);
+//鐢ㄦ埛鐝粍
+const departmentData = ref([]);
+//鐢ㄦ埛鍗曚綅
+const unitData = ref([]);
 //鏂板缓鐢ㄦ埛ref
 const formUserRef = ref();
-const options = ref([]);
-const props = { multiple: true };
-const userInfo = ref()
+const userInfo = ref();
 const isoptins = ref([
   {
     value: 0,
@@ -472,25 +1339,30 @@
   },
   { value: 1, label: "鏄�" },
 ]);
-//鍒嗙粍
+//瑙掕壊
 const groupOptions = ref([]);
 const formUser = ref({
   id: undefined,
   username: "",
   phoneno: "",
-  roleid: 2,
+  roleid: null,
   rolename: "",
   enable: 1,
   path: "",
   usertruename: "",
+  dept_Id: 1,
+  carnuber: null,
+  userteam: "",
+  isLeader: 0,
+  userunit: "",
 });
 const rules = reactive({
-  userName: {
+  username: {
     required: true,
     message: "璇疯緭鍏ョ敤鎴峰悕",
     trigger: "blur",
   },
-  role_Id: {
+  roleid: {
     required: true,
     message: "璇烽�夋嫨瑙掕壊",
     trigger: "change",
@@ -507,18 +1379,27 @@
     message: "璇疯緭鍏ュ鍚�",
     trigger: "blur",
   },
-  phoneNo: {
+  phoneno: {
     required: true,
     message: "璇疯緭鍏ユ墜鏈哄彿",
     trigger: "blur",
   },
-  userTrueName: {
+  usertruename: {
     required: true,
     message: "璇疯緭鍏ョ湡瀹炲鍚�",
     trigger: "blur",
   },
+  userteam: {
+    required: true,
+    message: "璇疯緭鍏ョ粍",
+    trigger: "blur",
+  },
+  userunit: {
+    required: true,
+    message: "璇烽�夋嫨鍗曚綅",
+    trigger: "blur",
+  },
 });
-
 const formpasswordRef = ref();
 const isactive = ref(1);
 const dialogVisible = ref(false);
@@ -544,21 +1425,26 @@
   },
 ];
 const fileList = ref([]);
-const roleNameList = ref([
-  { value: "鐢垫皵璐ㄦ", label: "鐢垫皵璐ㄦ" },
-  { value: "鏈烘璐ㄦ", label: "鏈烘璐ㄦ" },
-  { value: "鍦版矡璐ㄦ", label: "鍦版矡璐ㄦ" },
-  { value: "鐢垫皵鍔涚煩", label: "鐢垫皵鍔涚煩" },
-  { value: "鐢垫皵杈呭姪", label: "鐢垫皵杈呭姪" },
-  { value: "鏈烘鍔涚煩", label: "鏈烘鍔涚煩" },
-  { value: "鏈烘杈呭姪", label: "鏈烘杈呭姪" },
-  { value: "鍦版矡鍔涚煩", label: "鍦版矡鍔涚煩" },
-  { value: "鍦版矡杈呭姪", label: "鍦版矡杈呭姪" },
+const rolekey = ref([
+  { value: 1, label: "缁勯暱" },
+  { value: 0, label: "缁勫憳" },
 ]);
 const roleOptions = [
   {
     value: "roleName",
     label: "瑙掕壊鍚嶇О",
+  },
+];
+const treamOptions = [
+  {
+    value: "teamName",
+    label: "鐝粍鍚嶇О",
+  },
+];
+const unitOptions = [
+  {
+    value: "unitName",
+    label: "鍗曚綅鍚嶇О",
   },
 ];
 const selectoptions = ref([]);
@@ -583,11 +1469,14 @@
     },
   ],
 });
-
 const uploadRef = ref();
-const showUpload = ref(false)
+const showUpload = ref(false);
 const pageTotal = ref(0);
-//鐧诲綍璁板綍
+const isMin = ref(false);
+const newRole = ref({});
+//鑾峰彇閮ㄩ棬
+const departmentOptions = ref([]);
+
 const initData = () => {
   // 鏌ヨ鏉′欢
   const startTime = formatTime(queryForm.value.selectTime[0]);
@@ -602,18 +1491,52 @@
     { name: "createDate", value: endTime, displayType: "LessOrEqual" },
   ];
   GetUserList({
-    ...pageQuery.value,
-    filter,
+    pageIndex: 1,
+    pageSize: 10,
+    searchKeyword: "",
+    startDate: formatTime(queryForm.value.selectTime[0]),
+    endDate: formatTime(queryForm.value.selectTime[1]),
+    status: 0,
+    sortField: "",
+    sortOrder: "",
+    account: "",
   }).then((res) => {
-    tableData.value = res.rows.map((item) => {
+    tableData.value = res.data.items.map((item) => {
       return {
         ...item,
-        isdisabled: userInfo.value.userName == 'admin' || userInfo.value.roleId == "1" ? item.userName == "admin" || item.user_Id == "1" : item.userName == "admin" || item.user_Id == "1" || item.userName != userInfo.value.userName
+        isdisabled:
+          userInfo.value.userName == "admin" || userInfo.value.roleId == "1"
+            ? item.userName == "admin" || item.user_Id == "1"
+            : item.userName == "admin" ||
+              item.user_Id == "1" ||
+              item.userName != userInfo.value.userName,
       };
     });
-    pageTotal.value = res.total;
+    pageTotal.value = res.data.totalCount;
   });
-
+  getDepartment();
+};
+const getDepartment = () => {
+  GetDepartment({
+    page: 1,
+    rows: 100,
+    total: 0,
+    tableName: "string",
+    sort: "string",
+    order: "string",
+    wheres: "string",
+    export: true,
+    value: "string",
+    filter: [
+      {
+        name: "string",
+        value: "string",
+        displayType: "string",
+      },
+    ],
+  }).then((res) => {
+    departmentOptions.value = res.rows;
+  });
 };
 //鍒嗛〉璇锋眰鍙傛暟
 const pageQuery = ref({
@@ -675,11 +1598,14 @@
   formUser.value = {
     username: "",
     phoneno: "",
-    roleid: 20,
+    roleid: null,
     rolename: "",
     enable: 1,
     path: "",
     user_Id: undefined,
+    userteam: "",
+    carnuber: null,
+    isLeader: 0,
   };
   fileList.value = [];
 };
@@ -689,6 +1615,20 @@
   formRole.value = {
     roleName: "",
     description: "",
+  };
+};
+const resetForm2 = (formEl) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  formTeam.value = {
+    teamName: "",
+  };
+};
+const resetForm3 = (formEl) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  formUnit.value = {
+    unitName: "",
   };
 };
 
@@ -707,19 +1647,33 @@
 const beforeAvatarUpload = (val) => {
   console.log(val);
 };
+const handleRoleChange = (val) => {
+  groupOptions.value.find((item) => {
+    if (item.roleId == val) {
+      newRole.value = item;
+    }
+  });
+};
 //鏂板缓鐢ㄦ埛璐﹀彿
 const saveObj = async (formEl) => {
-  // submitUpload();
   if (!formEl) return;
   await formEl.validate((valid, fields) => {
     if (valid) {
       if (formUser.value.id != undefined) {
+        // if (!formUser.value.userteam.includes("缁�")) {
+        //   formUser.value.userteam = formUser.value.userteam + "缁�";
+        // }
+        formUser.value.isLeader = newRole.value.isLeader;
         UpdateUser(formUser.value).then((res) => {
           ElMessage({ message: "淇敼鎴愬姛", type: "success" });
           dialogVisible.value = false;
           initData();
         });
       } else {
+        // if (!formUser.value.userteam.includes("缁�")) {
+        //   formUser.value.userteam = formUser.value.userteam + "缁�";
+        // }
+        formUser.value.isLeader = newRole.value.isLeader;
         AddUser(formUser.value).then((res) => {
           ElMessage({ message: "鎻愪氦鎴愬姛", type: "success" });
           dialogVisible.value = false;
@@ -767,6 +1721,10 @@
     enable: val.enable,
     path: val.headImageUrl,
     usertruename: val.userTrueName,
+    cardNumber: val.cardNumber,
+    userteam: val.userteam,
+    userunit: val.unit,
+    dept_Id: val.dept_Id,
   };
   UpdateUser(data).then((res) => {
     ElMessage({ message: "淇敼鎴愬姛", type: "success" });
@@ -796,15 +1754,20 @@
     enable: val.enable,
     path: val.headImageUrl,
     usertruename: val.userTrueName,
+    carnuber: val.cardNumber,
+    userteam: val.userteam,
+    dept_Id: val.dept_Id,
+    isLeader: val.isLeader,
+    userunit: val.unit,
   };
   formUser.value = {
     ...obj,
   };
-  if (obj.headImageUrl != "") {
+  if (obj.headImageUrl != null) {
     fileList.value = [
       {
         name: "1",
-        url: "http://115.159.85.185:9098" + obj.headImageUrl,
+        url: "http://192.168.1.103:9093" + obj.headImageUrl,
       },
     ];
   }
@@ -817,21 +1780,17 @@
   let obj = Object.assign({}, val);
   formUser.value = obj;
   formpassword.value = val;
-  newobj.value = Object.assign({}, val);
-  console.log(newobj.value);
-
   dialogVisible1.value = true;
 };
 //淇濆瓨淇敼瀵嗙爜
 const savePassword = async (formEl) => {
   let obj = Object.assign({}, newobj);
   // obj.password = formpassword.value.password;
-  console.log(formUser.value);
 
   let formdata = {
     id: formUser.value.user_Id,
     oldPwd: formUser.value.userPwd,
-    newPwd: formUser.value.newPwd,
+    newPwd: newobj.value.newPwd,
   };
   if (!formEl) return;
   await formEl.validate((valid, fields) => {
@@ -856,6 +1815,16 @@
   description: {
     required: true,
     message: "璇疯緭鍏ヨ鑹叉弿杩�",
+    trigger: "blur",
+  },
+  teamName: {
+    required: true,
+    message: "璇疯緭鍏ョ彮缁勫悕绉�",
+    trigger: "blur",
+  },
+  unitName: {
+    required: true,
+    message: "璇疯緭鍏ュ崟浣嶅悕绉�",
     trigger: "blur",
   },
 });
@@ -901,6 +1870,20 @@
   let obj = Object.assign({}, val);
   formRole.value = obj;
   dialogVisible2.value = true;
+};
+//缂栬緫鐝粍
+const EditTream = (val) => {
+  Treamtype.value = "淇敼";
+  let obj = Object.assign({}, val);
+  formTeam.value = obj;
+  TreamdialogVisible.value = true;
+};
+//缂栬緫鍗曚綅
+const EditUnit = (val) => {
+  Unittype.value = "淇敼";
+  let obj = Object.assign({}, val);
+  formUnit.value = obj;
+  UnitdialogVisible.value = true;
 };
 //鑾峰彇瑙掕壊
 const getRole = () => {
@@ -953,15 +1936,119 @@
     });
   }
 };
+//鑾峰彇鐢ㄦ埛鐝粍
+const getGroup = () => {
+  const startTime = formatTime(queryForm.value.selectTime[0]);
+  const endTime = formatTime(queryForm.value.selectTime[1]);
+  const filter = [
+    {
+      name: queryForm.value.selectType,
+      value: queryForm.value.selectInput,
+      displayType: "like",
+    },
+    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
+    { name: "createDate", value: endTime, displayType: "LessOrEqual" },
+  ];
+  GetUserTeam({ ...pageQuery.value, filter }).then((res) => {
+    departmentData.value = res.rows;
+    pageTotal.value = res.total;
+  });
+};
+const formTeam = ref({});
+const TreamdialogVisible = ref(false);
+//鏂板缓鐢ㄦ埛鐝粍
+const AddGroup = () => {
+  Treamtype.value = "鏂板缓";
+  TreamdialogVisible.value = true;
+};
+const Treamtype = ref("鏂板缓");
+const formTreamdRef = ref(null);
+const saveTream = async (formEl) => {
+  if (!formEl) return;
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      if (Treamtype.value == "淇敼") {
+        EditUserTeam(formTeam.value).then((res) => {
+          ElMessage({ message: "淇敼鎴愬姛", type: "success" });
+          TreamdialogVisible.value = false;
+          getGroup();
+        });
+      } else {
+        AddUserTeam(formTeam.value).then((res) => {
+          ElMessage({ message: "娣诲姞鎴愬姛", type: "success" });
+          TreamdialogVisible.value = false;
+          getGroup();
+        });
+      }
+    } else {
+      console.log("error submit!", fields);
+    }
+  });
+};
+const formUnit = ref({});
+const UnitdialogVisible = ref(false);
+const Unittype = ref("鏂板缓");
+const formUnitRef = ref(null);
+const AddUnit = () => {
+  Unittype.value = "鏂板缓";
+  UnitdialogVisible.value = true;
+};
+//鑾峰彇鐢ㄦ埛鍗曚綅
+const getUnit = () => {
+  const startTime = formatTime(queryForm.value.selectTime[0]);
+  const endTime = formatTime(queryForm.value.selectTime[1]);
+  const filter = [
+    {
+      name: queryForm.value.selectType,
+      value: queryForm.value.selectInput,
+      displayType: "like",
+    },
+    { name: "createDate", value: startTime, displayType: "ThanOrEqual" },
+    { name: "createDate", value: endTime, displayType: "LessOrEqual" },
+  ];
+  GetUserUnit({ ...pageQuery.value, filter }).then((res) => {
+    unitData.value = res.rows;
+    pageTotal.value = res.total;
+  });
+};
+//淇濆瓨鍗曚綅
+const saveUnit = async (formEl) => {
+  if (!formEl) return;
+  await formEl.validate((valid, fields) => {
+    if (valid) {
+      if (Unittype.value == "淇敼") {
+        EditUserUnit(formUnit.value).then((res) => {
+          ElMessage({ message: "淇敼鎴愬姛", type: "success" });
+          UnitdialogVisible.value = false;
+          getUnit();
+        });
+      } else {
+        AddUserUnit(formUnit.value).then((res) => {
+          ElMessage({ message: "娣诲姞鎴愬姛", type: "success" });
+          UnitdialogVisible.value = false;
+          getUnit();
+        });
+      }
+    } else {
+      console.log("error submit!", fields);
+    }
+  });
+};
 //鍒囨崲椤甸潰
 const changeactive = (index) => {
   isactive.value = index;
   if (isactive.value == 1) {
     selectoptions.value = userOptions;
     initData();
-  } else {
+  } else if (isactive.value == 2) {
     selectoptions.value = roleOptions;
     getRole();
+  } else if (isactive.value == 3) {
+    selectoptions.value = treamOptions;
+    getGroup();
+  } else if (isactive.value == 4) {
+    selectoptions.value = unitOptions;
+    getUnit();
   }
 };
 
@@ -975,6 +2062,14 @@
 const RoleSelectionChange = (val) => {
   ids.value = [];
   ids.value = val.map((item) => item.roleId);
+};
+const TreamSelectionChange = (val) => {
+  ids.value = [];
+  ids.value = val.map((item) => item.id);
+};
+const UnitSelectionChange = (val) => {
+  ids.value = [];
+  ids.value = val.map((item) => item.id);
 };
 const deleteAll = () => {
   if (ids.value.includes(1)) {
@@ -990,23 +2085,37 @@
       ElMessage({ message: "鍒犻櫎鎴愬姛", type: "success" });
       initData();
     });
-  } else {
+  } else if (isactive.value == 2) {
     DeleteRoleApi(ids.value).then((res) => {
       ElMessage({ message: "鍒犻櫎鎴愬姛", type: "success" });
       getRole();
     });
+  } else if (isactive.value == 3) {
+    DeleteUserTeam(ids.value).then((res) => {
+      ElMessage({ message: "鍒犻櫎鎴愬姛", type: "success" });
+      getGroup();
+    });
+  } else if (isactive.value == 4) {
+    DeleteUserUnit(ids.value).then((res) => {
+      ElMessage({ message: "鍒犻櫎鎴愬姛", type: "success" });
+      getUnit();
+    });
   }
 };
-//绠$悊
-//璺敱璺宠浆
+// 绠$悊 璺敱璺宠浆
 const toDetail = (row) => {
   router.push({ name: "permission", state: { info: JSON.stringify(row) } });
 };
 
-
 onMounted(() => {
+  if (window.innerWidth <= 1080) {
+    isMin.value = true;
+  }
+  //鎵撳嵃褰撳墠灞忓箷瀹藉害
   initData();
   getRole();
+  getUnit();
+  getGroup();
   userInfo.value = JSON.parse(localStorage.getItem("user"));
 });
 </script>
@@ -1021,7 +2130,7 @@
     flex-direction: column;
 
     .checkbox {
-      width: 11rem;
+      width: 25rem;
       display: flex;
       justify-content: space-between;
       margin-top: 1rem;
@@ -1153,6 +2262,194 @@
     text-align: center;
   }
 }
+@media screen and (max-width: 1080px) {
+  .Usermanagement {
+    display: flex;
+    background-color: #fff;
+
+    .content {
+      width: 100%;
+      display: flex;
+      flex-direction: column;
+
+      .checkbox {
+        width: 35rem;
+        display: flex;
+        justify-content: space-between;
+        margin-top: 1rem;
+        margin-left: 1.31rem;
+
+        .item {
+          width: 8rem;
+          height: 2.88rem;
+          border-radius: 0.25rem;
+          background-color: rgba(190, 199, 209, 1);
+          color: rgba(255, 255, 255, 1);
+          font-size: 1.25rem;
+          text-align: center;
+          line-height: 2.88rem;
+          cursor: pointer;
+        }
+
+        .isactive {
+          background-color: rgba(16, 16, 16, 1);
+          color: rgba(255, 255, 255, 1);
+        }
+      }
+
+      .serch {
+        display: flex;
+        margin-top: 1.31rem;
+        align-items: center;
+
+        .time_box {
+          display: flex;
+          align-items: center;
+          text-align: center;
+          margin-left: 0.98rem;
+
+          .time {
+            box-sizing: border-box;
+            width: 6.88rem;
+            height: 3rem;
+            text-align: center;
+            border: 0.06rem solid rgba(222, 222, 222, 1);
+            border-radius: 0.25rem 0 0 0.25rem;
+            font-size: 1.25rem;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+          }
+          :deep(.el-input__wrapper) {
+            height: 3rem !important;
+            font-size: 1.25rem !important;
+          }
+        }
+
+        .serch_box {
+          display: flex;
+          align-items: center;
+          text-align: center;
+          margin-left: 0.98rem;
+          border-radius: 0.38rem;
+
+          .serchb {
+            box-sizing: border-box;
+            width: 9rem;
+            height: 3rem !important;
+            text-align: center;
+            font-size: 2rem !important;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            .select {
+              height: 3rem !important;
+              :deep(.el-select__wrapper) {
+                height: 3rem !important;
+                font-size: 1.5rem !important;
+              }
+            }
+          }
+
+          input {
+            box-sizing: border-box;
+            outline: none;
+            width: 19rem;
+            height: 3rem;
+            border: 0.06rem solid rgba(222, 222, 222, 1);
+            border-radius: 0 0.25rem 0.25rem 0;
+            padding-left: 0.3125rem;
+            font-size: 2rem;
+          }
+        }
+        .text_btn {
+          width: 10rem !important;
+          height: 3.5rem !important;
+          font-size: 2rem !important;
+          display: flex;
+          align-items: center;
+        }
+      }
+
+      .btns {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-top: 1.31rem;
+        margin-left: 1.13rem;
+        padding-right: 2rem;
+        box-sizing: border-box;
+        .text_btn {
+          width: 10rem !important;
+          height: 3.5rem !important;
+          font-size: 2rem !important;
+          display: flex;
+          align-items: center;
+        }
+      }
+    }
+    .formpassword {
+      font-size: 1.5rem !important;
+    }
+    .my-header {
+      height: 3.84rem;
+      display: flex;
+      justify-content: space-between;
+      border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
+    }
+
+    .avatar-uploader .avatar {
+      width: 7rem;
+      height: 7rem;
+      display: block;
+    }
+
+    :deep(.avatar-uploader .el-upload) {
+      width: 7rem;
+      height: 7rem;
+      border: 0.0625rem dashed var(--el-border-color);
+      border-radius: 0.0375rem;
+      cursor: pointer;
+      position: relative;
+      overflow: hidden;
+      transition: var(--el-transition-duration-fast);
+    }
+
+    :deep(.el-upload-list__item) {
+      width: 7rem;
+      height: 7rem;
+    }
+
+    .avatar-uploader .el-upload:hover {
+      border-color: var(--el-color-primary);
+    }
+
+    .el-icon .avatar-uploader-icon {
+      font-size: 0.5rem;
+      color: #8c939d;
+      width: 0.81rem;
+      height: 0.81rem;
+      text-align: center;
+    }
+    .font-title {
+      font-size: 2rem !important;
+    }
+    .from_title {
+      font-size: 2rem !important;
+    }
+    .el-form-item__content {
+      .el-input {
+        height: 3rem !important;
+        font-size: 2rem !important;
+      }
+      .el-select--small :deep(.el-select__wrapper) {
+        font-size: 2rem;
+        line-height: 3rem;
+        min-height: 3rem;
+      }
+    }
+  }
+}
 </style>
 <style>
 .confirmButtonClass {

--
Gitblit v1.9.3