Browse Source

收藏患者功能完善

x-emr
bianyaqi 2 years ago
parent
commit
a4606b1147
  1. 315
      src/components/360View/collection.vue
  2. 17
      src/components/360View/drawer.vue
  3. 6
      src/components/360View/followUpRecord/index.vue
  4. 20
      src/components/360View/index.vue
  5. 8
      src/components/360View/medicalRecord/index.vue
  6. 5
      src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue
  7. 6
      src/components/360View/opticalFile/index.vue
  8. 10
      src/components/360View/overView/index.vue
  9. 6
      src/components/360View/routine/index.vue
  10. 6
      src/components/360View/special/index.vue
  11. 6
      src/page-subspecialty/router/index.js

315
src/components/360View/collection.vue

@ -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>

17
src/components/360View/drawer.vue

@ -1,7 +1,7 @@
<template>
<div class="drawer">
<div :class="maskClass" @click="closeByMask" />
<div :class="mainClass" :style="mainStyle" class="main">
<div :class="['mainClass',infoHidden?'mainShow':'main']" :style="mainStyle">
<div class="drawer-body">
<shrink ref="shrinkTwo" :cur-type="curType" :arrow-type="2" @changeType="selectType" @display="closeByButton" />
<slot />
@ -19,6 +19,13 @@ export default {
curType: {
type: Number
},
//
infoHidden: {
type: Boolean,
default: false
},
//
display: {
type: Boolean
@ -142,6 +149,14 @@ export default {
background: #fff;
transition: all 0.5s;
}
.mainShow{
position: fixed;
z-index: 999;
top: 0;
height: 100%;
background: #fff;
transition: all 0.5s;
}
.main-show {
opacity: 1;
}

6
src/components/360View/followUpRecord/index.vue

@ -85,7 +85,11 @@ export default {
default: false
}
},
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() {
return {
visible: true,

20
src/components/360View/index.vue

@ -1,7 +1,7 @@
<template>
<div class="container">
<div style="width: 100%">
<div class="header">
<div v-if="!infoHidden" class="header">
<img :src="require('@/assets/img/back-l.png')" alt="" style="margin-right: 8px;cursor: pointer" @click="backList">
<img :src="require('@/assets/img/boy.png')" alt="">
<p class="head-t">
@ -21,7 +21,7 @@
</p>
<img :src="require('@/assets/img/pacs.png')" alt="" style="float: right;cursor: pointer" @click="handlePacs">
</div>
<div class="contentBox">
<div :class="infoHidden?'contentShow':'contentBox'">
<div class="leftBox">
<time-line
ref="timeline"
@ -212,7 +212,7 @@
</div>
</div>
<shrink ref="shrinks" :arrow-type="1" @display="handleDisplay" @changeType="changeType" />
<drawer ref="drawers" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true" @display="closeDrawer">
<drawer ref="drawers" :info-hidden="infoHidden" :cur-type="dataType" :display.sync="display" :width="drawerWidth" :mask="true" @display="closeDrawer">
<!-- 关键指标-->
<key-indicators
v-if="dataType === 1"
@ -226,7 +226,7 @@
<!-- 数据集-->
<dataInfo v-if="dataType === 2" :fore-list="foreList" :after-list="afterList" />
<!-- 病历收藏-->
<collection v-if="dataType === 3" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" />
<collection v-if="dataType === 3" :patient-id="patientBaseData.patientId" :jz-number="jzNumber" :platform="isSearch || $route.query.isSearch" />
<!-- 常用业务-->
<business v-if="dataType === 4" :patient-id="patientBaseData.patientId" :platform="isSearch || $route.query.isSearch" :patient-name="patientBaseData.patientName" />
</drawer>
@ -270,6 +270,7 @@ export default {
return {
display: false,
sharkFlag: true,
infoHidden: false,
patientBaseData: {},
timeAxisNodeInfo: [], //
doctorId: '', //
@ -292,7 +293,8 @@ export default {
label: 'tagName'
},
jsArr: [],
dataForm: {}
dataForm: {},
jzNumber: ''
}
},
computed: {
@ -312,6 +314,8 @@ export default {
}
},
created() {
this.jzNumber = window.sessionStorage.getItem('jzNumber')
this.infoHidden = this.$route.query.infoHidden && JSON.parse(this.$route.query.infoHidden)
this.getPatientData()
this.getTimeAxisData()
},
@ -402,6 +406,7 @@ export default {
this.$router.push('/outpatientManagement-call')
} else {
this.$parent.detailViewVisible = false
console.log(this.$parent)
this.$parent.reFresh()
}
},
@ -527,6 +532,11 @@ export default {
width: 100%;
height: calc(100% - 100px);
}
.contentShow{
display: flex;
width: 100%;
height: 100%;
}
.mr16{
margin-right: 16px;
}

8
src/components/360View/medicalRecord/index.vue

@ -9,7 +9,7 @@
ref="leftFormList"
:patient-id="patientId"
:is-search="isSearch"
:only-read="onlyRead"
:only-read="onlyRead||!isCreator"
:is-platform="isPlatform"
:form-list="formList"
:cur-index="curIndex"
@ -238,7 +238,11 @@ export default {
default: ''
}
},
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() {
return {
id: '',

5
src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue

@ -4,12 +4,12 @@
<div v-for="(item, index) in formList" :key="index" class="flex" style="margin-top: 12px" :class="[index === curIndex ? 'active' : '']" @click="handleForm(index, item)">
<div class="formBox">
<p :class="[index === curIndex ? 'activeFont' : 'curFont']">{{ item.createTime }}</p>
<p :class="[index === curIndex ? 'activeFont' : 'curFont']">操作员{{ item.doctorName }}</p>
<p v-if="item.doctorName" :class="[index === curIndex ? 'activeFont' : 'curFont']">操作员{{ item.doctorName }}</p>
<p>
{{ item.name }}
</p>
</div>
<i v-if="index === curIndex && !onlyRead && item.name !== '门急诊电子病历'&& !isCreate" style="margin-top: 28px;color: rgb(199,5,5)" class="el-icon-delete" @click.stop="deleteForm()" />
<i v-if="index === curIndex && !onlyRead && item.name !== '门急诊电子病历'" style="margin-top: 28px;color: rgb(199,5,5)" class="el-icon-delete" @click.stop="deleteForm()" />
</div>
<img v-if="!formList.length" src="@/assets/img/nodata.png" alt="" class="nodata">
</div>
@ -54,7 +54,6 @@ export default {
return {
formType: '治疗',
defaultChecked: true,
isCreate: true,
formTypeList: [
{
type: '治疗',

6
src/components/360View/opticalFile/index.vue

@ -123,7 +123,11 @@ export default {
default: false
}
},
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() {
return {
id: '',

10
src/components/360View/overView/index.vue

@ -1,6 +1,6 @@
<template>
<div class="overView">
<!-- 病史总览-->
<!-- 病史总览-->
<div style="width: 100%;">
<el-collapse v-model="activeNames">
<el-collapse-item v-for="(item, index) in tableData" :key="index" :title="item.category + ' ' + item.createTime" :name="index">
@ -109,9 +109,13 @@ export default {
patientId: {
type: String,
default: ''
},
}
},
inject: {
refresh: {
default: 'refresh'
}
},
inject: ['refresh'],
data() {
return {
tableData: [],

6
src/components/360View/routine/index.vue

@ -220,7 +220,11 @@ export default {
default: ''
}
},
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() {
return {
checkedSeJue: false,

6
src/components/360View/special/index.vue

@ -113,7 +113,11 @@ export default {
default: false
}
},
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() {
return {
date: '',

6
src/page-subspecialty/router/index.js

@ -47,6 +47,12 @@ export const pageRoutes = [
component: () => import('@/page-subspecialty/views/pages/pacs/index'),
name: 'pacs',
meta: { title: 'pacs浏览器', isTab: true }
},
{
path: '/detail',
name: 'detail',
meta: { title: '患者360', isTab: true },
component: () => import('@/components/360View/index.vue')
}
]

Loading…
Cancel
Save