diff --git a/frontend/src/api/device/device/deviceData.ts b/frontend/src/api/device/device/deviceData.ts index d49aeab..58e2215 100644 --- a/frontend/src/api/device/device/deviceData.ts +++ b/frontend/src/api/device/device/deviceData.ts @@ -50,10 +50,10 @@ const data = [ name: '240001', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -61,10 +61,10 @@ const data = [ name: '240002', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -72,10 +72,10 @@ const data = [ name: '240003', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -83,10 +83,10 @@ const data = [ name: '240004', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -94,7 +94,7 @@ const data = [ name: '240005', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '不合格', //检测结果 + check_Result: '不符合', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -105,7 +105,7 @@ const data = [ name: '240006', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '不合格', //检测结果 + check_Result: '不符合', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -116,7 +116,7 @@ const data = [ name: '240007', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '合格', //检测结果 + check_Result: '符合', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -127,7 +127,7 @@ const data = [ name: '240008', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '合格', //检测结果 + check_Result: '符合', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -138,7 +138,7 @@ const data = [ name: '240009', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '不合格', //检测结果 + check_Result: '不符合', //检测结果 report_State: '已生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -149,7 +149,7 @@ const data = [ name: '240010', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '合格', //检测结果 + check_Result: '符合', //检测结果 report_State: '已生成', //报告状态 document_State: '未归档', //归档状态 check_State:'检测完成',//检测状态 @@ -160,7 +160,7 @@ const data = [ name: '240011', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '合格', //检测结果 + check_Result: '符合', //检测结果 report_State: '已生成', //报告状态 document_State: '已归档', //归档状态 check_State:'检测完成',//检测状态 @@ -171,7 +171,7 @@ const data = [ name: '240012', //设备名称 dev_Type: 'PQS-882B4',//设备类型 dev_Chns: 4, //设备通道数 - check_Result: '合格', //检测结果 + check_Result: '符合', //检测结果 report_State: '已生成', //报告状态 document_State: '已归档', //归档状态 check_State:'检测完成',//检测状态 @@ -182,10 +182,10 @@ const data = [ name: '240013', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -193,32 +193,32 @@ const data = [ name: '240014', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { id: '15', //装置序号ID - name: '240013', //设备名称 + name: '240015', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { id: '16', //装置序号ID - name: '240014', //设备名称 + name: '240016', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -226,10 +226,10 @@ const data = [ name: '240017', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -237,10 +237,10 @@ const data = [ name: '240018', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -248,10 +248,10 @@ const data = [ name: '240019', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, { @@ -259,10 +259,10 @@ const data = [ name: '240020', //设备名称 dev_Type: 'PQS-882A',//设备类型 dev_Chns: 1, //设备通道数 - check_Result: '未检测', //检测结果 + check_Result: '未检', //检测结果 report_State: '未生成', //报告状态 document_State: '未归档', //归档状态 - check_State:'未检测',//检测状态 + check_State:'未检',//检测状态 reCheck_Num: 0, //复检次数 }, ] diff --git a/frontend/src/api/plan/static.json b/frontend/src/api/plan/static.json index f34325e..298f8da 100644 --- a/frontend/src/api/plan/static.json +++ b/frontend/src/api/plan/static.json @@ -2,7 +2,7 @@ "code": "200", "data": [ { - "name": "未检测", + "name": "未检", "children": [ { "id": 4, diff --git a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue index a2d5b28..16f56c6 100644 --- a/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue +++ b/frontend/src/views/home/components/dataCheckChangeErrSysPopup.vue @@ -268,8 +268,8 @@ import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingl const qualified = ref(0) const reportDisabled = ref(true) const reportDialogVisible = ref(false) -const deviceName = ref('被检设备1'); -const error_Sys_Id = ref('2'); +const deviceName = ref('240001'); +const error_Sys_Id = ref('1'); const testScriptName = ref('Q/GDW 10650.4-2021 模拟式'); const errorSysName = ref('Q/GDW 10650.2 - 2021'); const dataRule = ref('所有值'); diff --git a/frontend/src/views/home/components/dataCheckPopup.vue b/frontend/src/views/home/components/dataCheckPopup.vue index 9d8f5ee..f36e526 100644 --- a/frontend/src/views/home/components/dataCheckPopup.vue +++ b/frontend/src/views/home/components/dataCheckPopup.vue @@ -9,7 +9,7 @@ - + @@ -102,7 +102,7 @@ import DataCheckResultTable from './dataCheckResultTable.vue' import DataCheckRawDataTable from './dataCheckRawDataTable.vue' const formContent = ref({}) const activeName = ref('rawDataTab') -const deviceName = ref('被检设备1'); +const deviceName = ref('240001'); const monitorIdx = ref('1'); const reCheckIdx = ref('3'); const testScriptName = ref('Q/GDW 10650.4-2021 模拟式'); diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 4a5f832..2e6e142 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -21,7 +21,7 @@ - + - + - 归档 - 设备新增 + 归档 + @@ -130,7 +128,17 @@ v-if="form.activeTabs === 3 && form.activeChildTabs === 1" >查看 -
+ + 报告下载 + + 归档 @@ -183,9 +191,24 @@ link :icon="Switch" @click="openDrawer('误差体系更换', scope.row)" - v-if="form.activeTabs === 5" + v-if="form.activeTabs === 5 && scope.row.document_State === '已归档'" >误差体系更换 + +
+ + +
报告下载
+
+ +
+
暂停检测继续检测 - 重新检测 + > --> @@ -228,7 +229,7 @@
- +

{{ item.log }}
@@ -323,6 +324,41 @@ const scrollToBottom = () => { function getRandomInt(max: number): number { return Math.floor(Math.random() * max); } + +//判断该检测项(例如 频率准确度检测)是否全部合格(所有设备所有通道所有子检测项目全部合格为合格,否则为不合格) +function getItemCheckResult(index:number):boolean{ + + let items = columnList?.value.filter((item) => item === index.toString()) + + if(items.length > 0) + { + return false + } + else + return true +} +//测试项开始检测时间(或继续检测时间) +const startData = ref(new Date()) +//测试项检测结束时间(或暂停时的时间) +const endData= ref(new Date()) + +let timeDifference = ref(0) + +function getTimeDifference(timeDifference:number): string { + // 将时间差转换为天、小时、分钟、秒 + const millisecondsPerDay = 1000 * 60 * 60 * 24; + const millisecondsPerHour = 1000 * 60 * 60; + const millisecondsPerMinute = 1000 * 60; + const millisecondsPerSecond = 1000; + + const days = Math.floor(timeDifference / millisecondsPerDay); + const hours = Math.floor((timeDifference % millisecondsPerDay) / millisecondsPerHour); + const minutes = Math.floor((timeDifference % millisecondsPerHour) / millisecondsPerMinute); + const seconds = Math.floor((timeDifference % millisecondsPerMinute) / millisecondsPerSecond); + + return `时间差: ${days} 天, ${hours} 小时, ${minutes} 分钟, ${seconds} 秒` +} + const updateLog = () => { const currentTime = ref(new Date().toLocaleString()); @@ -334,14 +370,23 @@ const updateLog = () => { type: 'info', log: currentTime.value + ':频率准确度检测开始', }) - break; case 2: - - testLogList.value.push({ + if(getItemCheckResult(activeIndex.value - 1)) + { + testLogList.value.push({ type: 'info', - log:currentTime.value + ':频率准确度检测完成', + log:currentTime.value + ':频率准确度检测合格', }) + } + else + { + testLogList.value.push({ + type: 'error', + log:currentTime.value + ':频率准确度检测不合格', + }) + } + testLogList.value.push({ type: 'info', log:currentTime.value + ':电压准确度检测开始', @@ -1916,10 +1961,20 @@ watch(ts, function (newValue, oldValue) { :deep(.el-table .warning-row) { // background-color:var(--el-color-warning-light-9); //background-color:#bed96557; - color:red; + color:red; // font-size:30px; // --el-table-tr-bg-color: var(--el-color-warning-light-9); + // background-color:#f5f7fa; + // position: relative; } + +// :deep(.el-table .warning-row::before) { +// content: '*'; /* 必须设置content属性 */ +// position: absolute; +// color:red; +// background-color:#f5f7fa; +// } + .el-table .success-row { --el-table-tr-bg-color: var(--el-color-success-light-9); } diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue index 417990c..48a26fe 100644 --- a/frontend/src/views/home/components/testPopup.vue +++ b/frontend/src/views/home/components/testPopup.vue @@ -3,7 +3,7 @@

- + diff --git a/frontend/src/views/home/components/timeTest.vue b/frontend/src/views/home/components/timeTest.vue index 9d4d014..c888d9e 100644 --- a/frontend/src/views/home/components/timeTest.vue +++ b/frontend/src/views/home/components/timeTest.vue @@ -2,13 +2,13 @@
- - - - - - + + + + + - - 设备已合格 {{ qualified }} 台/共 4 台 - -
+ + + + 标准时间: {{ gpsTime }} + +
+
+ + 守时误差≤1000ms + + +
+ + 守时误差>1000ms + +
+ - -
-
- + + - + + - - --> + +
@@ -62,8 +89,9 @@