{{ 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 @@