联调 技术监督 草稿功能
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user