联调 技术监督 草稿功能
This commit is contained in:
@@ -68,7 +68,7 @@
|
|||||||
for="-"
|
for="-"
|
||||||
label="关联电站:"
|
label="关联电站:"
|
||||||
v-if="form.customSubstationFlag == 0"
|
v-if="form.customSubstationFlag == 0"
|
||||||
prop="substation"
|
:prop="dynamicProp"
|
||||||
style="display: flex; align-items: center"
|
style="display: flex; align-items: center"
|
||||||
>
|
>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@@ -95,7 +95,8 @@
|
|||||||
:render-after-expand="false"
|
:render-after-expand="false"
|
||||||
/> -->
|
/> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="关联电站:" v-if="form.customSubstationFlag == 1" prop="substation">
|
|
||||||
|
<el-form-item for="-" label="关联电站:" v-if="form.customSubstationFlag == 1" :prop="dynamicProp">
|
||||||
<el-input v-model="form.substation" placeholder="请输入关联电站"></el-input>
|
<el-input v-model="form.substation" placeholder="请输入关联电站"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form :model="form" label-width="auto"> -->
|
<!-- <el-form :model="form" label-width="auto"> -->
|
||||||
@@ -135,13 +136,15 @@
|
|||||||
<template #footer v-if="title != '查看计划'">
|
<template #footer v-if="title != '查看计划'">
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="cancelFn">取消</el-button>
|
<el-button @click="cancelFn">取消</el-button>
|
||||||
<el-button type="primary" @click="submitFn">确定</el-button>
|
|
||||||
|
<el-button type="primary" @click="submitFn(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="submitFn(false)">提交审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, nextTick } from 'vue'
|
import { ref, computed, nextTick } from 'vue'
|
||||||
import {
|
import {
|
||||||
addSurvey,
|
addSurvey,
|
||||||
auditSurvey,
|
auditSurvey,
|
||||||
@@ -161,6 +164,13 @@ const dictData = useDictData()
|
|||||||
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
const supvTypeOptionList = dictData.getBasicData('supv_type')
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const planAddition = ref(false)
|
const planAddition = ref(false)
|
||||||
|
|
||||||
|
const dynamicProp = computed(() => {
|
||||||
|
return supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code == 'Technical_Super'
|
||||||
|
? ''
|
||||||
|
: 'substation'
|
||||||
|
})
|
||||||
|
|
||||||
const defaultProps = ref({
|
const defaultProps = ref({
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
@@ -247,13 +257,43 @@ const detailById = (id: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 提交
|
// 提交
|
||||||
const submitFn = () => {
|
const submitFn = (flag: boolean) => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
if (flag) {
|
||||||
if (valid) {
|
const addForm = JSON.parse(JSON.stringify(form.value))
|
||||||
let filePath = ''
|
|
||||||
audit(filePath)
|
if (form.value.customSubstationFlag == 0) {
|
||||||
|
addForm.substation = addForm.substation.length==0?'': addForm.substation.join(',')
|
||||||
}
|
}
|
||||||
})
|
addForm.saveOrCheckflag = '1'
|
||||||
|
if (title.value == '计划新增') {
|
||||||
|
addSurveyPlan(addForm).then(res => {
|
||||||
|
cancelFn()
|
||||||
|
emit('onsubmit')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
formRef.value.validate(async (valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
//选择系统变电站
|
||||||
|
const addForm = JSON.parse(JSON.stringify(form.value))
|
||||||
|
if (form.value.customSubstationFlag == 0) {
|
||||||
|
addForm.substation = addForm.substation.length==0?'': addForm.substation.join(',')
|
||||||
|
}
|
||||||
|
addForm.saveOrCheckflag = '2'
|
||||||
|
if (title.value == '计划新增') {
|
||||||
|
addSurveyPlan(addForm).then(res => {
|
||||||
|
cancelFn()
|
||||||
|
emit('onsubmit')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
updateSurveyPlan(addForm).then(res => {
|
||||||
|
cancelFn()
|
||||||
|
emit('onsubmit')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 修改关联电站
|
// 修改关联电站
|
||||||
const changeArea = () => {
|
const changeArea = () => {
|
||||||
@@ -268,23 +308,6 @@ const changeArea = () => {
|
|||||||
treeData.value = list
|
treeData.value = list
|
||||||
}
|
}
|
||||||
const audit = (filePath: any) => {
|
const audit = (filePath: any) => {
|
||||||
//选择系统变电站
|
|
||||||
const addForm = JSON.parse(JSON.stringify(form.value))
|
|
||||||
if (form.value.customSubstationFlag == 0) {
|
|
||||||
addForm.substation = addForm.substation.join(',')
|
|
||||||
}
|
|
||||||
if (title.value == '计划新增') {
|
|
||||||
addSurveyPlan(addForm).then(res => {
|
|
||||||
cancelFn()
|
|
||||||
emit('onsubmit')
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
updateSurveyPlan(addForm).then(res => {
|
|
||||||
cancelFn()
|
|
||||||
emit('onsubmit')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 上传文件
|
// 上传文件
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
|
<el-form-item label="监督类型">
|
||||||
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supvTypeOptionList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -101,12 +111,14 @@ const tableStore = new TableStore({
|
|||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -133,11 +145,25 @@ const tableStore = new TableStore({
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return !row.processInstanceId
|
||||||
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
@@ -175,6 +201,7 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
|
tableStore.table.params.supvType = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
|
<el-form-item label="监督类型">
|
||||||
|
<el-select v-model="tableStore.table.params.supvType" clearable placeholder="请选择流程状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supvTypeOptionList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -103,6 +113,7 @@ const tableStore = new TableStore({
|
|||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
6: 'primary',
|
6: 'primary',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
@@ -110,6 +121,7 @@ const tableStore = new TableStore({
|
|||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
6: '新增',
|
6: '新增',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
@@ -120,7 +132,7 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
field: 'createBy',
|
field: 'createBy',
|
||||||
title: '填报人',
|
title: '填报人',
|
||||||
minWidth: 80,
|
minWidth: 120,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
@@ -151,13 +163,29 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 6 || row.status == 4
|
return row.status == 6 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// planTestRef.value.open('查看计划', row)
|
// planTestRef.value.open('查看计划', row)
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
addForms.value.open({
|
||||||
|
title: '编辑',
|
||||||
|
row: row
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
@@ -194,6 +222,7 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
|
tableStore.table.params.supvType = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
|
|||||||
@@ -1080,7 +1080,7 @@ const disabledDate = time => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = (flag?: boolean) => {
|
const confirmForm = (flag: boolean) => {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
//整理上传文件的数据
|
//整理上传文件的数据
|
||||||
// userType==0,1
|
// userType==0,1
|
||||||
@@ -1138,10 +1138,11 @@ const confirmForm = (flag?: boolean) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
confirmFormData.saveOrCheckflag = '1'
|
confirmFormData.saveOrCheckflag = '1'
|
||||||
confirmFormData.id = resendId.value
|
if (title.value != '用户档案录入') confirmFormData.id = resendId.value
|
||||||
|
|
||||||
submitFormData(confirmFormData).then(res => {
|
submitFormData(confirmFormData).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '保存成功',
|
message: '保存成功!',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
ruleFormRef.value.resetFields()
|
ruleFormRef.value.resetFields()
|
||||||
@@ -1149,7 +1150,7 @@ const confirmForm = (flag?: boolean) => {
|
|||||||
close()
|
close()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log(123213);
|
|
||||||
|
|
||||||
ruleFormRef.value.validate((valid: any) => {
|
ruleFormRef.value.validate((valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -1314,7 +1315,7 @@ const confirmForm = (flag?: boolean) => {
|
|||||||
confirmFormData.saveOrCheckflag = '2'
|
confirmFormData.saveOrCheckflag = '2'
|
||||||
if (title.value == '用户档案录入') {
|
if (title.value == '用户档案录入') {
|
||||||
submitFormData(confirmFormData).then(res => {
|
submitFormData(confirmFormData).then(res => {
|
||||||
if (res.code == 'A0000') {
|
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '新增成功',
|
message: '新增成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@@ -1322,14 +1323,14 @@ const confirmForm = (flag?: boolean) => {
|
|||||||
ruleFormRef.value.resetFields()
|
ruleFormRef.value.resetFields()
|
||||||
resetForm()
|
resetForm()
|
||||||
close()
|
close()
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log(confirmFormData)
|
console.log(confirmFormData)
|
||||||
confirmFormData.id = resendId.value
|
confirmFormData.id = resendId.value
|
||||||
|
|
||||||
updateFormData(confirmFormData).then(res => {
|
updateFormData(confirmFormData).then(res => {
|
||||||
if (res.code == 'A0000') {
|
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '重新发起成功',
|
message: '重新发起成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@@ -1337,7 +1338,7 @@ const confirmForm = (flag?: boolean) => {
|
|||||||
ruleFormRef.value.resetFields()
|
ruleFormRef.value.resetFields()
|
||||||
resetForm()
|
resetForm()
|
||||||
close()
|
close()
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.processInstanceId == null
|
return !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
|
|||||||
@@ -48,7 +48,9 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||||
|
<el-button type="primary" @click="submit(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="submit(false)">提交审批</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -84,7 +86,8 @@ const form = ref({
|
|||||||
deviceType: '1',
|
deviceType: '1',
|
||||||
devOriginalStatus: '0',
|
devOriginalStatus: '0',
|
||||||
devStatus: '',
|
devStatus: '',
|
||||||
propertyNo: ''
|
propertyNo: '',
|
||||||
|
saveOrCheckflag: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
@@ -114,7 +117,7 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
}
|
}
|
||||||
form.value.deviceType = form.value.deviceType + ''
|
form.value.deviceType = form.value.deviceType + ''
|
||||||
changeDevStatus(form.value.deviceId, true)
|
changeDevStatus(form.value.deviceId, true)
|
||||||
form.value.devStatus = form.value.devStatus + ''
|
form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : ''
|
||||||
} else {
|
} else {
|
||||||
resetForm()
|
resetForm()
|
||||||
// 在此处恢复默认表单
|
// 在此处恢复默认表单
|
||||||
@@ -133,33 +136,46 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = (flag: boolean) => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
if (flag) {
|
||||||
if (valid) {
|
form.value.saveOrCheckflag = '1'
|
||||||
if (form.value.devOriginalStatus == form.value.devStatus) {
|
|
||||||
if (form.value.devOriginalStatus == '0') {
|
addRunningDevice(form.value).then(res => {
|
||||||
ElMessage.warning('终端当前状态就是运行,无需变更!')
|
ElMessage.success('保存成功!')
|
||||||
} else if (form.value.devOriginalStatus == '1') {
|
tableStore.index()
|
||||||
ElMessage.warning('终端当前状态就是检修,无需变更!')
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
formRef.value.validate(async (valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
form.value.saveOrCheckflag = '2'
|
||||||
|
if (form.value.devOriginalStatus == form.value.devStatus) {
|
||||||
|
if (form.value.devOriginalStatus == '0') {
|
||||||
|
ElMessage.warning('终端当前状态就是运行,无需变更!')
|
||||||
|
} else if (form.value.devOriginalStatus == '1') {
|
||||||
|
ElMessage.warning('终端当前状态就是检修,无需变更!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
if (form.value.id) {
|
||||||
}
|
await quitRunningDeviceUpdate(form.value).then(res => {
|
||||||
} else {
|
ElMessage.success('重新发起成功')
|
||||||
if (form.value.id) {
|
tableStore.index()
|
||||||
await quitRunningDeviceUpdate(form.value)
|
dialogVisible.value = false
|
||||||
ElMessage.success('重新发起成功')
|
})
|
||||||
tableStore.index()
|
} else {
|
||||||
dialogVisible.value = false
|
await addRunningDevice(form.value).then(res => {
|
||||||
} else {
|
//查询进线数据,避免一直处于loading状态
|
||||||
await addRunningDevice(form.value)
|
ElMessage.success('申请成功')
|
||||||
//查询进线数据,避免一直处于loading状态
|
tableStore.index()
|
||||||
ElMessage.success('申请成功')
|
dialogVisible.value = false
|
||||||
tableStore.index()
|
})
|
||||||
dialogVisible.value = false
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -176,6 +192,7 @@ const changeDevStatus = async (event: any, flag?: boolean) => {
|
|||||||
await getDeviceDetailData(event).then(res => {
|
await getDeviceDetailData(event).then(res => {
|
||||||
//给当前终端赋值初始运行状态
|
//给当前终端赋值初始运行状态
|
||||||
runFlag.value = res.data.runFlag + ''
|
runFlag.value = res.data.runFlag + ''
|
||||||
|
form.value.devOriginalStatus = runFlag.value
|
||||||
if (!flag) form.value.devStatus = ''
|
if (!flag) form.value.devStatus = ''
|
||||||
devStatuData.value = devStatusList.value.filter(item => item.value != res.data.runFlag)
|
devStatuData.value = devStatusList.value.filter(item => item.value != res.data.runFlag)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -76,14 +76,17 @@ const tableStore = new TableStore({
|
|||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info'
|
4: 'info',
|
||||||
|
null: 'primary'
|
||||||
},
|
},
|
||||||
|
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运'
|
4: '退运',
|
||||||
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -92,16 +95,20 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning',
|
||||||
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
4: '已取消'
|
4: '已取消',
|
||||||
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
@@ -130,6 +137,19 @@ const tableStore = new TableStore({
|
|||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -22,17 +22,17 @@
|
|||||||
<el-form-item label="监测点当前状态:">
|
<el-form-item label="监测点当前状态:">
|
||||||
<el-select v-model="runFlag" disabled placeholder="请选择监测点" clearable class="select">
|
<el-select v-model="runFlag" disabled placeholder="请选择监测点" clearable class="select">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in runFlagData"
|
v-for="item in runFlagList "
|
||||||
:key="item.name"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.name"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="变更状态:" prop="devStatus">
|
<el-form-item label="变更状态:" prop="devStatus">
|
||||||
<el-select v-model="form.devStatus" placeholder="请选择监测点变更状态" clearable class="select">
|
<el-select v-model="form.devStatus" placeholder="请选择监测点变更状态" clearable class="select">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in runFlagList"
|
v-for="item in runFlagData"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
@@ -59,7 +59,9 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||||
|
<el-button type="primary" @click="submit(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="submit(false)">提交审批</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -90,14 +92,15 @@ const form = ref({
|
|||||||
deviceType: '2',
|
deviceType: '2',
|
||||||
devOriginalStatus: '0',
|
devOriginalStatus: '0',
|
||||||
devStatus: '',
|
devStatus: '',
|
||||||
|
saveOrCheckflag: '',
|
||||||
propertyNo: ''
|
propertyNo: ''
|
||||||
})
|
})
|
||||||
const runFlagList = [
|
const runFlagList = [
|
||||||
{ id: 0, name: '投运' },
|
{ id: '0', name: '投运' },
|
||||||
{ id: 1, name: '检修' },
|
{ id: '1', name: '检修' },
|
||||||
{ id: 2, name: '停运' },
|
{ id: '2', name: '停运' },
|
||||||
{ id: 3, name: '调试' },
|
{ id: '3', name: '调试' },
|
||||||
{ id: 4, name: '退运' }
|
{ id: '4', name: '退运' }
|
||||||
]
|
]
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
@@ -128,7 +131,7 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
}
|
}
|
||||||
form.value.deviceType = form.value.deviceType + ''
|
form.value.deviceType = form.value.deviceType + ''
|
||||||
changeDevStatus(form.value.deviceId, true)
|
changeDevStatus(form.value.deviceId, true)
|
||||||
form.value.devStatus = form.value.devStatus
|
form.value.devStatus = form.value.devStatus ? form.value.devStatus + '' : ''
|
||||||
} else {
|
} else {
|
||||||
resetForm()
|
resetForm()
|
||||||
// 在此处恢复默认表单
|
// 在此处恢复默认表单
|
||||||
@@ -145,27 +148,38 @@ const open = async (text: string, tempData?: any) => {
|
|||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = (flag: boolean) => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
if (flag) {
|
||||||
if (valid) {
|
form.value.saveOrCheckflag = '1'
|
||||||
if (form.value.devOriginalStatus == '4') {
|
|
||||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
addRunningDevice(form.value).then(res => {
|
||||||
} else {
|
ElMessage.success('保存成功!')
|
||||||
if (form.value.id) {
|
tableStore.index()
|
||||||
await quitRunningDeviceUpdate(form.value)
|
dialogVisible.value = false
|
||||||
ElMessage.success('重新发起成功')
|
})
|
||||||
tableStore.index()
|
} else {
|
||||||
dialogVisible.value = false
|
formRef.value.validate(async (valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
form.value.saveOrCheckflag = '2'
|
||||||
|
if (form.value.devOriginalStatus == '4') {
|
||||||
|
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||||
} else {
|
} else {
|
||||||
await addRunningDevice(form.value)
|
if (form.value.id) {
|
||||||
//查询进线数据,避免一直处于loading状态
|
await quitRunningDeviceUpdate(form.value)
|
||||||
ElMessage.success('申请成功')
|
ElMessage.success('重新发起成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
} else {
|
||||||
|
await addRunningDevice(form.value)
|
||||||
|
//查询进线数据,避免一直处于loading状态
|
||||||
|
ElMessage.success('申请成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -198,7 +212,8 @@ const changeDevStatus = async (event: any, flag?: any) => {
|
|||||||
// form.value.devOriginalStatus = '4'
|
// form.value.devOriginalStatus = '4'
|
||||||
// break
|
// break
|
||||||
// }
|
// }
|
||||||
runFlag.value = res.data.runFlag
|
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)
|
runFlagData.value = runFlagList.filter(item => item.name != res.data.runFlag)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -75,14 +75,16 @@ const tableStore = new TableStore({
|
|||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info'
|
4: 'info',
|
||||||
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运'
|
4: '退运',
|
||||||
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -95,14 +97,16 @@ const tableStore = new TableStore({
|
|||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'warning',
|
3: 'warning',
|
||||||
4: 'info'
|
4: 'info',
|
||||||
|
null: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '运行',
|
0: '运行',
|
||||||
1: '检修',
|
1: '检修',
|
||||||
2: '停运',
|
2: '停运',
|
||||||
3: '调试',
|
3: '调试',
|
||||||
4: '退运'
|
4: '退运',
|
||||||
|
null:'/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -111,12 +115,14 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -150,6 +156,19 @@ const tableStore = new TableStore({
|
|||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
deviceQuitPopup.value.open('编辑', row)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ const tableStore = new TableStore({
|
|||||||
minWidth: '150',
|
minWidth: '150',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
@@ -92,6 +93,7 @@ const tableStore = new TableStore({
|
|||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -154,6 +156,27 @@ const tableStore = new TableStore({
|
|||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
feedbackPopup.value.open(
|
||||||
|
'编辑',
|
||||||
|
row.id,
|
||||||
|
row.status,
|
||||||
|
row.issueDetail,
|
||||||
|
row.problemPath,
|
||||||
|
row.takeStep,
|
||||||
|
row.reportPath
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -51,7 +51,9 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="close">取消</el-button>
|
<el-button @click="close">取消</el-button>
|
||||||
<el-button type="primary" @click="submit">确认</el-button>
|
<!-- <el-button type="primary" @click="submit">确认</el-button> -->
|
||||||
|
<el-button type="primary" @click="submit(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="submit(false)">提交审批</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -165,35 +167,54 @@ const close = () => {
|
|||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = (flag: boolean) => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
if (flag) {
|
||||||
if (valid) {
|
let subForm = JSON.parse(JSON.stringify(form.value))
|
||||||
let subForm = JSON.parse(JSON.stringify(form.value))
|
subForm = {
|
||||||
subForm = {
|
...subForm,
|
||||||
...subForm,
|
reportPath: reportFilePath.value
|
||||||
reportPath: reportFilePath.value
|
|
||||||
}
|
|
||||||
if (!reportFilePath.value) {
|
|
||||||
return ElMessage({
|
|
||||||
message: '请上传处理成效报告',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (form.value.status == '3') {
|
|
||||||
await updateFeedback(subForm)
|
|
||||||
ElMessage.success('重新发起成功')
|
|
||||||
tableStore.index()
|
|
||||||
dialogVisible.value = false
|
|
||||||
} else {
|
|
||||||
//此时该告警单处于待反馈状态
|
|
||||||
await addFeedback(subForm)
|
|
||||||
//查询进线数据,避免一直处于loading状态
|
|
||||||
ElMessage.success('申请成功')
|
|
||||||
tableStore.index()
|
|
||||||
dialogVisible.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
subForm.saveOrCheckflag = '1'
|
||||||
|
//此时该告警单处于待反馈状态
|
||||||
|
addFeedback(subForm).then(res => {
|
||||||
|
//查询进线数据,避免一直处于loading状态
|
||||||
|
ElMessage.success('申请成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
formRef.value.validate(async (valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
let subForm = JSON.parse(JSON.stringify(form.value))
|
||||||
|
subForm = {
|
||||||
|
...subForm,
|
||||||
|
reportPath: reportFilePath.value
|
||||||
|
}
|
||||||
|
if (!reportFilePath.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传处理成效报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
subForm.saveOrCheckflag = '2'
|
||||||
|
if (form.value.status == '3') {
|
||||||
|
await updateFeedback(subForm).then(res => {
|
||||||
|
ElMessage.success('重新发起成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//此时该告警单处于待反馈状态
|
||||||
|
await addFeedback(subForm).then(res => {
|
||||||
|
//查询进线数据,避免一直处于loading状态
|
||||||
|
ElMessage.success('申请成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
@@ -84,6 +85,7 @@ const tableStore = new TableStore({
|
|||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -111,7 +113,22 @@ const tableStore = new TableStore({
|
|||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
addForms.value.open({
|
||||||
|
title: '编辑',
|
||||||
|
row: row
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '报告上传',
|
title: '报告上传',
|
||||||
@@ -125,6 +142,7 @@ const tableStore = new TableStore({
|
|||||||
FormRef.value.open('报告上次', row)
|
FormRef.value.open('报告上次', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="close()">取消</el-button>
|
<el-button @click="close()">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
<el-button type="primary" @click="confirmForm(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="confirmForm(false)">提交审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -55,7 +56,7 @@ const props = defineProps({
|
|||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const form: any = ref({})
|
const form: any = ref({})
|
||||||
const ruleFormRef = ref(null)
|
const ruleFormRef: any = ref(null)
|
||||||
//定义切换form类型
|
//定义切换form类型
|
||||||
const selectFormType = ref('')
|
const selectFormType = ref('')
|
||||||
selectFormType.value = '0'
|
selectFormType.value = '0'
|
||||||
@@ -91,12 +92,12 @@ const open = (text: any, row: any) => {
|
|||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
title.value = text
|
title.value = text
|
||||||
form.value.id = row.id
|
form.value.id = row.id
|
||||||
form.value.reason=row.reason
|
form.value.reason = row.reason
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
//重置表单内容
|
//重置表单内容
|
||||||
//取消表单校验状态
|
//取消表单校验状态
|
||||||
ruleFormRef.value && ruleFormRef.value.resetFields()
|
ruleFormRef.value && ruleFormRef.value?.resetFields()
|
||||||
dialogFormVisible.value = false
|
dialogFormVisible.value = false
|
||||||
emits('onSubmit')
|
emits('onSubmit')
|
||||||
resetForm()
|
resetForm()
|
||||||
@@ -110,29 +111,42 @@ const disabledDate = time => {
|
|||||||
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||||
}
|
}
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = () => {
|
const confirmForm = (flag: boolean) => {
|
||||||
// 提交监测点信息
|
if (flag) {
|
||||||
ruleFormRef.value.validate(valid => {
|
// 提交监测点信息
|
||||||
if (valid) {
|
|
||||||
//提交监测点联调信息
|
//提交监测点联调信息
|
||||||
if (title.value != '重新发起') {
|
form.value.saveOrCheckflag = '1'
|
||||||
addMointorPointTempLinedebug(form.value).then(res => {
|
addMointorPointTempLinedebug(form.value).then(res => {
|
||||||
ruleFormRef.value.resetFields()
|
ruleFormRef.value.resetFields()
|
||||||
resetForm()
|
resetForm()
|
||||||
close()
|
close()
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// 提交监测点信息
|
||||||
|
ruleFormRef.value.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
//提交监测点联调信息
|
||||||
|
form.value.saveOrCheckflag = '2'
|
||||||
|
if (!(title.value == '重新发起' || title.value == '编辑')) {
|
||||||
|
addMointorPointTempLinedebug(form.value).then(res => {
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
updateMointorPointTempLinedebug(form.value).then(res => {
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
updateMointorPointTempLinedebug(form.value).then(res => {
|
console.log('表单验证失败')
|
||||||
ruleFormRef.value.resetFields()
|
return false
|
||||||
resetForm()
|
|
||||||
close()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
console.log('表单验证失败')
|
}
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
@@ -99,6 +100,7 @@ const tableStore = new TableStore({
|
|||||||
5: 'primary'
|
5: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -127,6 +129,19 @@ const tableStore = new TableStore({
|
|||||||
return !row.processInstanceId
|
return !row.processInstanceId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
debugForms.value.open('编辑', row)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '申请联调',
|
title: '申请联调',
|
||||||
|
|||||||
@@ -352,7 +352,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="close()">取消</el-button>
|
<el-button @click="close()">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
<el-button type="primary" @click="confirmForm(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="confirmForm(false)">提交审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -974,14 +975,18 @@ const open = async (row: any) => {
|
|||||||
form.value.businessType = businessTypeList.value.filter(
|
form.value.businessType = businessTypeList.value.filter(
|
||||||
(item: any) => item.name == res.data.businessType
|
(item: any) => item.name == res.data.businessType
|
||||||
)[0]?.id
|
)[0]?.id
|
||||||
mainWiringDiagram.value = JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
|
mainWiringDiagram.value =
|
||||||
form.value.mainWiringDiagram = JSON.parse(
|
res.data.mainWiringDiagram.length == 0 ? [] : JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
|
||||||
JSON.stringify([
|
form.value.mainWiringDiagram =
|
||||||
{
|
res.data.mainWiringDiagram.length == 0
|
||||||
name: res.data.mainWiringDiagram.split('/')[2]
|
? []
|
||||||
}
|
: JSON.parse(
|
||||||
])
|
JSON.stringify([
|
||||||
)
|
{
|
||||||
|
name: res.data.mainWiringDiagram.split('/')[2]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resendId.value = ''
|
resendId.value = ''
|
||||||
@@ -1057,65 +1062,100 @@ const disabledDate = time => {
|
|||||||
}
|
}
|
||||||
const activeName = ref('0')
|
const activeName = ref('0')
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = () => {
|
const confirmForm = (flag: boolean) => {
|
||||||
// 先判断提交终端信息与监测点信息
|
if (flag) {
|
||||||
// 提交监测点信息
|
form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
|
||||||
ruleFormRef.value.validate(valid => {
|
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||||
if (valid) {
|
if (!form.value.pt1 || !form.value.pt2) {
|
||||||
//整理上传文件的数据
|
return ElMessage({
|
||||||
//处理填报日期时间格式
|
message: '请输入PT变比',
|
||||||
form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
|
type: 'warning'
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
})
|
||||||
if (!form.value.pt1 || !form.value.pt2) {
|
}
|
||||||
return ElMessage({
|
if (!form.value.ct1 || !form.value.ct2) {
|
||||||
message: '请输入PT变比',
|
return ElMessage({
|
||||||
type: 'warning'
|
message: '请输入CT变比',
|
||||||
})
|
type: 'warning'
|
||||||
}
|
})
|
||||||
if (!form.value.ct1 || !form.value.ct2) {
|
}
|
||||||
return ElMessage({
|
//提交终端信息
|
||||||
message: '请输入CT变比',
|
confirmFormData = {
|
||||||
type: 'warning'
|
...confirmFormData,
|
||||||
})
|
lineFilePath: form.value.lineFilePath?.length == 0 ? '' : lineFilePath?.value, //监测点信息
|
||||||
}
|
mainWiringDiagram: form.value.mainWiringDiagram?.length == 0 ? '' : mainWiringDiagram.value //主接线图
|
||||||
//提交终端信息
|
}
|
||||||
confirmFormData = {
|
confirmFormData.saveOrCheckflag = '1'
|
||||||
...confirmFormData,
|
if (title.value != '监测点信息') confirmFormData.id = resendId.value
|
||||||
lineFilePath: lineFilePath?.value, //监测点信息
|
addMointorPointFormData(confirmFormData).then(res => {
|
||||||
mainWiringDiagram: mainWiringDiagram.value //主接线图
|
ElMessage({
|
||||||
// pt1: form.value.pt1 / form.value.pt2, //PT变比
|
message: '保存成功!',
|
||||||
// ct1: form.value.ct1 / form.value.ct2 //CT变比
|
type: 'success'
|
||||||
}
|
})
|
||||||
if (title.value == '监测点信息') {
|
ruleFormRef.value.resetFields()
|
||||||
addMointorPointFormData(confirmFormData).then(res => {
|
resetForm()
|
||||||
ElMessage({
|
close()
|
||||||
message: '新增成功',
|
})
|
||||||
type: 'success'
|
} else {
|
||||||
|
// 先判断提交终端信息与监测点信息
|
||||||
|
// 提交监测点信息
|
||||||
|
ruleFormRef.value.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
//整理上传文件的数据
|
||||||
|
//处理填报日期时间格式
|
||||||
|
form.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')
|
||||||
|
let confirmFormData = JSON.parse(JSON.stringify(form.value))
|
||||||
|
if (!form.value.pt1 || !form.value.pt2) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请输入PT变比',
|
||||||
|
type: 'warning'
|
||||||
})
|
})
|
||||||
ruleFormRef.value.resetFields()
|
}
|
||||||
resetForm()
|
if (!form.value.ct1 || !form.value.ct2) {
|
||||||
close()
|
return ElMessage({
|
||||||
})
|
message: '请输入CT变比',
|
||||||
} else {
|
type: 'warning'
|
||||||
confirmFormData.id = resendId.value
|
})
|
||||||
// console.log(confirmFormData, '99999999999')
|
}
|
||||||
updateMointorPointFormData(confirmFormData).then(res => {
|
//提交终端信息
|
||||||
if (res.code == 'A0000') {
|
confirmFormData = {
|
||||||
|
...confirmFormData,
|
||||||
|
lineFilePath: form.value.lineFilePath?.length == 0 ? null : lineFilePath?.value, //监测点信息
|
||||||
|
mainWiringDiagram: form.value.mainWiringDiagram?.length == 0 ? null : mainWiringDiagram.value //主接线图
|
||||||
|
// pt1: form.value.pt1 / form.value.pt2, //PT变比
|
||||||
|
// ct1: form.value.ct1 / form.value.ct2 //CT变比
|
||||||
|
}
|
||||||
|
confirmFormData.saveOrCheckflag = '2'
|
||||||
|
if (title.value == '监测点信息') {
|
||||||
|
addMointorPointFormData(confirmFormData).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '重新发起成功',
|
message: '新增成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
ruleFormRef.value.resetFields()
|
ruleFormRef.value.resetFields()
|
||||||
resetForm()
|
resetForm()
|
||||||
close()
|
close()
|
||||||
}
|
})
|
||||||
})
|
} else {
|
||||||
|
confirmFormData.id = resendId.value
|
||||||
|
// console.log(confirmFormData, '99999999999')
|
||||||
|
updateMointorPointFormData(confirmFormData).then(res => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '重新发起成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// // console.log('表单验证失败')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
} else {
|
})
|
||||||
// // console.log('表单验证失败')
|
}
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -89,12 +89,14 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -113,11 +115,30 @@ const tableStore = new TableStore({
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return !row.processInstanceId
|
||||||
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
addForms.value.open({
|
||||||
|
title: '编辑',
|
||||||
|
row: row
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -590,7 +590,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="close()">取消</el-button>
|
<el-button @click="close()">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
<el-button type="primary" @click="confirmForm(true)">保存</el-button>
|
||||||
|
<el-button type="primary" @click="confirmForm(false)">提交审批</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -1421,61 +1422,116 @@ const close = async () => {
|
|||||||
resetForm()
|
resetForm()
|
||||||
}
|
}
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = () => {
|
const confirmForm = async (flag: boolean) => {
|
||||||
// 提交终端信息
|
if (flag) {
|
||||||
ruleFormRef.value.validate(valid => {
|
// 提交终端信息
|
||||||
if (valid) {
|
|
||||||
//整理上传文件的数据
|
//整理上传文件的数据
|
||||||
devReportForm.value.reporter = adminInfo.$state.id
|
devReportForm.value.reporter = adminInfo.$state.id
|
||||||
devReportForm.value.orgId = adminInfo.$state.deptId
|
devReportForm.value.orgId = adminInfo.$state.deptId
|
||||||
let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
|
let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
|
||||||
//提交终端信息
|
//提交终端信息 form.value
|
||||||
confirmFormData = {
|
confirmFormData = {
|
||||||
...confirmFormData,
|
...confirmFormData,
|
||||||
acceptanceInspectionReport: acceptanceInspectionReport.value, //验收检验报告
|
acceptanceInspectionReport:
|
||||||
// acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
|
form.value.acceptanceInspectionReport.length == 0 ? '' : acceptanceInspectionReport.value, //验收检验报告
|
||||||
deviceFilePath: deviceFilePath?.value, //终端台账信息
|
// acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
|
||||||
factoryInspectionReport: factoryInspectionReport.value, //出厂检验报告
|
deviceFilePath: form.value.deviceFilePath.length == 0 ? '' : deviceFilePath?.value, //终端台账信息
|
||||||
informationSecurityTestReport: informationSecurityTestReport.value, //信息安全检测报告
|
factoryInspectionReport:
|
||||||
performanceTestReport: performanceTestReport.value, //性能检测报告
|
form.value.factoryInspectionReport.length == 0 ? '' : factoryInspectionReport.value, //出厂检验报告
|
||||||
typeExperimentReport: typeExperimentReport.value, //型式实验报告
|
informationSecurityTestReport:
|
||||||
otherAttachments: otherAttachments?.value //其他附件
|
form.value.informationSecurityTestReport.length == 0 ? '' : informationSecurityTestReport.value, //信息安全检测报告
|
||||||
}
|
performanceTestReport: form.value.performanceTestReport.length == 0 ? '' : performanceTestReport.value, //性能检测报告
|
||||||
if (title.value == '终端信息') {
|
typeExperimentReport: form.value.typeExperimentReport.length == 0 ? '' : typeExperimentReport.value, //型式实验报告
|
||||||
addTerminalFormData(confirmFormData).then((res: any) => {
|
otherAttachments: form.value.otherAttachments.length == 0 ? '' : otherAttachments?.value //其他附件
|
||||||
if (res.code == 'A0000') {
|
|
||||||
ElMessage({
|
|
||||||
message: '新增成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
ruleFormRef.value.resetFields()
|
|
||||||
resetForm()
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
confirmFormData.reporter = adminInfo.$state.id
|
|
||||||
confirmFormData.orgId = adminInfo.$state.deptId
|
|
||||||
confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
|
|
||||||
confirmFormData.supervisionTempDeviceReportParam.commissioningTime.replace('T', ' ')
|
|
||||||
confirmFormData.id = resendId.value
|
|
||||||
updateTerminalFormData(confirmFormData).then((res: any) => {
|
|
||||||
if (res.code == 'A0000') {
|
|
||||||
ElMessage({
|
|
||||||
message: '重新发起成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
ruleFormRef.value.resetFields()
|
|
||||||
resetForm()
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('表单验证失败')
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
confirmFormData.saveOrCheckflag = '1'
|
||||||
|
confirmFormData.reporter = adminInfo.$state.id
|
||||||
|
confirmFormData.orgId = adminInfo.$state.deptId
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
|
||||||
|
confirmFormData?.supervisionTempDeviceReportParam?.commissioningTime?.replace('T', ' ') || ''
|
||||||
|
|
||||||
|
let powerCompanID = powerCompanyList.value.filter(item => item.name == form.value.powerCompany)[0]?.id
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.terminalIp = form.value.terminalIp
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.powerCompany = powerCompanID
|
||||||
|
? powerCompanID
|
||||||
|
: form.value.powerCompany
|
||||||
|
|
||||||
|
if (title.value != '终端信息') confirmFormData.id = resendId.value
|
||||||
|
|
||||||
|
await addTerminalFormData(confirmFormData).then((res: any) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '保存成功!',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 提交终端信息
|
||||||
|
ruleFormRef.value.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
//整理上传文件的数据
|
||||||
|
devReportForm.value.reporter = adminInfo.$state.id
|
||||||
|
devReportForm.value.orgId = adminInfo.$state.deptId
|
||||||
|
let confirmFormData = JSON.parse(JSON.stringify(devReportForm.value))
|
||||||
|
//提交终端信息
|
||||||
|
confirmFormData = {
|
||||||
|
...confirmFormData,
|
||||||
|
acceptanceInspectionReport:
|
||||||
|
form.value.acceptanceInspectionReport.length == 0 ? '' : acceptanceInspectionReport.value, //验收检验报告
|
||||||
|
// acceptanceInspectionReportSingle: acceptanceInspectionReportSingle.value, //验收检验报告单
|
||||||
|
deviceFilePath: form.value.deviceFilePath.length == 0 ? '' : deviceFilePath?.value, //终端台账信息
|
||||||
|
factoryInspectionReport:
|
||||||
|
form.value.factoryInspectionReport.length == 0 ? '' : factoryInspectionReport.value, //出厂检验报告
|
||||||
|
informationSecurityTestReport:
|
||||||
|
form.value.informationSecurityTestReport.length == 0 ? '' : informationSecurityTestReport.value, //信息安全检测报告
|
||||||
|
performanceTestReport:
|
||||||
|
form.value.performanceTestReport.length == 0 ? '' : performanceTestReport.value, //性能检测报告
|
||||||
|
typeExperimentReport: form.value.typeExperimentReport.length == 0 ? '' : typeExperimentReport.value, //型式实验报告
|
||||||
|
otherAttachments: form.value.otherAttachments.length == 0 ? '' : otherAttachments?.value //其他附件
|
||||||
|
}
|
||||||
|
confirmFormData.saveOrCheckflag = '2'
|
||||||
|
if (title.value == '终端信息') {
|
||||||
|
addTerminalFormData(confirmFormData).then((res: any) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '新增成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
confirmFormData.reporter = adminInfo.$state.id
|
||||||
|
confirmFormData.orgId = adminInfo.$state.deptId
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.commissioningTime =
|
||||||
|
confirmFormData.supervisionTempDeviceReportParam.commissioningTime.replace('T', ' ')
|
||||||
|
confirmFormData.id = resendId.value
|
||||||
|
updateTerminalFormData(confirmFormData).then((res: any) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '重新发起成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('表单验证失败')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<!---终端入网检测-->
|
|
||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
<TableHeader area datePicker nextFlag ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
@@ -96,12 +95,14 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -157,11 +158,30 @@ const tableStore = new TableStore({
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return !row.processInstanceId
|
||||||
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
addForms.value.open({
|
||||||
|
title: '编辑',
|
||||||
|
row: row
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '重新发起',
|
title: '重新发起',
|
||||||
|
|||||||
@@ -56,10 +56,11 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|||||||
import { addRunTest } from '@/api/supervision-boot/lineRunTest'
|
import { addRunTest } from '@/api/supervision-boot/lineRunTest'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { VxeTablePropTypes } from 'vxe-table'
|
import { VxeTablePropTypes } from 'vxe-table'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
@@ -107,12 +108,14 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
|
0: 'warning',
|
||||||
1: 'primary',
|
1: 'primary',
|
||||||
2: 'success',
|
2: 'success',
|
||||||
3: 'danger',
|
3: 'danger',
|
||||||
4: 'warning'
|
4: 'warning'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
|
0: '待提交审批',
|
||||||
1: '审批中',
|
1: '审批中',
|
||||||
2: '审批通过',
|
2: '审批通过',
|
||||||
3: '审批不通过',
|
3: '审批不通过',
|
||||||
@@ -145,10 +148,22 @@ const tableStore = new TableStore({
|
|||||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.testRunState != 2
|
return row.testRunState != 2 || !row.processInstanceId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.createBy != adminInfo.$state.id || !(row.status == 0)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '重新试运行',
|
title: '重新试运行',
|
||||||
|
|||||||
Reference in New Issue
Block a user