修改 查看详情 返回页面刷新
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<div>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='任务名称'>-->
|
||||
@@ -12,22 +12,21 @@
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<Table ref="tableRef"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref='deviceQuitPopup' />
|
||||
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { onMounted, provide, ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
@@ -37,16 +36,20 @@ import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunni
|
||||
defineOptions({
|
||||
name: 'supervision/retire'
|
||||
})
|
||||
const { push } = useRouter()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const deviceQuitPopup = ref()
|
||||
const flag = ref(false)
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{
|
||||
title: '设备类型', field: 'deviceType', minWidth: 130,
|
||||
title: '设备类型',
|
||||
field: 'deviceType',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
@@ -62,7 +65,9 @@ const tableStore = new TableStore({
|
||||
{ title: '设备名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '退役原因', field: 'propertyNo', minWidth: 130 },
|
||||
{
|
||||
title: '设备状态', field: 'deviceStatus', minWidth: 130,
|
||||
title: '设备状态',
|
||||
field: 'deviceStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
@@ -80,7 +85,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status', title: '审核状态', minWidth: 100,
|
||||
field: 'status',
|
||||
title: '审核状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
@@ -111,7 +118,8 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId,row.historyInstanceId)
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -149,7 +157,6 @@ const tableStore = new TableStore({
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -166,7 +173,7 @@ const add = () => {
|
||||
}
|
||||
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string,historyInstanceId:string) => {
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
@@ -197,5 +204,16 @@ const cancelLeave = async (row: any) => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user