服务评价
This commit is contained in:
parent
923884f132
commit
1e12e5efe5
@ -1,10 +1,10 @@
|
||||
// var baseurl = "https://quanyidaojia.xinelu.cn";
|
||||
// var baseurl = "http://192.168.16.48:8088";
|
||||
// 蒙
|
||||
var baseurl = "http://8.131.93.145:54088";
|
||||
// var baseurl = "http://8.131.93.145:54088";
|
||||
// 郝
|
||||
// var baseurl = "http://8.131.93.145:54010";
|
||||
|
||||
// var baseurl = "http://192.168.16.35:8088";
|
||||
var baseurl = "http://192.168.16.30:8088";
|
||||
|
||||
export default baseurl
|
||||
|
||||
33
api/pagesB/Serviceevaluation/Serviceevaluation.js
Normal file
33
api/pagesB/Serviceevaluation/Serviceevaluation.js
Normal file
@ -0,0 +1,33 @@
|
||||
import request from "../../request.js"
|
||||
export function getAppletOrderList(parentId,orderStatus,cardNo,region,pageNum,pageSize) {
|
||||
return request({
|
||||
url: `/nurseApplet/nursingOrder/getAppletOrderList?parentId=${parentId}&orderStatus=${orderStatus}&cardNo=${cardNo}®ion=${region}&pageNum=${pageNum}&pageSize=${pageSize}`,
|
||||
method: 'GET',
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
|
||||
})
|
||||
}
|
||||
//满意度评价
|
||||
export function addAppointmentEvaluate(data) {
|
||||
return request({
|
||||
url: `/nurseApp/orderEvaluate/addAppointmentEvaluate`,
|
||||
method: 'POST',
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
// 评价
|
||||
export function insertGoodsEvaluate(data) {
|
||||
return request({
|
||||
url: `/nurseApp/orderEvaluate/insertGoodsEvaluate`,
|
||||
method: 'POST',
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -4,7 +4,10 @@ export function insertGoodsEvaluate(data) {
|
||||
return request({
|
||||
url: `/nurseApp/orderEvaluate/insertGoodsEvaluate`,
|
||||
method: 'POST',
|
||||
data
|
||||
data,
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
40
pages.json
40
pages.json
@ -11,12 +11,15 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/register/register",
|
||||
"path": "pages/startup/startup",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
"path": "pages/homepage/homepage",
|
||||
@ -24,13 +27,7 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/startup/startup",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"path": "pages/medicalservice/medicalservice",
|
||||
"style": {
|
||||
@ -415,11 +412,34 @@
|
||||
"path" : "Serviceevaluation/Serviceevaluation",
|
||||
"style" :
|
||||
{
|
||||
"onReachBottomDistance": 40,
|
||||
"navigationBarTitleText": "服务评价",
|
||||
"enablePullDownRefresh": false
|
||||
"enablePullDownRefresh": false,
|
||||
"onReachBottom": true
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "evaluate/evaluate",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "评价",
|
||||
"onReachBottomDistance": 40,
|
||||
"enablePullDownRefresh": false,
|
||||
"onReachBottom": true
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path" : "myevaluation/myevaluation",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "我的评价",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"root": "pagesC",
|
||||
|
||||
@ -8,63 +8,337 @@
|
||||
<view class="righttitle">
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="orderitem">
|
||||
<view class="tiemitem">
|
||||
<span>孤注一掷</span>
|
||||
</view>
|
||||
<view class="details">
|
||||
<image src="../../static/headsculpture.png" mode=""></image>
|
||||
<view class="ppointment">
|
||||
<view class="doctorname">
|
||||
<span>齐鲁医院张先生</span><span>¥30</span>
|
||||
|
||||
<view class="" v-if="total >0">
|
||||
<view class="orderitem" v-for="(item,index) in evaluatedata">
|
||||
<view class="tiemitem">
|
||||
</view>
|
||||
<view class="details">
|
||||
<image src="../../static/headsculpture.png" mode="" v-if="item.orderType== 'FAMILY_DOCTOR' ">
|
||||
</image>
|
||||
<image :src="baseurl+item.pictureUrl" mode="" v-else></image>
|
||||
<view class="ppointment">
|
||||
<view class="doctorname">
|
||||
<span>{{item.orderName}}</span>
|
||||
</view>
|
||||
<view class="reservation">
|
||||
<span>{{item.createTime}}</span>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="reservation">
|
||||
评价时间:2023-09-08
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<span @tap="healthratenurse(item)">未评价</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<span @tap="rate()">评价</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="noorder" v-else>
|
||||
<u-empty mode="order" icon-size='220' text="暂无数据"></u-empty>
|
||||
</view>
|
||||
<!-- 家医模块 评价 -->
|
||||
|
||||
<u-popup v-model="evaluateshow" mode="bottom" length="45%" border-radius="30" :closeable='true'>
|
||||
<view class="evaluateserver">
|
||||
立即评价
|
||||
</view>
|
||||
<view class="star">
|
||||
<view class="evaluatstar">
|
||||
<span>评分</span>
|
||||
<u-rate size="50" active-color="#FFA115" inactive-color="#b2b2b2" gutter="20"
|
||||
v-model="list.compositeScore"></u-rate>
|
||||
</view>
|
||||
</view>
|
||||
<view class="star">
|
||||
<view class="evaluatstar">
|
||||
<span>评价</span>
|
||||
<u-input v-model="list.evaluateContent" type="textarea" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="submits">
|
||||
<span @tap="cancel()">取消</span>
|
||||
<span @tap="submit()">提交</span>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup v-model="evaluatenurse" mode="bottom" length="50%" border-radius="20" :closeable='true' class='masks'>
|
||||
<view class="title">
|
||||
综合评价
|
||||
</view>
|
||||
<view class="mask">
|
||||
<u-rate :count="5" v-model="rateval" :size='70' active-color='#F4EA2A'></u-rate>
|
||||
</view>
|
||||
<view class="rateitem">
|
||||
{{rateval==5?'非常满意':''}}
|
||||
{{rateval==4?'满意':''}}
|
||||
{{rateval==3?'一般':''}}
|
||||
{{rateval==2?'差':''}}
|
||||
{{rateval==1?'非常差':''}}
|
||||
</view>
|
||||
<view class="btn" @tap="submit()">
|
||||
确认
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAppletOrderList,
|
||||
addAppointmentEvaluate,
|
||||
insertGoodsEvaluate,
|
||||
} from '@/api/pagesB/Serviceevaluation/Serviceevaluation.js'
|
||||
import {
|
||||
|
||||
add
|
||||
} from '@/api/pagesC/servicerecord/servicerecord.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
evaluateshow: false, //家医评价
|
||||
evaluatenurse: false, //护理站评价
|
||||
parentId: '',
|
||||
orderStatus: 'NOT_EVALUATED', //状态
|
||||
evaluatedata: {}, //列表
|
||||
total: '',
|
||||
cardNo: '', //身份证号
|
||||
region: '', //地区
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
userinfo: '',
|
||||
rateval: 0, //评价星棵树
|
||||
list: {
|
||||
compositeScore: '',
|
||||
evaluateContent: '',
|
||||
patientId: '',
|
||||
openId: '',
|
||||
orderNo: '',
|
||||
evaluateSatisfaction: '',
|
||||
evaluateChannel: 'WE_CHAT_APPLET',
|
||||
},
|
||||
openId: '',
|
||||
orderType: '',
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userinfo = uni.getStorageSync('userinfo');
|
||||
this.cardNo = this.userinfo.cardNo;
|
||||
this.parentId = this.userinfo.id;
|
||||
this.region = this.userinfo.cityCode;
|
||||
this.openId = uni.getStorageSync('openid');
|
||||
// console.log(this.openId, '999')
|
||||
|
||||
// this.cardNo = '371402199404167019';
|
||||
// this.cardNo = '372926199812187720';
|
||||
// this.parentId = '83';
|
||||
|
||||
|
||||
this.getlist();
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
// this.list.patientId = uni.getStorageSync('patientId');
|
||||
|
||||
this.baseurl = baseurl;
|
||||
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
|
||||
if (this.evaluatedata.length >= this.total) {
|
||||
|
||||
} else {
|
||||
this.pageNum++
|
||||
getAppletOrderList(this.parentId, this.orderStatus, this.cardNo, this.region, this.pageNum, this
|
||||
.pageSize).then(res => {
|
||||
if (res.rows) {
|
||||
res.rows.forEach(e => {
|
||||
// e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
||||
this.evaluatedata.push(e)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
watch: { //监听
|
||||
rateval() {
|
||||
if (this.rateval == 5) {
|
||||
this.evaluateSatisfaction = 'VERYSATISFIED'
|
||||
} else if (this.rateval == 4) {
|
||||
this.evaluateSatisfaction = 'SATISFIED'
|
||||
} else if (this.rateval == 3) {
|
||||
this.evaluateSatisfaction = 'COMMONLY'
|
||||
} else if (this.rateval == 2) {
|
||||
this.evaluateSatisfaction = 'DISSATISFIED'
|
||||
} else if (this.rateval == 1) {
|
||||
this.evaluateSatisfaction = 'VERYDISSATISFIED'
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
//评价
|
||||
//商城评价
|
||||
rate(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}&delta=${1}`
|
||||
url: `/pagesB/evaluate/evaluate?item=${JSON.stringify(item)}&delta=${1}`
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
// 护理站评价
|
||||
ratenurse() {
|
||||
this.evaluatenurse = true;
|
||||
|
||||
|
||||
},
|
||||
// 未评价
|
||||
healthratenurse(item) {
|
||||
console.log(item, '58')
|
||||
if (item.orderSource == 'FAMILY_DOCTOR') {
|
||||
this.list.orderSource = 'FAMILY_DOCTOR'
|
||||
} else if (item.orderSource == 'SPRING_DOCTOR') {
|
||||
this.list.orderSource = 'SPRING_DOCTOR'
|
||||
}
|
||||
// 家医模块立即评价
|
||||
if (item.orderType == "FAMILY_DOCTOR") {
|
||||
this.evaluateshow = true;
|
||||
|
||||
}
|
||||
// 健康咨询、护理服务满意度
|
||||
if (item.orderType == "HEALTH_CONSULTATION" || item.orderType == "APPOINTMENT_ORDER") {
|
||||
this.evaluatenurse = true;
|
||||
|
||||
}
|
||||
// 商品积分兑换、直接购买
|
||||
if (item.orderType == "INTEGRAL_EXCHANGE" || item.orderType == "DIRECT_BUY") {
|
||||
uni.navigateTo({
|
||||
url: `/pagesB/evaluate/evaluate?item=${JSON.stringify(item)}&delta=${1}`
|
||||
// url: `/pagesB/goodsorderRate/goodsorderRate?item=${JSON.stringify(item)}&delta=${1}`
|
||||
})
|
||||
|
||||
}
|
||||
this.orderType = item.orderType
|
||||
this.list.orderNo = item.orderNo
|
||||
|
||||
|
||||
// this.list.evaluateChanne = 'WE_CHAT_APPLET'
|
||||
|
||||
},
|
||||
// 提交评价
|
||||
submit() {
|
||||
this.list.patientId = this.parentId
|
||||
this.list.openId = this.openId
|
||||
console.log(this.list, '45')
|
||||
|
||||
if (this.orderType == "FAMILY_DOCTOR" || this.orderType == "INTEGRAL_EXCHANGE" || this.orderType ==
|
||||
"DIRECT_BUY") {
|
||||
insertGoodsEvaluate(this.list).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '评价成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
this.cancel();
|
||||
this.getlist();
|
||||
} else if (res.code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
// 满意度
|
||||
} else if (this.orderType == "HEALTH_CONSULTATION" || this.orderType == "APPOINTMENT_ORDER") {
|
||||
var obj = {
|
||||
"patientId": this.list.patientId,
|
||||
"openid": this.list.openId,
|
||||
"orderNo": this.list.orderNo,
|
||||
"evaluateChannel": "WE_CHAT_APPLET",
|
||||
"evaluateSatisfaction": this.evaluateSatisfaction,
|
||||
"compositeScore": this.rateval,
|
||||
"orderSource": this.list.orderSource,
|
||||
}
|
||||
addAppointmentEvaluate(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
||||
this.$refs.uToast.show({
|
||||
title: '评价成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
this.cancel();
|
||||
// this.evaluatenurse =false;
|
||||
this.getlist();
|
||||
} else if (res.code == 500) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 取消
|
||||
cancel() {
|
||||
this.evaluateshow = false;
|
||||
this.evaluatenurse = false;
|
||||
|
||||
},
|
||||
// 列表
|
||||
getlist() {
|
||||
getAppletOrderList(this.parentId, this.orderStatus, this.cardNo, this.region, this.pageNum, this
|
||||
.pageSize).then(res => {
|
||||
this.evaluatedata = res.rows
|
||||
console.log(this.evaluatedata, '000')
|
||||
this.total = res.total
|
||||
console.log(this.total, '10')
|
||||
// console.log(this.baseurl+this.evaluatedata[0].pictureUrl,'000')
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转我的评价
|
||||
expertOrder() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesB/myevaluation/myevaluation'
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app{
|
||||
.app {
|
||||
height: 100vh;
|
||||
background-color: #F7F5F5;
|
||||
padding: 30rpx 0 0 0;
|
||||
overflow: scroll;
|
||||
|
||||
.noorder {
|
||||
margin-top: 20%;
|
||||
}
|
||||
|
||||
.myorder {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 73rpx;
|
||||
width: 96%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
height: 73rpx;
|
||||
width: 96%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
.orderStatus {
|
||||
text-align: center;
|
||||
margin: 60rpx auto 30rpx;
|
||||
@ -72,32 +346,32 @@
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
|
||||
.item {
|
||||
width: 25%;
|
||||
|
||||
|
||||
.text {
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
image {
|
||||
width: 70rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.righttitle {
|
||||
font-size: 26rpx;
|
||||
color: #969494;
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 30rpx;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
right: 30rpx;
|
||||
|
||||
image {
|
||||
vertical-align: middle;
|
||||
padding-left: 20rpx;
|
||||
@ -106,28 +380,30 @@
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
margin-left: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: #4B4B4B;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
image{
|
||||
/* vertical-align: middle; */
|
||||
/* padding-left: 20rpx; */
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
/* display: inline-block; */
|
||||
/* margin-top: 11rpx; */
|
||||
margin-right: 20rpx;
|
||||
position: relative;
|
||||
top: 7rpx;
|
||||
|
||||
}
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
|
||||
image {
|
||||
/* vertical-align: middle; */
|
||||
/* padding-left: 20rpx; */
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
/* display: inline-block; */
|
||||
/* margin-top: 11rpx; */
|
||||
margin-right: 20rpx;
|
||||
position: relative;
|
||||
top: 7rpx;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.orderitem {
|
||||
width: 96%;
|
||||
height: 383rpx;
|
||||
@ -137,7 +413,7 @@
|
||||
margin: 20rpx auto;
|
||||
position: relative;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
|
||||
.tiemitem {
|
||||
width: 92%;
|
||||
font-size: 28rpx;
|
||||
@ -148,11 +424,11 @@
|
||||
// background: red;
|
||||
left: 35rpx;
|
||||
top: 30rpx;
|
||||
|
||||
|
||||
span:nth-child(2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
span:nth-child(3) {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@ -161,7 +437,7 @@
|
||||
color: #26A888;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.details {
|
||||
width: 96%;
|
||||
height: 200rpx;
|
||||
@ -170,30 +446,36 @@
|
||||
top: 97rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
|
||||
image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 5rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
.ppointment {
|
||||
// background: red;
|
||||
position: absolute;
|
||||
width: 71%;
|
||||
height: 100%;
|
||||
right: 0;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
.doctorname {
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
|
||||
span:nth-child(1) {
|
||||
margin-top: 53rpx;
|
||||
height: 74rpx;
|
||||
|
||||
overflow: auto;
|
||||
span:nth-child(1) {
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
span:nth-child(2) {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@ -204,20 +486,20 @@
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.reservation {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #959595;
|
||||
position: absolute;
|
||||
top: 24%;
|
||||
|
||||
|
||||
top: 61%;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bottom {
|
||||
position: absolute;
|
||||
width: 96%;
|
||||
@ -225,17 +507,7 @@
|
||||
bottom: 4%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
|
||||
// span:nth-child(1) {
|
||||
// position: absolute;
|
||||
// font-weight: 400;
|
||||
// color: #959595;
|
||||
// top: 50%;
|
||||
// transform: translateY(-50%);
|
||||
// left: 5%;
|
||||
|
||||
// }
|
||||
|
||||
|
||||
span:nth-child(1) {
|
||||
line-height: 30px;
|
||||
width: 169rpx;
|
||||
@ -253,8 +525,208 @@
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
}
|
||||
|
||||
.evaluateserver {
|
||||
width: 100%;
|
||||
font-size: 38rpx;
|
||||
color: #000000;
|
||||
line-height: 120rpx;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
|
||||
::v-deep .u-close {
|
||||
top: 8% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.star {
|
||||
position: relative;
|
||||
left: 11%;
|
||||
height: 80rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.evaluatstar {
|
||||
::v-deep .u-rate {
|
||||
position: absolute !important;
|
||||
left: 14% !important;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
::v-deep .u-input__textarea {
|
||||
background: #F6F6F6;
|
||||
height: 200rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .u-input {
|
||||
width: 66% !important;
|
||||
height: 171rpx;
|
||||
position: absolute;
|
||||
left: 16%;
|
||||
}
|
||||
|
||||
font-family: Source Han Sans CN;
|
||||
|
||||
span:nth-child(1) {
|
||||
position: absolute;
|
||||
display: inline;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.2em;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submits {
|
||||
font-family: Source Han Sans CN;
|
||||
font-size: 31rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
top: 23%;
|
||||
text-align: center;
|
||||
|
||||
span:nth-child(1) {
|
||||
display: inline-block;
|
||||
width: 290rpx;
|
||||
height: 62rpx;
|
||||
line-height: 62rpx;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #26A888;
|
||||
border-radius: 5rpx;
|
||||
font-weight: 500;
|
||||
color: #26A888;
|
||||
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
width: 290rpx;
|
||||
height: 62rpx;
|
||||
line-height: 62rpx;
|
||||
background: #26A888;
|
||||
border-radius: 5rpx;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
width: 100%;
|
||||
font-size: 38rpx;
|
||||
color: #000000;
|
||||
line-height: 120rpx;
|
||||
text-align: center;
|
||||
|
||||
::v-deep .u-close {
|
||||
top: 8% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.starnurse {
|
||||
position: relative;
|
||||
top: 15%;
|
||||
left: 11%;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-top: 5%;
|
||||
letter-spacing: 0.2em;
|
||||
}
|
||||
}
|
||||
|
||||
.submitsnurse {
|
||||
position: relative;
|
||||
width: 496rpx;
|
||||
height: 61rpx;
|
||||
line-height: 61rpx;
|
||||
background: #26A888;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
font-size: 31rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
top: 35%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
}
|
||||
|
||||
.masks {
|
||||
image {
|
||||
position: absolute;
|
||||
top: 50rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 999;
|
||||
width: 250rpx;
|
||||
border-radius: 25rpx;
|
||||
height: 250rpx;
|
||||
}
|
||||
|
||||
.ratetitle {
|
||||
font-size: 34rpx;
|
||||
position: absolute;
|
||||
top: 320rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 42rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-star-wrap {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 70rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 70%;
|
||||
height: 71rpx;
|
||||
background: #26A888;
|
||||
border-radius: 26rpx;
|
||||
position: absolute;
|
||||
top: 530rpx;
|
||||
left: 15%;
|
||||
text-align: center;
|
||||
line-height: 71rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rateitem {
|
||||
position: absolute;
|
||||
top: 350rpx;
|
||||
left: 80rpx;
|
||||
font-size: 42rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
117
pagesB/evaluate/evaluate.scss
Normal file
117
pagesB/evaluate/evaluate.scss
Normal file
@ -0,0 +1,117 @@
|
||||
.app {
|
||||
.updata {
|
||||
width: 70%;
|
||||
margin: 80rpx 0 0 15%;
|
||||
height: 71rpx;
|
||||
background: #26A888;
|
||||
border-radius: 26rpx;
|
||||
line-height: 71rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
background-color: #FFFFFF;
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
padding-top: 50rpx;
|
||||
position: relative;
|
||||
height: 500rpx;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
|
||||
::v-deep .u-rate {
|
||||
position: absolute;
|
||||
top: 52rpx;
|
||||
left: 200rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 20rpx;
|
||||
|
||||
::v-deep .uni-textarea-textarea {
|
||||
width: 93%;
|
||||
display: block;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-input__textarea {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 20rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
padding-bottom: 50rpx;
|
||||
border-bottom: 1rpx solid #D8D4D4;
|
||||
}
|
||||
}
|
||||
|
||||
.rate {
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.images {
|
||||
padding-top: 20rpx;
|
||||
|
||||
.itemimgs {
|
||||
display: inline-block;
|
||||
width: 30.5%;
|
||||
height: 212rpx;
|
||||
margin: 0 0 20rpx 2%;
|
||||
position: relative;
|
||||
|
||||
.delimg {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.itemimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
display: inline-block;
|
||||
margin-bottom: 20rpx;
|
||||
width: 30.5%;
|
||||
margin: 0 0 0 2%;
|
||||
height: 212rpx;
|
||||
border: 1rpx dashed #818181;
|
||||
border-radius: 5rpx;
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
font-size: 35rpx;
|
||||
color: #969394;
|
||||
line-height: 70rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 58%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 20%;
|
||||
transform: translateX(-50%);
|
||||
width: 89rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
167
pagesB/evaluate/evaluate.vue
Normal file
167
pagesB/evaluate/evaluate.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view class='app'>
|
||||
<view class="rate">
|
||||
<view class="images">
|
||||
<view class="itemimgs" v-for="(item,index) in file">
|
||||
<image class="delimg" src="../../static/pagesB/gb2.png" mode="" style="color: red;" @tap='delimg(item)'>
|
||||
</image>
|
||||
<image class="itemimg" :src="item" mode=""></image>
|
||||
</view>
|
||||
<view class="shot item" @tap='updataImage'>
|
||||
|
||||
<image src="../../static/pagesB/paishe.png" mode=""></image>
|
||||
<view class="title">
|
||||
拍摄
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="videotape item">
|
||||
<image src="../../static/video.png" mode=""></image>
|
||||
<view class="title">
|
||||
录像
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="score">
|
||||
<view class="title">
|
||||
综合评分
|
||||
</view>
|
||||
<u-rate :count="count" v-model="countvalue" size='46'></u-rate>
|
||||
<view class="text">
|
||||
<u-input v-model="text" type="textarea" :clearable='false' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="updata" @tap='updata'>
|
||||
提交评价
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
import {
|
||||
insertGoodsEvaluate,
|
||||
uploadEvaluatePictureUrl
|
||||
} from '@/api/pagesB/goodsorderRate/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderlist: {},
|
||||
count: 5,
|
||||
countvalue: 0,
|
||||
text: '',
|
||||
baseurl: null,
|
||||
file: [],
|
||||
imgs: [],
|
||||
patientId: null,
|
||||
openid: null,
|
||||
timer: null,
|
||||
delta: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
delimg(item) {
|
||||
this.file = this.file.filter(e => e != item)
|
||||
},
|
||||
updata() {
|
||||
let that = this
|
||||
if (this.file.length > 0) {
|
||||
this.file.forEach(e => {
|
||||
uni.uploadFile({
|
||||
url: baseurl + '/nurseApp/orderEvaluate/uploadEvaluatePictureUrl',
|
||||
filePath: e,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'orderNo': that.orderlist.orderNo
|
||||
},
|
||||
timeout: 5000,
|
||||
success(res) {
|
||||
var img = {
|
||||
evaluatePictureUrl: JSON.parse(res.data).imgUrl
|
||||
}
|
||||
that.imgs.push(img)
|
||||
if (that.imgs.length == that.file.length) {
|
||||
that.info();
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
that.info();
|
||||
}
|
||||
},
|
||||
info() {
|
||||
var that = this
|
||||
var obj = {
|
||||
"patientId": that.patientId,
|
||||
"openid": that.openid,
|
||||
"orderNo": that.orderlist.orderNo,
|
||||
"evaluateChannel": "WE_CHAT_APPLET",
|
||||
"evaluateContent": that.text,
|
||||
"compositeScore": that.countvalue,
|
||||
"orderEvaluatePictureInfoList": that.imgs
|
||||
}
|
||||
insertGoodsEvaluate(obj).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("Refresh", 'Refresh')
|
||||
that.$refs.uToast.show({
|
||||
title: '评价成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
that.imgs = []
|
||||
if (that.delta == 2) {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
} else if (that.delta == 1) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}, 1500)
|
||||
} else {
|
||||
that.imgs = []
|
||||
}
|
||||
})
|
||||
},
|
||||
updataImage() {
|
||||
var that = this;
|
||||
uni.chooseImage({
|
||||
count: 9,
|
||||
success(res) {
|
||||
res.tempFilePaths.forEach(e => {
|
||||
that.file.push(e)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.orderlist = JSON.parse(options.item)
|
||||
console.log(this.orderlist,'000')
|
||||
this.delta = options.delta
|
||||
},
|
||||
onShow() {
|
||||
this.baseurl = baseurl
|
||||
var that = this
|
||||
const value = uni.getStorageSync('openid');
|
||||
if (value) {
|
||||
that.openid = value
|
||||
} else {}
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
that.patientId = value2
|
||||
} else {}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './evaluate.scss';
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user