From d304bc7fdcf418cdc68019574fa101b131c96435 Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Wed, 22 Mar 2023 11:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F=E6=82=A3=E8=80=85=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/360View/collection.vue | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/360View/collection.vue b/src/components/360View/collection.vue index 526164c..10d3162 100644 --- a/src/components/360View/collection.vue +++ b/src/components/360View/collection.vue @@ -16,7 +16,7 @@ {{ node.label }} - + @@ -133,12 +133,12 @@ export default { platform: this.platform } }) - // this.tableData = this.collectData = this.handlePatientList(data.data) }, + // 递归收藏患者 handlePatientList(arr) { arr.forEach(item => { - if (!item.childs) { + if (!item.childs && item.hisManagePatientEntity) { item.childs = [] } if (item.hisManagePatientEntity) { @@ -175,12 +175,14 @@ export default { // }, levelClick(data) { this.curNode = data + this.remark = data.remark || '' }, searchRemark(data) { // this.treeId = data.id // 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'), @@ -225,7 +227,7 @@ export default { break } }, - // 确定新增节点 + // 确定新增节点/重命名 async confirmNode() { const params = { createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), @@ -238,9 +240,18 @@ export default { this.disabled = true if (this.curNode.patientId) { this.curNode.name = this.editName + this.curNode.remark = this.editName await this.$http.post('/tree/addPatientTree', { ...this.curNode }) + this.$message({ + message: this.editMessage, + type: 'success' + }) } else { await this.$http.post('/tree/addTree', params) + this.$message({ + message: this.editMessage, + type: 'success' + }) } this.dialogFormVisible = false await this.findTree() @@ -251,6 +262,7 @@ export default { this.deleteNode(node, data) } else { this.disabled = false + console.log(this.curNode) this.editNode(node, data) } },