联调 技术监督 所有流程删除功能
This commit is contained in:
@@ -23,10 +23,11 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
@@ -44,6 +45,7 @@ import { ElMessageBox } from 'element-plus/es'
|
||||
import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunningDev'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
|
||||
const dictData = useDictData()
|
||||
const statusSelect = dictData.statusSelect()
|
||||
|
||||
@@ -60,6 +62,10 @@ const tableStore = new TableStore({
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
@@ -228,7 +234,30 @@ provide('tableStore', tableStore)
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
}
|
||||
|
||||
// 禁止点击
|
||||
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 {
|
||||
deleteQuitRunningDevice(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
|
||||
Reference in New Issue
Block a user