日志显示内容微调
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
<!-- v-if="!isPause && activeIndex < activeTotalNum" -->
|
<!-- v-if="!isPause && activeIndex < activeTotalNum" -->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
v-if="!isPause"
|
||||||
:disabled="activeIndex===0 && activeIndex >= activeTotalNum"
|
:disabled="activeIndex===0 || activeIndex >= activeTotalNum"
|
||||||
:icon="VideoPause"
|
:icon="VideoPause"
|
||||||
@click="handlePauseTest"
|
@click="handlePauseTest"
|
||||||
>暂停检测</el-button
|
>暂停检测</el-button
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 98px;">
|
<div style="height: 80px;">
|
||||||
<el-collapse model-value="1" accordion>
|
<el-collapse model-value="1" accordion>
|
||||||
<el-collapse-item title="检测项进度" name="1">
|
<el-collapse-item title="检测项进度" name="1">
|
||||||
<div ref="scrollContainer" class="dialog-log">
|
<div ref="scrollContainer" class="dialog-log">
|
||||||
@@ -628,7 +628,6 @@ const updateLog = () => {
|
|||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
}
|
}
|
||||||
const testLogList = ref([
|
const testLogList = ref([
|
||||||
@@ -732,10 +731,27 @@ const handleReCheck = () => {
|
|||||||
};
|
};
|
||||||
let timer: any = ref("");
|
let timer: any = ref("");
|
||||||
const handlePauseTest = () => {
|
const handlePauseTest = () => {
|
||||||
|
const currentTime = ref(new Date().toLocaleString());
|
||||||
|
|
||||||
if (!isPause.value) {
|
if (!isPause.value) {
|
||||||
|
endData.value = new Date();
|
||||||
|
const Pausetime = endData.value.getTime() - startData.value.getTime();
|
||||||
|
timeDifference.value += Pausetime
|
||||||
|
|
||||||
|
testLogList.value.push({
|
||||||
|
type: 'info',
|
||||||
|
log:currentTime.value + ':暂停检测',
|
||||||
|
})
|
||||||
|
|
||||||
pauseTimer()
|
pauseTimer()
|
||||||
} else {
|
} else {
|
||||||
|
startData.value = new Date();
|
||||||
|
|
||||||
|
testLogList.value.push({
|
||||||
|
type: 'info',
|
||||||
|
log:currentTime.value + ':继续检测',
|
||||||
|
})
|
||||||
|
|
||||||
resumeTimer()
|
resumeTimer()
|
||||||
}
|
}
|
||||||
isPause.value = !isPause.value;
|
isPause.value = !isPause.value;
|
||||||
@@ -2205,19 +2221,28 @@ watch(ts, function (newValue, oldValue) {
|
|||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-content{
|
.dialog-content{
|
||||||
max-height: 450px;
|
max-height: 450px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.el-collapse-item__header){
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.dialog-log{
|
.dialog-log{
|
||||||
max-height: 50px;
|
height: 50px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
// flex-grow: 1;
|
// flex-grow: 1;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// flex-direction: column-reverse;
|
// flex-direction: column-reverse;
|
||||||
}
|
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user