diff --git a/web/src/views/special/document/index.vue b/web/src/views/special/document/index.vue index 9066380..8537883 100644 --- a/web/src/views/special/document/index.vue +++ b/web/src/views/special/document/index.vue @@ -62,7 +62,7 @@ function setupWebSocket() { }; ws1.onmessage = (e) => { console.log('websocket接收到消息', e) - tonstatus() + tonstatus(true) } ws1.onclose = () => { @@ -109,7 +109,7 @@ function getProject() { projectName.value = projectArr.value[0].projectName ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'projectId_' + projectId.value) setupWebSocket() - tonstatus() + tonstatus(false) // gettreedata() }) @@ -135,7 +135,7 @@ function scan() { } else { specialScanById({ id: projectId.value }).then((res: any) => { if (res.code == 0) { - tonstatus() + tonstatus(false) } }) } @@ -474,7 +474,7 @@ function submitfile() { if (localStorage.getItem('filepath') == '/temporary') { documentUploadById({ fileName: JSON.parse(localStorage.getItem('fileArr'))[0].name, id: projectId.value }).then((res: any) => { if (res.code == 0) { - tonstatus() + tonstatus(false) upfile.value = false titleon.value = true closeDialog() @@ -814,12 +814,13 @@ const fileIcon = (row: any) => { const tonloading = ref(false) const tonloading1 = ref(false) const buttonmsg1 = ref('初始化导入项目完整压缩包') -function tonstatus() { +function tonstatus(ready: any) { //sao obtainInformationAsync({ id: projectId.value }).then((res: any) => { if (res.data.scanstatus == '1') { tonloading.value = false buttonmsg.value = '扫描项目完整路径' + readyto(ready,'1') } else if (res.data.scanstatus == '0') { tonloading.value = true buttonmsg.value = '处理中...' @@ -827,6 +828,7 @@ function tonstatus() { if (res.data.uploadstatus == '1') { tonloading1.value = false buttonmsg1.value = '初始化导入项目完整压缩包' + readyto(ready,'2') } else if (res.data.uploadstatus == '0') { tonloading1.value = true buttonmsg1.value = '处理中...' @@ -834,7 +836,23 @@ function tonstatus() { }) gettreedata() } +function readyto(ready: any, type: any) { + if (ready) { + let msg = type == '1' ? '项目扫描成功' : '项目初始化成功' + ElMessageBox.confirm( + msg, + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + } + ) + .then(() => { + }) + } +} @@ -1121,7 +1140,7 @@ function tonstatus() { .img_tree { display: flex; - width: 20%; + width: 25%; align-items: center; justify-content: space-between; diff --git a/web/src/views/special/project/index.vue b/web/src/views/special/project/index.vue index 2a5c128..b3d2153 100644 --- a/web/src/views/special/project/index.vue +++ b/web/src/views/special/project/index.vue @@ -407,7 +407,7 @@ let result2 = ref([]) - +
diff --git a/web/src/views/system/storage/index.vue b/web/src/views/system/storage/index.vue index 19f3ac2..c132148 100644 --- a/web/src/views/system/storage/index.vue +++ b/web/src/views/system/storage/index.vue @@ -236,16 +236,19 @@ function handleClose1() { function comparePercentage(percentStr: any) { // 去除百分号并转换为数字 if (!percentStr.spaceOccupancyRatio) { - percentStr.resar = false + percentStr.resar = '' return percentStr.spaceOccupancyRatio; } const arr = percentStr.spaceOccupancyRatio.split(";").map(item => parseFloat(item.replace("%", ""))); if(arr.length > 0){ arr.forEach(item => { - if (item > 80 || item == 80) { - percentStr.resar = true + if ((item < 20 && item > 10)|| item == 20) { + percentStr.resar = '#c5c528' } - }); + if (item < 10|| item == 10) { + percentStr.resar = 'red' + } + }); } // const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', '')); @@ -284,26 +287,32 @@ function comparePercentage(percentStr: any) { + + + - + @@ -2186,7 +2204,7 @@ function repstring(row: any) { .img_tree { display: flex; - width: 20%; + width: 25%; align-items: center; justify-content: space-between; diff --git a/web/src/views/testdata/fileSynchronization/index.vue b/web/src/views/testdata/fileSynchronization/index.vue index 512232b..790dc9d 100644 --- a/web/src/views/testdata/fileSynchronization/index.vue +++ b/web/src/views/testdata/fileSynchronization/index.vue @@ -38,7 +38,7 @@ function setupWebSocket() { }; ws1.onmessage = (e) => { console.log('websocket接收到消息', e) - tonstatus() + tonstatus(true) } ws1.onclose = () => { @@ -108,12 +108,13 @@ function gettreeTwo() { /// const tonloading = ref(false) const buttonmsg = ref('文件备份') -function tonstatus() { +function tonstatus(ready: any) { //sao automaticFileBackupData({ nodeId: pathid.value, taskId: projectId.value }).then((res: any) => { if (res.data.status == '1') { tonloading.value = false buttonmsg.value = '文件备份' + readyto(ready) } else { tonloading.value = true buttonmsg.value = '处理中...' @@ -122,6 +123,22 @@ function tonstatus() { getminiotree() }) } +function readyto(ready: any) { + if (ready) { + ElMessageBox.confirm( + '项目扫描成功', + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + } + ) + .then(() => { + + }) + } +} //// function backups() { ElMessageBox.confirm( @@ -155,14 +172,14 @@ function backups() { automaticFileBackupByIds(params).then((res: any) => { if (res.code == 0) { comparearr.value.length = 0 - tonstatus() + tonstatus(false) } }) } else { automaticFileBackup(params).then((res: any) => { if (res.code == 0) { comparearr.value.length = 0 - tonstatus() + tonstatus(false) } }) } @@ -396,7 +413,7 @@ function handleNodeClick(data: any, node: any) { setupWebSocket() getlocaltree() getminiotree() - tonstatus() + tonstatus(false) } //工作空间树点击 const handleCheckChange = ( diff --git a/web/src/views/testdata/testtask/index.vue b/web/src/views/testdata/testtask/index.vue index 1397d98..42d8909 100644 --- a/web/src/views/testdata/testtask/index.vue +++ b/web/src/views/testdata/testtask/index.vue @@ -521,10 +521,10 @@ let result2 = ref([]) --> - + - +