From 5c6c0ecc106f49490bb0c4201a0112a58511800f Mon Sep 17 00:00:00 2001 From: RenCheng Date: Tue, 4 Mar 2025 16:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9B=AE=E5=BD=95=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/fileManage/index.vue | 7 ++++--- src/views/fileManage/modules/SliceUpload.vue | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/fileManage/index.vue b/src/views/fileManage/index.vue index 72cf858..5c0c52b 100644 --- a/src/views/fileManage/index.vue +++ b/src/views/fileManage/index.vue @@ -214,7 +214,7 @@ export default { dataSource: [], loading: false, selectedRowKeys: [], - selectId:"0", + selectId:"", modalTitle:"", modelType:"", searchFile:{ @@ -235,7 +235,7 @@ export default { }, methods: { clickfile(){ - if(this.selectId == "0"){ + if(this.selectId.length <= 0){ this.$message.warning("必须选择文件上传目录"); return; } @@ -288,7 +288,7 @@ export default { this.getFileList(); }, getFileList(){ - if(this.selectId == "0"){ + if(this.selectId.length <= 0){ this.$message.warning("必须选择查询目录"); return; } @@ -375,6 +375,7 @@ export default { }, changeSelect(selectedKeys,e){ this.selectId = e.node.dataRef.id + this.searchFile.dirId = this.selectId this.searchgetFileList(); } } diff --git a/src/views/fileManage/modules/SliceUpload.vue b/src/views/fileManage/modules/SliceUpload.vue index 7393bfb..0112239 100644 --- a/src/views/fileManage/modules/SliceUpload.vue +++ b/src/views/fileManage/modules/SliceUpload.vue @@ -206,6 +206,14 @@ export default { */ customRequestUpload ({ file }) { // 开始执行上传逻辑 + if(this.dirId == "" || this.dirId ==null && this.dirId == undefined){ + this.$message.error('文件目录选择异常请刷新页面') + return; + } + if(this.taskId.length <= 0){ + this.$message.error('请选择任务') + return; + } const currentRow = this.tableDate.find((row) => row.uid === file.uid) if (currentRow) { // 当前上传进度归0