冀北普测计划修改

This commit is contained in:
cdf
2024-06-04 15:53:28 +08:00
parent 4da7fe4407
commit ed9bce09b3
4 changed files with 35 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删
import { ElMessage, genFileId, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
import { useDictData } from '@/stores/dictData'
import { addSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
import { addSurveyTest,updateSurveyTest, getTestById } from '@/api/supervision-boot/survey/test'
const tableStore = inject('tableStore') as TableStore
let uploadName = ref('')
@@ -167,12 +167,17 @@ const submitFn = () => {
}
if(addFlagRef){
//新增,则组装业务数据提交后台
//此时该告警单处于待反馈状态
await addSurveyTest(form.value)
//查询进线数据避免一直处于loading状态
ElMessage.success('申请成功')
tableStore.index()
planAddition.value = false
}else{
await updateSurveyTest(form.value)
//查询进线数据避免一直处于loading状态
ElMessage.success('重新申请成功')
tableStore.index()
planAddition.value = false
}
}
})