From a4606b1147593ff6e15af6ccdf4037d9b86f8c3b Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Mon, 14 Aug 2023 14:58:43 +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=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/360View/collection.vue | 315 ++++++++++-------- src/components/360View/drawer.vue | 17 +- .../360View/followUpRecord/index.vue | 6 +- src/components/360View/index.vue | 20 +- .../360View/medicalRecord/index.vue | 8 +- .../outPatientRecord/leftFormList.vue | 5 +- src/components/360View/opticalFile/index.vue | 6 +- src/components/360View/overView/index.vue | 10 +- src/components/360View/routine/index.vue | 6 +- src/components/360View/special/index.vue | 6 +- src/page-subspecialty/router/index.js | 6 + 11 files changed, 256 insertions(+), 149 deletions(-) diff --git a/src/components/360View/collection.vue b/src/components/360View/collection.vue index 8a2eebb..fcae91a 100644 --- a/src/components/360View/collection.vue +++ b/src/components/360View/collection.vue @@ -1,56 +1,83 @@ @@ -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 { diff --git a/src/components/360View/drawer.vue b/src/components/360View/drawer.vue index 88ac686..7ac67cd 100644 --- a/src/components/360View/drawer.vue +++ b/src/components/360View/drawer.vue @@ -1,7 +1,7 @@