add patient detail
parent
ca0e963793
commit
78e40c56ba
|
|
@ -1,4 +1,4 @@
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
#VUE_APP_BASE_API = 'http://www.xbzt.cc'
|
VUE_APP_BASE_API = 'http://www.xbzt.cc'
|
||||||
VUE_APP_BASE_API = 'http://local.medical-record.host'
|
#VUE_APP_BASE_API = 'http://local.medical-record.host'
|
||||||
|
|
@ -30,6 +30,12 @@
|
||||||
"navigationBarTitleText": "账户信息"
|
"navigationBarTitleText": "账户信息"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/patient/detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "初诊信息"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/record/index",
|
"path": "pages/record/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
},
|
},
|
||||||
itemClick(e) {
|
itemClick(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/record/index?type_id=${e}`
|
url: `/pages/patient/detail?id=${e}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -5,9 +5,6 @@
|
||||||
<u-cell title="类别" :value="info.type ? info.type.name : ''" />
|
<u-cell title="类别" :value="info.type ? info.type.name : ''" />
|
||||||
<u-cell title="病种" :value="info.illness_type ? info.illness_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.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}医师`" :value="info.doctor ? info.doctor.name : ''" />
|
||||||
<u-cell :title="`${type.text}情况`">
|
<u-cell :title="`${type.text}情况`">
|
||||||
<view slot="value">
|
<view slot="value">
|
||||||
|
|
@ -64,12 +61,6 @@ export default {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
this.info = res.data
|
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
|
this.type.text = this.info.type.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
<u-cell size="large" :url="`/pages/record/detail?id=${item.id}`">
|
<u-cell size="large" :url="`/pages/record/detail?id=${item.id}`">
|
||||||
<view slot="title" class="title">
|
<view slot="title" class="title">
|
||||||
<view class="list-item-title">医师: {{ item.doctor ? item.doctor.name : '' }}</view>
|
<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">
|
<text style="color: #dd524d;font-size: 19px">
|
||||||
<u-icon name="rmb" color="#dd524d" size="19px" />
|
<u-icon name="rmb" color="#dd524d" size="19px" />
|
||||||
{{ item.sell_price }}
|
{{ item.sell_price }}
|
||||||
</text>
|
</text>
|
||||||
<text style="color: #c0c0c0;text-decoration: line-through;">{{ item.origin_price }}</text>
|
<text style="color: #c0c0c0;text-decoration: line-through;">{{ item.origin_price }}</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view slot="label" class="label">
|
<view slot="label" class="label">
|
||||||
时间: {{ item.treat_at }}
|
时间: {{ item.treat_at }}
|
||||||
|
|
@ -28,10 +28,10 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
type: '',
|
patient_id: '',
|
||||||
|
patient: {},
|
||||||
page: 1,
|
page: 1,
|
||||||
perPage: 20,
|
perPage: 20,
|
||||||
typeList: [],
|
|
||||||
list: [],
|
list: [],
|
||||||
option: {
|
option: {
|
||||||
id: '',
|
id: '',
|
||||||
|
|
@ -46,11 +46,11 @@ export default {
|
||||||
swipeOption: [
|
swipeOption: [
|
||||||
{ text: '删除', style: {backgroundColor: '#dd524d'} }
|
{ text: '删除', style: {backgroundColor: '#dd524d'} }
|
||||||
],
|
],
|
||||||
listHeight: 0
|
listHeight: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.type = e.type
|
this.patient_id = e.patient
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.listHeight = res.safeArea.height - 20
|
this.listHeight = res.safeArea.height - 20
|
||||||
|
|
@ -68,7 +68,7 @@ export default {
|
||||||
this.page = 1
|
this.page = 1
|
||||||
}
|
}
|
||||||
uni.showLoading()
|
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 => {
|
this.$ajax.get('/api/client/record', { params }).then(res => {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
if (res.status == 0) {
|
if (res.status == 0) {
|
||||||
|
|
@ -93,6 +93,9 @@ export default {
|
||||||
.page {
|
.page {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
.page .info {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
.list {
|
.list {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
<u-cell title="性别" :value="info.sex_text" isLink @click="openGender" />
|
<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.birthday_format" isLink @click="openBirthday" />
|
||||||
<u-cell title="住址" :value="info.address" isLink @click="openModal('住址', 'address')" />
|
<u-cell title="住址" :value="info.address" isLink @click="openModal('住址', 'address')" />
|
||||||
|
<u-cell title="修改登录密码" isLink @click="openModal('新密码', 'password', 'password')" />
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<u-modal
|
<u-modal
|
||||||
:show="modal.show"
|
:show="modal.show"
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
@cancel="closeModal"
|
@cancel="closeModal"
|
||||||
@close="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-modal>
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
:show="gender.show"
|
:show="gender.show"
|
||||||
|
|
@ -51,6 +52,7 @@ export default {
|
||||||
modal: {
|
modal: {
|
||||||
show: false,
|
show: false,
|
||||||
title: '',
|
title: '',
|
||||||
|
input_type: 'text',
|
||||||
key: '',
|
key: '',
|
||||||
value: ''
|
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.title = title
|
||||||
this.modal.key = name
|
this.modal.key = name
|
||||||
this.modal.show = true
|
this.modal.show = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue