From 3fbc6ad6e1e5d556c177262e7ae0f4537576d95a Mon Sep 17 00:00:00 2001 From: wanglei Date: Fri, 14 Jun 2024 09:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=9B=AE=E5=BD=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/dangan/collection/index.vue | 62 +++++++++++-------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/dangan-ui/src/views/dangan/collection/index.vue b/dangan-ui/src/views/dangan/collection/index.vue index 41ee085..3353d12 100644 --- a/dangan-ui/src/views/dangan/collection/index.vue +++ b/dangan-ui/src/views/dangan/collection/index.vue @@ -334,7 +334,6 @@ export default { type: 'error' }); }else { - console.log(result.data); if(result.data.indexOf('M3230') !== -1){ _this.WebScanSetParams() }else { @@ -425,12 +424,12 @@ export default { catalogTreeselect().then(response => { this.dangAnOptions = response.data; - this.$nextTick(() => { - this.$refs.tree.setCurrentKey(this.$route.query.id); - this.dangAnNode = this.$refs.tree.getNode(this.$route.query.id); - - console.log(3132, this.dangAnNode); - }); + if(this.$route.query.id){ + this.$nextTick(() => { + this.$refs.tree.setCurrentKey(this.$route.query.id); + this.dangAnNode = this.$refs.tree.getNode(this.$route.query.id); + }); + } }); }, @@ -441,33 +440,44 @@ export default { }, // 节点单击事件 handleNodeClick(data, Node) { - console.log(23132,Node); this.dangAnID = data.id; this.dangAnNode = Node; }, /** 点击上传操作 */ handleUpload() { - this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => { - this.getTreeselect(); - this.fileList = [] - this.upload.shelfId=undefined; - this.upload.wlsjNode=undefined; - this.upload.open = true; - }).catch(() => { - this.upload.open = false; - }); + if(this.dangAnNode){ + this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => { + this.getTreeselect(); + this.fileList = [] + this.upload.shelfId=undefined; + this.upload.wlsjNode=undefined; + this.upload.open = true; + }).catch(() => { + this.upload.open = false; + }); + }else { + this.$alert(`请先选择档案目录`, `提示`, { + type: 'warning' + }); + } }, // 点击扫描上传 handleScan(){ - this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => { - this.getTreeselect(); - this.smwj.list = []; - this.smwj.shelfId=undefined; - this.smwj.wlsjNode=undefined; - this.smwj.open = true; - }).catch(() => { - this.smwj.open = false; - }); + if(this.dangAnNode){ + this.$modal.confirm(`是否确认选择【${this.dangAnNode.label}】档案目录?`).then(() => { + this.getTreeselect(); + this.smwj.list = []; + this.smwj.shelfId=undefined; + this.smwj.wlsjNode=undefined; + this.smwj.open = true; + }).catch(() => { + this.smwj.open = false; + }); + }else { + this.$alert(`请先选择档案目录`, `提示`, { + type: 'warning' + }); + } }, /** 查询目录下拉树结构 */ getTreeselect() {