gaoluyang
2026-08-06 7ee6d1367a6a4047835a1eee17c79195550ade1f
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)