⚡ 后台小程序用户列表不再提供删除入口

- 移除工具条「批量删除」与行内「删除」两个入口
- 一并删除 handleDelete / rowDel 与 permissionList.delBtn,不留无入口的死方法
- 删除是逻辑删除,且手机号唯一键不排除已删行,删过的手机号既登录不了也注册不了;终止访问改用「停用」
- 保留 api/system/mpUser.js 的 remove 封装与后端 /mp-user/remove 接口,本次只隐藏入口
- 保留表格多选列,批量「密码重置」仍依赖勾选
This commit is contained in:
2026-10-27 11:12:21 +08:00
parent 8d3e87d710
commit e53852b05f
+1 -37
View File
@@ -26,9 +26,6 @@
<el-button type="primary" plain v-if="permission.mp_user_reset" @click="handleReset">
密码重置
</el-button>
<el-button type="danger" plain v-if="permission.mp_user_delete" @click="handleDelete">
批量删除
</el-button>
</template>
<template #identities="{ row }">
{{ row.identitiesName || formatIdentities(row.identities) }}
@@ -102,9 +99,6 @@
<el-link type="primary" v-if="permission.mp_user_reset" @click="handleResetForRow(row)">
重置密码
</el-link>
<el-link type="danger" v-if="permission.mp_user_delete" @click="rowDel(row)">
删除
</el-link>
</template>
<template #menu-form="{ size }">
<el-button
@@ -121,7 +115,7 @@
<script>
import { h } from 'vue';
import { getList, getDetail, submit, remove, changeStatus, resetPassword } from '@/api/system/mpUser';
import { getList, getDetail, submit, changeStatus, resetPassword } from '@/api/system/mpUser';
import { getDeptTree } from '@/api/system/dept';
import option from '@/option/system/mpUser';
import { mapGetters } from 'vuex';
@@ -159,7 +153,6 @@ export default {
return {
addBtn: this.validData(this.permission.mp_user_add, false),
viewBtn: this.validData(this.permission.mp_user_view, false),
delBtn: this.validData(this.permission.mp_user_delete, false),
editBtn: this.validData(this.permission.mp_user_edit, false),
};
},
@@ -345,35 +338,6 @@ export default {
() => loading()
);
},
rowDel(row) {
this.$confirm('确定删除该小程序用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => remove(row.id))
.then(() => {
this.onLoad(this.page);
this.$message.success('操作成功');
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定删除选中的小程序用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => remove(this.ids))
.then(() => {
this.onLoad(this.page);
this.$message.success('操作成功');
this.$refs.crud.toggleSelection();
});
},
handleStatus(row) {
const status = row.status === 1 ? 0 : 1;
const text = status === 1 ? '启用' : '停用';