From d32db45e366352b6585dd32765525f18005a319f Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 19 一月 2023 11:08:57 +0800
Subject: [PATCH] 重置时取消部门选中

---
 src/views/system/user/index.vue |   31 +++++++------------------------
 1 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 8326e6f..5b1ea25 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -19,6 +19,7 @@
                   :expand-on-click-node="false"
                   :filter-node-method="filterNode"
                   ref="deptTreeRef"
+                  node-key="id"
                   highlight-current
                   default-expand-all
                   @node-click="handleNodeClick"
@@ -153,36 +154,16 @@
                <el-table-column label="鎿嶄綔" align="center" width="150" class-name="small-padding fixed-width">
                   <template #default="scope">
                      <el-tooltip content="淇敼" placement="top" v-if="scope.row.userId !== 1">
-                        <el-button
-                           type="text"
-                           icon="Edit"
-                           @click="handleUpdate(scope.row)"
-                           v-hasPermi="['system:user:edit']"
-                        ></el-button>
+                        <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
                      </el-tooltip>
                      <el-tooltip content="鍒犻櫎" placement="top" v-if="scope.row.userId !== 1">
-                        <el-button
-                           type="text"
-                           icon="Delete"
-                           @click="handleDelete(scope.row)"
-                           v-hasPermi="['system:user:remove']"
-                        ></el-button>
+                        <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button>
                      </el-tooltip>
                      <el-tooltip content="閲嶇疆瀵嗙爜" placement="top" v-if="scope.row.userId !== 1">
-                        <el-button
-                           type="text"
-                           icon="Key"
-                           @click="handleResetPwd(scope.row)"
-                           v-hasPermi="['system:user:resetPwd']"
-                        ></el-button>
+                         <el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
                      </el-tooltip>
                      <el-tooltip content="鍒嗛厤瑙掕壊" placement="top" v-if="scope.row.userId !== 1">
-                        <el-button
-                           type="text"
-                           icon="CircleCheck"
-                           @click="handleAuthRole(scope.row)"
-                           v-hasPermi="['system:user:edit']"
-                        ></el-button>
+                        <el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
                      </el-tooltip>
                   </template>
                </el-table-column>
@@ -456,6 +437,8 @@
 function resetQuery() {
   dateRange.value = [];
   proxy.resetForm("queryRef");
+  queryParams.value.deptId = undefined;
+  proxy.$refs.deptTreeRef.setCurrentKey(null);
   handleQuery();
 };
 /** 鍒犻櫎鎸夐挳鎿嶄綔 */

--
Gitblit v1.9.3