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

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

@@ -1,11 +1,10 @@
<template>
<TableHeader area datePicker nextFlag theCurrentTime ref="TableHeaderRef">
<!-- <template #operation>-->
<!-- <el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>-->
<!-- <el-button icon="el-icon-Delete" type="primary">删除</el-button>-->
<!-- </template>-->
<template #operation>
<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" />
</template>
@@ -21,6 +20,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'
const dictData = useDictData()
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
@@ -33,6 +33,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
type: 'seq',
@@ -113,7 +117,7 @@ const tableStore = new TableStore({
render: 'buttons',
fixed: 'right',
buttons: [
{
{
name: 'productSetting',
title: '查看报告',
type: 'primary',
@@ -263,6 +267,30 @@ 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 {
deleteWarningLeaflet(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认