Commit d27e9228 authored by songrui's avatar songrui

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

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