bug修复
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model='dialogVisible' title="系数校准" v-bind="dialogBig" width="1550px" @close="handleCancel">
|
<el-dialog v-model='dialogVisible' title="系数校准" v-bind="dialogBig" width="1550px" @close="handleCancel">
|
||||||
<div class="test-dialog" >
|
<div class="test-dialog">
|
||||||
<div class="dialog-content">
|
<div class="dialog-content">
|
||||||
<div class="right-title">
|
<div class="right-title">
|
||||||
<!-- <div>系数校准表</div> -->
|
<!-- <div>系数校准表</div> -->
|
||||||
@@ -18,14 +18,16 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="dialog-left">
|
<div class="dialog-left">
|
||||||
<el-steps direction="vertical" :active="active" :process-status="currentStepStatus" finish-status="success">
|
<el-steps direction="vertical" :active="active" :process-status="currentStepStatus" finish-status="success">
|
||||||
<el-step title="开始" />
|
<el-step title="开始"/>
|
||||||
<el-step>
|
<el-step>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>大电压/电流系数下装</span><br/>
|
<span>大电压/电流系数下装</span><br/>
|
||||||
<span class="spanStyle">源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 0">{{big_V_Download}}</span><br/>
|
<span class="spanStyle" v-if="active > 0">{{ big_V_Download }}</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 0">{{big_I_Download}}</span>
|
<span class="spanStyle" v-if="active > 0">{{ big_I_Download }}</span>
|
||||||
<el-icon v-if="active === 1 " class="loading-box"><el-icon-loading /></el-icon>
|
<el-icon v-if="active === 1 " class="loading-box">
|
||||||
|
<el-icon-loading/>
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
@@ -34,7 +36,9 @@
|
|||||||
<span class="spanStyle">源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 1">{{ small_V_Download }}</span><br/>
|
<span class="spanStyle" v-if="active > 1">{{ small_V_Download }}</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 1">{{ small_I_Download }}</span>
|
<span class="spanStyle" v-if="active > 1">{{ small_I_Download }}</span>
|
||||||
<el-icon v-if="active === 2" class="loading-box"><el-icon-loading /></el-icon>
|
<el-icon v-if="active === 2" class="loading-box">
|
||||||
|
<el-icon-loading/>
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
@@ -43,7 +47,9 @@
|
|||||||
<span class="spanStyle">源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 2">{{ big_V_Adjust }}</span><br/>
|
<span class="spanStyle" v-if="active > 2">{{ big_V_Adjust }}</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 2">{{ big_I_Adjust }}</span>
|
<span class="spanStyle" v-if="active > 2">{{ big_I_Adjust }}</span>
|
||||||
<el-icon v-if="active === 3" class="loading-box"><el-icon-loading /></el-icon>
|
<el-icon v-if="active === 3" class="loading-box">
|
||||||
|
<el-icon-loading/>
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
@@ -52,20 +58,22 @@
|
|||||||
<span class="spanStyle">源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 3">{{ small_V_Adjust }}</span><br/>
|
<span class="spanStyle" v-if="active > 3">{{ small_V_Adjust }}</span><br/>
|
||||||
<span class="spanStyle" v-if="active > 3">{{ small_I_Adjust }}</span>
|
<span class="spanStyle" v-if="active > 3">{{ small_I_Adjust }}</span>
|
||||||
<el-icon v-if="active === 4" class="loading-box"><el-icon-loading /></el-icon>
|
<el-icon v-if="active === 4" class="loading-box">
|
||||||
|
<el-icon-loading/>
|
||||||
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step title="结束"/>
|
<el-step title="结束"/>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
<el-tabs type="border-card" v-model="editableTabsValue" :active-index="String(activeIndex)" >
|
<el-tabs type="border-card" v-model="editableTabsValue" :active-index="String(activeIndex)">
|
||||||
<el-tab-pane v-for="(device, index) in name" :key="index" :label="device">
|
<el-tab-pane v-for="(device, index) in name" :key="index" :label="device">
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="custom-tabs-label">
|
<span class="custom-tabs-label">
|
||||||
<span>{{ device }}</span>
|
<span>{{ device }}</span>
|
||||||
<el-icon v-if="errorStates[index]" class ="icon-style" >
|
<el-icon v-if="errorStates[index]" class="icon-style">
|
||||||
<Failed />
|
<Failed/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -78,7 +86,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@@ -89,15 +97,14 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script lang="tsx" setup name="channelsTest">
|
<script lang="tsx" setup name="channelsTest">
|
||||||
import { type Device } from '@/api/device/interface/device';
|
import {type Device} from '@/api/device/interface/device';
|
||||||
import { SuccessFilled, Failed, Message, MessageBox } from '@element-plus/icons-vue'
|
import {Failed} from '@element-plus/icons-vue'
|
||||||
import { type Ref, ref, toRef, watch } from 'vue'
|
import {type Ref, ref, toRef, watch} from 'vue'
|
||||||
import {dialogBig} from '@/utils/elementBind'
|
import {dialogBig} from '@/utils/elementBind'
|
||||||
import { ElMessage, ElMessageBox, TabsPaneContext } from 'element-plus';
|
import {ElMessageBox} from 'element-plus';
|
||||||
import { getCoefficientCheck } from '@/api/home/channelsTest/index'
|
import {getCoefficientCheck} from '@/api/home/channelsTest/index'
|
||||||
import type { ChannelsTest } from '@/api/home/interface/channelsTest';
|
import type {ChannelsTest} from '@/api/home/interface/channelsTest';
|
||||||
import type { Plan } from '@/api/plan/interface';
|
import type {Plan} from '@/api/plan/interface';
|
||||||
import { fa } from 'element-plus/es/locale';
|
|
||||||
import {useUserStore} from "@/stores/modules/user";
|
import {useUserStore} from "@/stores/modules/user";
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +123,7 @@ const devIdArray = ref<string[]>([])//系数校准所选设备ID数组
|
|||||||
const select_Plan = ref<Plan.ReqPlan>()
|
const select_Plan = ref<Plan.ReqPlan>()
|
||||||
const planId = ref('')
|
const planId = ref('')
|
||||||
const isButtonDisabled = ref(false);
|
const isButtonDisabled = ref(false);
|
||||||
const CurV= ref<number>()//额定电压
|
const CurV = ref<number>()//额定电压
|
||||||
// 在 setup 函数中
|
// 在 setup 函数中
|
||||||
const errorStates = ref(new Array(name.value.length).fill(false));
|
const errorStates = ref(new Array(name.value.length).fill(false));
|
||||||
//const loadingStates = ref(new Array(name.value.length).fill(false)); // 初始化 loading 状态
|
//const loadingStates = ref(new Array(name.value.length).fill(false)); // 初始化 loading 状态
|
||||||
@@ -144,7 +151,7 @@ const tableDataMap = new Map<number, Ref<ChannelsTest.CoefficientVO[]>>([]);
|
|||||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||||
const webMsgSend = toRef(props, 'webMsgSend');
|
const webMsgSend = toRef(props, 'webMsgSend');
|
||||||
|
|
||||||
watch(webMsgSend,function (newValue,oldValue){
|
watch(webMsgSend, function (newValue, oldValue) {
|
||||||
if (newValue.code == 10520) {
|
if (newValue.code == 10520) {
|
||||||
ElMessageBox.alert('报文解析异常!', '初始化失败', {
|
ElMessageBox.alert('报文解析异常!', '初始化失败', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -218,17 +225,17 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
})
|
})
|
||||||
TableInit();
|
TableInit();
|
||||||
} else {
|
} else {
|
||||||
switch (newValue.requestId){
|
switch (newValue.requestId) {
|
||||||
case 'yjc_ytxjy':
|
case 'yjc_ytxjy':
|
||||||
switch (newValue.operateCode) {
|
switch (newValue.operateCode) {
|
||||||
case'INIT_GATHER':
|
case'INIT_GATHER':
|
||||||
if(newValue.code ==-1){
|
if (newValue.code == -1) {
|
||||||
ElMessageBox.alert('源未知异常', '初始化失败', {
|
ElMessageBox.alert('源未知异常', '初始化失败', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
TableInit();
|
TableInit();
|
||||||
}else if (newValue.code == 10523) {
|
} else if (newValue.code == 10523) {
|
||||||
ElMessageBox.alert('源连接失败', '源连接失败', {
|
ElMessageBox.alert('源连接失败', '源连接失败', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -274,7 +281,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
})
|
})
|
||||||
TableInit();
|
TableInit();
|
||||||
}else if (newValue.code == 10551) {
|
} else if (newValue.code == 10551) {
|
||||||
ElMessageBox.alert('设备触发报告异常', '设备触发报告异常', {
|
ElMessageBox.alert('设备触发报告异常', '设备触发报告异常', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -298,39 +305,44 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Coefficient_Check':
|
case 'Coefficient_Check':
|
||||||
console.log("Coefficient_Checkactive",active.value);
|
console.log("Coefficient_Checkactive", active.value);
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'big_end'://大电压,电流下装
|
case 'big_start'://大电压,电流下装
|
||||||
active.value++;
|
|
||||||
big_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
big_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
||||||
big_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
big_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
||||||
|
break;
|
||||||
tableLoading('small','系数下装')
|
case 'big_end'://大电压,电流下装
|
||||||
|
active.value++;
|
||||||
|
tableLoading('small', '系数下装')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'small_end'://小电压,电流下装
|
case 'small_start'://小电压,电流下装
|
||||||
active.value++;
|
|
||||||
small_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
small_V_Download.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
||||||
small_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
small_I_Download.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
||||||
|
break;
|
||||||
tableLoading('big','系数校准')
|
case 'small_end'://小电压,电流下装
|
||||||
|
active.value++;
|
||||||
|
tableLoading('big', '系数校准')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'big_comp_end'://大电压,电流校准
|
case 'big_comp_start'://大电压,电流校准
|
||||||
active.value++;
|
|
||||||
big_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
big_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
||||||
big_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
big_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
||||||
|
break;
|
||||||
tableLoading('small','系数校准')
|
case 'big_comp_end'://大电压,电流校准
|
||||||
|
active.value++;
|
||||||
|
tableLoading('small', '系数校准')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'small_comp_end'://小电压,电流校准
|
case 'small_comp_start'://小电压,电流校准
|
||||||
active.value++;
|
|
||||||
small_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
small_V_Adjust.value = 'Ua=Ub=Uc=' + newValue.data.devVolt + 'V';
|
||||||
small_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
small_I_Adjust.value = 'Ia=Ib=Ic=' + newValue.data.devCurr + 'A';
|
||||||
|
break;
|
||||||
|
case 'small_comp_end'://小电压,电流校准
|
||||||
|
active.value++;
|
||||||
active.value++;
|
active.value++;
|
||||||
|
|
||||||
for (let i = 0; i < name.value.length; i++) {
|
for (let i = 0; i < name.value.length; i++) {
|
||||||
@@ -351,7 +363,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
isButtonDisabled.value = false; // 恢复按钮
|
isButtonDisabled.value = false; // 恢复按钮
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'DATA_CHNFACTOR$02'://表格
|
case 'DATA_CHNFACTOR$02'://表格
|
||||||
// 输出 key 为 0 的数组中的第一条 ChannelsTest.CoefficientVO 对象
|
// 输出 key 为 0 的数组中的第一条 ChannelsTest.CoefficientVO 对象
|
||||||
for (let i = 0; i < name.value.length; i++) {
|
for (let i = 0; i < name.value.length; i++) {
|
||||||
@@ -434,7 +446,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'socket_timeout':
|
case 'socket_timeout':
|
||||||
switch(newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case 'VOLTAGE':
|
case 'VOLTAGE':
|
||||||
ElMessageBox.alert('连接超时!', '连接超时', {
|
ElMessageBox.alert('连接超时!', '连接超时', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -445,7 +457,7 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'connect':
|
case 'connect':
|
||||||
switch (newValue.operateCode){
|
switch (newValue.operateCode) {
|
||||||
case "Source":
|
case "Source":
|
||||||
ElMessageBox.alert('源服务端连接失败', '源服务端连接失败', {
|
ElMessageBox.alert('源服务端连接失败', '源服务端连接失败', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -469,11 +481,11 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
|
|
||||||
//出错系数检测初始化
|
//出错系数检测初始化
|
||||||
const TableInit = () => {
|
const TableInit = () => {
|
||||||
console.log("TableInitactive",active.value);
|
console.log("TableInitactive", active.value);
|
||||||
isButtonDisabled.value = false; // 恢复按钮
|
isButtonDisabled.value = false; // 恢复按钮
|
||||||
for (let i = 0; i < channel.value.length; i++) {
|
for (let i = 0; i < channel.value.length; i++) {
|
||||||
const currentTableData = initializeTableData(dataTemplates, i);
|
const currentTableData = initializeTableData(dataTemplates, i);
|
||||||
tableDataMap.set(i,currentTableData)
|
tableDataMap.set(i, currentTableData)
|
||||||
|
|
||||||
// const targetArrayRef = tableDataMap.get(i);
|
// const targetArrayRef = tableDataMap.get(i);
|
||||||
// if (targetArrayRef) {
|
// if (targetArrayRef) {
|
||||||
@@ -501,7 +513,7 @@ const tableLoading = (type: string, desc: string) => {
|
|||||||
const firstCoefficientVO = targetArray.find(item => item.monitorNum === (j + 1).toString() &&
|
const firstCoefficientVO = targetArray.find(item => item.monitorNum === (j + 1).toString() &&
|
||||||
item.type === type &&
|
item.type === type &&
|
||||||
item.desc === desc);
|
item.desc === desc);
|
||||||
if (firstCoefficientVO){
|
if (firstCoefficientVO) {
|
||||||
firstCoefficientVO.loading = true;
|
firstCoefficientVO.loading = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -510,13 +522,13 @@ const tableLoading = (type: string, desc: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataTemplates : ChannelsTest.CoefficientVO[]= [
|
const dataTemplates: ChannelsTest.CoefficientVO[] = [
|
||||||
{
|
{
|
||||||
monitorNum: '1',
|
monitorNum: '1',
|
||||||
desc: '系数下装',
|
desc: '系数下装',
|
||||||
type:'big',
|
type: 'big',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -527,21 +539,21 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:'',
|
devName: '',
|
||||||
aV:'—',
|
aV: '—',
|
||||||
bV:'—',
|
bV: '—',
|
||||||
cV:'—',
|
cV: '—',
|
||||||
aI:'—',
|
aI: '—',
|
||||||
bI:'—',
|
bI: '—',
|
||||||
cI:'—',
|
cI: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '2',
|
monitorNum: '2',
|
||||||
desc: '系数下装',
|
desc: '系数下装',
|
||||||
type:'small',
|
type: 'small',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -552,21 +564,21 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:'',
|
devName: '',
|
||||||
aV:'—',
|
aV: '—',
|
||||||
bV:'—',
|
bV: '—',
|
||||||
cV:'—',
|
cV: '—',
|
||||||
aI:'—',
|
aI: '—',
|
||||||
bI:'—',
|
bI: '—',
|
||||||
cI:'—',
|
cI: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '3',
|
monitorNum: '3',
|
||||||
desc: '系数校准',
|
desc: '系数校准',
|
||||||
type:'big',
|
type: 'big',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -577,21 +589,21 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:'',
|
devName: '',
|
||||||
aV:'—',
|
aV: '—',
|
||||||
bV:'—',
|
bV: '—',
|
||||||
cV:'—',
|
cV: '—',
|
||||||
aI:'—',
|
aI: '—',
|
||||||
bI:'—',
|
bI: '—',
|
||||||
cI:'—',
|
cI: '—',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '4',
|
monitorNum: '4',
|
||||||
desc: '系数校准',
|
desc: '系数校准',
|
||||||
type:'small',
|
type: 'small',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -602,25 +614,25 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:'',
|
devName: '',
|
||||||
aV:'—',
|
aV: '—',
|
||||||
bV:'—',
|
bV: '—',
|
||||||
cV:'—',
|
cV: '—',
|
||||||
aI:'—',
|
aI: '—',
|
||||||
bI:'—',
|
bI: '—',
|
||||||
cI:'—',
|
cI: '—',
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const dataTemplates2 : ChannelsTest.CoefficientVO[]= [
|
const dataTemplates2: ChannelsTest.CoefficientVO[] = [
|
||||||
{
|
{
|
||||||
monitorNum: '1',
|
monitorNum: '1',
|
||||||
desc: '系数下装',
|
desc: '系数下装',
|
||||||
type:'big',
|
type: 'big',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -631,15 +643,15 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:''
|
devName: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '2',
|
monitorNum: '2',
|
||||||
desc: '系数下装',
|
desc: '系数下装',
|
||||||
type:'small',
|
type: 'small',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -650,15 +662,15 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:''
|
devName: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '3',
|
monitorNum: '3',
|
||||||
desc: '系数校准',
|
desc: '系数校准',
|
||||||
type:'big',
|
type: 'big',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'不合格',
|
aVuXi: '不合格',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -669,15 +681,15 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:''
|
devName: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
monitorNum: '4',
|
monitorNum: '4',
|
||||||
desc: '系数校准',
|
desc: '系数校准',
|
||||||
type:'small',
|
type: 'small',
|
||||||
aVuData: '—',
|
aVuData: '—',
|
||||||
aVuXi:'—',
|
aVuXi: '—',
|
||||||
bVuData: '—',
|
bVuData: '—',
|
||||||
bVuXi: '—',
|
bVuXi: '—',
|
||||||
cVuData: '—',
|
cVuData: '—',
|
||||||
@@ -688,8 +700,8 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [
|
|||||||
bIeXi: '—',
|
bIeXi: '—',
|
||||||
cIeData: '—',
|
cIeData: '—',
|
||||||
cIeXi: '—',
|
cIeXi: '—',
|
||||||
loading:false,
|
loading: false,
|
||||||
devName:''
|
devName: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
@@ -699,8 +711,8 @@ const updateErrorState = (index: number, hasError: boolean) => {
|
|||||||
errorStates.value[index] = hasError;
|
errorStates.value[index] = hasError;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 打开弹窗,可能是新增,也可能是编辑
|
// 打开弹窗,可能是新增,也可能是编辑
|
||||||
const open = (selection: Device.ResPqDev[],plan:Plan.ReqPlan) => {
|
const open = (selection: Device.ResPqDev[], plan: Plan.ReqPlan) => {
|
||||||
CurV.value = selection[0]?.devVolt || 57.74;
|
CurV.value = selection[0]?.devVolt || 57.74;
|
||||||
isButtonDisabled.value = false; // 恢复按钮
|
isButtonDisabled.value = false; // 恢复按钮
|
||||||
select_Plan.value = plan
|
select_Plan.value = plan
|
||||||
@@ -718,19 +730,19 @@ const updateErrorState = (index: number, hasError: boolean) => {
|
|||||||
|
|
||||||
for (let i = 0; i < channel.value.length; i++) {
|
for (let i = 0; i < channel.value.length; i++) {
|
||||||
const currentTableData = initializeTableData(dataTemplates, i);
|
const currentTableData = initializeTableData(dataTemplates, i);
|
||||||
tableDataMap.set(i,currentTableData)
|
tableDataMap.set(i, currentTableData)
|
||||||
}
|
}
|
||||||
//console.log('tableDataMap',tableDataMap);
|
//console.log('tableDataMap',tableDataMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'quitClicked'): void;
|
(e: 'quitClicked'): void;
|
||||||
(e: 'submitClicked', callback: (resolve: (value: boolean) => void) => void): void;
|
(e: 'submitClicked', callback: (resolve: (value: boolean) => void) => void): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
||||||
const handleCancel=() => {
|
const handleCancel = () => {
|
||||||
|
|
||||||
//dataSocket.socketServe.closeWs()
|
//dataSocket.socketServe.closeWs()
|
||||||
// 清空 name, channel, total
|
// 清空 name, channel, total
|
||||||
@@ -743,7 +755,7 @@ const updateErrorState = (index: number, hasError: boolean) => {
|
|||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
editableTabsValue.value = '0'
|
editableTabsValue.value = '0'
|
||||||
emit('quitClicked'); // 触发事件
|
emit('quitClicked'); // 触发事件
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTableDataForChannel = (index: number): any[] => {
|
const getTableDataForChannel = (index: number): any[] => {
|
||||||
const data = tableDataMap.get(index);
|
const data = tableDataMap.get(index);
|
||||||
@@ -752,8 +764,7 @@ const getTableDataForChannel = (index: number): any[] => {
|
|||||||
|
|
||||||
|
|
||||||
watch(activeIndex, function (newValue, oldValue) {
|
watch(activeIndex, function (newValue, oldValue) {
|
||||||
if(activeIndex.value === 1)
|
if (activeIndex.value === 1) {
|
||||||
{
|
|
||||||
outputDsc.value = "电压误差为:±0.1Un%; 电流误差为:±0.5%";
|
outputDsc.value = "电压误差为:±0.1Un%; 电流误差为:±0.5%";
|
||||||
// 当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A"
|
// 当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A"
|
||||||
}
|
}
|
||||||
@@ -783,15 +794,15 @@ const handleSubmit = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isButtonDisabled.value = true; // 禁用按钮
|
isButtonDisabled.value = true; // 禁用按钮
|
||||||
tableLoading('big','系数下装')
|
tableLoading('big', '系数下装')
|
||||||
await getCoefficientCheck({
|
await getCoefficientCheck({
|
||||||
userPageId: "cdf",
|
userPageId: "cdf",
|
||||||
devIds:devIdArray.value,
|
devIds: devIdArray.value,
|
||||||
planId:planId.value,
|
planId: planId.value,
|
||||||
errorSysId:select_Plan.value?.errorSysId,
|
errorSysId: select_Plan.value?.errorSysId,
|
||||||
scriptId:select_Plan.value?.scriptId,
|
scriptId: select_Plan.value?.scriptId,
|
||||||
operateType:'0', // '0'为预检测、‘1‘为正式检测
|
operateType: '0', // '0'为预检测、‘1‘为正式检测
|
||||||
userId:userStore.userInfo.id
|
userId: userStore.userInfo.id
|
||||||
})
|
})
|
||||||
active.value++;
|
active.value++;
|
||||||
|
|
||||||
@@ -867,7 +878,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
|
|||||||
for (let j = 0; j < channel.value[index]; j++) {
|
for (let j = 0; j < channel.value[index]; j++) {
|
||||||
templates.forEach((template) => {
|
templates.forEach((template) => {
|
||||||
// 使用解构赋值排除 id 和 MonitorIdx 属性
|
// 使用解构赋值排除 id 和 MonitorIdx 属性
|
||||||
const { devName,monitorNum: __, ...rest } = template;
|
const {devName, monitorNum: __, ...rest} = template;
|
||||||
currentTableData.value.push({
|
currentTableData.value.push({
|
||||||
monitorNum: (j + 1).toString(),
|
monitorNum: (j + 1).toString(),
|
||||||
devName: name.value[index],
|
devName: name.value[index],
|
||||||
@@ -879,8 +890,8 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 对外映射
|
// 对外映射
|
||||||
defineExpose({ open })
|
defineExpose({open})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
@@ -906,6 +917,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-tabs-label .el-icon {
|
.custom-tabs-label .el-icon {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
@@ -922,13 +934,15 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
|
|||||||
.el-tabs--border-card {
|
.el-tabs--border-card {
|
||||||
height: 470px;
|
height: 470px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .el-icon svg {
|
/* .el-icon svg {
|
||||||
color: #ff7171;
|
color: #ff7171;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.icon-style{
|
.icon-style {
|
||||||
color: #ff7171;
|
color: #ff7171;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@@ -941,7 +955,7 @@ const initializeTableData = (templates: ChannelsTest.CoefficientVO[], index: num
|
|||||||
flex: 6;
|
flex: 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spanStyle{
|
.spanStyle {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -344,12 +344,7 @@ const sendPause = () => {
|
|||||||
console.log('发起暂停请求')
|
console.log('发起暂停请求')
|
||||||
|
|
||||||
TestStatus.value = 'paused_ing'
|
TestStatus.value = 'paused_ing'
|
||||||
pauseTest().then(res => {
|
pauseTest()
|
||||||
Object.assign(webMsgSend.value, {
|
|
||||||
requestId: 'preStopTest',
|
|
||||||
operateCode: 'stop'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// Object.assign(webMsgSend.value, {
|
// Object.assign(webMsgSend.value, {
|
||||||
// requestId: 'preStopTest',
|
// requestId: 'preStopTest',
|
||||||
|
|||||||
Reference in New Issue
Block a user