比对式误差切换和删除零时表
This commit is contained in:
@@ -72,7 +72,7 @@ export const exportRawData = (params: {
|
||||
}
|
||||
|
||||
/**
|
||||
* 数模式重新计算
|
||||
* 重新计算
|
||||
* @param params
|
||||
*/
|
||||
export const reCalculate = (params: {
|
||||
@@ -87,21 +87,6 @@ export const reCalculate = (params: {
|
||||
return http.post('/result/reCalculate', params, {loading: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 比对式重新计算
|
||||
* @param params
|
||||
*/
|
||||
export const reCalculate2 = (params: {
|
||||
planId: string
|
||||
deviceId: string
|
||||
errorSysId: string
|
||||
code: string
|
||||
patternId: string
|
||||
|
||||
}) => {
|
||||
return http.post('/result/reCalculate', params, {loading: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据获取基本信息
|
||||
* @param params
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
v-model="formContent.errorSysId"
|
||||
placeholder="请选择误差体系"
|
||||
autocomplete="off"
|
||||
@change="handleErrorSysChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in pqErrorList"
|
||||
@@ -156,8 +157,9 @@ import { Histogram, Postcard } from '@element-plus/icons-vue'
|
||||
import { getPqErrSysList } from '@/api/plan/plan'
|
||||
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { getContrastFormContent, getContrastResult, getScriptList,reCalculate2 } from '@/api/check/test'
|
||||
import { getContrastFormContent, getContrastResult, getScriptList,reCalculate ,changeErrorSystem,deleteTempTable} from '@/api/check/test'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {ResultEnum} from "@/enums/httpEnum";
|
||||
|
||||
const { appendToBody } = withDefaults(
|
||||
defineProps<{
|
||||
@@ -532,24 +534,49 @@ const handleWaveNumberChange = (value: number) => {
|
||||
getResults('wave_data')
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
const close = async () => {
|
||||
visible.value = false
|
||||
formContent.num = ''
|
||||
// 可以在这里添加其他清理逻辑
|
||||
if (checkStore.showDetailType === 1) {
|
||||
await deleteTempTable(checkStore.plan.code + '')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleReCalculate = async () => {
|
||||
reCalculate2({
|
||||
const handleErrorSysChange = async () => {
|
||||
console.log("切换误差体系", formContent.errorSysId);
|
||||
changeErrorSystem({
|
||||
planId: checkStore.plan.id,
|
||||
scriptId: '',
|
||||
errorSysId: formContent.errorSysId,
|
||||
deviceId: formContent.deviceId,
|
||||
code: checkStore.plan.code + '',
|
||||
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
|
||||
}).then((res) => {
|
||||
ElMessage.success('重新计算成功!')
|
||||
handleChnNumChange(formContent.chnNum)
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
ElMessage.success('切换误差体系成功')
|
||||
handleChnNumChange(formContent.chnNum)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const handleReCalculate = async () => {
|
||||
reCalculate({
|
||||
planId: checkStore.plan.id,
|
||||
scriptId: '',
|
||||
errorSysId: formContent.errorSysId,
|
||||
deviceId: formContent.deviceId,
|
||||
code: checkStore.plan.code + '',
|
||||
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
|
||||
}).then((res) => {
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
ElMessage.success('重新计算成功!')
|
||||
handleChnNumChange(formContent.chnNum)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user