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 |   15 ++++++++++++++-
 src/api/system/user.js          |    8 ++++++++
 vite.config.js                  |    2 +-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/api/system/user.js b/src/api/system/user.js
index 431f6b0..dafe4c5 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -87,6 +87,14 @@
   })
 }
 
+// 鍏ㄥ憳瀵嗙爜閲嶇疆
+export function resetAllPwd() {
+  return request({
+    url: '/system/user/resetAllPwd',
+    method: 'post'
+  })
+}
+
 // 鐢ㄦ埛瀵嗙爜閲嶇疆
 export function updateUserPwd(oldPassword, newPassword) {
   const data = {
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index aa41733..57fdfdb 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -53,6 +53,9 @@
 							<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>
 						
@@ -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)
diff --git a/vite.config.js b/vite.config.js
index 754349e..3adcb12 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -8,7 +8,7 @@
   const { VITE_APP_ENV } = env;
   const baseUrl =
       env.VITE_APP_ENV === "development"
-          ? "http://192.168.0.226:7005"
+          ? "http://192.168.0.10:7005"
           : env.VITE_BASE_API;
   const javaUrl =
       env.VITE_APP_ENV === "development"

--
Gitblit v1.9.3