From 7ee6d1367a6a4047835a1eee17c79195550ade1f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 06 八月 2026 10:34:49 +0800
Subject: [PATCH] 新疆_马铃薯 1.添加重置全员按钮功能
---
src/views/system/user/index.vue | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index f3059f8..57fdfdb 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -53,13 +53,16 @@
<el-col :span="1.5">
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:user:export']">瀵煎嚭</el-button>
</el-col>
+ <el-col :span="1.5">
+ <el-button type="danger" plain icon="Key" @click="handleResetAllPwd" v-hasPermi="['system:user:resetAllPwd']">鍏ㄥ憳瀵嗙爜閲嶇疆</el-button>
+ </el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<div style="flex: 1; overflow: hidden;">
<el-table v-loading="loading" :data="userList" height="100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="鐢ㄦ埛缂栧彿" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
+<!-- <el-table-column label="鐢ㄦ埛缂栧彿" align="center" key="userId" prop="userId" v-if="columns[0].visible" />-->
<el-table-column label="鐧诲綍璐﹀彿" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="鐢ㄦ埛鏄电О" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="閮ㄩ棬" align="center" key="deptNames" prop="deptNames" v-if="columns[3].visible" :show-overflow-tooltip="true" />
@@ -218,7 +221,7 @@
<script setup name="User">
import { getToken } from "@/utils/auth"
import useAppStore from '@/store/modules/app'
-import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect } from "@/api/system/user"
+import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect, resetAllPwd } from "@/api/system/user"
import { Splitpanes, Pane } from "splitpanes"
import "splitpanes/dist/splitpanes.css"
@@ -426,6 +429,16 @@
}).catch(() => {})
}
+/** 鍏ㄥ憳瀵嗙爜閲嶇疆 */
+function handleResetAllPwd() {
+ proxy.$modal.confirm('纭瑕侀噸缃墍鏈夌敤鎴风殑瀵嗙爜鍚楋紵姝ゆ搷浣滀笉鍙�嗭紒').then(function () {
+ return resetAllPwd()
+ }).then(() => {
+ proxy.$modal.msgSuccess("鍏ㄥ憳瀵嗙爜閲嶇疆鎴愬姛")
+ getList()
+ }).catch(() => {})
+}
+
/** 閫夋嫨鏉℃暟 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.userId)
--
Gitblit v1.9.3