1
0
Fork 0
panliang 2023-10-10 23:19:45 +08:00
parent 35244d6921
commit cb11fe7667
3 changed files with 9 additions and 21 deletions

View File

@ -10,7 +10,7 @@
</u-cell-group> </u-cell-group>
</view> </view>
<view class="btns"> <view class="btns">
<u-empty v-if="list.length == 0" mode="list" text="请先在后台添加分类" /> <u-empty v-if="list.length == 0" mode="list" text="暂无分类" />
<view class="btn" v-for="item in list" :key="item.id"> <view class="btn" v-for="item in list" :key="item.id">
<u-button <u-button
:icon="item.image" :icon="item.image"

View File

@ -105,7 +105,6 @@
<u--input v-model="modal.value" border="surround" /> <u--input v-model="modal.value" border="surround" />
</u-modal> </u-modal>
<u-action-sheet <u-action-sheet
title="性别"
:show="genderSheet.show" :show="genderSheet.show"
:actions="gender.options" :actions="gender.options"
:closeOnClickOverlay="true" :closeOnClickOverlay="true"
@ -273,8 +272,7 @@ export default {
this.update(params).then(res => { this.update(params).then(res => {
if (res.status == 0) { if (res.status == 0) {
this.info[`${key}_id`] = e.id this.info[`${key}_id`] = e.id
this.info[key].id = e.id this.info[key] = { id: e.id, name: e.name }
this.info[key].name = e.name
} }
}) })
this.closeDoctor() this.closeDoctor()
@ -323,7 +321,6 @@ export default {
}) })
}, },
handleCall(phone) { handleCall(phone) {
console.log(phone)
window.open(`tel:${phone}`, '_blank') window.open(`tel:${phone}`, '_blank')
// uni.makePhoneCall({ // uni.makePhoneCall({
// phoneNumber: phone // phoneNumber: phone

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="page"> <view class="page">
<u-subsection :list="typeList" :current="typeIndex" fontSize="16" @change="changeType" />
<view class="add-button"> <view class="add-button">
<u-button type="primary" icon="plus" shape="circle" size="large" @click="add" /> <u-button type="primary" icon="plus" shape="circle" size="large" @click="add" />
</view> </view>
@ -10,7 +9,7 @@
<u-swipe-action-item :options="swipeOption" :name="item.id" @click="swipeClick"> <u-swipe-action-item :options="swipeOption" :name="item.id" @click="swipeClick">
<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" />
@ -20,7 +19,7 @@
</view> </view>
</view> </view>
<view slot="label" class="label"> <view slot="label" class="label">
<view>就诊时间: {{ item.treat_at }}</view> 时间: {{ item.treat_at }}
</view> </view>
</u-cell> </u-cell>
</u-swipe-action-item> </u-swipe-action-item>
@ -67,9 +66,6 @@ export default {
this.patient_id = e.patient this.patient_id = e.patient
this.init() this.init()
}, },
onShow() {
this.loadData(true)
},
onPullDownRefresh() { onPullDownRefresh() {
this.loadData(true) this.loadData(true)
}, },
@ -81,10 +77,10 @@ export default {
this.patient = res.data this.patient = res.data
uni.setNavigationBarTitle({ title: `${this.patient.name}-病历记录` }) uni.setNavigationBarTitle({ title: `${this.patient.name}-病历记录` })
} }
res = await this.$ajax.get('/admin-api/category', { params: {_action: 'getData'}}) // res = await this.$ajax.get('/admin-api/category', { params: {_action: 'getData'}})
if (res.status == 0) { // if (res.status == 0) {
this.typeList = res.data.items // this.typeList = res.data.items
} // }
this.loadData(true) this.loadData(true)
}, },
changeType(e) { changeType(e) {
@ -96,13 +92,8 @@ export default {
this.list = [] this.list = []
this.page = 1 this.page = 1
} }
// ,
if (this.typeList.length == 0) {
return
}
uni.showLoading() uni.showLoading()
const type = this.typeList[this.typeIndex] const params = {_action: 'getData', page: this.page, perPage: this.perPage, patient_id: this.patient_id}
const params = {_action: 'getData', page: this.page, perPage: this.perPage, type_id: type.id, patient_id: this.patient_id}
this.$ajax.get('/admin-api/record?', { params }).then(res => { this.$ajax.get('/admin-api/record?', { params }).then(res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if (res.status == 0) { if (res.status == 0) {