联调 技术监督 所有流程删除功能

This commit is contained in:
GGJ
2024-09-10 14:07:25 +08:00
parent d9bcec8ea0
commit bc83dea947
16 changed files with 416 additions and 42 deletions

View File

@@ -13,13 +13,11 @@
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button>-->
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<!--表格-->
<Table ref="tableRef" />
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!--弹框-->
<feedback-popup ref="feedbackPopup" />
@@ -40,7 +38,7 @@ import { cancelFeedback } from '@/api/supervision-boot/leaflet'
import { useAdminInfo } from '@/stores/adminInfo'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
const dictData = useDictData()
@@ -59,6 +57,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
type: 'seq',
@@ -193,7 +195,7 @@ const tableStore = new TableStore({
render: 'buttons',
fixed: 'right',
buttons: [
{
{
name: 'productSetting',
title: '查看报告',
type: 'primary',
@@ -382,7 +384,30 @@ const tableStore = new TableStore({
tableStore.table.params.currentPage = tableStore.table.params.pageNum
}
})
// 禁止点击
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 {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认