fix: refine sensitive word table actions

This commit is contained in:
richjohnrambo
2026-09-11 01:11:35 +08:00
parent 26e511113b
commit d3d2235ca3
2 changed files with 16 additions and 25 deletions
+2 -21
View File
@@ -151,15 +151,7 @@
import { usePermission } from '@/hooks/web/usePermission';
import { useUserStore } from '@/store/modules/user';
import { adaModalWidth, adaTableScrollX } from '@/utils/hotgo';
import {
BatchImport,
Delete,
Edit,
GroupEdit,
GroupList,
List,
Status,
} from '@/api/imSensitiveWord';
import { BatchImport, Delete, Edit, GroupEdit, GroupList, List } from '@/api/imSensitiveWord';
import { columns, groupOptions, loadOptions, schemas } from './model';
import {
getDefaultTenantValue,
@@ -217,7 +209,7 @@
const loadTable = (res) => List({ ...searchFormRef.value?.formModel, ...res });
const reload = () => tableRef.value?.reload();
const actionColumn = reactive({
width: 230,
width: 150,
title: '操作',
key: 'action',
fixed: 'right',
@@ -226,11 +218,6 @@
style: 'button',
actions: [
{ label: '编辑', auth: ['/imSensitiveWord/edit'], onClick: () => openEdit(row) },
{
label: row.status === 1 ? '停用' : '启用',
auth: ['/imSensitiveWord/status'],
onClick: () => changeStatus(row),
},
{
label: '删除',
type: 'error',
@@ -264,12 +251,6 @@
submitting.value = false;
}
}
function changeStatus(row) {
Status({ id: row.id, status: row.status === 1 ? 2 : 1 }).then(() => {
message.success('操作成功');
reload();
});
}
function removeWord(row) {
dialog.error({
title: '删除敏感词',