patient detail

master
panliang 2023-10-17 12:27:29 +08:00
parent 78e40c56ba
commit f0905941d5
3 changed files with 7 additions and 9 deletions

View File

@ -33,7 +33,8 @@
{ {
"path": "pages/patient/detail", "path": "pages/patient/detail",
"style": { "style": {
"navigationBarTitleText": "初诊信息" "navigationBarTitleText": "初诊信息",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -7,8 +7,8 @@
<u-cell title="联系方式" :value="info.phone" /> <u-cell title="联系方式" :value="info.phone" />
<u-cell title="地址" :value="info.address" /> <u-cell title="地址" :value="info.address" />
<u-cell title="出生年月" :value="info.birthday | date('yyyy-MM-dd')" /> --> <u-cell title="出生年月" :value="info.birthday | date('yyyy-MM-dd')" /> -->
<u-cell title="初诊时间" :value="info.treat_at | date('yyyy-MM-dd')" /> <u-cell :title="`${type}时间`" :value="info.treat_at | date('yyyy-MM-dd')" />
<u-cell title="初诊医生" :value="info.doctor?info.doctor.name : ''" /> <u-cell :title="`${type}医师`" :value="info.doctor?info.doctor.name : ''" />
<u-cell title="病情描述"> <u-cell title="病情描述">
<view slot="value"> <view slot="value">
<!-- <rich-text :nodes="info.illness" /> --> <!-- <rich-text :nodes="info.illness" /> -->
@ -38,6 +38,7 @@ export default {
doctor_id: '', doctor_id: '',
doctor: {}, doctor: {},
}, },
type: '',
} }
}, },
onLoad(e) { onLoad(e) {
@ -57,11 +58,7 @@ export default {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if (res.status == 0) { if (res.status == 0) {
this.info = res.data this.info = res.data
if (res.data.images) { this.type = this.info.type ? this.info.type.name : ''
this.$refs['images'].setList(res.data.images.map(value => {
return { url: value }
}))
}
uni.setNavigationBarTitle({ title: this.info.name }) uni.setNavigationBarTitle({ title: this.info.name })
} }
}).catch(error => { }).catch(error => {

View File

@ -61,7 +61,7 @@ export default {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if (res.status == 0) { if (res.status == 0) {
this.info = res.data this.info = res.data
this.type.text = this.info.type.name this.type.text = this.info.type ? this.info.type.name : ''
} }
}, },