2024-05-13 18:36:19 +08:00
|
|
|
<!--待办事项列表-->
|
2024-04-16 08:41:41 +08:00
|
|
|
<template>
|
2024-05-14 15:21:37 +08:00
|
|
|
<div class='default-main'>
|
|
|
|
|
<TableHeader date-picker>
|
|
|
|
|
<template v-slot:select>
|
|
|
|
|
<!-- <el-form-item label='任务名称'>-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- v-model='tableStore.table.params.searchValue'-->
|
|
|
|
|
<!-- clearable-->
|
|
|
|
|
<!-- placeholder='请输入任务名称'-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
</template>
|
|
|
|
|
<template #operation>
|
|
|
|
|
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</TableHeader>
|
|
|
|
|
<!--表格-->
|
|
|
|
|
<Table ref='tableRef'></Table>
|
|
|
|
|
<!--弹框-->
|
|
|
|
|
<device-quit-popup ref='deviceQuitPopup' />
|
|
|
|
|
</div>
|
2024-04-16 08:41:41 +08:00
|
|
|
</template>
|
2024-04-17 14:15:19 +08:00
|
|
|
|
2024-05-13 18:36:19 +08:00
|
|
|
<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 { nextTick, onMounted, provide, ref } from 'vue'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import { dateFormatter, formatPast2 } from '@/utils/formatTime'
|
|
|
|
|
import DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.vue'
|
|
|
|
|
|
2024-04-16 08:41:41 +08:00
|
|
|
defineOptions({
|
2024-05-14 15:21:37 +08:00
|
|
|
name: 'businessUser'
|
2024-04-16 08:41:41 +08:00
|
|
|
})
|
2024-05-13 18:36:19 +08:00
|
|
|
const { push } = useRouter()
|
|
|
|
|
const deviceQuitPopup = ref()
|
2024-04-16 08:41:41 +08:00
|
|
|
|
2024-05-13 18:36:19 +08:00
|
|
|
const tableStore = new TableStore({
|
2024-05-14 15:21:37 +08:00
|
|
|
url: '/supervision-boot/quitRunningDevice/list',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
column: [
|
|
|
|
|
{ title: '序号', type: 'seq', width: 80 },
|
2024-05-13 18:36:19 +08:00
|
|
|
{
|
2024-05-14 15:21:37 +08:00
|
|
|
title: '设备类型', field: 'deviceType', minWidth: 130,
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
1: 'primary',
|
|
|
|
|
2: 'primary'
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
1: '装置',
|
|
|
|
|
2: '监测点'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
|
|
|
|
{ title: '变电站', field: 'subName', minWidth: 130 },
|
|
|
|
|
{ title: '设备名称', field: 'deviceName', minWidth: 130 },
|
|
|
|
|
{ title: '资产编号', field: 'propertyNo', minWidth: 130 },
|
|
|
|
|
{
|
|
|
|
|
title: '设备状态', field: 'deviceStatus', minWidth: 130,
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
0: 'success',
|
|
|
|
|
1: 'warning',
|
|
|
|
|
2: 'danger',
|
|
|
|
|
3: 'warning',
|
|
|
|
|
4: 'info'
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
0: '运行',
|
|
|
|
|
1: '检修',
|
|
|
|
|
2: '停运',
|
|
|
|
|
3: '调试',
|
|
|
|
|
4: '退运'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'status', title: '审核状态', minWidth: 100,
|
|
|
|
|
render: 'tag',
|
|
|
|
|
custom: {
|
|
|
|
|
1: 'primary',
|
|
|
|
|
2: 'success',
|
|
|
|
|
3: 'danger',
|
|
|
|
|
4: 'warning'
|
|
|
|
|
},
|
|
|
|
|
replaceValue: {
|
|
|
|
|
1: '审批中',
|
|
|
|
|
2: '审批通过',
|
|
|
|
|
3: '审批不通过',
|
|
|
|
|
4: '已取消'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
align: 'center',
|
|
|
|
|
minWidth: '150',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
render: 'buttons',
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
name: 'productSetting',
|
|
|
|
|
title: '流程详情',
|
|
|
|
|
type: 'primary',
|
|
|
|
|
icon: 'el-icon-EditPen',
|
|
|
|
|
render: 'basicButton',
|
|
|
|
|
click: row => {
|
|
|
|
|
handleAudit(row.processInstanceId)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
beforeSearchFun: () => {
|
|
|
|
|
for (let key in tableStore.table.params) {
|
|
|
|
|
if (tableStore.table.params[key] === '') {
|
|
|
|
|
delete tableStore.table.params[key]
|
|
|
|
|
}
|
2024-05-13 18:36:19 +08:00
|
|
|
}
|
2024-04-16 08:41:41 +08:00
|
|
|
|
2024-05-14 15:21:37 +08:00
|
|
|
}
|
2024-05-13 18:36:19 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2024-05-14 15:21:37 +08:00
|
|
|
// 加载数据
|
|
|
|
|
tableStore.index()
|
2024-05-13 18:36:19 +08:00
|
|
|
})
|
|
|
|
|
tableStore.table.params.searchValue = ''
|
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
|
|
|
|
|
|
//新增退运设备信息
|
|
|
|
|
const add = () => {
|
2024-05-14 15:21:37 +08:00
|
|
|
deviceQuitPopup.value.open('新增退运')
|
2024-04-17 14:15:19 +08:00
|
|
|
}
|
2024-05-13 18:36:19 +08:00
|
|
|
|
2024-05-14 15:21:37 +08:00
|
|
|
/** 处理审批按钮 */
|
|
|
|
|
const handleAudit = (instanceId: any) => {
|
|
|
|
|
push({
|
|
|
|
|
name: 'BpmProcessInstanceDetail',
|
|
|
|
|
query: {
|
|
|
|
|
id: instanceId
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-05-13 18:36:19 +08:00
|
|
|
|
|
|
|
|
</script>
|