| | |
| | | @row-click="rowClick" |
| | | > |
| | | <template #menu-left> |
| | | <el-button :size="size" type="primary" @click="showAdd()">新增节点</el-button> |
| | | <el-button :size="size" type="primary" @click="showAdd()">新增根节点</el-button> |
| | | </template> |
| | | <template #name="{ row }"> |
| | | <span>{{row.name}}</span> |
| | |
| | | }, |
| | | showAdd (row) { //新增子节点 |
| | | if(!row) { |
| | | this.modalTitle = "新增节点"; |
| | | this.modalTitle = "新增根节点"; |
| | | this.modalForm.nodeType = "10"; |
| | | this.modalForm.parentId = 0; |
| | | }else { |
| | |
| | | ); |
| | | }, |
| | | addLocalTreeNode(parentId) { |
| | | if(this.modalTitle == "新增根节点") { |
| | | this.onLoad(); |
| | | return; |
| | | } |
| | | this.loading = true; |
| | | var obj = {parentId: parentId} |
| | | axios({ |