|  | @ -2,17 +2,17 @@ | 
		
	
		
			
				|  |  |   <div class="collection"> |  |  |   <div class="collection"> | 
		
	
		
			
				|  |  |     <div class="collection_title">个人收藏</div> |  |  |     <div class="collection_title">个人收藏</div> | 
		
	
		
			
				|  |  |     <div style="flex: 1"> |  |  |     <div style="flex: 1"> | 
		
	
		
			
				|  |  |       <el-button v-if="!tableData.length" size="mini" @click="dialogFormVisible = true">新增节点</el-button> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       <el-button v-if="!collectData.length" size="mini" @click="dialogFormVisible = true">新增节点</el-button> | 
		
	
		
			
				|  |  |       <el-tree |  |  |       <el-tree | 
		
	
		
			
				|  |  |         v-else |  |  |         v-else | 
		
	
		
			
				|  |  |         :data="tableData" |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         :data="collectData" | 
		
	
		
			
				|  |  |         node-key="id" |  |  |         node-key="id" | 
		
	
		
			
				|  |  |         default-expand-all |  |  |         default-expand-all | 
		
	
		
			
				|  |  |         :expand-on-click-node="false" |  |  |         :expand-on-click-node="false" | 
		
	
		
			
				|  |  |       > |  |  |       > | 
		
	
		
			
				|  |  |         <span slot-scope="{ node, data }" class="custom-tree-node" :name="node.id" @click="levelClick(data)"> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         <span slot-scope="{ node, data }" class="custom-tree-node" @click="levelClick(data)"> | 
		
	
		
			
				|  |  |           <span style="display: inline-block;min-width: 100px"> |  |  |           <span style="display: inline-block;min-width: 100px"> | 
		
	
		
			
				|  |  |             <span>{{ node.label }}</span> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |             <span>{{ data.name }}</span> | 
		
	
		
			
				|  |  |           </span> |  |  |           </span> | 
		
	
		
			
				|  |  |           <span> |  |  |           <span> | 
		
	
		
			
				|  |  |             <el-dropdown trigger="click" @command="(command)=>addNode(command,node,data)"> |  |  |             <el-dropdown trigger="click" @command="(command)=>addNode(command,node,data)"> | 
		
	
	
		
			
				|  | @ -131,8 +131,7 @@ export default { | 
		
	
		
			
				|  |  |           platform: this.platform |  |  |           platform: this.platform | 
		
	
		
			
				|  |  |         } |  |  |         } | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |       console.log('树结构', data) |  |  |  | 
		
	
		
			
				|  |  |       // this.tableData = data |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.collectData = data.data | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 或者详情目录结构包含或者备注信息 |  |  |     // 或者详情目录结构包含或者备注信息 | 
		
	
		
			
				|  |  |     // async patientTrees() { |  |  |     // async patientTrees() { | 
		
	
	
		
			
				|  | @ -147,7 +146,6 @@ export default { | 
		
	
		
			
				|  |  |     // }, |  |  |     // }, | 
		
	
		
			
				|  |  |     levelClick(data) { |  |  |     levelClick(data) { | 
		
	
		
			
				|  |  |       this.curId = data.id |  |  |       this.curId = data.id | 
		
	
		
			
				|  |  |       console.log(this.curId) |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     searchRemark(data) { |  |  |     searchRemark(data) { | 
		
	
		
			
				|  |  |       // this.treeId = data.id |  |  |       // this.treeId = data.id | 
		
	
	
		
			
				|  | @ -172,27 +170,28 @@ export default { | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     // 新增节点 |  |  |     // 新增节点 | 
		
	
		
			
				|  |  |     addNode(command, node) { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     addNode(command, node, data) { | 
		
	
		
			
				|  |  |       this.editMessage = '添加成功!' |  |  |       this.editMessage = '添加成功!' | 
		
	
		
			
				|  |  |  |  |  |       console.log(data) | 
		
	
		
			
				|  |  |       this.disabled = false |  |  |       this.disabled = false | 
		
	
		
			
				|  |  |       switch (command) { |  |  |       switch (command) { | 
		
	
		
			
				|  |  |         // 新建同级节点 |  |  |         // 新建同级节点 | 
		
	
		
			
				|  |  |         case 'same': |  |  |         case 'same': | 
		
	
		
			
				|  |  |           this.dialogFormVisible = true |  |  |           this.dialogFormVisible = true | 
		
	
		
			
				|  |  |           this.addParam.id = node.id |  |  |  | 
		
	
		
			
				|  |  |           this.addParam.parentId = node.parent.id |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.addParam.id = '' | 
		
	
		
			
				|  |  |  |  |  |           this.addParam.parentId = data.parentId | 
		
	
		
			
				|  |  |           this.editName = node.name |  |  |           this.editName = node.name | 
		
	
		
			
				|  |  |           break |  |  |           break | 
		
	
		
			
				|  |  |         // 新建子级节点 |  |  |         // 新建子级节点 | 
		
	
		
			
				|  |  |         case 'child': |  |  |         case 'child': | 
		
	
		
			
				|  |  |           this.dialogFormVisible = true |  |  |           this.dialogFormVisible = true | 
		
	
		
			
				|  |  |           this.addParam.id = node.id |  |  |  | 
		
	
		
			
				|  |  |           this.addParam.parentId = node.parent.id |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.addParam.id = '' | 
		
	
		
			
				|  |  |  |  |  |           this.addParam.parentId = data.id | 
		
	
		
			
				|  |  |           this.editName = node.name |  |  |           this.editName = node.name | 
		
	
		
			
				|  |  |           break |  |  |           break | 
		
	
		
			
				|  |  |         // 初始新增 |  |  |         // 初始新增 | 
		
	
		
			
				|  |  |         default: |  |  |         default: | 
		
	
		
			
				|  |  |           this.addParam.id = 0 |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           this.addParam.id = '' | 
		
	
		
			
				|  |  |           this.addParam.parentId = 0 |  |  |           this.addParam.parentId = 0 | 
		
	
		
			
				|  |  |           this.editName = '' |  |  |           this.editName = '' | 
		
	
		
			
				|  |  |           break |  |  |           break | 
		
	
	
		
			
				|  | @ -201,12 +200,11 @@ export default { | 
		
	
		
			
				|  |  |     // 确定新增节点 |  |  |     // 确定新增节点 | 
		
	
		
			
				|  |  |     async confirmNode() { |  |  |     async confirmNode() { | 
		
	
		
			
				|  |  |       const params = { |  |  |       const params = { | 
		
	
		
			
				|  |  |         createDate: new Date().getDate(), |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), | 
		
	
		
			
				|  |  |         doctorId: this.doctorId, |  |  |         doctorId: this.doctorId, | 
		
	
		
			
				|  |  |         flag: '1', |  |  |         flag: '1', | 
		
	
		
			
				|  |  |         name: this.editName, |  |  |         name: this.editName, | 
		
	
		
			
				|  |  |         platform: this.platform, |  |  |         platform: this.platform, | 
		
	
		
			
				|  |  |         weight: 1, |  |  |  | 
		
	
		
			
				|  |  |         ...this.addParam |  |  |         ...this.addParam | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       this.disabled = true |  |  |       this.disabled = true | 
		
	
	
		
			
				|  | @ -234,7 +232,7 @@ export default { | 
		
	
		
			
				|  |  |         name: data.label, |  |  |         name: data.label, | 
		
	
		
			
				|  |  |         platform: this.platform, |  |  |         platform: this.platform, | 
		
	
		
			
				|  |  |         weight: 1, |  |  |         weight: 1, | 
		
	
		
			
				|  |  |         ...this.addParam |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         id: this.curId | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       this.$http.post('/tree/deleteTree', params).then(() => { |  |  |       this.$http.post('/tree/deleteTree', params).then(() => { | 
		
	
		
			
				|  |  |         this.$message({ |  |  |         this.$message({ | 
		
	
	
		
			
				|  | 
 |