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