diff --git a/frontend/src/api/home/interface/channelsTest.ts b/frontend/src/api/home/interface/channelsTest.ts index 195892f..5b911b8 100644 --- a/frontend/src/api/home/interface/channelsTest.ts +++ b/frontend/src/api/home/interface/channelsTest.ts @@ -3,7 +3,7 @@ export namespace ChannelsTest { // 系数校准列表 export interface CoefficientVO { - devName?: string;//设备名称 + devName?: string;//设备名称 type?:string;//区分大小电压 monitorNum: string;//监测点序号 desc: string;//描述 @@ -20,7 +20,12 @@ export namespace ChannelsTest { cIeData:string;//电流通道C数据 cIeXi:string;//电流通道C系数 loading: boolean; - reason?:string;//(不)合格原因 + aV:string; + bV:string; + cV:string; + aI:string; + bI:string; + cI:string; } } \ No newline at end of file diff --git a/frontend/src/routers/modules/staticRouter.ts b/frontend/src/routers/modules/staticRouter.ts index 2e03f60..4b8175b 100644 --- a/frontend/src/routers/modules/staticRouter.ts +++ b/frontend/src/routers/modules/staticRouter.ts @@ -38,7 +38,7 @@ export const staticRouter: RouteRecordRaw[] = [ isHide: false, isFull: false, isAffix: false, - isKeepAlive: false, + isKeepAlive: true,//缓存改成true }, }, { @@ -52,7 +52,7 @@ export const staticRouter: RouteRecordRaw[] = [ isHide: false, isFull: false, isAffix: false, - isKeepAlive: false, + isKeepAlive: true, }, }, { @@ -82,7 +82,7 @@ export const staticRouter: RouteRecordRaw[] = [ isHide: false, isFull: false, isAffix: false, - isKeepAlive: false, + isKeepAlive: true, }, }, // 错误页面路由 diff --git a/frontend/src/views/authority/resource/index.vue b/frontend/src/views/authority/resource/index.vue index 8cd37f2..aba2362 100644 --- a/frontend/src/views/authority/resource/index.vue +++ b/frontend/src/views/authority/resource/index.vue @@ -34,6 +34,9 @@ import ResourcePopup from './components/resourcePopup.vue' import {deleteFunction,getFunctionList} from '@/api/user/function/index' import * as Icons from '@element-plus/icons-vue' + defineOptions({ + name: 'resource' + }) const dictStore = useDictStore() const resourcePopup = ref() // ProTable 实例 diff --git a/frontend/src/views/authority/role/index.vue b/frontend/src/views/authority/role/index.vue index a77ee44..c66d68d 100644 --- a/frontend/src/views/authority/role/index.vue +++ b/frontend/src/views/authority/role/index.vue @@ -39,6 +39,9 @@ import RolePopup from './components/rolePopup.vue' import RoleResourcePopup from './components/roleResourcePopup.vue' import { onMounted, reactive, ref } from 'vue' import {useDictStore} from '@/stores/modules/dict' +defineOptions({ + name: 'role' + }) const rolePopup = ref() const roleResourcePopup = ref() const dictStore = useDictStore() diff --git a/frontend/src/views/authority/user/index.vue b/frontend/src/views/authority/user/index.vue index d81b85b..66e08d7 100644 --- a/frontend/src/views/authority/user/index.vue +++ b/frontend/src/views/authority/user/index.vue @@ -43,6 +43,9 @@ import {getUserList, deleteUser,getRoleList} from '@/api/user/user' import { onMounted, reactive, ref } from 'vue' import { type Role } from '@/api/user/interface/role' + defineOptions({ + name: 'user' + }) const roleList = ref([]) const dictStore = useDictStore() const userPopup = ref() diff --git a/frontend/src/views/home/components/channelsTest.vue b/frontend/src/views/home/components/channelsTest.vue index 5ac20e3..813276b 100644 --- a/frontend/src/views/home/components/channelsTest.vue +++ b/frontend/src/views/home/components/channelsTest.vue @@ -71,7 +71,8 @@ + :big_V_loading="big_V_loadingStates" + :curV="CurV"> @@ -112,6 +113,7 @@ const devIdArray = ref([])//系数校准所选设备ID数组 const select_Plan = ref() const planId = ref('') const isButtonDisabled = ref(false); +const CurV= ref()//额定电压 // 在 setup 函数中 const errorStates = ref(new Array(name.value.length).fill(false)); //const loadingStates = ref(new Array(name.value.length).fill(false)); // 初始化 loading 状态 @@ -152,6 +154,33 @@ watch(webMsgSend,function (newValue,oldValue){ } } break; + case 'YJC_xujy': + switch (newValue.operateCode) { + case 'OPER_GATHER': + if (newValue.code == 10552) { + ElMessageBox.alert('存在已经初始化步骤,执行自动关闭,请重新发起检测', '初始化失败', { + confirmButtonText: '确定', + type: 'error', + }) + } else if (newValue.code == 10520) { + ElMessageBox.alert('解析报文异常,执行自动关闭,请重新发起检测', '解析报文异常', { + confirmButtonText: '确定', + type: 'error', + }) + } + TableInit(); + break; + case 'DATA_REQUEST$02': + if (newValue.code == 25003) { + ElMessageBox.alert('相序校验未通过,执行自动关闭,请重新发起检测', '相序校验未通过', { + confirmButtonText: '确定', + type: 'error', + }) + } + TableInit(); + break; + } + break; case 'yjc_sbtxjy': switch (newValue.operateCode) { case 'INIT_GATHER$01': @@ -165,12 +194,19 @@ watch(webMsgSend,function (newValue,oldValue){ confirmButtonText: '确定', type: 'error', }) + TableInit(); } else if (newValue.code == 10552) { ElMessageBox.alert('存在已经初始化步骤,执行自动关闭,请重新发起检测', '初始化失败', { confirmButtonText: '确定', type: 'error', }) - } + } else if (newValue.code == 10520) { + ElMessageBox.alert('解析报文异常,执行自动关闭,请重新发起检测', '解析报文异常', { + confirmButtonText: '确定', + type: 'error', + }) + } + TableInit(); break; } break; @@ -287,6 +323,13 @@ watch(webMsgSend,function (newValue,oldValue){ } else { firstCoefficientVO.cIeXi = newValue.data.cIeXi; } + + firstCoefficientVO.aV = newValue.data.aV; + firstCoefficientVO.bV = newValue.data.bV; + firstCoefficientVO.cV = newValue.data.cV; + firstCoefficientVO.aI = newValue.data.aI; + firstCoefficientVO.bI = newValue.data.bI; + firstCoefficientVO.cI = newValue.data.cI; //console.log(newValue.data.devName + '对象:', firstCoefficientVO); activeIndex.value++; } else { @@ -309,6 +352,7 @@ watch(webMsgSend,function (newValue,oldValue){ confirmButtonText: '确定', type: 'error', }) + TableInit(); break; } break; @@ -327,11 +371,22 @@ watch(webMsgSend,function (newValue,oldValue){ }) break; } + TableInit(); break; - } }) +//出错系数检测初始化 +const TableInit = () => { + isButtonDisabled.value = false; // 恢复按钮 + for (let i = 0; i < channel.value.length; i++) { + const currentTableData = initializeTableData(dataTemplates, i); + tableDataMap.set(i,currentTableData) + } + activeIndex.value = 0 + qualified.value = 0 + active.value = 0 +} //按行图标转动 const tableLoading = (type: string, desc: string) => { @@ -373,7 +428,12 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeXi: '—', loading:false, devName:'', - reason:'', + aV:'—', + bV:'—', + cV:'—', + aI:'—', + bI:'—', + cI:'—', }, { monitorNum: '2', @@ -393,7 +453,12 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeXi: '—', loading:false, devName:'', - reason:'', + aV:'—', + bV:'—', + cV:'—', + aI:'—', + bI:'—', + cI:'—', }, { monitorNum: '3', @@ -413,7 +478,12 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeXi: '—', loading:false, devName:'', - reason:'', + aV:'—', + bV:'—', + cV:'—', + aI:'—', + bI:'—', + cI:'—', }, { monitorNum: '4', @@ -433,7 +503,12 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeXi: '—', loading:false, devName:'', - reason:'', + aV:'—', + bV:'—', + cV:'—', + aI:'—', + bI:'—', + cI:'—', }, ]; @@ -525,6 +600,7 @@ const updateErrorState = (index: number, hasError: boolean) => { // 打开弹窗,可能是新增,也可能是编辑 const open = (selection: Device.ResPqDev[],plan:Plan.ReqPlan) => { + CurV.value = selection[0]?.devVolt || 57.74; isButtonDisabled.value = false; // 恢复按钮 select_Plan.value = plan planId.value = selection[0]?.planId || ''; diff --git a/frontend/src/views/home/components/channelsTestTable.vue b/frontend/src/views/home/components/channelsTestTable.vue index 9f7749a..9dede00 100644 --- a/frontend/src/views/home/components/channelsTestTable.vue +++ b/frontend/src/views/home/components/channelsTestTable.vue @@ -27,8 +27,11 @@ class="item" effect="dark" placement="bottom-start" - :content="'电压L1系数校准不合格原因:'+scope.row.aVuData" > + {{ scope.row.aVuXi }} @@ -38,8 +41,11 @@ class="item" effect="dark" placement="bottom-start" - :content="'电压L1系数校准合格原因:'+scope.row.aVuData" > + {{ scope.row.aVuXi }}