diff --git a/src/utils/api.js b/src/utils/api.js index 8a39b91..d632892 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,8 +1,5 @@ let host = 'http://39.108.250.202:9000' -if(process.env.NODE_ENV === 'development'){ - host = 'http://192.168.31.216:9000' -} let host1 = 'http://192.168.31.216:9000'//榕 let host2 = 'http://192.168.31.125:9000'//林 // let host = 'http://192.168.31.137:9000'// 陈赓 diff --git a/src/views/data/Framework.vue b/src/views/data/Framework.vue index 19a4ff8..d46a1c5 100644 --- a/src/views/data/Framework.vue +++ b/src/views/data/Framework.vue @@ -319,6 +319,18 @@ export default { } }) }, + renderChecked(){ + let result = [] + let list = this.$refs.typeTree.getCheckedNodes() + list.map((n,i) => { + if(n.tableLen && n.tableLen > n.children.length){ + result = [...result,...n.children.map(n => n.id)] + }else{ + result.push(n.id) + } + }) + this.$refs.typeTree.setCheckedKeys(result) + }, loadType(e){ clearTimeout(this.typeTimer) let typeTree = this.$refs.typeTreeWrap @@ -328,7 +340,7 @@ export default { this.getMoreTable(this.importTypeList,this.curExpand) setTimeout(() => { this.$nextTick(() => { - this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) + this.renderChecked() }) },300) } @@ -431,7 +443,7 @@ export default { }, importTypeExpand(obj,node,com){ this.curExpand = obj.id - this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) + this.renderChecked() }, closeImport(){ this.$refs.typeTree.setCheckedKeys([]) diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index 5f4e3f5..c85f844 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -181,13 +181,13 @@ - + @@ -199,38 +199,39 @@ - + - + - + - + - + - +