Merge remote-tracking branch 'origin/main'

This commit is contained in:
2026-06-25 14:24:55 +08:00
5 changed files with 109 additions and 4 deletions
@@ -28,6 +28,10 @@ layout("/layouts/platform.html"){
<i class="ti-plus"></i>
新建用户
</el-button>
<el-button size="small" @click="resetAllPwd" :loading="resetAllPwdLoading" type="warning">
<i class="ti-reload"></i>
重置所有用户密码
</el-button>
</table-tool>
<el-table
:key="tableKey"
@@ -208,6 +212,7 @@ layout("/layouts/platform.html"){
addDialogVisible: false,
editDialogVisible: false,
roleDialogVisible: false,
resetAllPwdLoading: false,
treeData: {
label: "name",
children: "zones",
@@ -321,6 +326,26 @@ layout("/layouts/platform.html"){
this.formData = {} //打开新增窗口,表单先清空
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
},
resetAllPwd() {
this.$confirm("此操作将重置除 superadmin 外所有用户的密码,确定继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.resetAllPwdLoading = true
this.$axios.post("/platform/sys/user/resetAllPwd", {}).then((res) => {
if (res.code === 0) {
this.$alert("已重置 " + res.data + " 个用户的密码", "重置完成", {
confirmButtonText: "确定"
})
}
}).finally(() => {
this.resetAllPwdLoading = false
})
})
.catch(() => {})
},
doAdd() {
this.$refs["addForm"].validate((valid) => {
if (valid) {