联调 技术监督 草稿功能

This commit is contained in:
GGJ
2024-06-19 19:37:39 +08:00
parent c496a13617
commit 38c61ec5d5
19 changed files with 671 additions and 277 deletions

View File

@@ -85,6 +85,7 @@ const tableStore = new TableStore({
minWidth: '150',
render: 'tag',
custom: {
0: 'warning',
1: 'primary',
2: 'success',
3: 'danger',
@@ -92,6 +93,7 @@ const tableStore = new TableStore({
5: 'primary'
},
replaceValue: {
0: '待提交审批',
1: '审批中',
2: '审批通过',
3: '审批不通过',
@@ -154,6 +156,27 @@ const tableStore = new TableStore({
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',
title: '重新发起',

View File

@@ -51,7 +51,9 @@
<template #footer>
<span class="dialog-footer">
<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>
</template>
</el-dialog>
@@ -165,35 +167,54 @@ const close = () => {
/**
* 提交用户表单数据
*/
const submit = () => {
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'
})
}
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
}
const submit = (flag: boolean) => {
if (flag) {
let subForm = JSON.parse(JSON.stringify(form.value))
subForm = {
...subForm,
reportPath: reportFilePath.value
}
})
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 })