联调 技术监督 草稿功能

This commit is contained in:
GGJ
2024-06-20 16:54:19 +08:00
parent ac1335985f
commit 3a49fbf6a8
15 changed files with 256 additions and 98 deletions

View File

@@ -117,7 +117,7 @@ const open = async (text: string, tempData?: any) => {
}
form.value.deviceType = form.value.deviceType + ''
changeDevStatus(form.value.deviceId, true)
form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : ''
form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : ''
} else {
resetForm()
// 在此处恢复默认表单

View File

@@ -81,7 +81,7 @@ const tableStore = new TableStore({
},
replaceValue: {
0: '运',
0: '运',
1: '检修',
2: '停运',
3: '调试',
@@ -89,6 +89,28 @@ const tableStore = new TableStore({
null: '/'
}
},
{
title: '目标状态',
field: 'devStatus',
minWidth: 130,
render: 'tag',
custom: {
0: 'success',
1: 'warning',
2: 'danger',
3: 'warning',
4: 'info',
null: 'primary'
},
replaceValue: {
0: '投运',
1: '检修',
2: '停运',
3: '调试',
4: '退运',
null:'/'
}
},
{
field: 'status',
title: '流程状态',
@@ -133,6 +155,9 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
}

View File

@@ -22,7 +22,7 @@
<el-form-item label="监测点当前状态:">
<el-select v-model="runFlag" disabled placeholder="请选择监测点" clearable class="select">
<el-option
v-for="item in runFlagList "
v-for="item in runFlagList"
:key="item.id"
:label="item.name"
:value="item.id"
@@ -131,7 +131,7 @@ const open = async (text: string, tempData?: any) => {
}
form.value.deviceType = form.value.deviceType + ''
changeDevStatus(form.value.deviceId, true)
form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : ''
form.value.devStatus = tempData.devStatus != null ? tempData.devStatus + '' : ''
} else {
resetForm()
// 在此处恢复默认表单
@@ -161,9 +161,7 @@ const submit = (flag: boolean) => {
formRef.value.validate(async (valid: any) => {
if (valid) {
form.value.saveOrCheckflag = '2'
if (form.value.devOriginalStatus == '4') {
ElMessage.warning('终端当前状态就是退运,无需变更!')
} else {
{
if (form.value.id) {
await quitRunningDeviceUpdate(form.value)
ElMessage.success('重新发起成功')
@@ -212,9 +210,11 @@ const changeDevStatus = async (event: any, flag?: any) => {
// form.value.devOriginalStatus = '4'
// break
// }
runFlag.value = runFlagList.filter(item => item.name == res.data.runFlag)[0].id
runFlag.value = runFlagList.filter(item => item.name == res.data.runFlag)[0].id
form.value.devOriginalStatus = runFlag.value
if (!flag) form.value.devStatus = ''
if (!flag) {
form.value.devStatus = ''
}
runFlagData.value = runFlagList.filter(item => item.name != res.data.runFlag)
})
}

View File

@@ -151,6 +151,9 @@ const tableStore = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
disabled: row => {
return !row.processInstanceId
},
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)