|  |  | @ -23,11 +23,11 @@ | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="child">新增子级节点</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |             </el-dropdown> | 
			
		
	
		
			
				
					|  |  |  |             <el-dropdown trigger="click" style="margin-left: 10px" @command="(command)=>handleNode(command,node,data)"> | 
			
		
	
		
			
				
					|  |  |  |             <i v-if="data.patientId" style="color: red" class="el-icon-delete" @click="deleteNode(node, data)" /> | 
			
		
	
		
			
				
					|  |  |  |             <el-dropdown v-else trigger="click" style="margin-left: 10px" @command="(command)=>handleNode(command,node,data)"> | 
			
		
	
		
			
				
					|  |  |  |               <span>···</span> | 
			
		
	
		
			
				
					|  |  |  |               <el-dropdown-menu slot="dropdown"> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item v-if="!data.patientId" command="rename">重命名</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item v-else command="edit">编辑</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="rename">重命名</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="delete">删除</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |             </el-dropdown> | 
			
		
	
	
		
			
				
					|  |  | @ -106,6 +106,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     collectData(val) { | 
			
		
	
		
			
				
					|  |  |  |       console.log(val) | 
			
		
	
		
			
				
					|  |  |  |       if (!val.length) { | 
			
		
	
		
			
				
					|  |  |  |         this.disabled = false | 
			
		
	
		
			
				
					|  |  |  |         this.addParam.id = '' | 
			
		
	
	
		
			
				
					|  |  | @ -132,6 +133,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         // console.log(res.data) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 查找当前treeId下的患者 | 
			
		
	
		
			
				
					|  |  |  |     findTreePatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.$http.get('/tree/findPatientTree', { params: { | 
			
		
	
		
			
				
					|  |  |  |         limit: 10, | 
			
		
	
	
		
			
				
					|  |  | @ -205,7 +207,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       // this.remark = data.hisManagePatientEntity ? data.hisManagePatientEntity.remark : '' | 
			
		
	
		
			
				
					|  |  |  |       // this.remarkId = data.hisManagePatientEntity ? data.hisManagePatientEntity.id : '' | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 添加患者 | 
			
		
	
		
			
				
					|  |  |  |     // 收藏患者 | 
			
		
	
		
			
				
					|  |  |  |     handleAddPatient() { | 
			
		
	
		
			
				
					|  |  |  |       const params = { | 
			
		
	
		
			
				
					|  |  |  |         createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), | 
			
		
	
	
		
			
				
					|  |  | @ -214,6 +216,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         remark: this.remark, | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       console.log(this.curNode) | 
			
		
	
		
			
				
					|  |  |  |       this.$http.post('/tree/addPatientTree', params).then(() => { | 
			
		
	
		
			
				
					|  |  |  |         this.editMessage = '收藏成功!' | 
			
		
	
		
			
				
					|  |  |  |         this.$message({ | 
			
		
	
	
		
			
				
					|  |  | @ -284,9 +287,17 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 删除树节点 | 
			
		
	
		
			
				
					|  |  |  |     deleteNode(node, data) { | 
			
		
	
		
			
				
					|  |  |  |       // 删除患者 | 
			
		
	
		
			
				
					|  |  |  |       if (data.patientId) { | 
			
		
	
		
			
				
					|  |  |  |         const param = { | 
			
		
	
		
			
				
					|  |  |  |           id: data.id, | 
			
		
	
		
			
				
					|  |  |  |           patientId: data.patientId, | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           remark: data.remark, | 
			
		
	
		
			
				
					|  |  |  |           treeId: data.treeId | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.$confirmFun('你确定要删除吗?').then(() => { | 
			
		
	
		
			
				
					|  |  |  |           this.$http.post('/tree/deletePatientTree', { ...data }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |           this.$http.post('/tree/deletePatientTree', param).then(() => { | 
			
		
	
		
			
				
					|  |  |  |             this.$message({ | 
			
		
	
		
			
				
					|  |  |  |               message: '删除成功!', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
	
		
			
				
					|  |  | @ -295,6 +306,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         // 删除树节点 | 
			
		
	
		
			
				
					|  |  |  |         const params = { | 
			
		
	
		
			
				
					|  |  |  |           doctorId: this.doctorId, | 
			
		
	
		
			
				
					|  |  |  |           flag: '1', | 
			
		
	
	
		
			
				
					|  |  | 
 |