diff --git a/frontend/src/api/device/interface/standardDevice.ts b/frontend/src/api/device/interface/standardDevice.ts index 9b50c01..9a83104 100644 --- a/frontend/src/api/device/interface/standardDevice.ts +++ b/frontend/src/api/device/interface/standardDevice.ts @@ -35,9 +35,25 @@ export namespace StandardDevice { updateBy?: string | null; //更新用户 updateTime?: string | null; //更新时间 disabled?: boolean; + gainList?:Gain[] } + interface Gain{ + stdDevMonitorId:string; + uaGain:number; + ubGain:number; + ucGain:number; + u0Gain:number; + iaGain:number; + ibGain:number; + icGain:number; + i0Gain:number; + uabGain:number; + ubcGain:number; + ucaGain:number; + } + /** * 标准设备表格查询分页返回的对象; */ diff --git a/frontend/src/api/user/login/index.ts b/frontend/src/api/user/login/index.ts index a316ef0..71cad48 100644 --- a/frontend/src/api/user/login/index.ts +++ b/frontend/src/api/user/login/index.ts @@ -57,3 +57,14 @@ export const getPublicKey = (username: string) => { export const getAutoGenerate = () => { return http.get('/sysTestConfig/getAutoGenerate', {}, {loading: false}) } + +/** + * 获取比对模式下是否能够进行系数校准 + */ +export const getCanCoefficient=()=>{ + return http.get('/prepare/canCoefficient', {}, {loading: false}) +} + +export const startCoefficient=()=>{ + return http.get('/prepare/startCoefficient', {}, {loading: false}) +} diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index 040f242..4331c57 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -128,7 +128,7 @@ import {CheckData} from '@/api/check/interface' import {useCheckStore} from '@/stores/modules/check' import {ElMessage, ElMessageBox} from 'element-plus' import {getBigTestItem} from '@/api/check/test' -import {getAutoGenerate} from '@/api/user/login' +import {getAutoGenerate, getCanCoefficient, startCoefficient} from '@/api/user/login' import { generateDevReport } from '@/api/plan/plan' import {useModeStore} from '@/stores/modules/mode' // 引入模式 store import {useDictStore} from '@/stores/modules/dict' @@ -157,11 +157,6 @@ const props = defineProps({ const emit = defineEmits([ 'update:testStatus', - 'update:webMsgSend', - 'sendPause', - 'sendResume', - 'sendReCheck', - 'closeWebSocket' ]) // 用来保存测试项进度抽屉是否打开 @@ -684,16 +679,29 @@ const updatePercentage = async () => { }) } stopTimeCount(1) - ElMessageBox.alert( - '检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', - '检测完成', - { - confirmButtonText: '确定' - } - ) - // 关闭WebSocket连接 - emit('closeWebSocket') - //clear(); + + let { data: canCoefficient } = await getCanCoefficient() + if(canCoefficient) { + ElMessageBox.confirm('存在系数偏差,是否进行系数校准?', '系数校准', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(async ()=>{ + // 调用系数校准接口 + await startCoefficient() + ElMessage.success({ message: '系数下发中,请稍等...', duration: 15000 ,onClose() { + ElMessage.success('系数下发成功!') + },}) + }).catch(()=>{ + ElMessageBox.alert( + '检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', + '检测完成', + { + confirmButtonText: '确定' + } + ) + }) + } } } // ========== 时间计数器管理函数 ========== @@ -862,7 +870,6 @@ const handleClick = (item: any, chnNum: number, scriptType: string) => { } const handlePause = () => { - //emit('sendPause') testLogList.push({ type: 'error', log: `${new Date().toLocaleString()}:当前测试小项正在执行中,将在该小项执行结束后暂停...` diff --git a/frontend/src/views/machine/standardDevice/components/standardDevicePopup.vue b/frontend/src/views/machine/standardDevice/components/standardDevicePopup.vue index c9079d3..59f68d2 100644 --- a/frontend/src/views/machine/standardDevice/components/standardDevicePopup.vue +++ b/frontend/src/views/machine/standardDevice/components/standardDevicePopup.vue @@ -72,6 +72,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +