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

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

@@ -0,0 +1,81 @@
import createAxios from '@/utils/request'
/**
* 干扰源接入功能删除流程
*/
export const deleteUserReport = (data: any) => {
return createAxios({
url: '/supervision-boot/userReport/deleteUserReport',
method: 'POST',
data
})
}
/**
* 终端入网检测删除流程
*/
export const deleteDevReport = (data: any) => {
return createAxios({
url: '/supervision-boot/deVReport/deleteDevReport',
method: 'POST',
data
})
}
/**
* 监测点台账录入删除流程
*/
export const deleteTempLineReport = (data: any) => {
return createAxios({
url: '/supervision-boot/tempLine/deleteTempLineReport',
method: 'POST',
data
})
}
/**
* 试运行评估删除流程
*/
export const deleteTempLineRunTestReport = (data: any) => {
return createAxios({
url: '/supervision-boot/supervisionTempLineRunTest/deleteTempLineRunTestReport',
method: 'POST',
data
})
}
/**
* 预告警单删除流程
*/
export const deleteWarningLeaflet = (data: any) => {
return createAxios({
url: '/supervision-boot/warningLeaflet/deleteWarningLeaflet',
method: 'POST',
data
})
}
/**
* 设备退运管理删除流程
*/
export const deleteQuitRunningDevice = (data: any) => {
return createAxios({
url: '/supervision-boot/quitRunningDevice/deleteQuitRunningDevice',
method: 'POST',
data
})
}
/**
* 技术监督计划管理删除流程
*/
export const deleteSurveyPlan = (data: any) => {
return createAxios({
url: '/supervision-boot/surveyPlan/deleteSurveyPlan',
method: 'POST',
data
})
}
/**
* 技术监督测试管理删除流程
*/
export const deleteSurveyPlanTest = (data: any) => {
return createAxios({
url: '/supervision-boot/surveyTest/deleteSurveyPlanTest',
method: 'POST',
data
})
}

View File

@@ -66,4 +66,7 @@
// }
.vxe-table--tooltip-wrapper {
z-index: 10000 !important;
}
}
.is--disabled {
background-color: var(--vxe-input-disabled-color);
}

View File

@@ -101,7 +101,7 @@ const tableStore = new TableStore({
],
beforeSearchFun: () => {
tableStore.table.params.field = props.timePopUpBox.field
tableStore.table.params.lineId = '6469e77fda42db12c7ca6620a092f03c' //props.timePopUpBox.lineId
tableStore.table.params.lineId = props.timePopUpBox.lineId
tableStore.table.params.searchBeginTime = props.timePopUpBox.time
tableStore.table.params.searchEndTime = props.timePopUpBox.time
tableStore.table.params.statisticalId = radio2.value

View File

@@ -67,7 +67,7 @@
</el-card>
<el-card class="echart">
<h3>有功率区间占比</h3>
<my-echart :options="options" style="height: 208px" />
<my-echart :options="options" style="height: 212px" />
</el-card>
</div>
<div class="container" style="padding: 0px 10px 10px">
@@ -148,12 +148,12 @@
</el-link>
</template>
</vxe-column>
<vxe-column field="flicker" title="闪变">
<vxe-column field="flicker" title="长时闪变">
<template #default="{ row }">
<el-link
:type="row.flicker == '1' ? 'danger' : 'success'"
class="percentage"
@click="detailClick(row, '闪变', 'flickerList')"
@click="detailClick(row, '长时闪变', 'flickerList')"
>
{{ row.flicker == '1' ? '越限' : '合格' }}
</el-link>
@@ -534,13 +534,14 @@ const tableStore = new TableStore({
yAxis: {
show: false
},
dataZoom: { show: false },
options: {
series: [
{
type: 'pie',
center: ['50%', '55%'],
center: ['50%', '52%'],
selectedOffset: 30,
label: {
show: true,

View File

@@ -24,10 +24,10 @@
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</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"/>
<!-- 新增 -->
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" :openType="openType" />
</template>
@@ -46,7 +46,7 @@ import { useRouter } from 'vue-router'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
import { useDictData } from '@/stores/dictData'
import { deleteSurveyPlan } from '@/api/supervision-boot/delete/index'
const dictData = useDictData()
const supvTypeOptionList = dictData.getBasicData('supv_type')
const statusSelect = dictData.statusSelect()
@@ -64,6 +64,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
@@ -213,7 +217,30 @@ const add = () => {
// title.value = '普测计划新增'
planAddRef.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 {
deleteSurveyPlan(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const exportFn = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1

View File

@@ -23,10 +23,10 @@
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</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" />
<!-- 新增 -->
<planTest ref="planTestRef" @onsubmit="tableStore.index()" />
</template>
@@ -42,7 +42,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { cancelTest } from '@/api/process-boot/generalTest'
import planTest from './planTest.vue'
import { useRouter } from 'vue-router'
import { deleteSurveyPlanTest } from '@/api/supervision-boot/delete/index'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
@@ -63,6 +63,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 60,
@@ -228,7 +232,30 @@ provide('tableStore', tableStore)
const add = (id: string) => {
planTestRef.value.open('计划测试填报', id, true)
}
// 禁止点击
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 {
deleteSurveyPlanTest(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const exportFn = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1

View File

@@ -159,7 +159,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="关联终端" prop="devId" v-if="props.openType != 'create'">
<el-select v-model="form.devId" placeholder="请选择关联终端" @change="changeDevId">
<el-select v-model="form.devId" filterable placeholder="请选择关联终端" @change="changeDevId">
<el-option
v-for="(item, index) in devIdList"
:label="item.devName"

View File

@@ -29,10 +29,11 @@
<template #operation>
<!-- <el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button> -->
<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" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 新增 -->
<Add ref="addRef" @onSubmit="tableStore.index()" />
<!-- 上传 -->
@@ -41,7 +42,7 @@
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, watch } from 'vue'
import { ref, onMounted, provide, watch, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -55,6 +56,7 @@ import { cancelFormData } from '@/api/supervision-boot/interfere/index'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -76,6 +78,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{ title: '序号', type: 'seq', width: 80 },
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
{
@@ -243,6 +249,30 @@ provide('tableStore', tableStore)
const addList = () => {
addRef.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 {
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const addForms = ref()
const addFormModel = () => {

View File

@@ -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>
<!--弹框-->
<monitor-quit-popup ref="deviceQuitPopup" />
</div>
@@ -42,7 +43,7 @@ import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunningDev'
import { deleteQuitRunningDevice } from '@/api/supervision-boot/delete/index'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
@@ -61,6 +62,10 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 65,
column: [
{
width: '60',
type: 'checkbox'
},
{
field: 'index',
title: '序号',
@@ -233,6 +238,30 @@ 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({

View File

@@ -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({

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) => {
// 二次确认

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) => {
// 二次确认

View File

@@ -115,6 +115,7 @@
<el-select
v-model="form.monitoringTerminalCode"
clearable
filterable
style="width: 100%"
filterable
placeholder="请选择关联终端"
@@ -520,7 +521,7 @@ const userNameList = ref([])
//查询干扰源列表获取可选数据
const projectList = ref([])
const monitoringTerminalList:any = ref([])
const monitoringTerminalList: any = ref([])
//获取关联终端
const findAllMonitoringTerminalList = () => {
getDeviceList().then(res => {
@@ -605,8 +606,8 @@ const resetForm = async () => {
changeUserName()
}
})
if(title.value != '编辑'){
changevoltageDeviationLimit()
if (title.value != '编辑') {
changevoltageDeviationLimit()
}
}
//根据检测点电压等级切换电压偏差上限/下限

View File

@@ -22,10 +22,11 @@
</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" @click="exportEvent" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
<!-- 新增弹框 -->
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
@@ -43,6 +44,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelMointorPointFormData } from '@/api/supervision-boot/monitorpoint/index'
import { deleteTempLineReport } from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -61,6 +63,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{ title: '序号', type: 'seq', width: 80 },
// { field: 'orgName', title: '填报部门名称', minWidth: 170 },
{
@@ -132,7 +138,7 @@ const tableStore = new TableStore({
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
disabled: row => {
return !(row.status == 0)
},
@@ -218,6 +224,31 @@ const cancelLeave = async (row: any) => {
// 加载数据
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 {
deleteTempLineReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
const exportEvent = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1

View File

@@ -21,11 +21,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" />
<!-- 新增弹框 -->
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
@@ -52,6 +53,7 @@ import { cancelTerminalFormData } from '@/api/supervision-boot/terminal/index'
import uploadATemplate from './uploadATemplate.vue'
import addForm from './addForm.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { deleteDevReport } from '@/api/supervision-boot/delete/index'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
@@ -72,6 +74,10 @@ const tableStore = new TableStore({
publicHeight: 65,
method: 'POST',
column: [
{
width: '60',
type: 'checkbox'
},
{ title: '序号', type: 'seq', width: 80 },
{
field: 'orgName',
@@ -252,6 +258,30 @@ const cancelLeave = async (row: any) => {
// 加载数据
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 {
deleteDevReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
}
//导出模板
const exportExcelTemplate = () => {

View File

@@ -16,6 +16,7 @@
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
@@ -58,6 +59,7 @@ import { formatDate } from '@/utils/formatTime'
import { VxeTablePropTypes } from 'vxe-table'
import { useAdminInfo } from '@/stores/adminInfo'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { deleteTempLineRunTestReport } from '@/api/supervision-boot/delete/index'
const dictData = useDictData()
const statusSelect = dictData.statusSelect()
const { push } = useRouter()
@@ -258,6 +260,38 @@ const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
return !(row.testRunState == 1 || row.testRunState == 2)
}
})
const deleteEven = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
let createBy = tableStore.table.selection.map(item => item.createBy)
let status = tableStore.table.selection.map(item => item.status)
if (adminInfo.roleCode.includes('delete_info')) {
deleteList()
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
deleteList()
} else {
ElMessage({
type: 'warning',
message: '只能删除自己填报的数据!!!'
})
}
}
}
const deleteList = () => {
deleteTempLineRunTestReport(tableStore.table.selection.map(item => item.id)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
}
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
@@ -369,8 +403,6 @@ const runTestSubmit = (type: number) => {
}
})
}
</script>
<style scoped lang="scss"></style>