add patient detail

master
panliang 2023-10-16 14:28:11 +08:00
parent ca0e963793
commit 78e40c56ba
7 changed files with 122 additions and 21 deletions

View File

@ -1,4 +1,4 @@
ENV = 'production'
#VUE_APP_BASE_API = 'http://www.xbzt.cc'
VUE_APP_BASE_API = 'http://local.medical-record.host'
VUE_APP_BASE_API = 'http://www.xbzt.cc'
#VUE_APP_BASE_API = 'http://local.medical-record.host'

View File

@ -30,6 +30,12 @@
"navigationBarTitleText": "账户信息"
}
},
{
"path": "pages/patient/detail",
"style": {
"navigationBarTitleText": "初诊信息"
}
},
{
"path": "pages/record/index",
"style": {

View File

@ -56,7 +56,7 @@
},
itemClick(e) {
uni.navigateTo({
url: `/pages/record/index?type_id=${e}`
url: `/pages/patient/detail?id=${e}`
})
},
logout() {

View File

@ -0,0 +1,96 @@
<template>
<view class="page">
<u-cell-group :border="false">
<u-cell title="类别" :value="info.type ? info.type.name : ''" />
<!-- <u-cell title="姓名" :value="info.name" />
<u-cell title="性别" :value="info.sex_text" />
<u-cell title="联系方式" :value="info.phone" />
<u-cell title="地址" :value="info.address" />
<u-cell title="出生年月" :value="info.birthday | date('yyyy-MM-dd')" /> -->
<u-cell title="初诊时间" :value="info.treat_at | date('yyyy-MM-dd')" />
<u-cell title="初诊医生" :value="info.doctor?info.doctor.name : ''" />
<u-cell title="病情描述">
<view slot="value">
<!-- <rich-text :nodes="info.illness" /> -->
<text>{{info.illness}}</text>
</view>
</u-cell>
<u-cell title="图片资料">
<view slot="value">
<u-album :urls="info.images" />
</view>
</u-cell>
</u-cell-group>
<view class="btn">
<u-button text="病历记录" type="success" @click="record" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
info: {
images: [],
doctor_id: '',
doctor: {},
},
}
},
onLoad(e) {
this.id = e.id
this.loadData()
},
onPullDownRefresh() {
this.loadData()
},
methods: {
loadData() {
if (!this.id) {
return
}
uni.showLoading()
this.$ajax.get(`/api/client/patient/${this.id}`).then(res => {
uni.stopPullDownRefresh()
if (res.status == 0) {
this.info = res.data
if (res.data.images) {
this.$refs['images'].setList(res.data.images.map(value => {
return { url: value }
}))
}
uni.setNavigationBarTitle({ title: this.info.name })
}
}).catch(error => {
uni.stopPullDownRefresh()
})
},
record() {
uni.navigateTo({ url: `/pages/record/index?patient=${this.id}` })
}
}
}
</script>
<style scoped>
.page {
padding: 20px;
background: white;
}
.u-cell-group {
background: white;
}
.btn {
padding: 0 10px;
}
.btn .u-button {
margin-top: 20px;
}
.page ::v-deep .u-upload__wrap {
justify-content: flex-end;
}
.text-gray {color: gray}
</style>

View File

@ -5,9 +5,6 @@
<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="划线价" :value="info.origin_price" />
<u-cell title="实收价" :value="info.sell_price" />
<u-cell title="收费情况" :value="info.order_status" />
<u-cell :title="`${type.text}医师`" :value="info.doctor ? info.doctor.name : ''" />
<u-cell :title="`${type.text}情况`">
<view slot="value">
@ -64,12 +61,6 @@ export default {
uni.stopPullDownRefresh()
if (res.status == 0) {
this.info = res.data
// this.info = {
// ...res.data,
// treat_at: res.data.treat_at ? res.data.treat_at.replaceAll('-', '/') : '',
// next_treat_at: res.data.next_treat_at ? res.data.next_treat_at.replaceAll('-', '/') : '',
// notify_at: res.data.notify_at ? res.data.notify_at.replaceAll('-', '/') : '',
// }
this.type.text = this.info.type.name
}

View File

@ -6,13 +6,13 @@
<u-cell size="large" :url="`/pages/record/detail?id=${item.id}`">
<view slot="title" class="title">
<view class="list-item-title">医师: {{ item.doctor ? item.doctor.name : '' }}</view>
<view class="list-item-price">
<!-- <view class="list-item-price">
<text style="color: #dd524d;font-size: 19px">
<u-icon name="rmb" color="#dd524d" size="19px" />
{{ item.sell_price }}
</text>
<text style="color: #c0c0c0;text-decoration: line-through;">{{ item.origin_price }}</text>
</view>
</view> -->
</view>
<view slot="label" class="label">
时间: {{ item.treat_at }}
@ -28,10 +28,10 @@
export default {
data() {
return {
type: '',
patient_id: '',
patient: {},
page: 1,
perPage: 20,
typeList: [],
list: [],
option: {
id: '',
@ -46,11 +46,11 @@ export default {
swipeOption: [
{ text: '删除', style: {backgroundColor: '#dd524d'} }
],
listHeight: 0
listHeight: 0,
}
},
onLoad(e) {
this.type = e.type
this.patient_id = e.patient
uni.getSystemInfo({
success: (res) => {
this.listHeight = res.safeArea.height - 20
@ -68,7 +68,7 @@ export default {
this.page = 1
}
uni.showLoading()
const params = { page: this.page, perPage: this.perPage, type_id: this.type }
const params = { page: this.page, perPage: this.perPage, patient_id: this.patient_id }
this.$ajax.get('/api/client/record', { params }).then(res => {
uni.stopPullDownRefresh()
if (res.status == 0) {
@ -93,6 +93,9 @@ export default {
.page {
padding-top: 20px;
}
.page .info {
background: white;
}
.list {
background: white;
}

View File

@ -9,6 +9,7 @@
<u-cell title="性别" :value="info.sex_text" isLink @click="openGender" />
<u-cell title="生日" :value="info.birthday_format" isLink @click="openBirthday" />
<u-cell title="住址" :value="info.address" isLink @click="openModal('住址', 'address')" />
<u-cell title="修改登录密码" isLink @click="openModal('新密码', 'password', 'password')" />
</u-cell-group>
<u-modal
:show="modal.show"
@ -20,7 +21,7 @@
@cancel="closeModal"
@close="closeModal"
>
<u--input v-model="modal.value" border="surround" />
<u--input :type="modal.input_type" v-model="modal.value" border="surround" />
</u-modal>
<u-action-sheet
:show="gender.show"
@ -51,6 +52,7 @@ export default {
modal: {
show: false,
title: '',
input_type: 'text',
key: '',
value: ''
},
@ -95,7 +97,10 @@ export default {
}
});
},
openModal(title, name) {
openModal(title, name, type) {
if (type) {
this.modal.input_type = type
}
this.modal.title = title
this.modal.key = name
this.modal.show = true