Merge branch 'master' of http://192.168.1.22:3000/ClientApps/pqs-9100_client
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
v-model="formContent.errorSysId"
|
||||
placeholder="请选择误差体系"
|
||||
autocomplete="off"
|
||||
@change="handleErrorSysChange"
|
||||
@change="handleErrorSysChange('切换误差体系成功')"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in pqErrorList"
|
||||
@@ -29,7 +29,20 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据原则">
|
||||
<el-input v-model="formContent.dataRule" :disabled="true" />
|
||||
<!-- <el-input v-model="formContent.dataRule" :disabled="true" />-->
|
||||
<el-select
|
||||
:disabled="checkStore.showDetailType === 2 || checkStore.showDetailType === 0"
|
||||
v-model="formContent.dataRule"
|
||||
placeholder="请选择数据原则"
|
||||
autocomplete="off"
|
||||
@change="handleErrorSysChange('切换数据处理原则成功')">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('Data_Rule')"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="formContent.deviceName" :disabled="true" />
|
||||
@@ -55,7 +68,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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 v-if="checkStore.showDetailType === 0">
|
||||
<el-button type="primary" :icon="Histogram" @click="handleReCalculate">重新计算</el-button>
|
||||
@@ -182,7 +195,7 @@ import CompareDataCheckChart from './compareDataCheckChart.vue'
|
||||
import { CheckData } from '@/api/check/interface'
|
||||
import { useCheckStore } from '@/stores/modules/check'
|
||||
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 { useDictStore } from '@/stores/modules/dict'
|
||||
import {
|
||||
@@ -399,6 +412,7 @@ const getBasicInformation = async (scriptType: any) => {
|
||||
})
|
||||
|
||||
formContent.dataRule = res.data.dataRule
|
||||
console.log('formContent.dataRule',formContent.dataRule)
|
||||
formContent.deviceName = res.data.deviceName
|
||||
formContent.errorSysId = res.data.errorSysId
|
||||
chnMapList.value = res.data.chnMap
|
||||
@@ -514,6 +528,7 @@ const getResults = async (code: any) => {
|
||||
// 判断是否为录波数据请求
|
||||
const isWaveDataRequest = code === 'wave_data' || isWaveData.value
|
||||
|
||||
console.log(checkStore.plan)
|
||||
getContrastResult({
|
||||
planId: checkStore.plan.id,
|
||||
scriptType: rowList.value.scriptType,
|
||||
@@ -522,7 +537,8 @@ const getResults = async (code: any) => {
|
||||
num: formContent.num == '' ? null : formContent.num,
|
||||
waveNum: isWaveDataRequest ? waveNumber.value : null,
|
||||
isWave: isWaveDataRequest,
|
||||
patternId: pattern.value
|
||||
patternId: pattern.value,
|
||||
code: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'')
|
||||
}).then((res: any) => {
|
||||
let list: string[] = []
|
||||
for (let key in res.data.resultMap) {
|
||||
@@ -563,7 +579,7 @@ const close = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleErrorSysChange = async () => {
|
||||
const handleErrorSysChange = async (msg:string) => {
|
||||
changeErrorSystem({
|
||||
planId: checkStore.plan.id,
|
||||
scriptId: '',
|
||||
@@ -571,10 +587,11 @@ const handleErrorSysChange = async () => {
|
||||
deviceId: formContent.deviceId,
|
||||
code: checkStore.plan.code + '',
|
||||
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
|
||||
chnNum: formContent.chnNum
|
||||
chnNum: formContent.chnNum,
|
||||
dataRuleId: formContent.dataRule
|
||||
}).then(res => {
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
ElMessage.success('切换误差体系成功')
|
||||
ElMessage.success(msg)
|
||||
handleChnNumChange(formContent.chnNum)
|
||||
}
|
||||
})
|
||||
@@ -588,7 +605,8 @@ const handleReCalculate = async () => {
|
||||
deviceId: formContent.deviceId,
|
||||
code: checkStore.plan.code + '',
|
||||
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
|
||||
chnNum: formContent.chnNum
|
||||
chnNum: formContent.chnNum,
|
||||
dataRuleId: formContent.dataRule,
|
||||
}).then(res => {
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
ElMessage.success('重新计算成功!')
|
||||
@@ -597,6 +615,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({
|
||||
open
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user