| | |
| | | |
| | | </div> |
| | | <div class="dividing-line"></div> |
| | | <div style="padding: 10px;"> |
| | | <div style="padding: 10px;height: 70vh;margin-top: 10px; overflow: auto;"> |
| | | <el-form |
| | | :model="formInline" |
| | | class="demo-form-inline" |
| | |
| | | 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 { |
| | | let pchildNodes = this.$refs.tree.getNode(this.newNode.id).parent.childNodes |
| | | orderNum = this.getMaxOrderNum(pchildNodes); |
| | | lever = this.formInline.level; |
| | | id = this.formInline.pid; |
| | | } |
| | | } 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("图层列表查询失败"); |
| | | } |