正式检测-时间显示调整
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dialog" v-bind="dialogBig">
|
<div class="dialog" v-bind="dialogBig">
|
||||||
<div class="dialog-title">
|
<div class="dialog-title">
|
||||||
|
<div class="timeView">检测用时:{{ timeView }}</div>
|
||||||
<el-progress
|
<el-progress
|
||||||
style="width: 65%"
|
style="width: 55%; margin-right: 15px;"
|
||||||
:percentage="percentage"
|
:percentage="percentage"
|
||||||
:color="customColors"/>
|
:color="customColors"/>
|
||||||
|
|
||||||
|
<div style="width: 12%">
|
||||||
<el-button type="primary" v-if="testStatus=='test_init'" disabled @click="handlePause()">
|
<el-button type="primary" v-if="testStatus=='test_init'" disabled @click="handlePause()">
|
||||||
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||||
<component :is="Refresh"/>
|
<component :is="Refresh"/>
|
||||||
@@ -61,8 +63,8 @@
|
|||||||
@click="emit('sendResume')"
|
@click="emit('sendResume')"
|
||||||
>继续检测
|
>继续检测
|
||||||
</el-button>
|
</el-button>
|
||||||
<div type="text" :icon="Timer" disabled>检测用时:{{ timeView }}</div>
|
</div>
|
||||||
<el-button type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
|
<el-button style="width: 10%" type="text" :icon="InfoFilled" @click="showTestLog">检测项进度</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dialog-content">
|
<div class="dialog-content">
|
||||||
@@ -133,7 +135,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-container">
|
<div class="drawer-container">
|
||||||
<el-drawer v-model="drawer" title="检测项进度">
|
<el-drawer v-model="drawer" title="检测项进度" direction="btt">
|
||||||
<div ref="scrollContainerRef" style="height: 100%; overflow-y: auto;">
|
<div ref="scrollContainerRef" style="height: 100%; overflow-y: auto;">
|
||||||
<p v-for="(item, index) in testLogList"
|
<p v-for="(item, index) in testLogList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -185,7 +187,7 @@ const emit = defineEmits(['update:testStatus', 'update:webMsgSend', 'sendPause',
|
|||||||
// 用来保存测试项进度抽屉是否打开
|
// 用来保存测试项进度抽屉是否打开
|
||||||
const drawer = ref(false)
|
const drawer = ref(false)
|
||||||
// 进度条颜色
|
// 进度条颜色
|
||||||
const customColors = [{color: "#5cb87a", percentage: 100}]
|
const customColors = [{color: "#67c23a", percentage: 100}]
|
||||||
// 检测脚本数据
|
// 检测脚本数据
|
||||||
let scriptData: CheckData.ScriptItem[] = []
|
let scriptData: CheckData.ScriptItem[] = []
|
||||||
// 用来保存被检设备
|
// 用来保存被检设备
|
||||||
@@ -633,8 +635,8 @@ const handleStartItem = (code: string, desc: string | undefined) => {
|
|||||||
updateCheckResultView(code, true)
|
updateCheckResultView(code, true)
|
||||||
updateLog(true)
|
updateLog(true)
|
||||||
} else {
|
} else {
|
||||||
if (desc.length > 60) {
|
if (desc.length > 100) {
|
||||||
desc = desc.substring(0, 60) + '...'
|
desc = desc.substring(0, 100) + '...'
|
||||||
}
|
}
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}准确度检测:开始`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}准确度检测:开始`})
|
||||||
}
|
}
|
||||||
@@ -651,8 +653,8 @@ const handleEndItem = (code: string, desc: string | undefined, devices: CheckDat
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let result = getResult(devices)
|
let result = getResult(devices)
|
||||||
if (desc.length > 60) {
|
if (desc.length > 100) {
|
||||||
desc = desc.substring(0, 60) + '...'
|
desc = desc.substring(0, 100) + '...'
|
||||||
}
|
}
|
||||||
if (result === 1) {
|
if (result === 1) {
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}检测结束:符合`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:${desc}检测结束:符合`})
|
||||||
@@ -776,7 +778,7 @@ const updateCheckResult = (data: CheckData.ScriptChnItem) => {
|
|||||||
|
|
||||||
const scrollToBottom = () => {
|
const scrollToBottom = () => {
|
||||||
if (scrollContainerRef.value) {
|
if (scrollContainerRef.value) {
|
||||||
scrollContainerRef.value.scrollTop = scrollContainerRef.value.scrollHeight;
|
scrollContainerRef.value.scrollTop = scrollContainerRef.value.scrollHeight-50;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1445,11 +1447,22 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dialog-title {
|
.dialog-title {
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.timeView {
|
||||||
|
color: #67c23a;;
|
||||||
|
width: 25%;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 0px;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-content {
|
.dialog-content {
|
||||||
|
|||||||
Reference in New Issue
Block a user