diff --git a/frontend/.env.development b/frontend/.env.development index ca3d07d..8f13788 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -19,6 +19,6 @@ VITE_API_URL=/api # 开发环境跨域代理,支持配置多个 -VITE_PROXY=[["/api","http://192.168.1.127:18092/"]] +VITE_PROXY=[["/api","http://192.168.1.124:18092/"]] #VITE_PROXY=[["/api","http://192.168.1.125:18092/"]] # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts index 8135666..ce3d6b7 100644 --- a/frontend/src/api/device/interface/device.ts +++ b/frontend/src/api/device/interface/device.ts @@ -50,7 +50,7 @@ export namespace Device { planId?:string;//检测计划Id timeCheckResult?:number;//守时检测结果(0:不符合1:符合) factorFlag?:number;//是否支持系数校准(0:不支持,1:支持) - factorCheckResult?: number;//系数校准结果(0:不符合1:符合) + factorCheckResult?: number;//系数校准结果(0:不合格,1:合格,2:/表示没有做系数校准) state: number; //状态 createBy?: string| null; //创建用户 createTime?: string| null; //创建时间 diff --git a/frontend/src/api/home/interface/channelsTest.ts b/frontend/src/api/home/interface/channelsTest.ts index 60230ab..195892f 100644 --- a/frontend/src/api/home/interface/channelsTest.ts +++ b/frontend/src/api/home/interface/channelsTest.ts @@ -20,7 +20,7 @@ export namespace ChannelsTest { cIeData:string;//电流通道C数据 cIeXi:string;//电流通道C系数 loading: boolean; - + reason?:string;//(不)合格原因 } } \ No newline at end of file diff --git a/frontend/src/directives/modules/auth.ts b/frontend/src/directives/modules/auth.ts index 8730c93..8d78f0b 100644 --- a/frontend/src/directives/modules/auth.ts +++ b/frontend/src/directives/modules/auth.ts @@ -10,12 +10,14 @@ const auth: Directive = { const { value } = binding const authStore = useAuthStore() const currentPageRoles = authStore.authButtonListGet[authStore.routeName] ?? [] - // console.log('1234',authStore.routeName) - // console.log('123',currentPageRoles) - if (value instanceof Array && value.length) { + // console.log('1234',authStore.routeName) + // console.log('123',currentPageRoles) + if (value instanceof Array && value.length) { + console.log('123456',value) const hasPermission = value.every(item => currentPageRoles.includes(item)) if (!hasPermission) el.remove() } else { + console.log('12345',value) if (!currentPageRoles.includes(value)) el.remove() } }, diff --git a/frontend/src/views/home/components/channelsTest.vue b/frontend/src/views/home/components/channelsTest.vue index 33a23f1..f5ffa28 100644 --- a/frontend/src/views/home/components/channelsTest.vue +++ b/frontend/src/views/home/components/channelsTest.vue @@ -96,6 +96,7 @@ import { ElMessage, ElMessageBox, TabsPaneContext } from 'element-plus'; import { getCoefficientCheck } from '@/api/home/channelsTest/index' import type { ChannelsTest } from '@/api/home/interface/channelsTest'; import type { Plan } from '@/api/plan/interface'; +import { fa } from 'element-plus/es/locale'; const activeIndex = ref(0) const activeTotalNum = ref(4) const qualified = ref(0) @@ -324,7 +325,8 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeData: '—', cIeXi: '—', loading:false, - devName:'' + devName:'', + reason:'', }, { monitorNum: '2', @@ -343,7 +345,8 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeData: '—', cIeXi: '—', loading:false, - devName:'' + devName:'', + reason:'', }, { monitorNum: '3', @@ -362,7 +365,8 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeData: '—', cIeXi: '—', loading:false, - devName:'' + devName:'', + reason:'', }, { monitorNum: '4', @@ -381,7 +385,8 @@ const dataTemplates : ChannelsTest.CoefficientVO[]= [ cIeData: '—', cIeXi: '—', loading:false, - devName:'' + devName:'', + reason:'', }, ]; @@ -403,6 +408,8 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [ bIeXi: '—', cIeData: '—', cIeXi: '—', + loading:false, + devName:'' }, { monitorNum: '2', @@ -420,6 +427,8 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [ bIeXi: '—', cIeData: '—', cIeXi: '—', + loading:false, + devName:'' }, { monitorNum: '3', @@ -437,6 +446,8 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [ bIeXi: '—', cIeData: '—', cIeXi: '—', + loading:false, + devName:'' }, { monitorNum: '4', @@ -454,6 +465,8 @@ const dataTemplates2 : ChannelsTest.CoefficientVO[]= [ bIeXi: '—', cIeData: '—', cIeXi: '—', + loading:false, + devName:'' }, ]; @@ -465,22 +478,6 @@ const updateErrorState = (index: number, hasError: boolean) => { // 打开弹窗,可能是新增,也可能是编辑 const open = (selection: Device.ResPqDev[],plan:Plan.ReqPlan) => { - const checkStates = selection.map(item => item.checkState); - const allCheckStatesEqual = new Set(checkStates).size <= 1; - - if (!allCheckStatesEqual) { - ElMessageBox.confirm( - '所勾选设备检测状态不一致,请重新选择', - '提示', - { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - } - ) - return - } - 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 e8bac94..63bb9c4 100644 --- a/frontend/src/views/home/components/channelsTestTable.vue +++ b/frontend/src/views/home/components/channelsTestTable.vue @@ -9,8 +9,8 @@ - - + + - +