Commit 68c65d99 authored by songrui's avatar songrui

居民详情

parent 038258f0
import {fetchBase} from '@/api/doctor/doctorFetch'
// 居民档案ID查询居民信息
export function queryResidentInfo(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/detailed`, body: params, loading: true })
}
export function queryVisitByPage(params, loading) {
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record/page`, body: params, loading })
}
<template>
<van-config-provider :theme-vars='themeVars'>
<van-config-provider :theme-vars='themeVars' class="h-full">
<div class='h-full resident-home'>
<router-view v-slot='{ Component }'>
<Transition name='route' mode='out-in'>
......@@ -27,10 +27,15 @@ export default {
buttonDefaultBorderColor: '#BFBFBF',
buttonNormalFontSize: '.16rem',
loadingSpinnerColor: '#607FF0',
// tab
tabActiveTextColor: '#607FF0',
tabTextColor: '#8C8C8C',
tabsBottomBarColor: '#607FF0',
// 表单相关
cellVerticalPadding: '.15rem',
cellTextColor: '#262626',
cellBorderColor: '#d9d9d9'
cellBorderColor: '#d9d9d9',
navBarIconColor: '#262626'
}
}
},
......
......@@ -238,8 +238,4 @@ export default {
overflow-y: auto;
}
}
:deep(.van-nav-bar .van-icon) {
color: #000000;
}
</style>
\ No newline at end of file
......@@ -323,8 +323,4 @@ export default {
overflow-y: auto;
}
}
:deep(.van-nav-bar .van-icon) {
color: #000000;
}
</style>
\ No newline at end of file
<template>
<div class="h-full base">
<div class='mt-3 p-4 card' v-if="info.id">
<div class='flex items-center'>
<div class='text-16 font-semibold base-title'>{{ info.residentName }}</div>
<div class='second-title px-2'>{{ info.currentAge }}</div>
<div class='second-title px-2'>{{ info.genderName }}</div>
<div class="second-title px-2" v-if="info.chronicStatus === 9" >死亡</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
身份证号
</div>
<div class='detail-right'>
{{ $idCardHide(info.idCard) }}
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
建档状态
</div>
<div class='detail-right'>
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
签约状态
</div>
<div class='detail-right'>
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
高危评估
</div>
<div class='detail-right'>
<span>{{ info.firstScreenResultName || '-' }}</span>
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
专病高危评估
</div>
<div class='detail-right'>
<span>{{ info.highTagsArrayName || '-' }}</span>
</div>
</div>
<div class='flex mt-3'>
<div class='detail-left'>
慢病标签
</div>
<div class='detail-right' style='flex: 1'>
<ChronicTag :list="info.chronicTagsArray"/>
</div>
</div>
<div class="text-center mt-5">
<van-button round type="primary" class="detail-bt" @click="toEdit">修改基本信息</van-button>
</div>
</div>
<div class="text-center empty" v-else>
<img src="@/assets/image/doctor/empty.png" alt="" style="width: 1.2rem;">
<p>暂无数据</p>
</div>
</div>
</template>
<script>
import ChronicTag from '@/doctor/components/chronicTag/ChronicTag.vue'
export default {
components: {
ChronicTag
},
inject: ['getBaseInfo'],
data() {
return {}
},
computed: {
info() {
return this.getBaseInfo() || {}
}
},
methods: {
toEdit() {
}
}
}
</script>
<style lang="less" scoped>
.card {
background-color: #fff;
.second-title {
background: #F0F3FF;
line-height: 24px;
margin-left: 10px;
}
.detail-left {
width: 8em;
color: #8C8C8C;
}
.detail-bt {
color: #607FF0;
background-color: #F0F3FF;
border: 0;
width: 80%;
height: 40px;
}
}
</style>
<template>
<div class="h-full flex flex-col">
<van-nav-bar title='居民详情' left-text='' left-arrow class="shrink-0"></van-nav-bar>
<div class="flex shrink-0 justify-center pb-1">
<van-tabs v-model:active='activeTab' class="w-1/2 top-tabs"
@change="tabChange">
<van-tab v-for='item in tabList' :key="item.name"
:title='item.title' :name='item.name'></van-tab>
</van-tabs>
</div>
<div class="grow" style="background-color: #f5f5f5;">
<router-view v-slot='{ Component }'>
<Transition name='route' mode='out-in'>
<component :is='Component' />
</Transition>
</router-view>
</div>
</div>
</template>
<script>
import { showNotify } from 'vant'
import { queryResidentInfo } from '@/api/doctor/resident'
export default {
data() {
return {
tabList: [
{ title: '基本信息', name: 'base', path: '/doctor/resident/base' },
{ title: '随访记录', name: 'visit', path: '/doctor/resident/visit' }
],
activeTab: 'base',
residentId: null,
// 基础信息
baseInfo: null
}
},
computed: {
routeQuery() {
return this.$route.query
}
},
provide() {
return {
getBaseInfo: () => this.baseInfo
}
},
created() {
this.residentId = this.routeQuery.residentId
if (!this.residentId) {
showNotify({ type: 'warning', message: '未获取到医生信息', duration: 0 })
return
}
this.load()
},
methods: {
tabChange() {
console.log(this.activeTab)
const item = this.tabList.find(e => e.name === this.activeTab)
if (!item) return
this.$router.replace({
path: item.path,
query: { residentId: this.residentId }
})
},
load() {
const query = {
residentInfoId: this.residentId
}
queryResidentInfo(query).then(res => {
this.baseInfo = res.data || {}
})
},
}
}
</script>
<style lang="less" scoped>
.top-tabs {
:deep(.van-tab) {
color: #262626;
}
:deep(.van-tab--active) {
color: var(--van-tab-active-text-color);
}
:deep(.van-tabs__line) {
height: 2px;
width: 28px;
bottom: 20px;
}
}
</style>
<template>
<div class="visit">
<van-tabs v-model:active='activeTab'
@change="tabChange">
<van-tab v-for='item in tabList' :key="item.name"
:title='item.title' :name='item.name'></van-tab>
</van-tabs>
<div class="card-list" v-if="list.length">
<div v-for='item in list' :key="item.id" class="p-4 mt-3 card">
<div class='flex items-center'>
<div class='detail-left'>
随访日期
</div>
<div class='detail-right'>
{{ item.serveDate }}
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
随访医生
</div>
<div class='detail-right'>
{{ item.serveDoctorName }}
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
随访方式
</div>
<div class='detail-right'>
{{ item.serveTypeName }}
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
随访机构
</div>
<div class='detail-right'>
{{ item.serveUnitName }}
</div>
</div>
<div class='mt-3 flex items-center'>
<div class='detail-left'>
下次随访日期
</div>
<div class='detail-right'>
{{ item.nextVisitDate }}
</div>
</div>
</div>
</div>
<div class="text-center empty" v-else>
<img src="@/assets/image/doctor/empty.png" alt="" style="width: 1.2rem;">
<p>暂无数据</p>
</div>
</div>
</template>
<script>
import { queryVisitByPage } from '@/api/doctor/resident.js'
export default {
data() {
return {
activeTab: undefined,
list: [],
pagination: {
total: 0,
pageIndex: 1,
pageSize: 10
},
}
},
inject: ['getBaseInfo'],
computed: {
baseInfo() {
return this.getBaseInfo() || {}
},
chronicTagsArray() {
let chronicTagsArray = this.baseInfo.chronicTagsArray || ''
return chronicTagsArray.split(',')
},
tabList() {
const list = [
{ title: '高血压', name: 1, code: '1' },
{ title: '糖尿病', name: 2, code: '2' },
{ title: '冠心病', name: 3, code: '4' },
{ title: '脑卒中', name: 4, code: '8' },
{ title: '慢性阻塞性疾病', name: 5, code: '16' },
{ title: '慢性肾病', name: 6, code: '32' },
{ title: '血脂异常', name: 7, code: '64' },
]
return list.filter(e => this.chronicTagsArray.includes(e.code))
}
},
created() {
this.init()
},
methods: {
load() {
const query = {
residentInfoId: this.baseInfo.residentInfoId,
serveTypeList: [5, 6, 7, 8, 9, 10, 11, 12, 14],
diseaseType: this.activeTab,
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
}
queryVisitByPage(query).then(res => {
this.list = res.data.dataList || []
this.pagination.total = res.data.total || 0
})
},
init() {
if (this.chronicTagsArray.length) {
const item = this.tabList.find(e => e.code === this.chronicTagsArray[0]) || {}
this.activeTab = item.name
this.load()
}
},
tabChange() {
}
}
}
</script>
<style lang="less" scoped>
.card {
background-color: #fff;
.detail-left {
width: 8em;
color: #8C8C8C;
}
.card-bt {
color: #607FF0;
background-color: #F0F3FF;
border: 0;
width: 80%;
height: 40px;
}
}
</style>
<template>
</template>
<script>
export default {
name: 'Index'
}
</script>
<style scoped>
</style>
\ No newline at end of file
......@@ -48,6 +48,26 @@ const routes = [
name: 'followUp-generalFU-add',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/followUp/generalFU/form/Index')
},
{
path: 'resident',
name: 'doctor-resident',
redirect: '/doctor/resident/base',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Index.vue'),
children: [
// 基本信息
{
path: 'base',
name: 'doctor-resident-base',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Base.vue')
},
// 随访记录
{
path: 'visit',
name: 'doctor-resident-visit',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Visit.vue')
},
]
}
]
}
]
......
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