This commit is contained in:
caozehui
2025-08-28 16:29:00 +08:00
parent 8b578d4d8b
commit 6e979c5dcb
3 changed files with 15 additions and 6 deletions

View File

@@ -73,6 +73,7 @@ export const reCalculate = (params: {
errorSysId: string errorSysId: string
deviceId: string deviceId: string
code: string code: string
patternId: string
}) => { }) => {
return http.post('/result/reCalculate', params, {loading: true}) return http.post('/result/reCalculate', params, {loading: true})
} }
@@ -113,6 +114,7 @@ export const changeErrorSystem = (params: {
errorSysId: string errorSysId: string
deviceId: string deviceId: string
code: string code: string
patternId: string
}) => { }) => {
return http.post('/result/changeErrorSystem', params, {loading: true}) return http.post('/result/changeErrorSystem', params, {loading: true})
} }

View File

@@ -292,6 +292,7 @@ const getResults = async () => {
const close = () => { const close = () => {
visible.value = false visible.value = false
formContent.num=''
// 可以在这里添加其他清理逻辑 // 可以在这里添加其他清理逻辑
} }

View File

@@ -8,7 +8,8 @@
<el-input v-model='formContent.scriptName' :disabled="true"/> <el-input v-model='formContent.scriptName' :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item label="误差体系"> <el-form-item label="误差体系">
<el-select :disabled="checkStore.showDetailType===2 || checkStore.showDetailType===0" v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" <el-select :disabled="checkStore.showDetailType===2 || checkStore.showDetailType===0" v-model="formContent.errorSysId" placeholder="请选择误差体系"
autocomplete="off"
@change="handleErrorSysChange"> @change="handleErrorSysChange">
<el-option <el-option
v-for="(option) in pqErrorList" v-for="(option) in pqErrorList"
@@ -107,7 +108,6 @@ import {reactive, ref, watch} from 'vue'
import DataCheckResultTable from './dataCheckResultTable.vue' import DataCheckResultTable from './dataCheckResultTable.vue'
import DataCheckRawDataTable from './dataCheckRawDataTable.vue' import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
import {CheckData} from "@/api/check/interface"; import {CheckData} from "@/api/check/interface";
import {useDictStore} from "@/stores/modules/dict";
import {useCheckStore} from "@/stores/modules/check"; import {useCheckStore} from "@/stores/modules/check";
import {changeErrorSystem, deleteTempTable, exportRawData, getFormData, getTableData, getTreeData, reCalculate} from "@/api/check/test"; import {changeErrorSystem, deleteTempTable, exportRawData, getFormData, getTableData, getTreeData, reCalculate} from "@/api/check/test";
import {generateDevReport, getPqErrSysList} from '@/api/plan/plan' import {generateDevReport, getPqErrSysList} from '@/api/plan/plan'
@@ -115,6 +115,11 @@ 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 {ResultEnum} from "@/enums/httpEnum";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
import {useDictStore} from "@/stores/modules/dict";
import {useModeStore} from "@/stores/modules/mode";
const dictStore = useDictStore()
const modeStore = useModeStore()
const {appendToBody} = withDefaults(defineProps<{ const {appendToBody} = withDefaults(defineProps<{
appendToBody: boolean appendToBody: boolean
@@ -125,7 +130,6 @@ const defaultProps = {
children: "children", children: "children",
}; };
const dictStore = useDictStore()
const checkStore = useCheckStore() const checkStore = useCheckStore()
const visible = ref(false) const visible = ref(false)
@@ -226,6 +230,7 @@ const handleErrorSysChange = async () => {
errorSysId: formContent.errorSysId, errorSysId: formContent.errorSysId,
deviceId: deviceId, deviceId: deviceId,
code: checkStore.plan.code + '', code: checkStore.plan.code + '',
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
}).then((res) => { }).then((res) => {
if (res.code === ResultEnum.SUCCESS) { if (res.code === ResultEnum.SUCCESS) {
ElMessage.success('切换误差体系成功') ElMessage.success('切换误差体系成功')
@@ -440,7 +445,7 @@ const open = async (_deviceId: string, chnNum: string, _scriptType: string | nul
} }
const handleGenerateReport = async () => { const handleGenerateReport = async () => {
await generateDevReport({'planId': checkStore.plan.id, 'devIdList': [deviceId],'scriptId':checkStore.plan.scriptId,'planCode':planCode}) await generateDevReport({'planId': checkStore.plan.id, 'devIdList': [deviceId], 'scriptId': checkStore.plan.scriptId, 'planCode': planCode})
ElMessage.success({message: `报告生成成功!`}) ElMessage.success({message: `报告生成成功!`})
} }
@@ -450,7 +455,8 @@ const handleReCalculate = async () => {
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 + '',
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
}).then((res) => { }).then((res) => {
ElMessage.success('重新计算成功!') ElMessage.success('重新计算成功!')
// if (originErrorSysId != formContent.errorSysId) { // if (originErrorSysId != formContent.errorSysId) {
@@ -596,7 +602,7 @@ const dataToShow = (num: number): string => {
if (num == null || num == undefined) { if (num == null || num == undefined) {
return '/' return '/'
} }
return num+'' return num + ''
} }