|  |  | @ -1,56 +1,83 @@ | 
			
		
	
		
			
				
					|  |  |  | <template> | 
			
		
	
		
			
				
					|  |  |  |   <div class="collection"> | 
			
		
	
		
			
				
					|  |  |  |     <div> | 
			
		
	
		
			
				
					|  |  |  |       <div style="padding: 16px"> | 
			
		
	
		
			
				
					|  |  |  |         <el-button style="width: 180px" type="primary" size="small" @click="handleAddPatient">收藏当前患者</el-button> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |       <div style="padding:0 16px"> | 
			
		
	
		
			
				
					|  |  |  |         <el-input v-model="remark" style="flex: 1" type="textarea" resize="none" :autosize="{minRows: 2, maxRows: 2}" clearable placeholder="请输入备注" /> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |     <div class="collection_title">个人收藏</div> | 
			
		
	
		
			
				
					|  |  |  |     <div style="flex: 1" class="collect_context"> | 
			
		
	
		
			
				
					|  |  |  |       <el-button v-if="!collectData.length" size="mini" @click="dialogFormVisible = true">新增节点</el-button> | 
			
		
	
		
			
				
					|  |  |  |       <el-tree | 
			
		
	
		
			
				
					|  |  |  |         v-else | 
			
		
	
		
			
				
					|  |  |  |         :data="collectData" | 
			
		
	
		
			
				
					|  |  |  |         node-key="id" | 
			
		
	
		
			
				
					|  |  |  |         :props="defaultProps" | 
			
		
	
		
			
				
					|  |  |  |       > | 
			
		
	
		
			
				
					|  |  |  |         <span slot-scope="{ node, data }" class="custom-tree-node" @click="levelClick(data)"> | 
			
		
	
		
			
				
					|  |  |  |           <span style="display: inline-block;min-width: 100px"> | 
			
		
	
		
			
				
					|  |  |  |             <span>{{ node.label }}</span> | 
			
		
	
		
			
				
					|  |  |  |           </span> | 
			
		
	
		
			
				
					|  |  |  |           <span> | 
			
		
	
		
			
				
					|  |  |  |             <el-dropdown v-if="!data.patientId" trigger="click" @command="(command)=>addNode(command,node,data)"> | 
			
		
	
		
			
				
					|  |  |  |               <span> | 
			
		
	
		
			
				
					|  |  |  |                 <i class="el-icon-plus" /> | 
			
		
	
		
			
				
					|  |  |  |               </span> | 
			
		
	
		
			
				
					|  |  |  |               <el-dropdown-menu slot="dropdown"> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="same">新增同级节点</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="child">新增子级节点</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |             </el-dropdown> | 
			
		
	
		
			
				
					|  |  |  |             <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 command="rename">重命名</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-item command="delete">删除</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |             </el-dropdown> | 
			
		
	
		
			
				
					|  |  |  |     <div class="collect_content"> | 
			
		
	
		
			
				
					|  |  |  |       <div style="flex: 1" class="collect_context"> | 
			
		
	
		
			
				
					|  |  |  |         <el-button v-if="!collectData.length" size="mini" @click="dialogFormVisible = true">新增节点</el-button> | 
			
		
	
		
			
				
					|  |  |  |         <el-tree | 
			
		
	
		
			
				
					|  |  |  |           v-else | 
			
		
	
		
			
				
					|  |  |  |           :data="collectData" | 
			
		
	
		
			
				
					|  |  |  |           node-key="id" | 
			
		
	
		
			
				
					|  |  |  |           :props="defaultProps" | 
			
		
	
		
			
				
					|  |  |  |         > | 
			
		
	
		
			
				
					|  |  |  |           <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> | 
			
		
	
		
			
				
					|  |  |  |             <span> | 
			
		
	
		
			
				
					|  |  |  |               <el-dropdown v-if="!data.patientId" trigger="click" @command="(command)=>addNode(command,node,data)"> | 
			
		
	
		
			
				
					|  |  |  |                 <span :class="{'active':curNode.id===data.id}"> | 
			
		
	
		
			
				
					|  |  |  |                   <i class="el-icon-plus" /> | 
			
		
	
		
			
				
					|  |  |  |                 </span> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-menu slot="dropdown"> | 
			
		
	
		
			
				
					|  |  |  |                   <el-dropdown-item command="same">新增同级节点</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                   <el-dropdown-item command="child">新增子级节点</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown> | 
			
		
	
		
			
				
					|  |  |  |               <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 :class="{'active':curNode.id===data.id}">···</span> | 
			
		
	
		
			
				
					|  |  |  |                 <el-dropdown-menu slot="dropdown"> | 
			
		
	
		
			
				
					|  |  |  |                   <el-dropdown-item command="rename">编辑</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                   <el-dropdown-item command="delete">删除</el-dropdown-item> | 
			
		
	
		
			
				
					|  |  |  |                 </el-dropdown-menu> | 
			
		
	
		
			
				
					|  |  |  |               </el-dropdown> | 
			
		
	
		
			
				
					|  |  |  |             </span> | 
			
		
	
		
			
				
					|  |  |  |           </span> | 
			
		
	
		
			
				
					|  |  |  |         </span> | 
			
		
	
		
			
				
					|  |  |  |       </el-tree> | 
			
		
	
		
			
				
					|  |  |  |       <el-dialog :modal-append-to-body="false" width="30%" title="节点名称" :visible.sync="dialogFormVisible"> | 
			
		
	
		
			
				
					|  |  |  |         <el-input ref="renameRef" v-model="editName" /> | 
			
		
	
		
			
				
					|  |  |  |         </el-tree> | 
			
		
	
		
			
				
					|  |  |  |         <el-dialog :modal-append-to-body="false" width="30%" title="节点名称" :visible.sync="dialogFormVisible"> | 
			
		
	
		
			
				
					|  |  |  |           <el-input ref="renameRef" v-model="editName" /> | 
			
		
	
		
			
				
					|  |  |  |           <div slot="footer" class="dialog-footer"> | 
			
		
	
		
			
				
					|  |  |  |             <el-button @click="dialogFormVisible = false">取 消</el-button> | 
			
		
	
		
			
				
					|  |  |  |             <el-button type="primary" :disabled="disabled" @click="confirmNode()">确 定</el-button> | 
			
		
	
		
			
				
					|  |  |  |           </div> | 
			
		
	
		
			
				
					|  |  |  |         </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |       <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" /> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="性别" prop="patientSex" /> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="登记号" prop="patientId" /> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="备注" prop="remark" /> | 
			
		
	
		
			
				
					|  |  |  |         <el-table-column label="操作" align="center"> | 
			
		
	
		
			
				
					|  |  |  |           <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |             <div> | 
			
		
	
		
			
				
					|  |  |  |               <div style="color: #ff0000;cursor: pointer" @click="deletePatient(scope.row)">删除</div> | 
			
		
	
		
			
				
					|  |  |  |               <div style="color: #1890ff;cursor: pointer" @click="editPatient(scope.row)">编辑</div> | 
			
		
	
		
			
				
					|  |  |  |               <div style="color: #1890ff;cursor: pointer" @click="goDetail(scope.row)">患者360</div> | 
			
		
	
		
			
				
					|  |  |  |             </div> | 
			
		
	
		
			
				
					|  |  |  |           </template> | 
			
		
	
		
			
				
					|  |  |  |         </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |       </el-table> | 
			
		
	
		
			
				
					|  |  |  |       <el-dialog :modal-append-to-body="false" width="30%" title="备注修改" :visible.sync="remarkDialog"> | 
			
		
	
		
			
				
					|  |  |  |         <el-input ref="renameRef" v-model="editRemark" /> | 
			
		
	
		
			
				
					|  |  |  |         <div slot="footer" class="dialog-footer"> | 
			
		
	
		
			
				
					|  |  |  |           <el-button @click="dialogFormVisible = false">取 消</el-button> | 
			
		
	
		
			
				
					|  |  |  |           <el-button type="primary" :disabled="disabled" @click="confirmNode()">确 定</el-button> | 
			
		
	
		
			
				
					|  |  |  |           <el-button @click="remarkDialog = false">取 消</el-button> | 
			
		
	
		
			
				
					|  |  |  |           <el-button type="primary" :disabled="disabled" @click="editPatientRemark()">确 定</el-button> | 
			
		
	
		
			
				
					|  |  |  |         </div> | 
			
		
	
		
			
				
					|  |  |  |       </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |     <div> | 
			
		
	
		
			
				
					|  |  |  |       <div style="display:flex;text-align: center;padding: 16px"> | 
			
		
	
		
			
				
					|  |  |  |         <span>备注:</span> | 
			
		
	
		
			
				
					|  |  |  |         <el-input v-model="remark" style="flex: 1" type="textarea" resize="none" clearable placeholder="请输入备注" /> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |       <div style="text-align: right;padding:0 16px 16px"> | 
			
		
	
		
			
				
					|  |  |  |         <el-button style="width: 180px" type="primary" size="small" @click="handleAddPatient">收藏当前患者</el-button> | 
			
		
	
		
			
				
					|  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |     </div> | 
			
		
	
		
			
				
					|  |  |  |   </div> | 
			
		
	
		
			
				
					|  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -68,15 +95,22 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     patientId: { | 
			
		
	
		
			
				
					|  |  |  |       type: String, | 
			
		
	
		
			
				
					|  |  |  |       default: '' | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     jzNumber: { | 
			
		
	
		
			
				
					|  |  |  |       type: String, | 
			
		
	
		
			
				
					|  |  |  |       default: '' | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   data() { | 
			
		
	
		
			
				
					|  |  |  |     return { | 
			
		
	
		
			
				
					|  |  |  |       keyword: '', | 
			
		
	
		
			
				
					|  |  |  |       dialogFormVisible: false, | 
			
		
	
		
			
				
					|  |  |  |       remarkDialog: false, | 
			
		
	
		
			
				
					|  |  |  |       remark: '', | 
			
		
	
		
			
				
					|  |  |  |       curNode: '', | 
			
		
	
		
			
				
					|  |  |  |       editName: '', | 
			
		
	
		
			
				
					|  |  |  |       editMessage: '', | 
			
		
	
		
			
				
					|  |  |  |       editRemark: '', | 
			
		
	
		
			
				
					|  |  |  |       editMessage: '新增成功', | 
			
		
	
		
			
				
					|  |  |  |       curPatient: {}, // 当前id下的患者 | 
			
		
	
		
			
				
					|  |  |  |       disabled: false, // 用防止多次添加或多次重命名 | 
			
		
	
		
			
				
					|  |  |  |       addParam: { | 
			
		
	
	
		
			
				
					|  |  | @ -111,38 +145,11 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   async created() { | 
			
		
	
		
			
				
					|  |  |  |     this.initPatient() | 
			
		
	
		
			
				
					|  |  |  |     this.findCurPatientRemark() | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   methods: { | 
			
		
	
		
			
				
					|  |  |  |     // 初始化获取或者相关信息 | 
			
		
	
		
			
				
					|  |  |  |     initPatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.findTree() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取当前患者的备注 | 
			
		
	
		
			
				
					|  |  |  |     findCurPatientRemark() { | 
			
		
	
		
			
				
					|  |  |  |       this.$http.get('tree/findPatientRemark', { | 
			
		
	
		
			
				
					|  |  |  |         patient: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |         platform: this.platform | 
			
		
	
		
			
				
					|  |  |  |       }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         // console.log(res.data) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 查找当前treeId下的患者 | 
			
		
	
		
			
				
					|  |  |  |     findTreePatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.$http.get('/tree/findPatientTree', { params: { | 
			
		
	
		
			
				
					|  |  |  |         limit: 10, | 
			
		
	
		
			
				
					|  |  |  |         page: 1, | 
			
		
	
		
			
				
					|  |  |  |         platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |       }}).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         this.curPatient = res.data.data.list.map(item => { | 
			
		
	
		
			
				
					|  |  |  |           return { | 
			
		
	
		
			
				
					|  |  |  |             name: item.patientName, | 
			
		
	
		
			
				
					|  |  |  |             ...item | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |         this.handlePatientList(this.collectData) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取当前或者最新备注 | 
			
		
	
		
			
				
					|  |  |  |     async queryPatientRemarks() { | 
			
		
	
	
		
			
				
					|  |  | @ -154,83 +161,104 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       this.collectData = data.data | 
			
		
	
		
			
				
					|  |  |  |       this.findCurTableData(this.collectData) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 递归收藏患者 | 
			
		
	
		
			
				
					|  |  |  |     handlePatientList(data) { | 
			
		
	
		
			
				
					|  |  |  |       data.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |     findCurTableData(collectData) { | 
			
		
	
		
			
				
					|  |  |  |       collectData.forEach(item => { | 
			
		
	
		
			
				
					|  |  |  |         if (!item.childs) { | 
			
		
	
		
			
				
					|  |  |  |           item.childs = [] | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if (this.curNode.id === item.id) { | 
			
		
	
		
			
				
					|  |  |  |           const arr = _.uniqWith(item.childs.concat(this.curPatient), (item1, item2) => item1.id === item2.id) | 
			
		
	
		
			
				
					|  |  |  |           this.$set(item, 'childs', arr) | 
			
		
	
		
			
				
					|  |  |  |           this.curNode = item | 
			
		
	
		
			
				
					|  |  |  |           this.tableData = item.treePatientVoList | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.handlePatientList((item.childs)) | 
			
		
	
		
			
				
					|  |  |  |           this.findCurTableData(item.childs) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       return data | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 查询树结构 | 
			
		
	
		
			
				
					|  |  |  |     async findTree() { | 
			
		
	
		
			
				
					|  |  |  |       const { data } = await this.$http.get(`/tree/findTree`, { | 
			
		
	
		
			
				
					|  |  |  |     // 搜索患者 | 
			
		
	
		
			
				
					|  |  |  |     searchPatient() { | 
			
		
	
		
			
				
					|  |  |  |       this.$http.get('/tree/findCollectPatient', { | 
			
		
	
		
			
				
					|  |  |  |         params: { | 
			
		
	
		
			
				
					|  |  |  |           doctorId: JSON.parse(window.sessionStorage.getItem('qg-userData')).id, | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform | 
			
		
	
		
			
				
					|  |  |  |           doctorld: this.doctorId, | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           queryStr: this.keyword | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         this.tableData = res.data.data | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 删除患者 | 
			
		
	
		
			
				
					|  |  |  |     deletePatient(scopeRow) { | 
			
		
	
		
			
				
					|  |  |  |       this.$confirmFun('确定删除该患者吗?').then(() => { | 
			
		
	
		
			
				
					|  |  |  |         return this.$http.post('/tree/deletePatientTree', { | 
			
		
	
		
			
				
					|  |  |  |           id: scopeRow.id | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         if (res.data.code === 0) { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.success('删除成功!') | 
			
		
	
		
			
				
					|  |  |  |           this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error(res.data.msg) | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }).catch(() => {}) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 编辑收藏患者 | 
			
		
	
		
			
				
					|  |  |  |     editPatient(scopeRow) { | 
			
		
	
		
			
				
					|  |  |  |       this.remarkDialog = true | 
			
		
	
		
			
				
					|  |  |  |       this.curPatient = scopeRow | 
			
		
	
		
			
				
					|  |  |  |       this.editRemark = this.curPatient.remark | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     editPatientRemark(node) { | 
			
		
	
		
			
				
					|  |  |  |       const params = { | 
			
		
	
		
			
				
					|  |  |  |         id: this.curPatient.id, | 
			
		
	
		
			
				
					|  |  |  |         patientId: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |         platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |         remark: this.editRemark, | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curNode.id, | 
			
		
	
		
			
				
					|  |  |  |         jzNumber: this.jzNumber | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.$http.post('/tree/addPatientTree', params).then(() => { | 
			
		
	
		
			
				
					|  |  |  |         this.$message.success('修改成功!') | 
			
		
	
		
			
				
					|  |  |  |         this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |         this.remarkDialog = false | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 患者360跳转 | 
			
		
	
		
			
				
					|  |  |  |     goDetail(scopeRow) { | 
			
		
	
		
			
				
					|  |  |  |       this.$router.push({ | 
			
		
	
		
			
				
					|  |  |  |         path: '/360view', | 
			
		
	
		
			
				
					|  |  |  |         query: { | 
			
		
	
		
			
				
					|  |  |  |           onlyRead: true, | 
			
		
	
		
			
				
					|  |  |  |           isSearch: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           patientId: scopeRow.patientId, | 
			
		
	
		
			
				
					|  |  |  |           jzNumber: scopeRow.jzNumber | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       await this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 或者详情目录结构包含或者备注信息 | 
			
		
	
		
			
				
					|  |  |  |     // async patientTrees() { | 
			
		
	
		
			
				
					|  |  |  |     //   const { data } = await this.$http.get('/tree/findTreeIsExistPatient', { | 
			
		
	
		
			
				
					|  |  |  |     //     params: { | 
			
		
	
		
			
				
					|  |  |  |     //       doctorId: this.doctorId, | 
			
		
	
		
			
				
					|  |  |  |     //       patientId: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |     //       platform: this.platform | 
			
		
	
		
			
				
					|  |  |  |     //     } | 
			
		
	
		
			
				
					|  |  |  |     //   }) | 
			
		
	
		
			
				
					|  |  |  |     //   console.log('详情目录', data) | 
			
		
	
		
			
				
					|  |  |  |     // }, | 
			
		
	
		
			
				
					|  |  |  |     levelClick(data) { | 
			
		
	
		
			
				
					|  |  |  |       this.curNode = data | 
			
		
	
		
			
				
					|  |  |  |       this.remark = data.remark || '' | 
			
		
	
		
			
				
					|  |  |  |       this.findTreePatient() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     searchRemark(data) { | 
			
		
	
		
			
				
					|  |  |  |       // this.treeId = data.id | 
			
		
	
		
			
				
					|  |  |  |       // this.remark = data.hisManagePatientEntity ? data.hisManagePatientEntity.remark : '' | 
			
		
	
		
			
				
					|  |  |  |       // this.remarkId = data.hisManagePatientEntity ? data.hisManagePatientEntity.id : '' | 
			
		
	
		
			
				
					|  |  |  |       this.tableData = data.treePatientVoList | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 收藏患者 | 
			
		
	
		
			
				
					|  |  |  |     handleAddPatient() { | 
			
		
	
		
			
				
					|  |  |  |       let params = {} | 
			
		
	
		
			
				
					|  |  |  |       if (!this.curNode.patientId) { | 
			
		
	
		
			
				
					|  |  |  |         // 添加患者 | 
			
		
	
		
			
				
					|  |  |  |         params = { | 
			
		
	
		
			
				
					|  |  |  |           createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), | 
			
		
	
		
			
				
					|  |  |  |           patientId: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           remark: this.remark, | 
			
		
	
		
			
				
					|  |  |  |           treeId: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.editMessage = '收藏成功!' | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
		
			
				
					|  |  |  |         // 修改患者 | 
			
		
	
		
			
				
					|  |  |  |         params = { | 
			
		
	
		
			
				
					|  |  |  |           patientId: this.curNode.patientId, | 
			
		
	
		
			
				
					|  |  |  |           platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |           remark: this.remark, | 
			
		
	
		
			
				
					|  |  |  |           treeId: this.curNode.treeId, | 
			
		
	
		
			
				
					|  |  |  |           id: this.curNode.id | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.editMessage = '修改成功!' | 
			
		
	
		
			
				
					|  |  |  |       // 添加患者 | 
			
		
	
		
			
				
					|  |  |  |       params = { | 
			
		
	
		
			
				
					|  |  |  |         patientId: this.patientId, | 
			
		
	
		
			
				
					|  |  |  |         platform: this.platform, | 
			
		
	
		
			
				
					|  |  |  |         remark: this.remark, | 
			
		
	
		
			
				
					|  |  |  |         treeId: this.curNode.id, | 
			
		
	
		
			
				
					|  |  |  |         jzNumber: this.jzNumber | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.editMessage = '收藏成功!' | 
			
		
	
		
			
				
					|  |  |  |       this.$http.post('/tree/addPatientTree', params).then(() => { | 
			
		
	
		
			
				
					|  |  |  |         this.$message({ | 
			
		
	
		
			
				
					|  |  |  |           message: this.editMessage, | 
			
		
	
		
			
				
					|  |  |  |           type: 'success' | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |         this.findTree() | 
			
		
	
		
			
				
					|  |  |  |         this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 新增节点 | 
			
		
	
	
		
			
				
					|  |  | @ -277,7 +305,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         type: 'success' | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       this.dialogFormVisible = false | 
			
		
	
		
			
				
					|  |  |  |       await this.findTree() | 
			
		
	
		
			
				
					|  |  |  |       await this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 更多 | 
			
		
	
		
			
				
					|  |  |  |     handleNode(command, node, data) { | 
			
		
	
	
		
			
				
					|  |  | @ -309,7 +337,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |               message: '删除成功!', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
		
			
				
					|  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |             this.findTree() | 
			
		
	
		
			
				
					|  |  |  |             this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } else { | 
			
		
	
	
		
			
				
					|  |  | @ -327,7 +355,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |               message: '删除成功!', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
		
			
				
					|  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |             this.findTree() | 
			
		
	
		
			
				
					|  |  |  |             this.queryPatientRemarks() | 
			
		
	
		
			
				
					|  |  |  |           }) | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
	
		
			
				
					|  |  | @ -345,15 +373,20 @@ export default { | 
			
		
	
		
			
				
					|  |  |  | </script> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | <style lang="scss" scoped> | 
			
		
	
		
			
				
					|  |  |  | .flex{ | 
			
		
	
		
			
				
					|  |  |  |   display: flex; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .a-c{ | 
			
		
	
		
			
				
					|  |  |  |   align-items: center; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .collection { | 
			
		
	
		
			
				
					|  |  |  |   width: 650px; | 
			
		
	
		
			
				
					|  |  |  |   display: flex; | 
			
		
	
		
			
				
					|  |  |  |   flex-direction: column; | 
			
		
	
		
			
				
					|  |  |  |   justify-content: space-between; | 
			
		
	
		
			
				
					|  |  |  |   .collection_title{ | 
			
		
	
		
			
				
					|  |  |  |     font-size: 16px; | 
			
		
	
		
			
				
					|  |  |  |     font-weight: bold; | 
			
		
	
		
			
				
					|  |  |  |     padding: 18px; | 
			
		
	
		
			
				
					|  |  |  |     padding: 10px; | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |   .cell-cursor { | 
			
		
	
		
			
				
					|  |  |  |     cursor: pointer; | 
			
		
	
	
		
			
				
					|  |  | @ -366,8 +399,28 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     height: 164px; | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .collect_context{ | 
			
		
	
		
			
				
					|  |  |  | .collect_content{ | 
			
		
	
		
			
				
					|  |  |  |   overflow: hidden; | 
			
		
	
		
			
				
					|  |  |  |   overflow-y: scroll; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .custom-tree-node{ | 
			
		
	
		
			
				
					|  |  |  |   width: 100%; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .active{ | 
			
		
	
		
			
				
					|  |  |  |   color: #FFFFFF; | 
			
		
	
		
			
				
					|  |  |  |   background: #1e79ff; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | .treeDefault{ | 
			
		
	
		
			
				
					|  |  |  |   display: inline-block; | 
			
		
	
		
			
				
					|  |  |  |   min-width: 200px; | 
			
		
	
		
			
				
					|  |  |  |   max-width:500px; | 
			
		
	
		
			
				
					|  |  |  |   font-size: 16px; | 
			
		
	
		
			
				
					|  |  |  |   text-overflow: ellipsis; | 
			
		
	
		
			
				
					|  |  |  |   overflow: hidden; | 
			
		
	
		
			
				
					|  |  |  |   padding-right: 10px; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | ::v-deep .custom-tree-node{ | 
			
		
	
		
			
				
					|  |  |  |   display: flex; | 
			
		
	
		
			
				
					|  |  |  |   align-items: center; | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | </style> | 
			
		
	
	
		
			
				
					|  |  | 
 |