xinelu-doctor-app/pages/taskDetails/taskDetails.vue

175 lines
3.2 KiB
Vue
Raw Normal View History

2023-10-24 10:05:03 +08:00
<template>
<view class="app" v-if="list">
<view class="top">
<view class="title">
患者信息
</view>
<view class="text">
姓名{{list.patientName}}
</view>
<view class="text">
性别{{list.sex}}
</view>
<view class="text">
身份证号{{list.cardNo}}
</view>
<view class="text">
手机号码{{list.phone}}
</view>
<view class="text">
家庭住址{{list.address}}
</view>
</view>
<view class="center top">
<view class="title">
预约时间
</view>
<view class="time">
2023-11-14 10:17:48 +08:00
{{list.appointmentDate}}{{' '+list.appointmentStartTime?list.appointmentStartTime:' '+' - '+list.appointmentEndTime?list.appointmentEndTime:''}}
2023-10-24 10:05:03 +08:00
</view>
</view>
<view class="bottom top">
<view class="title">
咨询内容
</view>
<view class="text-area">
{{list.problemStatement}}
</view>
</view>
<view class="fileimage top">
<view class="title">
检查单/患处照片
</view>
<view class="images" v-for='(item,index) in fileUrls'>
<image :src="item" mode="" @click.stop='previewImage(index)'></image>
</view>
</view>
</view>
</template>
<script>
import baseurl from '@/api/baseurl.js'
import {
consultationInfo
} from '@/api/taskDetails/index.js'
import {
getSex
} from '@/utils/conversion.js'
export default {
data() {
return {
list: null,
baseurl: null,
fileUrls: [],
2023-10-25 11:20:45 +08:00
title: '',
2023-10-24 10:05:03 +08:00
};
},
onLoad(options) {
this.baseurl = baseurl
this.info(options.id)
2023-10-25 11:20:45 +08:00
this.title = options.title
if (options.title == 'COMPLETED') {
this.title = '已完成工单'
} else {
this.title = '工单详情'
}
},
onReady() { //更改导航栏文字
uni.setNavigationBarTitle({
title: this.title,
});
2023-10-24 10:05:03 +08:00
},
methods: {
previewImage(index) {
uni.previewImage({
urls: this.fileUrls,
current: index,
indicator: "default",
loop: true
})
},
info(id) {
consultationInfo(id).then(res => {
res.data.fileUrls.forEach(e => {
e = this.baseurl + e
this.fileUrls.push(e)
})
res.data.sex = getSex(res.data.cardNo)
this.list = res.data
})
}
}
}
</script>
<style lang="scss">
.app {
.fileimage {
.images {
width: 90%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
image {
width: 100%;
}
}
}
.bottom {
.text-area {
width: 90%;
margin: 30rpx auto;
font-weight: 500;
word-break: break-all;
}
}
.center {
.time {
width: 90%;
margin: 0 auto;
height: 80rpx;
line-height: 80rpx;
background: #F7F9F8;
margin-top: 20rpx;
border-radius: 14rpx;
font-size: 28rpx;
font-weight: 500;
color: #333333;
padding-left: 20rpx;
}
}
.title {
width: 90%;
height: 80rpx;
line-height: 80rpx;
margin: 0 auto;
font-size: 28rpx;
font-weight: 500;
color: #333333;
border-bottom: 2rpx solid #E6E6E6;
}
.top {
width: 94%;
margin: 0 auto;
background-color: #fff;
border-radius: 10rpx;
margin-top: 20rpx;
padding-bottom: 20rpx;
.text {
font-size: 24rpx;
font-weight: 500;
color: #333333;
line-height: 60rpx;
width: 90%;
margin: 0 auto;
}
}
}
</style>