123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <template>
- <view >
- <view class="content">
- <view class="ping" >
- <view class="title">
- 问诊医生
- </view>
- <view class="doc-box">
- <view class="left">
- <image :src="doctor.avatar" mode="aspectFill"></image>
- </view>
- <view class="right">
- <view class="doc-name-box">
- <view class="doc-name">
- {{doctor.doctorName}}
- </view>
- </view>
- <view class="doc-dept-box">
- {{department.deptName}}|{{doctor.position}}
- </view>
- <view class="doc-his-box">
- {{hospital.hospitalName}}
- </view>
- </view>
-
- </view>
- <view class="ping-star">
- <text class="label">问诊满意度</text>
- <view class="star">
- <u-rate size="24" active-color="#fcab36" v-model="form.pingStar"></u-rate>
- </view>
-
- </view>
- <view class="ping-content">
- <view class="textarea-box">
- <textarea v-model="form.pingContent" placeholder="写入您对医生的评价吧" maxlength="200" />
- <view class="num-box">{{ form.pingContent.length }}/200</view>
- </view>
- </view>
- </view>
- </view>
- <view class="btn-box">
- <view class="btn" @click="submit()">提交评价</view>
- </view>
- </view>
- </template>
- <script>
- import {pingOrder,getMyInquiryOrderById} from '@/api/inquiryOrder.js'
- import {getDoctorDetails} from '@/api/doctor.js'
- export default {
- data() {
- return {
- hospital:null,
- department:null,
- doctor:null,
- form:{
- orderId:null,
- starCount:5,
- pingStar:0,
- pingContent:"",
-
- }
- }
- },
- onLoad(options) {
- this.form.orderId=options.orderId;
- this.getMyInquiryOrderById()
- },
- methods: {
- getMyInquiryOrderById(){
- var that=this;
- var data={orderId:this.form.orderId}
- getMyInquiryOrderById(data).then(
- res => {
- if(res.code==200){
- this.order=res.data.order;
- this.doctorId=this.order.doctorId;
- this.getDoctorDetails()
- }
- },
- err => {
- }
- );
-
- },
- getDoctorDetails(){
- var data={doctorId:this.doctorId};
- getDoctorDetails(data).then(
- res => {
- if(res.code==200){
- this.doctor=res.data.doctor;
- this.department=res.data.department;
- this.hospital=res.data.hospital;
- }
- },
- rej => {}
- );
- },
- submit(){
- uni.showLoading({
- title:"处理中..."
- })
- pingOrder(this.form).then(
- res => {
- uni.hideLoading()
- if(res.code==200){
- uni.showToast({
- icon:'success',
- title: "评价成功",
- });
- uni.$emit('refreshInquiryOrder');
- setTimeout(function(){
- uni.navigateBack({
- delta:1,
- })
- },2000);
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- },
- rej => {}
- );
- },
-
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .content{
- padding: 20rpx 20rpx 140rpx 20rpx;
- }
- .ping{
- margin-bottom:20rpx;
- padding: 20rpx;
- border-radius: 15rpx;
- background: #FFFFFF;
- .title{
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #0F1826;
- }
- .doc-box{
- margin-top: 30rpx;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- .left{
- width: 100upx;
- height: 100upx;
- image{
- border-radius: 50%;
- width: 100upx;
- height: 100upx;
- }
- }
- .right{
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 20rpx;
- height:120upx;
- width: 100%;
- .doc-name-box{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- position: relative;
- .doc-name{
- font-size: 32rpx;
- }
-
- }
- .doc-dept-box{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin-top: 5rpx;
- font-size: 24upx;
- font-family: PingFang SC;
- color: #2d2b36;
-
- }
- .doc-his-box{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin-top: 5rpx;
- font-size: 24upx;
- font-family: PingFang SC;
- color: #9a9a9c;
-
- }
-
- }
-
- }
- .ping-star{
- padding-top: 30rpx;
- .label{
- font-size: 32upx;
- font-weight: bold;
- font-family: PingFang SC;
- color: #0F1826;
- }
- .star{
- margin-top: 10rpx;
- }
- }
- .ping-content{
- width: 100%;
- padding: 30rpx 0rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .textarea-box{
- width: 100%;
- box-sizing: border-box;
- height: 330upx;
- background: #f6f6f6;
- border-radius: 10upx;
- padding: 30upx;
- position: relative;
- .textarea-place{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #C9CED6;
- }
- textarea{
- width: 100%;
- height: 100%;
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #000000;
- }
- .num-box{
- position: absolute;
- right: 20upx;
- bottom: 20upx;
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #C9CED6;
- z-index: 10;
- background: #F5F6FA;
- }
- }
- }
- }
- .btn-box{
- height: 140upx;
- z-index: 9999;
- width: 100%;
- padding: 0rpx 30upx;
- position: fixed;
- bottom: 0;
- left: 0;
- box-sizing: border-box;
- background-color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- .btn{
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- background: #C39A58;
- border-radius: 10upx;
- }
- }
- </style>
|