85 lines
2.2 KiB
Vue
85 lines
2.2 KiB
Vue
<template>
|
|
<view class="page">
|
|
<u-cell-group :border="false">
|
|
<u-cell title="姓名" :value="this.info.patient ? this.info.patient.name : ''" />
|
|
<u-cell title="类别" :value="info.type ? info.type.name : ''" />
|
|
<u-cell title="病种" :value="info.illness_type ? info.illness_type.name : ''" />
|
|
<u-cell :title="`${type.text}时间`" :value="info.treat_at | date" />
|
|
<u-cell :title="`${type.text}医师`" :value="info.doctor ? info.doctor.name : ''" />
|
|
<u-cell :title="`${type.text}情况`">
|
|
<view slot="value">
|
|
<!-- <rich-text :nodes="info.illness" /> -->
|
|
<text>{{info.content}}</text>
|
|
</view>
|
|
</u-cell>
|
|
<u-cell title="图片资料">
|
|
<view slot="value">
|
|
<u-album :urls="info.images" />
|
|
</view>
|
|
</u-cell>
|
|
<u-cell
|
|
title="下次就诊时间"
|
|
:value="info.next_treat_at | date"
|
|
/>
|
|
</u-cell-group>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
id: '',
|
|
info: {
|
|
patient_id: '',
|
|
type_id: '',
|
|
origin_price: '',
|
|
sell_price: '',
|
|
notify_remarks: '',
|
|
is_notified: 0,
|
|
},
|
|
type: {
|
|
text: ''
|
|
}
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
this.id = e.id
|
|
this.loadData()
|
|
},
|
|
onPullDownRefresh() {
|
|
this.loadData()
|
|
},
|
|
methods: {
|
|
async loadData() {
|
|
if (!this.id) {
|
|
return
|
|
}
|
|
uni.showLoading()
|
|
let res = await this.$ajax.get(`/api/client/record/${this.id}`)
|
|
uni.stopPullDownRefresh()
|
|
if (res.status == 0) {
|
|
this.info = res.data
|
|
this.type.text = this.info.type.name
|
|
}
|
|
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.page {
|
|
padding: 20px;
|
|
background: white;
|
|
}
|
|
.btn {
|
|
padding: 0 10px;
|
|
}
|
|
.btn .u-button {
|
|
margin-top: 20px;
|
|
}
|
|
.text-gray {
|
|
color: gray;
|
|
}
|
|
</style> |