This commit is contained in:
GGJ
2025-03-14 15:03:45 +08:00
2 changed files with 31 additions and 14 deletions

View File

@@ -33,7 +33,7 @@ export const getTreeData = (params: {
scriptType?: string | null, scriptType?: string | null,
code?: string, code?: string,
}) => { }) => {
return http.post<CheckData.TreeItem[]>("/result/treeData/", params, {loading: true}); return http.post<CheckData.TreeItem[]>("/result/treeData/", params, {loading: false});
} }
/** /**

View File

@@ -115,6 +115,8 @@ import {changeErrorSystem, deleteTempTable, exportRawData, getFormData, getTable
import {getPqErrSysList} from '@/api/plan/plan' import {getPqErrSysList} from '@/api/plan/plan'
import {useDownload} from "@/hooks/useDownload"; import {useDownload} from "@/hooks/useDownload";
import {Histogram, Postcard} from "@element-plus/icons-vue"; import {Histogram, Postcard} from "@element-plus/icons-vue";
import {ResultEnum} from "@/enums/httpEnum";
import {ElMessage} from "element-plus";
const {appendToBody} = withDefaults(defineProps<{ const {appendToBody} = withDefaults(defineProps<{
appendToBody: boolean appendToBody: boolean
@@ -219,13 +221,15 @@ const handleNodeClick = async (data: any) => {
const handleErrorSysChange = async () => { const handleErrorSysChange = async () => {
console.log("切换误差体系", formContent.errorSysId); console.log("切换误差体系", formContent.errorSysId);
await changeErrorSystem({ changeErrorSystem({
planId: checkStore.plan.id, planId: checkStore.plan.id,
scriptId: checkStore.plan.scriptId, scriptId: checkStore.plan.scriptId,
errorSysId: formContent.errorSysId, errorSysId: formContent.errorSysId,
deviceId: deviceId, deviceId: deviceId,
code: checkStore.plan.code + '', code: checkStore.plan.code + '',
}) }).then((res) => {
if (res.code === ResultEnum.SUCCESS) {
ElMessage.success('切换误差体系成功')
if (originErrorSysId != formContent.errorSysId) { if (originErrorSysId != formContent.errorSysId) {
planCode = checkStore.plan.code + "_temp" planCode = checkStore.plan.code + "_temp"
} else { } else {
@@ -236,6 +240,8 @@ const handleErrorSysChange = async () => {
} else { } else {
handleChnNumChange() handleChnNumChange()
} }
}
})
} }
@@ -455,14 +461,25 @@ const handleGenerateReport = () => {
} }
const handleReCalculate = async () => { const handleReCalculate = async () => {
await reCalculate({ reCalculate({
planId: checkStore.plan.id, planId: checkStore.plan.id,
scriptId: checkStore.plan.scriptId, scriptId: checkStore.plan.scriptId,
errorSysId: formContent.errorSysId, errorSysId: formContent.errorSysId,
deviceId: deviceId, deviceId: deviceId,
code: checkStore.plan.code + '' code: checkStore.plan.code + ''
}) }).then((res) => {
ElMessage.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()
}
})
} }
const close = async () => { const close = async () => {