误差切换时,生成检测报告
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="checkStore.showDetailType === 1">
|
<el-form-item v-if="checkStore.showDetailType === 1">
|
||||||
<el-button type="primary" :icon="Postcard">报告生成</el-button>
|
<el-button type="primary" :icon="Postcard" @click="handleGenerateReport">报告生成</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="checkStore.showDetailType === 0">
|
<el-form-item v-if="checkStore.showDetailType === 0">
|
||||||
<el-button type="primary" :icon="Histogram" @click="handleReCalculate">重新计算</el-button>
|
<el-button type="primary" :icon="Histogram" @click="handleReCalculate">重新计算</el-button>
|
||||||
@@ -175,7 +175,7 @@ import CompareDataCheckRawDataTable from './compareDataCheckRawDataTable.vue'
|
|||||||
import { CheckData } from '@/api/check/interface'
|
import { CheckData } from '@/api/check/interface'
|
||||||
import { useCheckStore } from '@/stores/modules/check'
|
import { useCheckStore } from '@/stores/modules/check'
|
||||||
import { Histogram, Postcard } from '@element-plus/icons-vue'
|
import { Histogram, Postcard } from '@element-plus/icons-vue'
|
||||||
import { getPqErrSysList } from '@/api/plan/plan'
|
import {generateDevReport, 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 {
|
import {
|
||||||
@@ -590,6 +590,20 @@ const handleReCalculate = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleGenerateReport = async () => {
|
||||||
|
generateDevReport({
|
||||||
|
planId: checkStore.plan.id,
|
||||||
|
devIdList: [formContent.deviceId],
|
||||||
|
scriptId: checkStore.plan.scriptId,
|
||||||
|
planCode: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId ? '_temp':'')
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === ResultEnum.SUCCESS) {
|
||||||
|
ElMessage.success({ message: `报告生成成功!` })
|
||||||
|
handleChnNumChange(formContent.chnNum)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open
|
open
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user