暂停页面效果调整
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
@click="handlePause()">停止检测
|
@click="handlePause()">停止检测
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" v-if="testStatus === 'paused_ing' && percentage < 100" disabled>
|
<el-button type="warning" v-if="testStatus === 'paused_ing' && percentage < 100" disabled>
|
||||||
<el-icon class="loading-box">
|
<el-icon class="loading-box" style="margin-right: 8px;">
|
||||||
<component :is="Refresh"/>
|
<component :is="Refresh"/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
暂停中
|
暂停中
|
||||||
@@ -303,7 +303,6 @@ watch(testStatus, function (newValue, oldValue) {
|
|||||||
if (newValue == 'start') {
|
if (newValue == 'start') {
|
||||||
ElMessage.success('初始化开始!')
|
ElMessage.success('初始化开始!')
|
||||||
|
|
||||||
startData.value = new Date();
|
|
||||||
showTestLog()
|
showTestLog()
|
||||||
|
|
||||||
if (oldValue == 'error') {
|
if (oldValue == 'error') {
|
||||||
@@ -315,6 +314,8 @@ watch(testStatus, function (newValue, oldValue) {
|
|||||||
}
|
}
|
||||||
emit('update:testStatus', 'test_init')
|
emit('update:testStatus', 'test_init')
|
||||||
//startTimer() // todo 可移除
|
//startTimer() // todo 可移除
|
||||||
|
startData.value = new Date();
|
||||||
|
timeDifference.value = 0;
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -418,9 +419,11 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
if (newValue.code == 25001) {
|
if (newValue.code == 25001) {
|
||||||
ElMessage.success('初始化成功!')
|
ElMessage.success('初始化成功!')
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:协议校验成功!`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:协议校验成功!`})
|
||||||
|
timeDifference.value = + new Date().getTime() - startData.value.getTime();
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化成功!`})
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化成功!`})
|
||||||
percentage.value = 3
|
percentage.value = 3
|
||||||
|
|
||||||
|
|
||||||
activeIndex = getNextActiveIndex() + 2
|
activeIndex = getNextActiveIndex() + 2
|
||||||
//startTimer()
|
//startTimer()
|
||||||
|
|
||||||
@@ -716,17 +719,21 @@ const updateCheckResult = (data: CheckData.ScriptChnItem) => {
|
|||||||
|
|
||||||
checkResult.forEach(item => {
|
checkResult.forEach(item => {
|
||||||
if (item.scriptType == scriptType) {
|
if (item.scriptType == scriptType) {
|
||||||
item.devices.forEach((device, index) => {
|
for (let i = 0; i < item.devices.length; i++) {
|
||||||
let targetDevice = data.devices.find(dev => dev.deviceId === device.deviceId)
|
let targetDevice = data.devices.find(dev => dev.deviceId === item.devices[i].deviceId)
|
||||||
if (targetDevice !== undefined) {
|
if (targetDevice !== undefined) {
|
||||||
device.chnResult = [...targetDevice.chnResult]
|
item.devices[i].chnResult = [...targetDevice.chnResult]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// item.devices.forEach((device, index) => {
|
||||||
|
// let targetDevice = data.devices.find(dev => dev.deviceId === device.deviceId)
|
||||||
|
// if (targetDevice !== undefined) {
|
||||||
|
// device.chnResult = [...targetDevice.chnResult]
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const scrollToBottom = () => {
|
const scrollToBottom = () => {
|
||||||
if (scrollContainerRef.value) {
|
if (scrollContainerRef.value) {
|
||||||
@@ -768,12 +775,13 @@ const updateLog = (isStart: boolean) => {
|
|||||||
let timeDifferenceItem = 0
|
let timeDifferenceItem = 0
|
||||||
|
|
||||||
if (activeIndex === 1 && isStart) {
|
if (activeIndex === 1 && isStart) {
|
||||||
timeDifference.value = 0;
|
// timeDifference.value = 0;
|
||||||
//testLogList.length = 0; // 清空数组
|
//testLogList.length = 0; // 清空数组
|
||||||
}
|
}
|
||||||
// debugger
|
// debugger
|
||||||
if (activeIndex <= checkTotal) {
|
if (activeIndex <= checkTotal) {
|
||||||
if (isStart) {
|
if (isStart) {
|
||||||
|
startData.value = new Date();
|
||||||
testLogList.push({
|
testLogList.push({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
log: currentTime.value + ` :${scriptData[activeIndex - 1].scriptName}准确度检测:开始`,
|
log: currentTime.value + ` :${scriptData[activeIndex - 1].scriptName}准确度检测:开始`,
|
||||||
@@ -891,8 +899,8 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch
|
|||||||
// }
|
// }
|
||||||
// {
|
// {
|
||||||
// chnResult: [1, 1, 1, 1],
|
// chnResult: [1, 1, 1, 1],
|
||||||
// deviceId: "2957b271f39d4240a1c5e275c453676c",
|
// deviceId: "461813a4f30f4a34a1a273ecd0379458",
|
||||||
// deviceName: "测试003"
|
// deviceName: "25011407"
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
let temp = null
|
let temp = null
|
||||||
|
|||||||
Reference in New Issue
Block a user