Commit d27e9228 authored by songrui's avatar songrui

缓存工作台、患者信息页面

parent 7f581c64
<template> <template>
<van-config-provider :theme-vars='themeVars' style="height: 100vh"> <van-config-provider :theme-vars='themeVars' style="height: 100vh">
<div class='h-full resident-home'> <div class='h-full resident-home'>
<router-view v-slot='{ Component }'> <router-view v-slot='{ Component, route }'>
<Transition name='route' mode='out-in'> <Transition name='route' mode='out-in'>
<component :is='Component' v-if='visible' /> <KeepAlive :include="['PatientDetail', 'Workbench']">
<component :is='Component' :key="route.name" v-if='visible' />
</KeepAlive>
</Transition> </Transition>
</router-view> </router-view>
</div> </div>
......
...@@ -58,6 +58,7 @@ import { ...@@ -58,6 +58,7 @@ import {
} from '@/api/doctor/generalFU' } from '@/api/doctor/generalFU'
import GeneralFUForm from '@/doctor/followUp/generalFU/form/GeneralFUForm' import GeneralFUForm from '@/doctor/followUp/generalFU/form/GeneralFUForm'
import CommonBottom from '@/doctor/followUp/generalFU/form/CommonBottom' import CommonBottom from '@/doctor/followUp/generalFU/form/CommonBottom'
import { useStore } from '@/doctor/store'
const getModeEnum = (patientInfo = {}) => { const getModeEnum = (patientInfo = {}) => {
return { return {
mode1: [ mode1: [
...@@ -131,6 +132,7 @@ export default { ...@@ -131,6 +132,7 @@ export default {
components: { CommonBottom, GeneralFUForm, BaseInfo }, components: { CommonBottom, GeneralFUForm, BaseInfo },
data() { data() {
return { return {
store: useStore(),
info: {}, info: {},
resident: {}, resident: {},
step: 1, step: 1,
...@@ -238,6 +240,7 @@ export default { ...@@ -238,6 +240,7 @@ export default {
let fun = this.info.id ? updateCurrency : addCurrency let fun = this.info.id ? updateCurrency : addCurrency
fun(params, true).then(({ code }) => { fun(params, true).then(({ code }) => {
if (code == 'SUCCESS') { if (code == 'SUCCESS') {
this.store.onRefreshMark()
this.$router.back() this.$router.back()
} }
}) })
......
...@@ -105,6 +105,7 @@ import DiseaseList from './components/disease/Index.vue' ...@@ -105,6 +105,7 @@ import DiseaseList from './components/disease/Index.vue'
export default { export default {
name: 'PatientDetail',
components: { components: {
DocNavBar, DocNavBar,
ChronicTag, ChronicTag,
...@@ -117,6 +118,7 @@ export default { ...@@ -117,6 +118,7 @@ export default {
}, },
data() { data() {
return { return {
residentInfoId: null,
residentInfo: {}, residentInfo: {},
// 折叠 // 折叠
collapsed: true, collapsed: true,
...@@ -135,9 +137,6 @@ export default { ...@@ -135,9 +137,6 @@ export default {
} }
}, },
computed: { computed: {
residentInfoId() {
return this.$route.query.residentInfoId
},
chronicTagsArray() { chronicTagsArray() {
const chronicTagsArray = this.residentInfo.chronicTagsArray || '' const chronicTagsArray = this.residentInfo.chronicTagsArray || ''
return chronicTagsArray.split(',') return chronicTagsArray.split(',')
...@@ -173,15 +172,15 @@ export default { ...@@ -173,15 +172,15 @@ export default {
return this.tabList[this.activeTab] || {} return this.tabList[this.activeTab] || {}
}, },
}, },
created() { activated() {
if (!this.residentInfoId) { this.residentInfoId = this.$route.query.residentInfoId
showNotify({ type: 'warning', message: '未获取到患者信息' })
return
}
this.load()
}, },
methods: { methods: {
load() { load() {
if (!this.residentInfoId) {
showNotify({ type: 'warning', message: '未获取到患者信息' })
return
}
queryResidentInfo({ residentInfoId: this.residentInfoId }).then(res => { queryResidentInfo({ residentInfoId: this.residentInfoId }).then(res => {
this.residentInfo = res.data || {} this.residentInfo = res.data || {}
}) })
...@@ -204,6 +203,13 @@ export default { ...@@ -204,6 +203,13 @@ export default {
query: { residentInfoId: this.residentInfoId } query: { residentInfoId: this.residentInfoId }
}) })
} }
},
watch: {
residentInfoId(val) {
if (!val) return
this.residentInfo = {}
this.load()
}
} }
} }
</script> </script>
......
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
<script> <script>
import { fetchDiseaseTypeList } from '@/api/doctor/disease.js' import { fetchDiseaseTypeList } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
loadingRefresh: false, loadingRefresh: false,
isRefreshDisable: false, isRefreshDisable: false,
diagnoseRecord: [], diagnoseRecord: [],
...@@ -198,6 +200,9 @@ export default { ...@@ -198,6 +200,9 @@ export default {
watch: { watch: {
diseaseType() { diseaseType() {
this.load() this.load()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<script> <script>
import { getVisitManageList } from '@/api/doctor/disease.js' import { getVisitManageList } from '@/api/doctor/disease.js'
import { useStore } from '@/doctor/store'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
...@@ -78,6 +79,7 @@ export default { ...@@ -78,6 +79,7 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
list: [], list: [],
pagination: { pagination: {
total: 0, total: 0,
...@@ -163,6 +165,9 @@ export default { ...@@ -163,6 +165,9 @@ export default {
diseaseType() { diseaseType() {
this.list = [] this.list = []
this.load() this.load()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
...@@ -58,11 +58,13 @@ ...@@ -58,11 +58,13 @@
<script> <script>
import { fetchCurrencyList, delCurrencyById } from '@/api/doctor/generalFU.js' import { fetchCurrencyList, delCurrencyById } from '@/api/doctor/generalFU.js'
import { showToast } from 'vant' import { showToast } from 'vant'
import { useStore } from '@/doctor/store'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
data() { data() {
return { return {
store: useStore(),
list: [], list: [],
pagination: { pagination: {
total: 0, total: 0,
...@@ -118,7 +120,7 @@ export default { ...@@ -118,7 +120,7 @@ export default {
}, },
onRefresh() { onRefresh() {
this.pagination.pageIndex = 1 this.pagination.pageIndex = 1
this.load() this.load(false)
}, },
toDetail(record) { toDetail(record) {
if (!record) return if (!record) return
...@@ -139,6 +141,11 @@ export default { ...@@ -139,6 +141,11 @@ export default {
delBtn() { delBtn() {
} }
},
watch: {
'store.refreshMark'() {
this.onRefresh()
}
} }
} }
</script> </script>
......
...@@ -5,34 +5,36 @@ ...@@ -5,34 +5,36 @@
<div v-for="item in firstScreenList" :key="item.id" <div v-for="item in firstScreenList" :key="item.id"
class="first-card mb-3"> class="first-card mb-3">
<div class="title px-4 py-1">主要慢病筛查记录</div> <div class="title px-4 py-1">主要慢病筛查记录</div>
<div class="flex flex-col gap-y-2.5 py-3 px-4 doc-list-card"> <div class=" py-3 px-4 doc-list-card">
<div> <div class="flex flex-col gap-y-2.5">
<span class="label">高危评估</span> <div>
<span>{{ item.screenResultName }}</span> <span class="label">高危评估</span>
</div> <span>{{ item.screenResultName }}</span>
<div> </div>
<span class="label">筛查日期</span> <div>
<span>{{ item.screenDate }}</span> <span class="label">筛查日期</span>
</div> <span>{{ item.screenDate }}</span>
<div class="text-ellipsis"> </div>
<span class="label">筛查单位</span> <div class="text-ellipsis">
<span>{{ item.screenUnitName }}</span> <span class="label">筛查单位</span>
</div> <span>{{ item.screenUnitName }}</span>
<div class="text-ellipsis"> </div>
<span class="label">筛查科室</span> <div class="text-ellipsis">
<span>{{ item.screenOfficeName }}</span> <span class="label">筛查科室</span>
</div> <span>{{ item.screenOfficeName }}</span>
<div> </div>
<span class="label">筛查医生</span> <div>
<span>{{ item.screenDoctorName }}</span> <span class="label">筛查医生</span>
</div> <span>{{ item.screenDoctorName }}</span>
<div> </div>
<span class="label">数据来源</span> <div>
<span>{{ item.sourceName }}</span> <span class="label">数据来源</span>
</div> <span>{{ item.sourceName }}</span>
<div> </div>
<span class="label">创建时间</span> <div>
<span>{{ item.created }}</span> <span class="label">创建时间</span>
<span>{{ item.created }}</span>
</div>
</div> </div>
<!-- <div class="divider"></div> <!-- <div class="divider"></div>
<div class="bt-group"> <div class="bt-group">
...@@ -47,34 +49,36 @@ ...@@ -47,34 +49,36 @@
<div v-for="item in secondScreenList" :key="item.id" <div v-for="item in secondScreenList" :key="item.id"
class="second-card mb-3"> class="second-card mb-3">
<div class="title px-4 py-1">专病筛查记录</div> <div class="title px-4 py-1">专病筛查记录</div>
<div class="flex flex-col gap-y-2.5 py-3 px-4 doc-list-card"> <div class=" py-3 px-4 doc-list-card">
<div class="text-ellipsis"> <div class="flex flex-col gap-y-2.5">
<span class="label">高危评估</span> <div class="text-ellipsis">
<span>{{ item.specialScreenResultName }}</span> <span class="label">高危评估</span>
</div> <span>{{ item.specialScreenResultName }}</span>
<div> </div>
<span class="label">筛查日期</span> <div>
<span>{{ item.screenDate }}</span> <span class="label">筛查日期</span>
</div> <span>{{ item.screenDate }}</span>
<div> </div>
<span class="label">筛查单位</span> <div>
<span>{{ item.screenUnitName }}</span> <span class="label">筛查单位</span>
</div> <span>{{ item.screenUnitName }}</span>
<div> </div>
<span class="label">筛查科室</span> <div>
<span>{{ item.screenOfficeName }}</span> <span class="label">筛查科室</span>
</div> <span>{{ item.screenOfficeName }}</span>
<div> </div>
<span class="label">筛查医生</span> <div>
<span>{{ item.screenDoctorName }}</span> <span class="label">筛查医生</span>
</div> <span>{{ item.screenDoctorName }}</span>
<div> </div>
<span class="label">数据来源</span> <div>
<span>{{ item.sourceName }}</span> <span class="label">数据来源</span>
</div> <span>{{ item.sourceName }}</span>
<div> </div>
<span class="label">创建时间</span> <div>
<span>{{ item.created }}</span> <span class="label">创建时间</span>
<span>{{ item.created }}</span>
</div>
</div> </div>
<!-- <div class="divider"></div> <!-- <div class="divider"></div>
<div class="bt-group"> <div class="bt-group">
...@@ -95,6 +99,7 @@ ...@@ -95,6 +99,7 @@
</template> </template>
<script> <script>
import { useStore } from '@/doctor/store'
import { getScreenAllList } from '@/api/doctor/screening.js' import { getScreenAllList } from '@/api/doctor/screening.js'
import { showToast } from 'vant' import { showToast } from 'vant'
...@@ -102,6 +107,7 @@ export default { ...@@ -102,6 +107,7 @@ export default {
inject: ['residentInfo'], inject: ['residentInfo'],
data() { data() {
return { return {
store: useStore(),
loadingRefresh: false, loadingRefresh: false,
isRefreshDisable: false, isRefreshDisable: false,
firstScreenList: [], firstScreenList: [],
...@@ -173,7 +179,11 @@ export default { ...@@ -173,7 +179,11 @@ export default {
delBtn() { delBtn() {
} }
},
watch: {
'store.refreshMark'() {
this.onRefresh()
}
} }
} }
</script> </script>
......
...@@ -58,11 +58,13 @@ ...@@ -58,11 +58,13 @@
<script> <script>
import { getHighVisitList } from '@/api/doctor/visit.js' import { getHighVisitList } from '@/api/doctor/visit.js'
import { useStore } from '@/doctor/store'
export default { export default {
inject: ['residentInfo'], inject: ['residentInfo'],
data() { data() {
return { return {
store: useStore(),
list: [], list: [],
pagination: { pagination: {
total: 0, total: 0,
...@@ -147,6 +149,11 @@ export default { ...@@ -147,6 +149,11 @@ export default {
delBtn() { delBtn() {
} }
},
watch: {
'store.refreshMark'() {
this.onRefresh()
}
} }
} }
</script> </script>
......
...@@ -6,7 +6,9 @@ export const useStore = defineStore('chronic', { ...@@ -6,7 +6,9 @@ export const useStore = defineStore('chronic', {
// 字典 // 字典
dict: [], dict: [],
//登录医生相关基本信息 //登录医生相关基本信息
authInfo: {} authInfo: {},
// 刷新标记
refreshMark: 1
} }
}, },
getters: {}, getters: {},
...@@ -27,6 +29,9 @@ export const useStore = defineStore('chronic', { ...@@ -27,6 +29,9 @@ export const useStore = defineStore('chronic', {
} }
let temp = array.find(e => e.value == value) || {} let temp = array.find(e => e.value == value) || {}
return temp.name || '' return temp.name || ''
},
onRefreshMark() {
this.refreshMark++
} }
} }
}) })
...@@ -53,6 +53,7 @@ import TableFirstScreen from './tables/FirstScreen.vue' ...@@ -53,6 +53,7 @@ import TableFirstScreen from './tables/FirstScreen.vue'
import TableHighRisk from './tables/HighRisk.vue' import TableHighRisk from './tables/HighRisk.vue'
export default { export default {
name: 'Workbench',
components: { components: {
DocNavBar, DocNavBar,
TableWork, TableWork,
......
<template> <template>
<div class="h-full flex flex-col px-2 py-3 first-screen"> <div class="h-full flex flex-col first-screen">
<div class="shrink-0 flex pb-2 items-center"> <div class="shrink-0 flex pb-2 px-2 py-3 items-center">
<van-tabs shrink type="card" class="grow doc-tab-round" line> <van-tabs shrink type="card" class="grow doc-tab-round" line>
<van-tab title="全部" title-style="padding: 0 .2rem"></van-tab> <van-tab title="全部" title-style="padding: 0 .2rem"></van-tab>
</van-tabs> </van-tabs>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@click='openSearch' /> @click='openSearch' />
</div> </div>
<div class='grow pt-1 relative min-h-0'> <div class='grow pt-1 relative min-h-0'>
<div class='h-full overflow-y-auto' ref='list'> <div class='h-full overflow-y-auto px-2' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style="min-height: 100%">
<van-list <van-list
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
this.load() this.load()
}, },
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = !this.searchVisible
}, },
onDateConfirm({ selectedValues }) { onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-') const result = selectedValues.join('-')
...@@ -246,6 +246,9 @@ export default { ...@@ -246,6 +246,9 @@ export default {
watch: { watch: {
searchType() { searchType() {
this.onRefresh() this.onRefresh()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
<template> <template>
<div class="h-full flex flex-col px-2 py-3 heigh-risk"> <div class="h-full flex flex-col heigh-risk">
<div class="shrink-0 flex pb-2 items-center"> <div class="shrink-0 flex pb-2 px-2 py-3 items-center">
<van-tabs shrink type="card" class="grow doc-tab-round" line <van-tabs shrink type="card" class="grow doc-tab-round" line
v-model:active="activeTab" v-model:active="activeTab"
@change="tabChange"> @change="tabChange">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
</div> </div>
<div class='grow pt-1 relative min-h-0'> <div class='grow pt-1 relative min-h-0'>
<div class='h-full overflow-y-auto' ref='list'> <div class='h-full overflow-y-auto px-2' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style="min-height: 100%">
<van-list <van-list
...@@ -235,7 +235,7 @@ export default { ...@@ -235,7 +235,7 @@ export default {
this.load() this.load()
}, },
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = !this.searchVisible
}, },
onDateConfirm({ selectedValues }) { onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-') const result = selectedValues.join('-')
...@@ -277,6 +277,9 @@ export default { ...@@ -277,6 +277,9 @@ export default {
watch: { watch: {
searchType() { searchType() {
this.onRefresh() this.onRefresh()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
<template> <template>
<div class="h-full flex flex-col px-2 py-3 receive"> <div class="h-full flex flex-col receive">
<div class="shrink-0 flex pb-2 items-center"> <div class="shrink-0 flex pb-2 px-2 py-3 items-center">
<van-tabs shrink type="card" class="grow doc-tab-round" line> <van-tabs shrink type="card" class="grow doc-tab-round" line>
<van-tab title="全部" title-style="padding: 0 .2rem"></van-tab> <van-tab title="全部" title-style="padding: 0 .2rem"></van-tab>
</van-tabs> </van-tabs>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@click='openSearch' /> @click='openSearch' />
</div> </div>
<div class='grow pt-1 relative min-h-0'> <div class='grow pt-1 relative min-h-0'>
<div class='h-full overflow-y-auto' ref='list'> <div class='h-full overflow-y-auto px-2' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style="min-height: 100%">
<van-list <van-list
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
this.load() this.load()
}, },
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = !this.searchVisible
}, },
onDateConfirm({ selectedValues }) { onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-') const result = selectedValues.join('-')
...@@ -261,6 +261,9 @@ export default { ...@@ -261,6 +261,9 @@ export default {
watch: { watch: {
searchType() { searchType() {
this.onRefresh() this.onRefresh()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
<template> <template>
<div class="h-full flex flex-col px-2 py-3 visit"> <div class="h-full flex flex-col visit">
<div class="shrink-0 flex pb-2 items-center"> <div class="shrink-0 flex pb-2 px-2 py-3 items-center">
<van-tabs shrink type="card" class="grow doc-tab-round" line <van-tabs shrink type="card" class="grow doc-tab-round" line
v-model:active="activeTab" v-model:active="activeTab"
@change="tabChange"> @change="tabChange">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
</div> </div>
<div class='grow pt-1 relative min-h-0'> <div class='grow pt-1 relative min-h-0'>
<div class='h-full overflow-y-auto' ref='list'> <div class='h-full overflow-y-auto px-2' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style="min-height: 100%">
<van-list <van-list
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
this.load() this.load()
}, },
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = !this.searchVisible
}, },
onDateConfirm({ selectedValues }) { onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-') const result = selectedValues.join('-')
...@@ -297,6 +297,9 @@ export default { ...@@ -297,6 +297,9 @@ export default {
watch: { watch: {
searchType() { searchType() {
this.onRefresh() this.onRefresh()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
<template> <template>
<div class="h-full flex flex-col px-2 py-3 work"> <div class="h-full flex flex-col work">
<div class="shrink-0 flex pb-2 items-center"> <div class="shrink-0 flex px-2 pb-2 py-3 items-center">
<van-tabs shrink type="card" class="grow doc-tab-round" line> <van-tabs shrink type="card" class="grow doc-tab-round" line>
<van-tab title="全部" title-style="padding: 0 .2rem"></van-tab> <van-tab title="全部" title-style="padding: 0 .2rem"></van-tab>
</van-tabs> </van-tabs>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@click='openSearch' /> @click='openSearch' />
</div> </div>
<div class='grow pt-1 relative min-h-0'> <div class='grow pt-1 relative min-h-0'>
<div class='h-full overflow-y-auto' ref='list'> <div class='h-full px-2 overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh' <van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
:disabled='isRefreshDisable' style="min-height: 100%"> :disabled='isRefreshDisable' style="min-height: 100%">
<van-list <van-list
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
this.load() this.load()
}, },
openSearch() { openSearch() {
this.searchVisible = true this.searchVisible = !this.searchVisible
}, },
onDateConfirm({ selectedValues }) { onDateConfirm({ selectedValues }) {
const result = selectedValues.join('-') const result = selectedValues.join('-')
...@@ -238,6 +238,9 @@ export default { ...@@ -238,6 +238,9 @@ export default {
watch: { watch: {
searchType() { searchType() {
this.onRefresh() this.onRefresh()
},
'store.refreshMark'() {
this.onRefresh()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment