|  |  | @ -14,7 +14,6 @@ | 
			
		
	
		
			
				
					|  |  |  |         <el-button v-if="!collectData.length" size="mini" @click="dialogFormVisible = true">新增节点</el-button> | 
			
		
	
		
			
				
					|  |  |  |         <el-tree | 
			
		
	
		
			
				
					|  |  |  |           v-else | 
			
		
	
		
			
				
					|  |  |  |           ref="collectTree" | 
			
		
	
		
			
				
					|  |  |  |           :data="collectData" | 
			
		
	
		
			
				
					|  |  |  |           node-key="id" | 
			
		
	
		
			
				
					|  |  |  |           :props="defaultProps" | 
			
		
	
	
		
			
				
					|  |  | @ -22,7 +21,7 @@ | 
			
		
	
		
			
				
					|  |  |  |           @node-expand="handleNodeExpand" | 
			
		
	
		
			
				
					|  |  |  |           @node-collapse="handleNodeCollapse" | 
			
		
	
		
			
				
					|  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |           <span slot-scope="{ node, data }" :class="[curNode.id===data.id?'active':'','custom-tree-node']" @click="levelClick(data,node)"> | 
			
		
	
		
			
				
					|  |  |  |           <span slot-scope="{ node, data }" :class="[curNode.id===data.id?'active':'','custom-tree-node']" @click="levelClick(data)"> | 
			
		
	
		
			
				
					|  |  |  |             <span class="treeDefault"> | 
			
		
	
		
			
				
					|  |  |  |               <span>{{ node.label }}</span> | 
			
		
	
		
			
				
					|  |  |  |             </span> | 
			
		
	
	
		
			
				
					|  |  | @ -57,6 +56,7 @@ | 
			
		
	
		
			
				
					|  |  |  |       <div class="flex a-c" style="font-size: 16px"> | 
			
		
	
		
			
				
					|  |  |  |         关键词搜索:<el-input v-model="keyword" style="width: 300px;padding: 16px" @change="searchPatient" /> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |       <!--      搜索数据   --> | 
			
		
	
		
			
				
					|  |  |  |       <el-table center :data="tableData"> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="姓名" prop="patientName" /> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="年龄" prop="patientAge" /> | 
			
		
	
	
		
			
				
					|  |  | @ -112,7 +112,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       remarkDialog: false, | 
			
		
	
		
			
				
					|  |  |  |       remark: '', | 
			
		
	
		
			
				
					|  |  |  |       curNode: '', | 
			
		
	
		
			
				
					|  |  |  |       curExpand: '', | 
			
		
	
		
			
				
					|  |  |  |       editName: '', | 
			
		
	
		
			
				
					|  |  |  |       editRemark: '', | 
			
		
	
		
			
				
					|  |  |  |       editMessage: '新增成功', | 
			
		
	
	
		
			
				
					|  |  | @ -156,7 +155,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     initPatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取当前或者最新备注 | 
			
		
	
		
			
				
					|  |  |  |     // 初始化树 | 
			
		
	
		
			
				
					|  |  |  |     async queryPatientRemarks() { | 
			
		
	
		
			
				
					|  |  |  |       const { data } = await this.$http.get('/tree/findTreeIsExistPatient', { | 
			
		
	
		
			
				
					|  |  |  |         params: { | 
			
		
	
	
		
			
				
					|  |  | @ -166,20 +165,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       this.collectData = data.data | 
			
		
	
		
			
				
					|  |  |  |       this.findCurTableData(this.collectData) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     findCurTableData(collectData) { | 
			
		
	
		
			
				
					|  |  |  |       collectData.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |         if (!item.childs) { | 
			
		
	
		
			
				
					|  |  |  |           item.childs = [] | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if (this.curNode.id === item.id) { | 
			
		
	
		
			
				
					|  |  |  |           this.curNode = item | 
			
		
	
		
			
				
					|  |  |  |           this.tableData = item.treePatientVoList | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.findCurTableData(item.childs) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 搜索患者 | 
			
		
	
		
			
				
					|  |  |  |     searchPatient() { | 
			
		
	
	
		
			
				
					|  |  | @ -202,7 +187,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         if (res.data.code === 0) { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.success('删除成功!') | 
			
		
	
		
			
				
					|  |  |  |           this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |           this.queryCurPatient() | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error(res.data.msg) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | @ -241,11 +226,20 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     levelClick(data, node) { | 
			
		
	
		
			
				
					|  |  |  |     levelClick(data) { | 
			
		
	
		
			
				
					|  |  |  |       this.curNode = data | 
			
		
	
		
			
				
					|  |  |  |       this.curExpand = node | 
			
		
	
		
			
				
					|  |  |  |       this.remark = data.remark || '' | 
			
		
	
		
			
				
					|  |  |  |       this.tableData = data.treePatientVoList | 
			
		
	
		
			
				
					|  |  |  |       this.queryCurPatient() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     queryCurPatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.$http.get('tree/findPatientTree', { | 
			
		
	
		
			
				
					|  |  |  |         params: { | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           treeId: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         this.tableData = res.data.data.list | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 收藏患者 | 
			
		
	
		
			
				
					|  |  |  |     handleAddPatient() { | 
			
		
	
	
		
			
				
					|  |  | @ -265,7 +259,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |             message: this.editMessage, | 
			
		
	
		
			
				
					|  |  |  |             type: 'success' | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |           this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |           this.queryCurPatient() | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error(res.data.msg) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | 
 |