增加重置用户

This commit is contained in:
mac
2026-04-08 22:16:53 +08:00
parent fca9aa5dce
commit 30f2999231
2 changed files with 32 additions and 2 deletions
+23 -2
View File
@@ -291,7 +291,7 @@ v-loading="loading"
scope.row.updatedAt | BeiJingTime
}}</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="650">
<el-table-column align="center" fixed="right" label="操作" width="740">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="openQr(scope.$index, scope.row)">查看二维码</el-button>
<el-button
@@ -323,6 +323,7 @@ size="mini"
</el-dropdown-menu>
</el-dropdown>
<el-button @click="BindBankCard(scope.$index, scope.row)" size="mini" type="success">绑定银行卡</el-button>
<el-button @click="resetUserDevId(scope.row)" size="mini" type="warning" plain>重置用户</el-button>
</template>
</el-table-column>
</el-table>
@@ -356,7 +357,8 @@ import {
getUserList,
userExport,
userUpdate,
userUnBan
userUnBan,
userResetDevId
} from '@/api/user/userList'
import { vipTypeList, userTypeList } from '@/filters/user/userList'
import Edit from './components/AddOrEdit'
@@ -529,6 +531,25 @@ export default {
})
},
resetUserDevId(row) {
this.$confirm('确定重置该用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
userResetDevId({ id: row.id }).then((res) => {
if (res.code === 200) {
this.$message.success('重置成功')
this.getUserData()
} else {
this.$message.error(res.msg || res.tip || '重置失败')
}
})
})
.catch(() => {})
},
clear(key) {
this.searchData[key] = undefined
this.getUserData()