From a1d3485ba749b837964b0d7975c3279755b79c53 Mon Sep 17 00:00:00 2001 From: GYYM <704080176@qq.com> Date: Mon, 25 Nov 2024 21:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/device/device/deviceData.ts | 66 ++ frontend/src/assets/icons/preTest.svg | 1 + frontend/src/assets/icons/守时检测.svg | 1 + frontend/src/assets/icons/完成.svg | 1 + frontend/src/assets/icons/正式检测.svg | 1 + frontend/src/assets/icons/系数校准.svg | 1 + .../src/components/echarts/pie/default.vue | 6 +- .../views/home/components/channelsTest.vue | 195 ++++- .../home/components/channelsTestTable.vue | 131 +-- .../components/dataCheckChangeErrSysPopup.vue | 20 +- .../views/home/components/dataCheckPopup.vue | 51 +- .../home/components/dataCheckRawDataTable.vue | 6 +- .../home/components/dataCheckResultTable.vue | 14 +- .../src/views/home/components/preTest.vue | 27 +- frontend/src/views/home/components/table.vue | 12 +- frontend/src/views/home/components/test.vue | 779 +++++++++++++++++- .../src/views/home/components/testPopup.vue | 42 +- frontend/src/views/home/tabs/dashboard.vue | 31 +- 18 files changed, 1225 insertions(+), 160 deletions(-) create mode 100644 frontend/src/assets/icons/preTest.svg create mode 100644 frontend/src/assets/icons/守时检测.svg create mode 100644 frontend/src/assets/icons/完成.svg create mode 100644 frontend/src/assets/icons/正式检测.svg create mode 100644 frontend/src/assets/icons/系数校准.svg diff --git a/frontend/src/api/device/device/deviceData.ts b/frontend/src/api/device/device/deviceData.ts index 20439fd..6a5fafd 100644 --- a/frontend/src/api/device/device/deviceData.ts +++ b/frontend/src/api/device/device/deviceData.ts @@ -145,6 +145,72 @@ const data = [ check_State:'检测完成',//检测状态 reCheck_Num: 2, //复检次数 }, + { + id: '10', //装置序号ID + name: '山大电力测试装置2', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, + { + id: '11', //装置序号ID + name: '山大电力测试装置2', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, + { + id: '12', //装置序号ID + name: '山大电力测试装置2', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, + { + id: '13', //装置序号ID + name: '山大电力测试装置2', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, + { + id: '14', //装置序号ID + name: '山大电力测试装置3', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, + { + id: '15', //装置序号ID + name: '山大电力测试装置4', //设备名称 + dev_Type: 'SDL-3002C',//设备类型 + dev_Chns: 1, //设备通道数 + check_Result: '不合格', //检测结果 + report_State: '已生成', //报告状态 + document_State: '未归档', //归档状态 + check_State:'检测完成',//检测状态 + reCheck_Num: 2, //复检次数 + }, ] export default {data,plan_devicedata} \ No newline at end of file diff --git a/frontend/src/assets/icons/preTest.svg b/frontend/src/assets/icons/preTest.svg new file mode 100644 index 0000000..7ca0e09 --- /dev/null +++ b/frontend/src/assets/icons/preTest.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/icons/守时检测.svg b/frontend/src/assets/icons/守时检测.svg new file mode 100644 index 0000000..5cac310 --- /dev/null +++ b/frontend/src/assets/icons/守时检测.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/icons/完成.svg b/frontend/src/assets/icons/完成.svg new file mode 100644 index 0000000..b41134d --- /dev/null +++ b/frontend/src/assets/icons/完成.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/icons/正式检测.svg b/frontend/src/assets/icons/正式检测.svg new file mode 100644 index 0000000..83102d1 --- /dev/null +++ b/frontend/src/assets/icons/正式检测.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/icons/系数校准.svg b/frontend/src/assets/icons/系数校准.svg new file mode 100644 index 0000000..cb7e23c --- /dev/null +++ b/frontend/src/assets/icons/系数校准.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/components/echarts/pie/default.vue b/frontend/src/components/echarts/pie/default.vue index f62c5f8..4215ea4 100644 --- a/frontend/src/components/echarts/pie/default.vue +++ b/frontend/src/components/echarts/pie/default.vue @@ -32,15 +32,15 @@ const init = () => { ratio: true, //是否显示数值占比,默认不显示 isRing: false, //是否环形图 isRadius: false, //是否圆角 - isSpace: true, //是否显示间隔 - isLabelLine: false, //是否显示引导线 + isSpace: false, //是否显示间隔 + isLabelLine: true, //是否显示引导线 ...props.customData, }; legendData.value = { icon: "roundRect", // 图例项的icon,类型包括 circle(圆形),rect(正方形),//roundRect(圆角正方形),triangle(三角形),diamond(菱形),//pin(大头针行),arrow(箭头形),none(无图例项的icon) orient: "vertical", //图例排列方向 left: "right", //可选属性left,right,top,bottom,可选属性值 left,right,top,bottom,px,百分比,数值, - itemGap: 0, // 设置图例项之间的间隔为20 + itemGap: 1, // 设置图例项之间的间隔为20 ...props.legendData, }; chart.value = chartsRef.value && echarts.init(chartsRef.value); diff --git a/frontend/src/views/home/components/channelsTest.vue b/frontend/src/views/home/components/channelsTest.vue index b6da0d1..c7f2ba0 100644 --- a/frontend/src/views/home/components/channelsTest.vue +++ b/frontend/src/views/home/components/channelsTest.vue @@ -6,23 +6,33 @@
-
当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A
+
当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A; 电压误差为:±0.1Un%; 电流误差为:±0.5%
通道系数已校准3台/共3台 - 通道系数已校准3台/共3台 + 通道系数已校准3台/共3台
- + - + + - + @@ -34,7 +44,7 @@ diff --git a/frontend/src/views/home/components/channelsTestTable.vue b/frontend/src/views/home/components/channelsTestTable.vue index a302a92..2f80d43 100644 --- a/frontend/src/views/home/components/channelsTestTable.vue +++ b/frontend/src/views/home/components/channelsTestTable.vue @@ -52,75 +52,76 @@ import { useDictStore } from '@/stores/modules/dict' const dictStore = useDictStore() const props = defineProps<{ - visible: boolean; - dialogTitle: string; - - formData: { - id: string;//误差体系表Id - name: string;//误差体系名称 - standard_Name:string;//参照标准名称 - standard_Time:string;//标准推行时间 - dev_Level:string;//使用设备等级 - enable:number;//状态:0-不启用 1-启用 - state:number;//0-删除 1-正常 + tableData: { + id: string; + updateTime: string; + deviceName:string; + MonitorIdx:number; + Ua:number; + Ub:number; + Uc:number; + Ia:number; + Ib:number; + Ic:number; + Result: string; }; }>(); - const tableData = ref([ - { - id: '1', - updateTime: '2024-10-10 10:30:00', - deviceName:'被检设备1', - MonitorIdx: 1, - Ua:1.0003, - Ub:1.0003, - Uc:0.0096, - Ia:1.0003, - Ib:1.0003, - Ic:1.0008, - Result: '合格', - }, - { - id: '2', - updateTime: '2024-10-10 10:30:00', - deviceName:'被检设备1', - MonitorIdx: 2, - Ua:1.0003, - Ub:1.0003, - Uc:0.0096, - Ia:1.0003, - Ib:1.0003, - Ic:1.0008, - Result: '合格', - }, - { - id: '3', - updateTime: '2024-10-10 10:30:00', - deviceName:'被检设备1', - MonitorIdx: 3, - Ua:1.0003, - Ub:1.0003, - Uc:0.0096, - Ia:1.0003, - Ib:1.0003, - Ic:1.0008, - Result: '合格', - }, - { - id: '4', - updateTime: '2024-10-10 10:30:00', - deviceName:'被检设备1', - MonitorIdx: 4, - Ua:1.0003, - Ub:1.0003, - Uc:0.0096, - Ia:1.0003, - Ib:1.0003, - Ic:1.0008, - Result: '合格', - }, - ]) + // const tableData = ref([ + // { + // id: '1', + // updateTime: '2024-10-10 10:30:00', + // deviceName:'被检设备1', + // MonitorIdx: 1, + // Ua:1.0003, + // Ub:1.0003, + // Uc:0.0096, + // Ia:1.0003, + // Ib:1.0003, + // Ic:1.0008, + // Result: '合格', + // }, + // { + // id: '2', + // updateTime: '2024-10-10 10:30:00', + // deviceName:'被检设备1', + // MonitorIdx: 2, + // Ua:1.0003, + // Ub:1.0003, + // Uc:0.0096, + // Ia:1.0003, + // Ib:1.0003, + // Ic:1.0008, + // Result: '合格', + // }, + // { + // id: '3', + // updateTime: '2024-10-10 10:30:00', + // deviceName:'被检设备1', + // MonitorIdx: 3, + // Ua:1.0003, + // Ub:1.0003, + // Uc:0.0096, + // Ia:1.0003, + // Ib:1.0003, + // Ic:1.0008, + // Result: '合格', + // }, + // { + // id: '4', + // updateTime: '2024-10-10 10:30:00', + // deviceName:'被检设备1', + // MonitorIdx: 4, + // Ua:1.0003, + // Ub:1.0003, + // Uc:0.0096, + // Ia:1.0003, + // Ib:1.0003, + // Ic:1.0008, + // Result: '合格', + // }, + // ]) diff --git a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue index 8e9fe56..890beaf 100644 --- a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue +++ b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue @@ -28,8 +28,11 @@ v-for="plan in testErrSystDataList" :key="plan.id" :label="plan.label" - :value="plan.id"> + :value="plan.id" + :disabled = "plan.label === errorSysName" + > + @@ -220,12 +223,14 @@ import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,so import ReportPopup from './reportPopup.vue' import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue' - const reportDisabled = ref(true) + + +const reportDisabled = ref(true) const reportDialogVisible = ref(false) const deviceName = ref('被检设备1'); const error_Sys_Id = ref('2'); const testScriptName = ref('Q/GDW 10650.4-2021 模拟式'); - const errorSysName = ref('Q/GDW 10650.2-2021'); + const errorSysName = ref('Q/GDW 10650.2 - 2021'); const dataRule = ref('所有值'); const scriptSwitch = ref(true); const currentScriptDsc = ref('频率准确度检测:频率:42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°'); @@ -234,7 +239,14 @@ import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingl label: "name", pid: "pid", }; - +const judge = (label:string) => +{ + console.log(label,errorSysName.value) + if(label === errorSysName.value) + return true +else +return false +} const testData = ref([ { deviceName: '额定条件下频率检测42.5Hz', diff --git a/frontend/src/views/home/components/dataCheckPopup.vue b/frontend/src/views/home/components/dataCheckPopup.vue index ba073f3..e1e2ec3 100644 --- a/frontend/src/views/home/components/dataCheckPopup.vue +++ b/frontend/src/views/home/components/dataCheckPopup.vue @@ -1,5 +1,5 @@