Browse Source

收藏患者功能

360view
bianyaqi 2 years ago
parent
commit
d304bc7fdc
  1. 20
      src/components/360View/collection.vue

20
src/components/360View/collection.vue

@ -16,7 +16,7 @@
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
</span> </span>
<span> <span>
<el-dropdown trigger="click" @command="(command)=>addNode(command,node,data)">
<el-dropdown v-if="!data.treeId" trigger="click" @command="(command)=>addNode(command,node,data)">
<span> <span>
<i class="el-icon-plus" /> <i class="el-icon-plus" />
</span> </span>
@ -133,12 +133,12 @@ export default {
platform: this.platform platform: this.platform
} }
}) })
// this.tableData =
this.collectData = this.handlePatientList(data.data) this.collectData = this.handlePatientList(data.data)
}, },
//
handlePatientList(arr) { handlePatientList(arr) {
arr.forEach(item => { arr.forEach(item => {
if (!item.childs) {
if (!item.childs && item.hisManagePatientEntity) {
item.childs = [] item.childs = []
} }
if (item.hisManagePatientEntity) { if (item.hisManagePatientEntity) {
@ -175,12 +175,14 @@ export default {
// }, // },
levelClick(data) { levelClick(data) {
this.curNode = data this.curNode = data
this.remark = data.remark || ''
}, },
searchRemark(data) { searchRemark(data) {
// this.treeId = data.id // this.treeId = data.id
// this.remark = data.hisManagePatientEntity ? data.hisManagePatientEntity.remark : '' // this.remark = data.hisManagePatientEntity ? data.hisManagePatientEntity.remark : ''
// this.remarkId = data.hisManagePatientEntity ? data.hisManagePatientEntity.id : '' // this.remarkId = data.hisManagePatientEntity ? data.hisManagePatientEntity.id : ''
}, },
//
handleAddPatient() { handleAddPatient() {
const params = { const params = {
createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
@ -225,7 +227,7 @@ export default {
break break
} }
}, },
//
// /
async confirmNode() { async confirmNode() {
const params = { const params = {
createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), createDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
@ -238,9 +240,18 @@ export default {
this.disabled = true this.disabled = true
if (this.curNode.patientId) { if (this.curNode.patientId) {
this.curNode.name = this.editName this.curNode.name = this.editName
this.curNode.remark = this.editName
await this.$http.post('/tree/addPatientTree', { ...this.curNode }) await this.$http.post('/tree/addPatientTree', { ...this.curNode })
this.$message({
message: this.editMessage,
type: 'success'
})
} else { } else {
await this.$http.post('/tree/addTree', params) await this.$http.post('/tree/addTree', params)
this.$message({
message: this.editMessage,
type: 'success'
})
} }
this.dialogFormVisible = false this.dialogFormVisible = false
await this.findTree() await this.findTree()
@ -251,6 +262,7 @@ export default {
this.deleteNode(node, data) this.deleteNode(node, data)
} else { } else {
this.disabled = false this.disabled = false
console.log(this.curNode)
this.editNode(node, data) this.editNode(node, data)
} }
}, },

Loading…
Cancel
Save