From 485e754646eaa6cd01f61cd4ad775801f610c1f3 Mon Sep 17 00:00:00 2001 From: wangxk Date: Mon, 7 Jul 2025 10:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E6=89=A7=E8=A1=8C=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=87=AA=E5=8A=A8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/special/document/index.vue | 23 +++++++++++++++---- .../views/testdata/datamanagement/index.vue | 6 ++--- .../testdata/fileSynchronization/index.vue | 8 +++---- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/web/src/views/special/document/index.vue b/web/src/views/special/document/index.vue index 8537883..e271768 100644 --- a/web/src/views/special/document/index.vue +++ b/web/src/views/special/document/index.vue @@ -52,6 +52,7 @@ onBeforeUnmount(() => { }) const projectId = ref() const storageKey: any = ref() +const statustype: any = ref('') //websocket let ws1 function setupWebSocket() { @@ -62,6 +63,12 @@ function setupWebSocket() { }; ws1.onmessage = (e) => { console.log('websocket接收到消息', e) + // debugger + if (e.data == '专项文档扫描任务处理完成!') { + statustype.vlaue = '1' + } else { + statustype.vlaue = '2' + } tonstatus(true) } ws1.onclose = () => { @@ -820,7 +827,9 @@ function tonstatus(ready: any) { if (res.data.scanstatus == '1') { tonloading.value = false buttonmsg.value = '扫描项目完整路径' - readyto(ready,'1') + if (statustype.vlaue == '1') { + readyto(ready, '1') + } } else if (res.data.scanstatus == '0') { tonloading.value = true buttonmsg.value = '处理中...' @@ -828,7 +837,9 @@ function tonstatus(ready: any) { if (res.data.uploadstatus == '1') { tonloading1.value = false buttonmsg1.value = '初始化导入项目完整压缩包' - readyto(ready,'2') + if (statustype.vlaue == '2') { + readyto(ready, '2') + } } else if (res.data.uploadstatus == '0') { tonloading1.value = true buttonmsg1.value = '处理中...' @@ -837,7 +848,9 @@ function tonstatus(ready: any) { gettreedata() } function readyto(ready: any, type: any) { + if (ready) { + let msg = type == '1' ? '项目扫描成功' : '项目初始化成功' ElMessageBox.confirm( msg, @@ -848,9 +861,9 @@ function readyto(ready: any, type: any) { type: 'warning', } ) - .then(() => { - - }) + setTimeout(() => { + ElMessageBox.close() + }, 5000) } } diff --git a/web/src/views/testdata/datamanagement/index.vue b/web/src/views/testdata/datamanagement/index.vue index 802a6d3..43cc344 100644 --- a/web/src/views/testdata/datamanagement/index.vue +++ b/web/src/views/testdata/datamanagement/index.vue @@ -155,9 +155,9 @@ function readyto(ready: any) { type: 'warning', } ) - .then(() => { - - }) + setTimeout(() => { + ElMessageBox.close() + }, 5000) } } //左侧树配置 diff --git a/web/src/views/testdata/fileSynchronization/index.vue b/web/src/views/testdata/fileSynchronization/index.vue index 790dc9d..e45b471 100644 --- a/web/src/views/testdata/fileSynchronization/index.vue +++ b/web/src/views/testdata/fileSynchronization/index.vue @@ -126,7 +126,7 @@ function tonstatus(ready: any) { function readyto(ready: any) { if (ready) { ElMessageBox.confirm( - '项目扫描成功', + '文件备份成功', '提示', { confirmButtonText: '确定', @@ -134,9 +134,9 @@ function readyto(ready: any) { type: 'warning', } ) - .then(() => { - - }) + setTimeout(() => { + ElMessageBox.close() + }, 5000) } } ////