Commit de13be01 authored by songrui's avatar songrui

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents d4d26eab 8a8d6b61
0a3e09905736ce5e82f4685709846d09
\ No newline at end of file
<template>
<van-config-provider :theme-vars="themeVars">
<div class="h-full resident-home">
<router-view v-slot="{ Component }">
<Transition name="route" mode="out-in">
<component :is="Component" v-if="visible"/>
<van-config-provider :theme-vars='themeVars'>
<div class='h-full resident-home'>
<router-view v-slot='{ Component }'>
<Transition name='route' mode='out-in'>
<component :is='Component' v-if='visible' />
</Transition>
</router-view>
</div>
......@@ -13,6 +13,8 @@
<script>
import { getDict, getResidentByInfo } from '@/api/base.js'
import { useStore } from './store/index.js'
import { getQueryVariable } from '@/utils/common'
import { showNotify } from 'vant'
export default {
data() {
......@@ -40,7 +42,7 @@ export default {
fieldLabelColor: '#262626',
cellBorderColor: '#d9d9d9',
// 进度条
sliderActiveBackground: '#54CCBD',
sliderActiveBackground: '#54CCBD'
}
}
},
......@@ -56,15 +58,25 @@ export default {
console.log(this.visible)
const res = await getDict()
this.store.$patch({ dict: res.data || {} })
const user = await getResidentByInfo({idCard: '620622196307194019'})
let idCard = getQueryVariable('idCard')
if (idCard) {
const user = await getResidentByInfo({ idCard: idCard })
if (!user.data) {
showNotify({ type: 'warning', message: '未获取到慢病信息', duration: 0 })
return
}
this.store.$patch({ userInfo: user.data || {} })
window.sessionStorage.setItem('userInfo', JSON.stringify(user.data))
} else {
let user = JSON.parse(window.sessionStorage.getItem('userInfo'))
this.store.$patch({ userInfo: user.data || {} })
}
this.visible = true
},
}
}
}
</script>
<style lang="less" scoped>
<style lang='less' scoped>
</style>
......@@ -95,11 +95,6 @@ export default {
info: {}
}
},
methods: {
onBack() {
this.$router.back()
},
},
computed: {
id() {
return this.$route.params.id
......
......@@ -157,7 +157,6 @@ export default {
this.load(false)
},
toDetail(item) {
debugger
let par = {}
let path = ``
if (item.serveType == 5) {
......
......@@ -58,7 +58,7 @@
</div>
</div>
</van-collapse-item>
<van-collapse-item key='2' title='随访详情' name='2'>
<van-collapse-item key='2' title='本次随访情况' name='2'>
<template #right-icon>
<doc-icon type='doc-down' />
</template>
......@@ -69,7 +69,14 @@
<span>{{ info.visitSituationName || '-' }}</span>
</span>
</div>
<div class='flex justify-between py-1 border-bottom item' v-if='info.visitSituation == 2'>
</div>
</van-collapse-item>
<van-collapse-item key='3' title='失访原因' name='3' v-if='info.visitSituation == 2'>
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>失访原因</span>
<span class='text-end'>
<span v-if='info.lossReason != 9'>{{ info.lossReasonName || '-' }}</span>
......@@ -78,7 +85,137 @@
</div>
</div>
</van-collapse-item>
<van-collapse-item key='3' title='随访机构' name='3'>
<van-collapse-item key='4' title='死亡原因' name='4' v-if="info.lossReason == 3">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>死亡原因</span>
<span class='text-end'>
<span>{{ info.deathReason || '-' }}</span>
</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item key='5' title='随访方式' name='5' v-if="info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>随访方式</span>
<span class='text-end'>
<span>{{ detailInfo.followUpWayName || '-' }}</span>
</span>
</div>
<div class='flex justify-between py-1 border-bottom item' v-if="info.visitSituation == 1 && (info.visitWay == 3 || info.visitWay == 4)">
<span class='shrink-0 mr-2 label'>是否发送</span>
<span class='text-end'>
<span v-if="info.isSms">{{ info.isSmsName || '-'}}</span>
<span v-if="info.isWx">{{info.isWxName || '-'}}</span>
</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item key='6' title='随访内容' name='6' v-if="showOne && info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>随访内容</span>
<span class='text-end'>
<span>{{ info.visitContent || '-' }}</span>
</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item key='7' title='处置意见' name='7' v-if="showOne && info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>处置意见</span>
<span class='text-end'>
<span>{{ info.disposalOpinion || '-' }}</span>
</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item key="8" title='健康指导' name="8" v-if="(showOne || showTwo) && info.visitSituation == 1">
<template #right-icon>
<doc-icon type="doc-down" />
</template>
<div>
<!-- <div style="color: #262626">指导内容</div> -->
<div v-if="guideContentList.length" class="flex flex-col card">
<!-- 文本 -->
<div v-for="item in guideContentList" :key="item.templateMode" class="mb-1 flex"
:style="`order: ${item.templateMode}`">
<span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span>
<span> {{ item.templateContent }}</span>
</div>
</div>
</div>
</van-collapse-item>
<van-collapse-item key="9" title='宣教内容' name="9" v-if="showThree && info.visitSituation == 1">
<template #right-icon>
<doc-icon type="doc-down" />
</template>
<div>
<!-- <div style="color: #262626">指导内容</div> -->
<div v-if="contentList.length" class="flex flex-col card">
<!-- 文本 -->
<div v-for="item in contentList" :key="item.templateMode" class="mb-1 flex"
:style="`order: ${item.templateMode}`">
<span class="shrink-0 mr-1" v-if="item.templateModeTrans != '无'">{{ item.templateModeTrans }} :</span>
<span> {{ item.templateContent }}</span>
</div>
</div>
<div v-if="mp4List.length" class="card mt-2">
<Mp4 :files="mp4List"/>
</div>
<div v-if="mp3List.length" class="card mt-2">
<Mp3 :files="mp3List"/>
</div>
</div>
</van-collapse-item>
<van-collapse-item key='10' title='催检内容' name='10' v-if="showFour && info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list'>
<div class='flex justify-between py-1 border-bottom item' >
<span class='shrink-0 mr-2 label'>催检内容</span>
<span class='text-end'>
<span>{{ info.urgentInsContent || '-' }}</span>
</span>
</div>
</div>
</van-collapse-item>
<van-collapse-item key='11' title='上传随访记录' name='11' v-if="showOne && info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list gap-x-2.5 gap-y-1 flex items-center flex-wrap'>
<div v-for="(url, index) in info.uploadVisitRecordImageList" :key="index" >
<img style='width: 1.47rem;height: 2.04rem' :src="url.trueDownloadUrl" />
</div>
</div>
</van-collapse-item>
<van-collapse-item key='12' title='现场随访照片' name='12' v-if="showOne && info.visitSituation == 1">
<template #right-icon>
<doc-icon type='doc-down' />
</template>
<div class='list gap-x-2.5 gap-y-1 flex items-center flex-wrap'>
<div v-for="(url, index) in info.sceneVisitImageList" :key="index" >
<img style='width: 1.47rem;height: 2.04rem' :src="url.trueDownloadUrl" />
</div>
</div>
</van-collapse-item>
<van-collapse-item key='13' title='随访机构' name='13'>
<template #right-icon>
<doc-icon type='doc-down' />
</template>
......@@ -101,18 +238,35 @@
<script>
import { showToast } from 'vant'
import { fetchCurrencyById } from '@/api/doctor/generalFU'
import { queryGeneralFUDetail } from '@/api/residentWX/visit'
import Mp3 from '@/residentWX/components/mediaPlay/Mp3.vue'
import Mp4 from '@/residentWX/components/mediaPlay/Mp4'
export default {
name: 'CurrencyFUDetail.vue',
components: { Mp4, Mp3 },
data() {
return {
activeCollapse: [],
detailInfo: {
visitWayRulesT: [],
publicizeType: [],
followUpWayName: ''
},
collapseList: [
{ title: '居民信息', name: '1', columns: [], info: {} },
{ title: '随访详情', name: '2', columns: [], info: {} },
{ title: '随访机构', name: '3', columns: [], info: {} }
{ title: '居民信息', name: '1'},
{ title: '本次随访情况', name: '2'},
{ title: '失访原因', name: '3'},
{ title: '死亡原因', name: '4'},
{ title: '随访方式', name: '5'},
{ title: '随访内容', name: '6'},
{ title: '处置意见', name: '7'},
{ title: '健康指导', name: '8'},
{ title: '宣教内容', name: '9'},
{ title: '催检内容', name: '10'},
{ title: '上传随访记录', name: '11'},
{ title: '现场随访照片', name: '12'},
{ title: '随访机构', name: '13'},
],
// 全部展开、收起
collapseAll: false,
......@@ -130,24 +284,6 @@ export default {
{ title: '户籍地址', key: 'registeredCodeName' },
{ title: '详细地址', key: 'permanentAddress' }
],
columnsDetail: [
{ title: '年龄', key: 'currentAge', unit: '岁' },
{ title: '既往史', key: 'medicalHistoryName' },
{ title: '身高', key: 'height', unit: 'cm' },
{ title: '体重', key: 'weight', unit: 'kg' },
{ title: 'BMI', key: 'bmi', unit: 'kg/m²' },
{ title: '腰围', key: 'waistline', unit: 'cm' },
{ title: '是否吸烟', key: 'isSmokingName' },
{ title: '家族史', key: 'familyHistoryName' },
{ title: '血压值', key: 'pressure' },
{ title: '空腹血糖', key: 'fastingGlucose', unit: 'mmol/L' },
{ title: '低密度脂蛋白胆固醇', key: 'ldlCholesterin', unit: 'mmol/L' },
{ title: '血清总胆固醇', key: 'serumCholesterin', unit: 'mmol/L' },
{ title: '高密度脂蛋白胆固醇', key: 'hdlCholesterin', unit: 'mmol/L' },
{ title: '运动', key: 'exerciseIntensityName' },
{ title: '慢病高危评估结果', key: 'screenResultName' }
],
columnsOrg: [
{ title: '随访单位', key: 'visitUnitName' },
{ title: '随访科室', key: 'visitOfficeName' },
......@@ -161,6 +297,64 @@ export default {
},
residentInfo() {
return this.info.residentsRecord || {}
},
//复检
showOne() {
const {visitWayRulesT = []} = this.detailInfo
let res = false
if (visitWayRulesT.includes('1-1') || visitWayRulesT.includes('1-2') || visitWayRulesT.includes('1-3') ||
visitWayRulesT.includes('1-4') || visitWayRulesT.includes('1-5') || visitWayRulesT.includes('1-6')) {
res = true
}
return res
},
//指导
showTwo() {
const {visitWayRulesT = []} = this.detailInfo
let res = false
if (visitWayRulesT.includes('2-1') || visitWayRulesT.includes('2-2') || visitWayRulesT.includes('2-3') ||
visitWayRulesT.includes('2-4') || visitWayRulesT.includes('2-5') || visitWayRulesT.includes('2-6')) {
res = true
}
return res
},
//宣教
showThree() {
const {visitWayRulesT = []} = this.detailInfo
let res = false
if (visitWayRulesT.includes('3-1') || visitWayRulesT.includes('3-2') || visitWayRulesT.includes('3-3') ||
visitWayRulesT.includes('3-4') || visitWayRulesT.includes('3-5') || visitWayRulesT.includes('3-6')) {
res = true
}
return res
},
//催检
showFour() {
const {visitWayRulesT = []} = this.detailInfo
let res = false
if (visitWayRulesT.includes('4-1') || visitWayRulesT.includes('4-2') || visitWayRulesT.includes('4-3') ||
visitWayRulesT.includes('4-4') || visitWayRulesT.includes('4-5') || visitWayRulesT.includes('4-6')) {
res = true
}
return res
},
// 文本内容
guideContentList() {
return this.info?.guide?.contentList || []
},
// 文本内容
contentList() {
return this.info?.publicize?.contentList || []
},
// 文件内容
annexList() {
return this.info?.publicize?.annexList || []
},
mp3List() {
return this.annexList.filter(e => e.type == 2)
},
mp4List() {
return this.annexList.filter(e => e.type == 3)
}
},
created() {
......@@ -178,9 +372,28 @@ export default {
queryGeneralFUDetail(par).then(res => {
let result = res.data || {}
this.info = result
this.dataHandle()
}).finally(() => {
})
},
//数据处理
dataHandle() {
const {visitWay, visitWayRules, publicizeType, visitWayName, visitWayRulesName} = this.info
let visitWayRulesT = []
if (visitWay && visitWayRules) {
let resList = []
let list = visitWayRules.split(',')
list.forEach(item => {
resList.push(`${item}-${visitWay}`)
})
visitWayRulesT = resList
this.detailInfo.visitWayRulesT = visitWayRulesT
if (publicizeType) {
this.detailInfo.publicizeType = publicizeType.split(',').map(item => Number(item))
}
this.detailInfo.followUpWayName = visitWayName+ '-'+visitWayRulesName.replace(",","/")
}
},
// 折叠面板切换
collapseChange(val) {
if (val && val.length === this.collapseList.length) {
......@@ -278,4 +491,10 @@ table {
min-width: 5em;
}
}
.card {
background-color: #F8FAFC;
padding: 4px 10px;
border-radius: 4px;
color: #4D5665;
}
</style>
\ No newline at end of file
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