|  |  | @ -82,7 +82,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     return { | 
			
		
	
		
			
				
					|  |  |  |       dialogFormVisible: false, | 
			
		
	
		
			
				
					|  |  |  |       remark: '', | 
			
		
	
		
			
				
					|  |  |  |       curId: '', | 
			
		
	
		
			
				
					|  |  |  |       curNode: '', | 
			
		
	
		
			
				
					|  |  |  |       editName: '', | 
			
		
	
		
			
				
					|  |  |  |       editMessage: '', | 
			
		
	
		
			
				
					|  |  |  |       disabled: false, // 用防止多次添加或多次重命名 | 
			
		
	
	
		
			
				
					|  |  | @ -123,7 +123,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     // 初始化获取或者相关信息 | 
			
		
	
		
			
				
					|  |  |  |     initPatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.findTree() | 
			
		
	
		
			
				
					|  |  |  |       this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取当前或者最新备注 | 
			
		
	
		
			
				
					|  |  |  |     async queryPatientRemarks() { | 
			
		
	
	
		
			
				
					|  |  | @ -134,7 +133,21 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       console.log('备注', data) | 
			
		
	
		
			
				
					|  |  |  |       // this.tableData = | 
			
		
	
		
			
				
					|  |  |  |       this.collectData = this.handlePatientList(data.data) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     handlePatientList(arr) { | 
			
		
	
		
			
				
					|  |  |  |       arr.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |         if (!item.childs) { | 
			
		
	
		
			
				
					|  |  |  |           item.childs = [] | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if (item.hisManagePatientEntity) { | 
			
		
	
		
			
				
					|  |  |  |           this.$set(item.hisManagePatientEntity, 'name', item.hisManagePatientEntity.remark) | 
			
		
	
		
			
				
					|  |  |  |           item.childs.push(item.hisManagePatientEntity) | 
			
		
	
		
			
				
					|  |  |  |           this.handlePatientList(item.childs) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       return arr | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 查询树结构 | 
			
		
	
		
			
				
					|  |  |  |     async findTree() { | 
			
		
	
	
		
			
				
					|  |  | @ -145,6 +158,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       this.collectData = data.data | 
			
		
	
		
			
				
					|  |  |  |       await this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 或者详情目录结构包含或者备注信息 | 
			
		
	
		
			
				
					|  |  |  |     // async patientTrees() { | 
			
		
	
	
		
			
				
					|  |  | @ -158,7 +172,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     //   console.log('详情目录', data) | 
			
		
	
		
			
				
					|  |  |  |     // }, | 
			
		
	
		
			
				
					|  |  |  |     levelClick(data) { | 
			
		
	
		
			
				
					|  |  |  |       this.curId = data.id | 
			
		
	
		
			
				
					|  |  |  |       this.curNode = data | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     searchRemark(data) { | 
			
		
	
		
			
				
					|  |  |  |       // this.treeId = data.id | 
			
		
	
	
		
			
				
					|  |  | @ -171,7 +185,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         patientId: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |         platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |         remark: this.remark, | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curId | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.$http.post('/tree/addPatientTree', params).then(() => { | 
			
		
	
		
			
				
					|  |  |  |         this.editMessage = '收藏成功!' | 
			
		
	
	
		
			
				
					|  |  | @ -180,7 +194,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           type: 'success' | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |         this.findTree() | 
			
		
	
		
			
				
					|  |  |  |         this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 新增节点 | 
			
		
	
	
		
			
				
					|  |  | @ -221,7 +234,12 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         ...this.addParam | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.disabled = true | 
			
		
	
		
			
				
					|  |  |  |       if (this.curNode.patientId) { | 
			
		
	
		
			
				
					|  |  |  |         this.curNode.name = this.editName | 
			
		
	
		
			
				
					|  |  |  |         await this.$http.post('/tree/addPatientTree', { ...this.curNode }) | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         await this.$http.post('/tree/addTree', params) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.dialogFormVisible = false | 
			
		
	
		
			
				
					|  |  |  |       await this.findTree() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
	
		
			
				
					|  |  | @ -236,6 +254,17 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 删除树节点 | 
			
		
	
		
			
				
					|  |  |  |     deleteNode(node, data) { | 
			
		
	
		
			
				
					|  |  |  |       if (this.curNode.patientId) { | 
			
		
	
		
			
				
					|  |  |  |         this.$confirmFun('你确定要删除吗?').then(() => { | 
			
		
	
		
			
				
					|  |  |  |           this.$http.post('/tree/deletePatientTree', { ...this.curNode }).then(() => { | 
			
		
	
		
			
				
					|  |  |  |             this.$message({ | 
			
		
	
		
			
				
					|  |  |  |               message: '删除成功!', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
		
			
				
					|  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |             this.findTree() | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         const params = { | 
			
		
	
		
			
				
					|  |  |  |           doctorId: this.doctorId, | 
			
		
	
		
			
				
					|  |  |  |           flag: '1', | 
			
		
	
	
		
			
				
					|  |  | @ -243,13 +272,16 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           id: data.id | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.$confirmFun('你确定要删除吗?').then(() => { | 
			
		
	
		
			
				
					|  |  |  |           this.$http.post('/tree/deleteTree', params).then(() => { | 
			
		
	
		
			
				
					|  |  |  |             this.$message({ | 
			
		
	
		
			
				
					|  |  |  |               message: '删除成功!', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
		
			
				
					|  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |             this.findTree() | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 重命名 | 
			
		
	
		
			
				
					|  |  |  |     editNode(node, data) { | 
			
		
	
	
		
			
				
					|  |  | 
 |