diff --git a/src/views/device/Instance/Process/index.vue b/src/views/device/Instance/Process/index.vue index 0437cc9d..643b5fc6 100644 --- a/src/views/device/Instance/Process/index.vue +++ b/src/views/device/Instance/Process/index.vue @@ -54,7 +54,7 @@ const handleCancel = () => { }; const _percent = computed(() => { - return ((errCount.value + count.value) / total.value * 100).toFixed(2) + return total.value ? ((errCount.value + count.value) / total.value * 100).toFixed(2) : 0 }) const getData = (api: string) => { @@ -82,6 +82,12 @@ const getData = (api: string) => { default: break; } + if ((count.value + errCount.value) >= total.value) { + setTimeout(() => { + _source.close(); + flag.value = false; + }, 500) + } }; _source.onerror = () => { _source.close();