Browse Source

fix:暂停/停止测试弹窗

master
guoapeng 2 weeks ago
parent
commit
733145f0ed
  1. 54
      src/pages/Index/Index.vue

54
src/pages/Index/Index.vue

@ -331,6 +331,28 @@
@confirm="confirmFail"
/>
<InitWarn
v-if="showPauseModal"
:visible="showPauseModal"
title="确认操作"
message="是否暂停测试"
icon="/src/assets/Warn.svg"
cancelText="取消"
confirmText="确认"
@close="showPauseModal = false"
@confirm="handlePauseConfirm"
/>
<InitWarn
v-if="showStopModal"
:visible="showStopModal"
title="确认操作"
message="是否停止测试"
icon="/src/assets/Warn.svg"
cancelText="取消"
confirmText="确认"
@close="showStopModal = false"
@confirm="handleStopConfirm"
/>
<InitWarn
v-if="idCardInserted"
:visible="idCardInserted"
title="检测到id卡插入,是否保存?"
@ -968,13 +990,10 @@ const startTest = async () => {
}
}
//
const pauseTest = async () => {
await ElMessageBox.confirm('是否暂停测试?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
const showPauseModal = ref(false)
const handlePauseConfirm = async () => {
showPauseModal.value = false;
deviceWaitingModelInfo.value = {
title: '设备正在响应中',
message: '请不要有任何手动操作!',
@ -989,13 +1008,15 @@ const pauseTest = async () => {
}
}
//
const stopTest = async () => {
await ElMessageBox.confirm('是否停止测试?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
//
const pauseTest = async () => {
showPauseModal.value = true;
}
const showStopModal = ref(false)
const handleStopConfirm = async () => {
showStopModal.value = false
deviceWaitingModelInfo.value = {
title: '设备正在响应中',
message: '请不要有任何手动操作!',
@ -1009,6 +1030,11 @@ const stopTest = async () => {
res && res.data && res.data.info && eMessage.error(res.data.info)
}
}
//
const stopTest = async () => {
showStopModal.value = true
}
//
const continueTest = async () => {
deviceWaitingModelInfo.value = {

Loading…
Cancel
Save