Commit c78d2c48 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 16b46283 3d39a38f
...@@ -8,3 +8,8 @@ export function queryResidentInfo(params) { ...@@ -8,3 +8,8 @@ export function queryResidentInfo(params) {
export function queryVisitByPage(params, loading) { export function queryVisitByPage(params, loading) {
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record/page`, body: params, loading }) return fetchBase({ url: `/chronic-admin/v1/chronic-visit-record/page`, body: params, loading })
} }
//更新居民基本信息
export function updateResident(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/update`, body: params, loading: true })
}
\ No newline at end of file
...@@ -5,56 +5,56 @@ ...@@ -5,56 +5,56 @@
<div class='title'>居民信息</div> <div class='title'>居民信息</div>
<div class='detail-div mt-2'> <div class='detail-div mt-2'>
<div class='flex items-center justify-between'> <div class='flex items-center justify-between'>
<div>证件类型</div> <div class='label'>证件类型</div>
<div>{{ residentInfo.certificateTypeName || '-' }}</div> <div>{{ residentInfo.certificateTypeName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>证件号码</div> <div class='label'>证件号码</div>
<div>{{ residentInfo.idCard || '-' }}</div> <div>{{ residentInfo.idCard || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>姓名</div> <div class='label'>姓名</div>
<div>{{ residentInfo.residentName || '-' }}</div> <div>{{ residentInfo.residentName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>性别</div> <div class='label'>性别</div>
<div>{{ residentInfo.genderName || '-' }}</div> <div>{{ residentInfo.genderName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>出生日期</div> <div class='label'>出生日期</div>
<div>{{ residentInfo.dataBirth || '-' }}</div> <div>{{ residentInfo.dataBirth || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>民族</div> <div class='label'>民族</div>
<div>{{ residentInfo.nationalName || '-' }}</div> <div>{{ residentInfo.nationalName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>年龄</div> <div class='label'>年龄</div>
<div>{{ residentInfo.currentAge || '-' }}</div> <div>{{ residentInfo.currentAge || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>本人电话</div> <div class='label'>本人电话</div>
<div>{{ residentInfo.telephone || '-' }}</div> <div>{{ residentInfo.telephone || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>联系人姓名</div> <div class='label'>联系人姓名</div>
<div>{{ residentInfo.contactName || '-' }}</div> <div>{{ residentInfo.contactName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>与居民关系</div> <div class='label'>与居民关系</div>
<div>{{ residentInfo.relationName || '-' }}</div> <div>{{ residentInfo.relationName || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex items-center justify-between mt-2'>
<div>联系电话</div> <div class='label'>联系电话</div>
<div>{{ residentInfo.contactPhone || '-' }}</div> <div>{{ residentInfo.contactPhone || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex flex-wrap justify-between mt-2'>
<div>现住址</div> <div class='label'>现住址</div>
<div>{{ residentInfo.fullNowAddress || '-' }}</div> <div style='flex: 1'>{{ residentInfo.fullNowAddress || '-' }}</div>
</div> </div>
<div class='flex items-center justify-between mt-2'> <div class='flex flex-wrap justify-between mt-2'>
<div>户籍地址</div> <div class='label'>户籍地址</div>
<div>{{ residentInfo.fullPermanentAddress || '-' }}</div> <div style='flex: 1'>{{ residentInfo.fullPermanentAddress || '-' }}</div>
</div> </div>
</div> </div>
<div class='title mt-2'>随访信息</div> <div class='title mt-2'>随访信息</div>
...@@ -87,22 +87,76 @@ ...@@ -87,22 +87,76 @@
</div> </div>
<div class='mt-2' v-if="showOne && info.visitSituation == 1"> <div class='mt-2' v-if="showOne && info.visitSituation == 1">
<div>随访内容</div> <div>随访内容</div>
<div class='white-b mt-2'> <div class='white-b mt-2' style='min-height: 60px'>
<div>{{ info.visitContent }}</div> <div>{{ info.visitContent }}</div>
</div> </div>
</div> </div>
<div class='mt-2' v-if="showOne && info.visitSituation == 1"> <div class='mt-2' v-if="showOne && info.visitSituation == 1">
<div>处置意见</div> <div>处置意见</div>
<div class='white-b mt-2'> <div class='white-b mt-2' style='min-height: 60px'>
<div>{{ info.disposalOpinion }}</div> <div>{{ info.disposalOpinion }}</div>
</div> </div>
</div> </div>
<div class='mt-2' v-if="(showOne || showTwo) && info.visitSituation == 1 && info.isHealthGuide == 1"> <div class='mt-2' v-if="(showOne || showTwo) && info.visitSituation == 1 && info.isHealthGuide == 1">
<div>健康指导</div> <div>健康指导</div>
<div class='white-b mt-2'> <div class='white-b mt-2'>
<div class='flex flex-wrap' v-for="(item, index) in healthInterventionsInfo.visitHealthGuideList" > <div class='flex flex-wrap mt-2' v-for="(item, index) in healthInterventionsInfo.visitHealthGuideList" >
<div v-if="item.name != '无'">{{item.name}}</div> <div v-if="item.name != '无'" class='label'>{{item.name}}</div>
<div>{{item.templateContent || '-'}}</div> <div style='flex: 1'>{{item.templateContent }}</div>
</div>
</div>
</div>
<div class='mt-2' v-if='imgList1.length'>
<div>随访记录</div>
<div class='flex items-center' style='flex-wrap: wrap'>
<div v-for='(item, index) in imgList1'>
<!-- 图片-->
<div v-if="item.imgFlag == 'img'" class='mt-2'>
<img :src='item.trueDownloadUrl' class='ml-2' style='width: 95px;height: 95px;'>
</div>
</div>
</div>
<!-- pdf-->
<div>
<div v-for='item in imgList1'>
<div class='mt-2 pdf' v-if="item.imgFlag == 'pdf'">
<div class='flex items-center justify-between'>
<div class='flex items-center' @click.stop='toPdf(item)'>
<div>
<doc-icon type='doc-PDF' style='font-size: .48rem'></doc-icon>
</div>
<div class='ml-1'>{{ item.name }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='mt-2' v-if='imgList2.length'>
<div>现场随访照片</div>
<div class='flex items-center' style='flex-wrap: wrap'>
<div v-for='(item, index) in imgList2'>
<!-- 图片-->
<div v-if="item.imgFlag == 'img'" class='mt-2'>
<img :src='item.trueDownloadUrl' class='ml-2' style='width: 95px;height: 95px;'>
</div>
</div>
</div>
<!-- pdf-->
<div>
<div v-for='item in imgList2'>
<div class='mt-2 pdf' v-if="item.imgFlag == 'pdf'">
<div class='flex items-center justify-between'>
<div class='flex items-center' @click.stop='toPdf(item)'>
<div>
<doc-icon type='doc-PDF' style='font-size: .48rem'></doc-icon>
</div>
<div class='ml-1'>{{ item.name }}</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -126,7 +180,7 @@ ...@@ -126,7 +180,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="px-5 flex align-center justify-around"> <div class="px-5 flex align-center justify-around pt-2 pb-2">
<van-button type="primary" round plain style="width: 70%;background: #F0F3FF;border: 0px" <van-button type="primary" round plain style="width: 70%;background: #F0F3FF;border: 0px"
@click="toBack">返回</van-button> @click="toBack">返回</van-button>
</div> </div>
...@@ -136,6 +190,7 @@ ...@@ -136,6 +190,7 @@
<script> <script>
import { fetchCurrencyById } from '@/api/doctor/generalFU' import { fetchCurrencyById } from '@/api/doctor/generalFU'
import { showToast } from 'vant' import { showToast } from 'vant'
import { useStore } from '@/doctor/store'
export default { export default {
name: 'Detail', name: 'Detail',
...@@ -144,6 +199,7 @@ export default { ...@@ -144,6 +199,7 @@ export default {
}, },
data() { data() {
return { return {
store: useStore(),
info: {}, info: {},
residentInfo: {} residentInfo: {}
} }
...@@ -181,7 +237,7 @@ export default { ...@@ -181,7 +237,7 @@ export default {
}, },
//健康指导 //健康指导
healthInterventionsInfo() { healthInterventionsInfo() {
const modeArray = this.$dict('DC00084') const modeArray = this.store.getDict('DC00084')
let visitHealthGuideList = [] let visitHealthGuideList = []
if (this.info.healthGuideContent) { if (this.info.healthGuideContent) {
visitHealthGuideList = JSON.parse(this.info.healthGuideContent) visitHealthGuideList = JSON.parse(this.info.healthGuideContent)
...@@ -198,7 +254,33 @@ export default { ...@@ -198,7 +254,33 @@ export default {
}) })
} }
return res return res
} },
imgList1() {
const {uploadVisitRecordImageList = []} = this.info
uploadVisitRecordImageList.forEach(item => {
item['imgFlag'] = ''
if (item.fileType == 'pdf') {
item['imgFlag'] = 'pdf'
}
if (item.fileType == 'img') {
item['imgFlag'] = 'img'
}
})
return uploadVisitRecordImageList
},
imgList2() {
const {sceneVisitImageList = []} = this.info
sceneVisitImageList.forEach(item => {
item['imgFlag'] = ''
if (item.fileType == 'pdf') {
item['imgFlag'] = 'pdf'
}
if (item.fileType == 'img') {
item['imgFlag'] = 'img'
}
})
return sceneVisitImageList
},
}, },
created() { created() {
this.load() this.load()
...@@ -248,6 +330,10 @@ export default { ...@@ -248,6 +330,10 @@ export default {
border-radius: 8px; border-radius: 8px;
} }
.label {
width: 104px;
}
:deep(.van-nav-bar .van-icon) { :deep(.van-nav-bar .van-icon) {
color: #000000; color: #000000;
} }
......
...@@ -171,16 +171,16 @@ ...@@ -171,16 +171,16 @@
<template #input> <template #input>
<van-radio-group v-model='form.visitSituation' class='w-full' shape='dot'> <van-radio-group v-model='form.visitSituation' class='w-full' shape='dot'>
<van-cell-group> <van-cell-group>
<van-cell title='在访' clickable @click="form.visitSituation = '1'" <van-cell title='在访' clickable @click="form.visitSituation = 1"
class='input-back form-input'> class='input-back form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='1' /> <van-radio :name='1' />
</template> </template>
</van-cell> </van-cell>
<van-cell title='失访' clickable @click="form.visitSituation = '2'" <van-cell title='失访' clickable @click="form.visitSituation = 2"
class='input-back mt-2 form-input'> class='input-back mt-2 form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='2' /> <van-radio :name='2' />
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -194,22 +194,22 @@ ...@@ -194,22 +194,22 @@
<template #input> <template #input>
<van-radio-group v-model='form.lossReason' class='w-full' shape='dot'> <van-radio-group v-model='form.lossReason' class='w-full' shape='dot'>
<van-cell-group> <van-cell-group>
<van-cell title='无法联系' clickable @click="form.lossReason = '1'" <van-cell title='无法联系' clickable @click="form.lossReason = 1"
class='input-back form-input'> class='input-back form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='1' /> <van-radio :name='1' />
</template> </template>
</van-cell> </van-cell>
<van-cell title='患者拒绝随访' clickable @click="form.lossReason = '2'" <van-cell title='患者拒绝随访' clickable @click="form.lossReason = 2"
class='input-back mt-2 form-input'> class='input-back mt-2 form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='2' /> <van-radio :name='2' />
</template> </template>
</van-cell> </van-cell>
<van-cell title='死亡' clickable @click="form.lossReason = '3'" <van-cell title='死亡' clickable @click="form.lossReason = 3"
class='input-back mt-2 form-input'> class='input-back mt-2 form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='3' /> <van-radio :name='3' />
</template> </template>
</van-cell> </van-cell>
<van-field <van-field
...@@ -219,10 +219,10 @@ ...@@ -219,10 +219,10 @@
placeholder='死亡原因' placeholder='死亡原因'
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
/> />
<van-cell title='其他' clickable @click="form.lossReason = '9'" <van-cell title='其他' clickable @click="form.lossReason = 9"
class='input-back mt-2 form-input'> class='input-back mt-2 form-input'>
<template #right-icon> <template #right-icon>
<van-radio name='9' /> <van-radio :name='9' />
</template> </template>
</van-cell> </van-cell>
<van-field <van-field
...@@ -242,12 +242,12 @@ ...@@ -242,12 +242,12 @@
<template #input> <template #input>
<van-radio-group v-model='form.visitWay' class='w-full' shape='dot'> <van-radio-group v-model='form.visitWay' class='w-full' shape='dot'>
<van-cell-group> <van-cell-group>
<van-cell title='门诊' clickable @click="form.visitWay = '5'" <van-cell title='门诊' clickable @click="form.visitWay = 5"
class='input-back form-input' class='input-back form-input'
:style="{borderRadius: form.visitWay == 5 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 5 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='5' /> <van-radio :name='5' />
</template> </template>
</van-cell> </van-cell>
...@@ -259,12 +259,12 @@ ...@@ -259,12 +259,12 @@
<div @click='toTel' class='tel-label'>点击拨打</div> <div @click='toTel' class='tel-label'>点击拨打</div>
</div> </div>
</div> </div>
<van-cell title='住院' clickable @click="form.visitWay = '6'" <van-cell title='住院' clickable @click="form.visitWay = 6"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 6 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 6 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='6' /> <van-radio :name='6' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 6'> <div class='tel-back' v-if='form.visitWay == 6'>
...@@ -275,12 +275,12 @@ ...@@ -275,12 +275,12 @@
<div @click='toTel' class='tel-label'>点击拨打</div> <div @click='toTel' class='tel-label'>点击拨打</div>
</div> </div>
</div> </div>
<van-cell title='入户' clickable @click="form.visitWay = '7'" <van-cell title='入户' clickable @click="form.visitWay = 7"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 7 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 7 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='7' /> <van-radio :name='7' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 7'> <div class='tel-back' v-if='form.visitWay == 7'>
...@@ -291,12 +291,12 @@ ...@@ -291,12 +291,12 @@
<div @click='toTel' class='tel-label'>点击拨打</div> <div @click='toTel' class='tel-label'>点击拨打</div>
</div> </div>
</div> </div>
<van-cell title='电话' clickable @click="form.visitWay = '8'" <van-cell title='电话' clickable @click="form.visitWay = 8"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 8 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 8 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='8' /> <van-radio :name='8' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 8'> <div class='tel-back' v-if='form.visitWay == 8'>
...@@ -308,12 +308,12 @@ ...@@ -308,12 +308,12 @@
</div> </div>
</div> </div>
<van-cell title='短信(指导)' clickable @click="form.visitWay = '9'" <van-cell title='短信(指导)' clickable @click="form.visitWay = 9"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 9 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 9 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='9' /> <van-radio :name='9' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 9'> <div class='tel-back' v-if='form.visitWay == 9'>
...@@ -325,21 +325,21 @@ ...@@ -325,21 +325,21 @@
shape='dot'> shape='dot'>
<div class='flex items-center w-full'> <div class='flex items-center w-full'>
<van-cell title='是' clickable <van-cell title='是' clickable
@click="form.isHealthGuide = '1'" @click="form.isHealthGuide = 1"
style='flex: 1' style='flex: 1'
class='input-back form-input' class='input-back form-input'
> >
<template #right-icon> <template #right-icon>
<van-radio name='1' /> <van-radio :name='1' />
</template> </template>
</van-cell> </van-cell>
<van-cell title='否' clickable <van-cell title='否' clickable
@click="form.isHealthGuide = '2'" @click="form.isHealthGuide = 2"
style='flex: 1' style='flex: 1'
class='input-back form-input ml-2' class='input-back form-input ml-2'
> >
<template #right-icon> <template #right-icon>
<van-radio name='2' /> <van-radio :name='2' />
</template> </template>
</van-cell> </van-cell>
</div> </div>
...@@ -347,12 +347,12 @@ ...@@ -347,12 +347,12 @@
</div> </div>
</div> </div>
<van-cell title='微信(指导)' clickable @click="form.visitWay = '11'" <van-cell title='微信(指导)' clickable @click="form.visitWay = 11"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 11 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 11 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='11' /> <van-radio :name='11' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 11'> <div class='tel-back' v-if='form.visitWay == 11'>
...@@ -364,21 +364,21 @@ ...@@ -364,21 +364,21 @@
shape='dot'> shape='dot'>
<div class='flex items-center w-full'> <div class='flex items-center w-full'>
<van-cell title='是' clickable <van-cell title='是' clickable
@click="form.isHealthGuide = '1'" @click="form.isHealthGuide = 1"
style='flex: 1' style='flex: 1'
class='input-back form-input' class='input-back form-input'
> >
<template #right-icon> <template #right-icon>
<van-radio name='1' /> <van-radio :name='1' />
</template> </template>
</van-cell> </van-cell>
<van-cell title='否' clickable <van-cell title='否' clickable
@click="form.isHealthGuide = '2'" @click="form.isHealthGuide = 2"
style='flex: 1' style='flex: 1'
class='input-back form-input ml-2' class='input-back form-input ml-2'
> >
<template #right-icon> <template #right-icon>
<van-radio name='2' /> <van-radio :name='2' />
</template> </template>
</van-cell> </van-cell>
</div> </div>
...@@ -386,12 +386,12 @@ ...@@ -386,12 +386,12 @@
</div> </div>
</div> </div>
<van-cell title='短信(催检)' clickable @click="form.visitWay = '10'" <van-cell title='短信(催检)' clickable @click="form.visitWay = 10"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 10 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 10 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='10' /> <van-radio :name='10' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 10'> <div class='tel-back' v-if='form.visitWay == 10'>
...@@ -411,12 +411,12 @@ ...@@ -411,12 +411,12 @@
<van-date-picker @confirm='timeConfirm1' @cancel='showBirth = false' /> <van-date-picker @confirm='timeConfirm1' @cancel='showBirth = false' />
</van-popup> </van-popup>
<van-cell title='微信(催检)' clickable @click="form.visitWay = '12'" <van-cell title='微信(催检)' clickable @click="form.visitWay = 12"
class='input-back mt-2 form-input' class='input-back mt-2 form-input'
:style="{borderRadius: form.visitWay == 12 ? '8px 8px 0px 0px ': '8px'}" :style="{borderRadius: form.visitWay == 12 ? '8px 8px 0px 0px ': '8px'}"
> >
<template #right-icon> <template #right-icon>
<van-radio name='12' /> <van-radio :name='12' />
</template> </template>
</van-cell> </van-cell>
<div class='tel-back' v-if='form.visitWay == 12'> <div class='tel-back' v-if='form.visitWay == 12'>
...@@ -526,12 +526,12 @@ const defaultForm = (info = {}) => { ...@@ -526,12 +526,12 @@ const defaultForm = (info = {}) => {
// createUnitId: undefined, // createUnitId: undefined,
// createUnitName: undefined // createUnitName: undefined
//本次随访情况 //本次随访情况
visitSituation: '1', visitSituation: 1,
lossReason: undefined, lossReason: undefined,
deathReason: undefined, deathReason: undefined,
lossReasonOther: undefined, lossReasonOther: undefined,
visitWay: '5', visitWay: 5,
isHealthGuide: '1', isHealthGuide: 1,
screenTime: new dayjs().add(1, 'day').format('YYYY-MM-DD') screenTime: new dayjs().add(1, 'day').format('YYYY-MM-DD')
} }
Reflect.ownKeys(form).forEach(key => { Reflect.ownKeys(form).forEach(key => {
...@@ -694,12 +694,7 @@ export default { ...@@ -694,12 +694,7 @@ export default {
id: this.form.personId, id: this.form.personId,
}, },
} }
resolve( resolve(par)
fetchDataHandle(par, {
presentCode: 'arrToAdd',
registeredCode: 'arrToAdd'
})
)
}).catch((e) => { }).catch((e) => {
console.warn('ArchiveCommon error', e) console.warn('ArchiveCommon error', e)
}) })
......
...@@ -184,8 +184,12 @@ export default { ...@@ -184,8 +184,12 @@ export default {
return { return {
store: useStore(), store: useStore(),
form: {}, form: {},
//展示用
imgList: [], imgList: [],
imgList2: [], imgList2: [],
//input图片值
imgInputList1: [],
imgInputList2: [],
showDate: false, showDate: false,
rules: { rules: {
nextVisitDate: [{required: true,message: '请选择'}] nextVisitDate: [{required: true,message: '请选择'}]
...@@ -197,8 +201,8 @@ export default { ...@@ -197,8 +201,8 @@ export default {
handler() { handler() {
this.form = this.setForm(this.info) this.form = this.setForm(this.info)
if (this.info.id) { if (this.info.id) {
this.imgList = this.info.uploadVisitRecordImageList || [] this.imgList = this.imgListInfo1
this.imgList2 = this.info.sceneVisitImageList || [] this.imgList2 = this.imgListInfo2
} }
}, },
immediate: true immediate: true
...@@ -231,7 +235,35 @@ export default { ...@@ -231,7 +235,35 @@ export default {
res = true res = true
} }
return res return res
} },
imgListInfo1() {
const {uploadVisitRecordImageList = []} = this.info
uploadVisitRecordImageList.forEach((item, index) => {
item['imgFlag'] = ''
item['indexF'] = index + 1
if (item.fileType == 'pdf') {
item['imgFlag'] = 'pdf'
}
if (item.fileType == 'img') {
item['imgFlag'] = 'img'
}
})
return uploadVisitRecordImageList
},
imgListInfo2() {
const {sceneVisitImageList = []} = this.info
sceneVisitImageList.forEach((item, index) => {
item['imgFlag'] = ''
item['indexF'] = index + 1
if (item.fileType == 'pdf') {
item['imgFlag'] = 'pdf'
}
if (item.fileType == 'img') {
item['imgFlag'] = 'img'
}
})
return sceneVisitImageList
},
}, },
methods: { methods: {
setForm(info = {}) { setForm(info = {}) {
...@@ -302,6 +334,7 @@ export default { ...@@ -302,6 +334,7 @@ export default {
} }
}) })
this.imgList = this.imgList.concat(newFile) this.imgList = this.imgList.concat(newFile)
this.imgInputList1 = this.imgInputList1.concat(newFile)
}, },
choiceImg2() { choiceImg2() {
let input = document.getElementById('imgId2') let input = document.getElementById('imgId2')
...@@ -320,6 +353,8 @@ export default { ...@@ -320,6 +353,8 @@ export default {
} }
}) })
this.imgList2 = this.imgList2.concat(newFile) this.imgList2 = this.imgList2.concat(newFile)
console.log(this.imgList2)
this.imgInputList2 = this.imgInputList2.concat(newFile)
}, },
//图片预览 //图片预览
toPreview(index) { toPreview(index) {
...@@ -340,9 +375,11 @@ export default { ...@@ -340,9 +375,11 @@ export default {
}, },
delImg(index) { delImg(index) {
this.imgList = this.imgList.filter(item => item.indexF != index) this.imgList = this.imgList.filter(item => item.indexF != index)
this.imgInputList1 = this.imgInputList1.filter(item => item.indexF != index)
}, },
delImg2(index) { delImg2(index) {
this.imgList2 = this.imgList2.filter(item => item.indexF != index) this.imgList2 = this.imgList2.filter(item => item.indexF != index)
this.imgInputList2 = this.imgInputList2.filter(item => item.indexF != index)
}, },
dataConfirm({ selectedValues }) { dataConfirm({ selectedValues }) {
this.form.nextVisitDate = selectedValues.join('-') this.form.nextVisitDate = selectedValues.join('-')
...@@ -354,6 +391,8 @@ export default { ...@@ -354,6 +391,8 @@ export default {
let par = { let par = {
img1: this.imgList || [], img1: this.imgList || [],
img2: this.imgList2 || [], img2: this.imgList2 || [],
imgInput1: this.imgInputList1,
imgInput2: this.imgInputList2,
...this.form, ...this.form,
healthGuideContent: JSON.stringify(this.form.visitHealthGuideList) healthGuideContent: JSON.stringify(this.form.visitHealthGuideList)
} }
......
<template> <template>
<div> <div>
<van-nav-bar title='新增通用随访' left-text='' left-arrow @click-left='toBack'></van-nav-bar> <van-nav-bar :title="routerDetail.id ? '修改通用随访': '新增通用随访'" left-text='' left-arrow @click-left='toBack'></van-nav-bar>
<div class='p-4 h-overflow'> <div class='p-4 h-overflow'>
<base-info :info='info' v-show='step == 1' ref='baseInfo' <base-info :info='info' v-show='step == 1' ref='baseInfo'
@changeVisitSituation='changeVisitSituation'></base-info> @changeVisitSituation='changeVisitSituation'></base-info>
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
</div> </div>
<div class='pt-2 pb-2'> <div class='pt-2 pb-2'>
<div class='px-5 grow flex flex-col justify-end' v-if='step == 1'> <div class='px-5 grow flex flex-col justify-end' v-if='step == 1'>
<van-button type='primary' block round v-if='visitSituation ==1' <van-button type='primary' block round v-if='visitSituation == 1'
@click='toNext(2)'>下一步 @click='toNext(2)'>下一步
</van-button> </van-button>
<van-button type='primary' block round v-if='visitSituation ==2' <van-button type='primary' block round v-if='visitSituation == 2'
@click='toNext(3)'>下一步 @click='toNext(3)'>下一步
</van-button> </van-button>
</div> </div>
...@@ -72,31 +72,37 @@ export default { ...@@ -72,31 +72,37 @@ export default {
methods: { methods: {
async init() { async init() {
this.info = {} this.info = {}
const res = await getChronicResidentsId(this.routerDetail.residentInfoId)
const {
id,
createDate,
createDoctorId,
createDoctorName,
createOfficeId,
createOfficeName,
createUnitId,
createUnitName,
updated,
...others
} = res.data
this.info = {
personId: id,
...others
}
this.info.diseaseType = this.routerDetail.diseaseType
if (this.routerDetail.id) { if (this.routerDetail.id) {
const res = await fetchCurrencyById({ id: this.routerDetail.id }) const res = await fetchCurrencyById({ id: this.routerDetail.id })
let result = res.data || {} let result = res.data || {}
const {residentsRecord = {}} = result
const {id, ...others} = residentsRecord
this.info = { this.info = {
...others,
personId: id,
...result ...result
} }
} else {
const res = await getChronicResidentsId(this.routerDetail.residentInfoId)
const {
id,
createDate,
createDoctorId,
createDoctorName,
createOfficeId,
createOfficeName,
createUnitId,
createUnitName,
updated,
...others
} = res.data
this.info = {
personId: id,
...others
}
this.info.diseaseType = this.routerDetail.diseaseType
} }
}, },
async toNext(val) { async toNext(val) {
if (val == 2) { if (val == 2) {
...@@ -113,40 +119,60 @@ export default { ...@@ -113,40 +119,60 @@ export default {
//图片上传 //图片上传
async upload(imgList = []) { async upload(imgList = []) {
let list = [] let list = []
let fileId = Math.random().toString(16).substring(2, 8) if (imgList.length) {
let data = new FormData() let fileId = Math.random().toString(16).substring(2, 8)
data.append('parentId', fileId) let data = new FormData()
data.append('parentId', fileId)
imgList.forEach(item => {
data.append('files', item)
})
let res = await upLoadMultifile(data)
let result = res.data || []
result.forEach(item => {
list.push(item.id)
})
}
return list
},
//原图片数据处理
baseImgHandle(imgList = []) {
let list = []
imgList.forEach(item => { imgList.forEach(item => {
data.append('files', item)
})
let res = await upLoadMultifile(data)
let result = res.data || []
result.forEach(item => {
list.push(item.id) list.push(item.id)
}) })
return list.join() return list
}, },
async onsubmit() { async onsubmit() {
debugger
let baseInfo = await this.$refs.baseInfo.onSubmit() let baseInfo = await this.$refs.baseInfo.onSubmit()
let generalFUForm = await this.$refs.generalFUForm.onSubmit() let generalFUForm = await this.$refs.generalFUForm.onSubmit()
let commonBottom = await this.$refs.commonBottom.onSubmit() let commonBottom = await this.$refs.commonBottom.onSubmit()
let imgInput1List = []
let imgInput2List = []
let uploadVisitRecord = '' let uploadVisitRecord = ''
let sceneVisitImage = '' let sceneVisitImage = ''
let fileId2 = Math.random().toString(16).substring(2, 8)
//图片上传 //图片上传
if (generalFUForm.imgInput1.length) {
imgInput1List = await this.upload(generalFUForm.imgInput1)
}
if (generalFUForm.imgInput2.length) {
imgInput2List = await this.upload(generalFUForm.imgInput2)
}
if (generalFUForm.img1.length) { if (generalFUForm.img1.length) {
uploadVisitRecord = await this.upload(generalFUForm.img1) let img1List = this.baseImgHandle(generalFUForm.img1)
let lsit1 = [...imgInput1List, ...img1List]
uploadVisitRecord = Array.from(new Set(lsit1)).join()
} }
if (generalFUForm.img2.length) { if (generalFUForm.img2.length) {
sceneVisitImage = await this.upload(generalFUForm.img2) let img2List = this.baseImgHandle(generalFUForm.img2)
let lsit2 = [...imgInput2List, ...img2List]
sceneVisitImage = Array.from(new Set(lsit2)).join()
} }
let params = { let params = {
...baseInfo, ...baseInfo,
...generalFUForm, ...generalFUForm,
...commonBottom, ...commonBottom,
uploadVisitRecord, uploadVisitRecord,
sceneVisitImage sceneVisitImage,
} }
if (this.info.id) { if (this.info.id) {
params.visitRecordId = this.info.visitRecordId params.visitRecordId = this.info.visitRecordId
...@@ -165,14 +191,14 @@ export default { ...@@ -165,14 +191,14 @@ export default {
if (this.visitSituation == 1) { if (this.visitSituation == 1) {
if (this.step != 1) { if (this.step != 1) {
this.step-- this.step--
return
} }
return
} }
if (this.visitSituation == 2) { if (this.visitSituation == 2) {
if (this.step != 1) { if (this.step != 1) {
this.step = 1 this.step = 1
return
} }
return
} }
this.$router.back() this.$router.back()
} }
......
...@@ -86,7 +86,10 @@ export default { ...@@ -86,7 +86,10 @@ export default {
}, },
methods: { methods: {
toEdit() { toEdit() {
let par = {
residentInfoId: this.info.residentInfoId
}
this.$router.push({path: `/doctor/resident/base/update`, query: par})
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
finished-text="没有更多了" finished-text="没有更多了"
@load="onMore" @load="onMore"
> >
<div v-for='item in list' :key="item.id" class="p-4 mt-3 card"> <div v-for='item in list' :key="item.id" class="p-4 mt-3 card" @click.stop='toDetail(item)'>
<div class='flex items-center'> <div class='flex items-center'>
<div class='detail-left'> <div class='detail-left'>
随访情况 随访情况
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
<div class="flex justify-end"> <div class="flex justify-end">
<van-button round type="primary" class="card-bt" style="margin-right: .12rem" <van-button round type="primary" class="card-bt" style="margin-right: .12rem"
@click="editBtn(item)">修改</van-button> @click.stop="editBtn(item)">修改</van-button>
<van-button round type="primary" class="card-bt" @click="delBtn(item)">删除</van-button> <van-button round type="primary" class="card-bt" @click.stop="delBtn(item)">删除</van-button>
</div> </div>
<span class="px-3 float-bt"> <span class="px-3 float-bt">
...@@ -176,9 +176,32 @@ export default { ...@@ -176,9 +176,32 @@ export default {
showToast('该居民已标记为死亡,无法新增随访') showToast('该居民已标记为死亡,无法新增随访')
return return
} }
let par = {
residentInfoId: this.baseInfo.residentInfoId
}
this.$router.push({
path: `/doctor/followUp/generalFU/add`,
query: par
})
},
toDetail(item) {
let par = {
relationId: item. relationId
}
this.$router.push({
path: `/doctor/followUp/generalFU/detail`,
query: par
})
}, },
editBtn(item) { editBtn(item) {
let par = {
id: item.relationId,
residentInfoId: this.baseInfo.residentInfoId
}
this.$router.push({
path: `/doctor/followUp/generalFU/add`,
query: par
})
}, },
delBtn(item) { delBtn(item) {
showConfirmDialog({ showConfirmDialog({
......
<template>
<div>
<van-nav-bar title='修改居民信息' left-text='' left-arrow
@click-left='toBack'></van-nav-bar>
<div class='p-4 h-overflow'>
<van-form ref='form'>
<div class='title'>居民信息</div>
<van-cell-group inset>
<div class='label-title'>证件类型</div>
<van-field
v-model='form.certificateTypeName'
is-link
disabled
placeholder='证件类型'
class='input-back mt-2 form-input'
:rules='rules.certificateTypeName'
/>
<div class='label-title mt-5'>证件号码</div>
<van-field
v-model='form.idCard'
disabled
placeholder='证件号码'
class='input-back mt-2 form-input'
:rules='rules.idCard'
/>
<div class='label-title mt-5'>姓名</div>
<van-field
v-model='form.residentName'
clearable
placeholder='姓名'
class='input-back mt-2 form-input'
:rules='rules.residentName'
/>
<div class='label-title mt-5'>性别</div>
<van-field
v-model='form.genderName'
is-link
disabled
placeholder='性别'
class='input-back mt-2 form-input'
:rules='rules.genderName'
/>
<div class='label-title mt-5'>出生日期</div>
<van-field
v-model='form.dataBirth'
is-link
disabled
placeholder='出生日期'
class='input-back mt-2 form-input'
:rules='rules.dataBirth'
/>
<div class='label-title mt-5'>民族</div>
<van-field
v-model='form.nationalName'
is-link
readonly
name='national'
placeholder='请选择'
class='input-back mt-2 form-input'
:rules='rules.nationalName'
@click='showNational = true' />
<van-popup v-model:show='showNational' position='bottom'>
<van-picker
:columns-field-names="{ text: 'name', value: 'value' }"
:columns="store.getDict('DC00006')"
@confirm='nationalConfirm'
@cancel='showNational = false'
/>
</van-popup>
<div class='label-title mt-5'>年龄</div>
<van-field
v-model='form.currentAge'
disabled
placeholder='年龄'
class='input-back mt-2 form-input'
:rules='rules.currentAge'
/>
<div class='label-title mt-5'>本人电话</div>
<van-field
v-model='form.telephone'
clearable
placeholder='本人电话'
class='input-back mt-2 form-input'
:rules='rules.telephone'
/>
<div class='no-req-label mt-5'>联系人姓名</div>
<van-field
v-model='form.contactName'
clearable
placeholder='联系人姓名'
class='input-back mt-2 form-input'
:rules='rules.contactName'
/>
<div class='no-req-label mt-5'>与居民关系</div>
<van-field
v-model='form.relationName'
readonly
is-link
placeholder='与居民关系'
class='input-back mt-2 form-input'
@click='showRelation= true'
/>
<van-popup v-model:show='showRelation' position='bottom'>
<van-picker
:columns-field-names="{ text: 'name', value: 'value' }"
:columns="store.getDict('DC00023')"
@confirm='relationlConfirm'
@cancel='showRelation = false'
/>
</van-popup>
<van-field
v-if='form.relation == 99'
v-model='form.relationOther'
clearable
placeholder='其他关系'
class='input-back mt-2 form-input'
/>
<div class='label-title mt-5'>现住址</div>
<van-field
v-model='form.presentCodeName'
is-link
readonly
placeholder='请选择所在地区'
class='input-back mt-2 form-input'
:rules='rules.presentCodeName'
@click='showPresent = true'
/>
<van-popup v-model:show='showPresent' :close-on-click-overlay='false' position='bottom'>
<DocAddress v-model:value='form.presentCode' @close='showPresent = false'
:viewData='addressRecord.presentCode'
@change='presentChange' />
</van-popup>
<div class='no-req-label mt-5'>详细地址</div>
<van-field
v-model='form.nowAddress'
clearable
class='input-back mt-2 form-input'
placeholder='请填写详细地址'
maxlength='50'
/>
<div class='flex items-center justify-between mt-5'>
<div class='label-title '>户口地址</div>
<van-button size='mini' plain type='primary'
@click='setRegisteredAddress'>同步现住址
</van-button>
</div>
<van-field
v-model='form.registeredCodeName'
is-link
readonly
placeholder='请选择所在地区'
class='input-back mt-2 form-input'
:rules='rules.registeredCode'
@click='showRegistered = true'
/>
<van-popup v-model:show='showRegistered' :close-on-click-overlay='false' position='bottom'>
<DocAddress v-model:value='form.registeredCode' @close='showRegistered = false'
:viewData='addressRecord.registeredCode'
@change='registeredChange' />
</van-popup>
<div class='no-req-label mt-5'>详细地址</div>
<van-field
v-model='form.permanentAddress'
clearable
class='input-back mt-2 form-input'
placeholder='请填写详细地址'
maxlength='50'
/>
</van-cell-group>
</van-form>
</div>
<div class='px-5 grow flex flex-col justify-end pt-2 pb-2'>
<van-button type='primary' block round
@click='onSubmit'>提交
</van-button>
</div>
</div>
</template>
<script>
import { addToArr, fetchDataHandle } from '@/utils/common'
import { useStore } from '@/doctor/store'
import DocAddress from '@/components/docAddress/DocAddress'
import dayjs from 'dayjs'
import { getChronicResidentsId } from '@/api/doctor/generalFU'
import { updateResident } from '@/api/doctor/resident'
const defaultForm = (info = {}) => {
const form = {
id: undefined,
residentInfoId: undefined,
// 年龄
currentAge: undefined,
// 出生地详细地址
birthAddress: undefined,
// 出生地编码
birthCode: undefined,
// 证件类型,[DC00004]
certificateType: 1,
certificateTypeName: '身份证',
// 联系人姓名
contactName: undefined,
contactName2: undefined,
// 联系人电话
contactPhone: undefined,
// 与居民关系,[DC00023]
contactRelation: undefined,
contactRelationName: undefined,
// 出生日期
dataBirth: undefined,
// 职业,[DC00010]
duty: undefined,
dutyName: undefined,
// 文化程度(学历),[DC00007]
education: undefined,
educationName: undefined,
// 性别,[DC00005]
gender: undefined,
genderName: undefined,
// 身份证号
idCard: undefined,
// innerMarital: undefined,
// 民族,[DC00006]
national: undefined,
nationalName: undefined,
// 现住址
nowAddress: undefined,
// 户籍地址
permanentAddress: undefined,
// 现住址编码
presentCode: undefined,
presentCodeName: undefined,
// 户籍地编码
registeredCode: undefined,
registeredCodeName: undefined,
// 居民档案id
residentId: undefined,
// 姓名
residentName: undefined,
// 本人电话
telephone: undefined,
// 工作单位
workUnit: undefined,
// 与居民关系
relation: undefined,
relationOther: undefined
// 人群
}
Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) {
form[key] = info[key]
}
})
return form
}
export default {
name: 'BaseInfo',
components: { DocAddress },
props: {
info: {
default: () => {
return {}
}
}
},
data() {
return {
store: useStore(),
// 民族
showNational: false,
showRelation: false,
// 现住址
showPresent: false,
// 户籍地址
showRegistered: false,
// 地址回显使用
addressRecord: {},
form: {},
rules: {
certificateTypeName: [{ required: true, message: '请选择证件类型' }],
idCard: [{ required: true, message: '请填写证件号码' }],
residentName: [{ required: true, message: '请填写姓名' }],
genderName: [{ required: true, message: '请选择性别' }],
dataBirth: [{ required: true, message: '请选择出生日期' }],
nationalName: [{ required: true, message: '请选择名族' }],
currentAge: [{ required: true, message: '请填写年龄' }],
telephone: [{ required: true, message: '请填写本人电话' }],
contactName: [{ required: false, message: '请填写联系人姓名' }],
presentCodeName: [{ required: true, message: '请选择所在地区' }],
registeredCode: [{ required: true, message: '请选择所在地区' }]
}
}
},
computed: {
authInfo() {
return this.store.$state.authInfo
},
routerDetail() {
return this.$route.query
}
},
created() {
this.load()
},
methods: {
async load() {
const res = await getChronicResidentsId(this.routerDetail.residentInfoId)
this.form = defaultForm(res.data)
if (this.form.presentCode) {
this.addressRecord.presentCode = addToArr(this.form.presentCode)
}
if (this.form.registeredCode) {
this.addressRecord.registeredCode = addToArr(this.form.registeredCode)
}
},
// 民族
nationalConfirm({ selectedValues, selectedOptions }) {
this.form.national = selectedValues[0]
this.form.nationalName = selectedOptions[0].name
this.showNational = false
},
//与居民关系
relationlConfirm({ selectedValues, selectedOptions }) {
this.form.relation = selectedValues[0]
this.form.relationName = selectedOptions[0].name
this.showRelation = false
},
// 现住址
presentChange(val) {
const selectedOptions = val.selectedOptions
this.form.presentCodeName = selectedOptions.map(e => e.text).join('/')
},
// 户口地址
registeredChange(val) {
const selectedOptions = val.selectedOptions
this.form.registeredCodeName = selectedOptions.map(e => e.text).join('/')
if (!this.form.presentCode && selectedOptions.length >= 5) {
this.form.presentCode = val.value
this.form.presentCodeName = this.form.registeredCodeName
}
},
// 同步现住址
setRegisteredAddress() {
this.$refs.form.validate(['presentCode']).then(res => {
this.form.registeredCode = this.form.presentCode
this.form.registeredCodeName = this.form.presentCodeName
this.form.permanentAddress = this.form.nowAddress
this.addressRecord.registeredCode = addToArr(this.form.presentCode)
}).catch(err => console.warn(err))
},
onSubmit() {
this.$refs.form.validate().then(() => {
let par = {
...this.form
}
updateResident(par).then(() => {
this.toBack()
})
}).catch((e) => {
console.warn('ArchiveCommon error', e)
})
},
toBack() {
this.$router.back()
}
}
}
</script>
<style scoped lang='less'>
.h-overflow {
height: calc(100vh - 110px);
overflow-y: auto;
}
.title {
font-weight: bold;
margin-bottom: 20px;
}
.label-title {
font-size: 13px;
color: #595959;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.form-input {
padding: 8px 12px;
border-radius: 8px;
}
.input-back {
background: #FAFAFA;
}
.tel-back {
background: #F5F5F5;
padding: 8px;
border-radius: 0px 0px 8px 8px;
}
.tel {
background: #FFFFFF;
padding: 8px;
border-radius: 8px;
}
.tel-label {
color: #607FF0;
font-weight: bold;
}
.p-12-0 {
padding: 12px 0px;
}
:deep(.van-nav-bar .van-icon) {
color: #000000;
}
:deep(.van-cell-group--inset) {
overflow: visible;
}
:deep(.van-cell) {
overflow: visible;
}
:deep(.van-field__error-message) {
position: absolute;
}
:deep(.van-cell:after) {
border-bottom: 0px;
}
</style>
\ No newline at end of file
...@@ -67,7 +67,13 @@ const routes = [ ...@@ -67,7 +67,13 @@ const routes = [
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Visit.vue') component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/Visit.vue')
}, },
] ]
} },
//修改基本信息
{
path: 'resident/base/update',
name: 'doctor-resident-base-update',
component: () => import(/* webpackChunkName: "page-doctor" */ '@/doctor/resident/form/BaseInfo.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