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() {