| | |
| | | this.newNode = node; |
| | | var id, lever, orderNum; |
| | | if (res == 1) { |
| | | //新增同级 |
| | | id = this.formInline.pid; |
| | | let pchildNodes = this.$refs.tree.getNode(this.newNode.id).parent.childNodes |
| | | orderNum = this.getMaxOrderNum(pchildNodes); |
| | | lever = this.formInline.level; |
| | | if (this.formInline.pid) { |
| | | id = this.formInline.pid; |
| | | let pchildNodes = this.$refs.tree.getNode(this.newNode.id).parent.childNodes |
| | | orderNum = this.getMaxOrderNum(pchildNodes); |
| | | lever = this.formInline.level; |
| | | } else { |
| | | id = 0; |
| | | orderNum = 1; |
| | | lever = 1; |
| | | } |
| | | } else if (res == 2) { |
| | | //新增子级 |
| | | id = this.formInline.id; |
| | |
| | | }, |
| | | //获取图层列表 |
| | | async getLayerTree() { |
| | | const data = await layer_selectAll(); |
| | | const data = await layer_selectAll({ flag: 0 }); |
| | | if (data.code != 200) { |
| | | return this.$message.error("图层列表查询失败"); |
| | | } |