diff --git a/frontend/src/api/check/test/index.ts b/frontend/src/api/check/test/index.ts index 105b40f..b4cebe2 100644 --- a/frontend/src/api/check/test/index.ts +++ b/frontend/src/api/check/test/index.ts @@ -33,7 +33,7 @@ export const getTreeData = (params: { scriptType?: string | null, code?: string, }) => { - return http.post("/result/treeData/", params, {loading: true}); + return http.post("/result/treeData/", params, {loading: false}); } /** diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index b8818d6..5acd2c6 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -115,6 +115,8 @@ import {changeErrorSystem, deleteTempTable, exportRawData, getFormData, getTable import {getPqErrSysList} from '@/api/plan/plan' import {useDownload} from "@/hooks/useDownload"; import {Histogram, Postcard} from "@element-plus/icons-vue"; +import {ResultEnum} from "@/enums/httpEnum"; +import {ElMessage} from "element-plus"; const {appendToBody} = withDefaults(defineProps<{ appendToBody: boolean @@ -219,23 +221,27 @@ const handleNodeClick = async (data: any) => { const handleErrorSysChange = async () => { console.log("切换误差体系", formContent.errorSysId); - await changeErrorSystem({ + changeErrorSystem({ planId: checkStore.plan.id, scriptId: checkStore.plan.scriptId, errorSysId: formContent.errorSysId, deviceId: deviceId, code: checkStore.plan.code + '', + }).then((res) => { + if (res.code === ResultEnum.SUCCESS) { + ElMessage.success('切换误差体系成功') + if (originErrorSysId != formContent.errorSysId) { + planCode = checkStore.plan.code + "_temp" + } else { + planCode = checkStore.plan.code + '' + } + if (formContent.chnNum != chnList[0].value) { + formContent.chnNum = chnList[0].value + } else { + handleChnNumChange() + } + } }) - if (originErrorSysId != formContent.errorSysId) { - planCode = checkStore.plan.code + "_temp" - } else { - planCode = checkStore.plan.code + '' - } - if (formContent.chnNum != chnList[0].value) { - formContent.chnNum = chnList[0].value - } else { - handleChnNumChange() - } } @@ -455,14 +461,25 @@ const handleGenerateReport = () => { } const handleReCalculate = async () => { - await reCalculate({ + reCalculate({ planId: checkStore.plan.id, scriptId: checkStore.plan.scriptId, errorSysId: formContent.errorSysId, deviceId: deviceId, code: checkStore.plan.code + '' + }).then((res) => { + ElMessage.success('重新计算成功!') + // if (originErrorSysId != formContent.errorSysId) { + // planCode = checkStore.plan.code + "_temp" + // } else { + // planCode = checkStore.plan.code + '' + // } + if (formContent.chnNum != chnList[0].value) { + formContent.chnNum = chnList[0].value + } else { + handleChnNumChange() + } }) - ElMessage.success('重新计算成功!') } const close = async () => {