联调 技术监督 草稿功能
This commit is contained in:
@@ -352,7 +352,8 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<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>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -974,14 +975,18 @@ const open = async (row: any) => {
|
||||
form.value.businessType = businessTypeList.value.filter(
|
||||
(item: any) => item.name == res.data.businessType
|
||||
)[0]?.id
|
||||
mainWiringDiagram.value = JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
|
||||
form.value.mainWiringDiagram = JSON.parse(
|
||||
JSON.stringify([
|
||||
{
|
||||
name: res.data.mainWiringDiagram.split('/')[2]
|
||||
}
|
||||
])
|
||||
)
|
||||
mainWiringDiagram.value =
|
||||
res.data.mainWiringDiagram.length == 0 ? [] : JSON.parse(JSON.stringify(res.data.mainWiringDiagram))
|
||||
form.value.mainWiringDiagram =
|
||||
res.data.mainWiringDiagram.length == 0
|
||||
? []
|
||||
: JSON.parse(
|
||||
JSON.stringify([
|
||||
{
|
||||
name: res.data.mainWiringDiagram.split('/')[2]
|
||||
}
|
||||
])
|
||||
)
|
||||
})
|
||||
} else {
|
||||
resendId.value = ''
|
||||
@@ -1057,65 +1062,100 @@ const disabledDate = time => {
|
||||
}
|
||||
const activeName = ref('0')
|
||||
//提交
|
||||
const confirmForm = () => {
|
||||
// 先判断提交终端信息与监测点信息
|
||||
// 提交监测点信息
|
||||
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'
|
||||
})
|
||||
}
|
||||
if (!form.value.ct1 || !form.value.ct2) {
|
||||
return ElMessage({
|
||||
message: '请输入CT变比',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
//提交终端信息
|
||||
confirmFormData = {
|
||||
...confirmFormData,
|
||||
lineFilePath: lineFilePath?.value, //监测点信息
|
||||
mainWiringDiagram: mainWiringDiagram.value //主接线图
|
||||
// pt1: form.value.pt1 / form.value.pt2, //PT变比
|
||||
// ct1: form.value.ct1 / form.value.ct2 //CT变比
|
||||
}
|
||||
if (title.value == '监测点信息') {
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
const confirmForm = (flag: boolean) => {
|
||||
if (flag) {
|
||||
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'
|
||||
})
|
||||
}
|
||||
if (!form.value.ct1 || !form.value.ct2) {
|
||||
return ElMessage({
|
||||
message: '请输入CT变比',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
//提交终端信息
|
||||
confirmFormData = {
|
||||
...confirmFormData,
|
||||
lineFilePath: form.value.lineFilePath?.length == 0 ? '' : lineFilePath?.value, //监测点信息
|
||||
mainWiringDiagram: form.value.mainWiringDiagram?.length == 0 ? '' : mainWiringDiagram.value //主接线图
|
||||
}
|
||||
confirmFormData.saveOrCheckflag = '1'
|
||||
if (title.value != '监测点信息') confirmFormData.id = resendId.value
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
ElMessage({
|
||||
message: '保存成功!',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
})
|
||||
} 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()
|
||||
close()
|
||||
})
|
||||
} else {
|
||||
confirmFormData.id = resendId.value
|
||||
// console.log(confirmFormData, '99999999999')
|
||||
updateMointorPointFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
}
|
||||
if (!form.value.ct1 || !form.value.ct2) {
|
||||
return ElMessage({
|
||||
message: '请输入CT变比',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
//提交终端信息
|
||||
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({
|
||||
message: '重新发起成功',
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
})
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
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 })
|
||||
</script>
|
||||
|
||||
@@ -89,12 +89,14 @@ const tableStore = new TableStore({
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '待提交审批',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
@@ -113,11 +115,30 @@ 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)
|
||||
}
|
||||
},
|
||||
{
|
||||
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',
|
||||
title: '重新发起',
|
||||
|
||||
Reference in New Issue
Block a user