联调 技术监督 草稿功能

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

@@ -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 })