修改技术监督删除功能
This commit is contained in:
@@ -23,11 +23,12 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||
<DetailInfo :id="userId"></DetailInfo>
|
||||
</el-dialog>
|
||||
@@ -47,6 +48,8 @@ import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { downloadSensitiveUserTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import SensitiveUserPopup from './sensitiveUserPopup.vue'
|
||||
import addForm from '@/views/pqs/supervise/interfere/components/undocumented/addForm.vue'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
const TableHeaderRef = ref()
|
||||
@@ -61,6 +64,10 @@ const tableStore = new TableStore({
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
width: 80,
|
||||
@@ -190,6 +197,31 @@ provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增
|
||||
const addFormModel = () => {
|
||||
addForms.value.filterUsers([5, 4, 3, 2, 1, 0])
|
||||
|
||||
Reference in New Issue
Block a user