|
@@ -1,74 +1,327 @@
|
|
|
<template>
|
|
|
- <view class="center">
|
|
|
- <view class="">
|
|
|
- <view class="">
|
|
|
- <u-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
|
|
|
- <u-radio :customStyle="{marginBottom: '8px'}"
|
|
|
- label="张先生" name="张先生" >
|
|
|
- </u-radio>
|
|
|
- </u-radio-group>
|
|
|
+ <view class="page_pingjia4">
|
|
|
+ <view class="kuang">
|
|
|
+ <view class="order-row flex flex-space-between">
|
|
|
+ <view class="flex align-center">
|
|
|
+ <view>张先生</view>
|
|
|
+ <view>匿名评价</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="flex align-center">
|
|
|
+ <!-- <image :src="objData.driverPortrait" mode="widthFix" class="tx-img"></image> -->
|
|
|
+ <!-- <view>{{objData.driverName}}</view> -->
|
|
|
+ <view>2022-04-21</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="xkuang">
|
|
|
+ <view style="display: flex;" class="flex-space-between" v-for="(item,index) in rate"
|
|
|
+ @click="clickStar(index)">
|
|
|
+ <view class="flex" style="margin: 10rpx 0;">
|
|
|
+ <view class="ziti">{{item.name}}</view>
|
|
|
+ <start :count="item.count" style="" size="35" activeIcon="heart-fill" inactiveIcon="heart"
|
|
|
+ activeColor="#ffaa00" v-model="item.value1" @change="getVal" :size="22">
|
|
|
+ </start>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="">
|
|
|
+ {{item.level}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <u-form labelPosition="left" :model="modelData" labelWidth="80">
|
|
|
- <u-form-item label="货主信用" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-radio-group v-model="radiovalue1" placement="column" @change="groupChange">
|
|
|
- </u-radio-group>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="货主信用" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-rate :count="count" v-model="modelData.value"></u-rate>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="运输效率" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-rate :count="count" v-model="modelData.value"></u-rate>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="运输安全" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-rate :count="count" v-model="modelData.value"></u-rate>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="服务质量" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-rate :count="count" v-model="modelData.value"></u-rate>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item label="满意度" prop="modelData.value" borderBottom width="600">
|
|
|
- <u-rate :count="count" v-model="modelData.value"></u-rate>
|
|
|
- </u-form-item>
|
|
|
- </u-form>
|
|
|
+ <view>
|
|
|
+ <!-- <u--textarea style="margin-top: 20px;" background-color="#6d6d6d" v-model="value3"
|
|
|
+ placeholder="评价一下这单发运任务~">
|
|
|
+ </u--textarea> -->
|
|
|
+ <view>是否点击可浪费啊据了解SD卡见风使舵是否点击拉分手的距离看拉圣诞节福利发送到节流防抖拉三级分类库山东假的李开复加空间撒的卢卡斯的房间里快递费</view>
|
|
|
+ </view>
|
|
|
+ <!-- <u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
|
|
|
+ name="1" multiple :maxCount="9" style="margin-bottom: 80rpx;"></u-upload> -->
|
|
|
+ <div class="imgShow">
|
|
|
+ <image src='https://cdn.uviewui.com/uview/album/1.jpg' class="img img_item" v-for="(item,index) in 9" :key='index'></image>
|
|
|
+ </div>
|
|
|
+ <!-- <u-line></u-line> -->
|
|
|
</view>
|
|
|
-
|
|
|
+ <!-- <view class="anniu" v-for="(item,index) in button">
|
|
|
+ <u-button type="warning">{{item.name}}</u-button>
|
|
|
+ </view> -->
|
|
|
+ <u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ var that
|
|
|
+ import {
|
|
|
+ mapState
|
|
|
+ } from 'vuex';
|
|
|
+ import start from '../../common/components/uni-rate.vue'
|
|
|
+ import uploadImage from '@/components/ossutil/uploadFile.js';
|
|
|
+
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ start
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- count: 5,
|
|
|
- modelData: {
|
|
|
- value: 4
|
|
|
- },
|
|
|
- radiovalue1: ""
|
|
|
+ imageList :[],
|
|
|
+ objData:{},
|
|
|
+ starIndex: '',
|
|
|
+ checkboxValue1: [],
|
|
|
+ checkboxList1: [{
|
|
|
+ name: '匿名评论',
|
|
|
+ disabled: false
|
|
|
+ }],
|
|
|
+ count: "5",
|
|
|
+ value: '',
|
|
|
+ value3: '',
|
|
|
+ fileList1: [],
|
|
|
+ por: [{
|
|
|
+ title: '"无可挑剔"',
|
|
|
+ }],
|
|
|
+ rate: [{
|
|
|
+ name: "司机信用",
|
|
|
+ count: "5",
|
|
|
+ value1: '5',
|
|
|
+ level: '非常好'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "运输效率",
|
|
|
+ count: "5",
|
|
|
+ value1: '5',
|
|
|
+ level: '非常好'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "运输安全",
|
|
|
+ count: "5",
|
|
|
+ value1: '5',
|
|
|
+ level: '非常好'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "运输安全",
|
|
|
+ count: "5",
|
|
|
+ value1: '5',
|
|
|
+ level: '非常好'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "满意度",
|
|
|
+ count: "5",
|
|
|
+ value1: '5',
|
|
|
+ level: '非常满意'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ button: [{
|
|
|
+ name: '提交'
|
|
|
+ }],
|
|
|
|
|
|
+ hidden: [{
|
|
|
+ name: '匿名评论',
|
|
|
+ disabled: false
|
|
|
+ }],
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
-
|
|
|
+ onNavigationBarButtonTap() {debugger
|
|
|
+ let _data = {
|
|
|
+ driverId: this.objData.commonId,
|
|
|
+ ownerName:this.checkboxValue1?this.objData.cargoOwner:'',
|
|
|
+ ownerPortrait:this.checkboxValue1?this.userInfo.avatarUrl:'',
|
|
|
+ orderId:this.objData.id,
|
|
|
+ orderNumber:this.objData.orderNo,
|
|
|
+ driverCredit:this.rate[0].value1,
|
|
|
+ tranEfficiency:this.rate[1].value1,
|
|
|
+ tranSafety:this.rate[2].value1,
|
|
|
+ serviceQuality:this.rate[3].value1,
|
|
|
+ satisfaction:this.rate[4].value1,
|
|
|
+ ownerContent:this.value3,
|
|
|
+ ownerUrl:this.imageList.toString(),
|
|
|
+ ownerAnonymous:this.checkboxValue1.length!=0?1:0
|
|
|
+
|
|
|
+ }
|
|
|
+ that.$request.baseRequest('post', '/evaluateInfo/api/addEvaluateInfo', _data).then(res => {
|
|
|
+ if (res.code==200) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "评价成功",
|
|
|
+ complete() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/order/index'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "评价失败",
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- onLoad() {
|
|
|
- this.getList()
|
|
|
+ onLoad(options) {
|
|
|
+ that = this
|
|
|
+ this.objData = JSON.parse(options.val)
|
|
|
+ console.log(this.objData)
|
|
|
+ that.imageList = []
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
+ clickStar(index) {
|
|
|
+ console.log(index)
|
|
|
+ this.selectStar = index
|
|
|
+ if (index == 0 || index == 1|| index == 2|| index == 3) {
|
|
|
+ if (this.starIndex == '1') {
|
|
|
+ this.rate[index].level = '极差'
|
|
|
+ } else if (this.starIndex == '2') {
|
|
|
+ this.rate[index].level = '差'
|
|
|
+ } else if (this.starIndex == '3') {
|
|
|
+ this.rate[index].level = '一般'
|
|
|
+ } else if (this.starIndex == '4') {
|
|
|
+ this.rate[index].level = '较好'
|
|
|
+ } else if (this.starIndex == '5') {
|
|
|
+ this.rate[index].level = '非常好'
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (this.starIndex == '1') {
|
|
|
+ this.rate[index].level = '极不满意'
|
|
|
+ } else if (this.starIndex == '2') {
|
|
|
+ this.rate[index].level = '不满意'
|
|
|
+ } else if (this.starIndex == '3') {
|
|
|
+ this.rate[index].level = '尚可'
|
|
|
+ } else if (this.starIndex == '4') {
|
|
|
+ this.rate[index].level = '满意'
|
|
|
+ } else if (this.starIndex == '5') {
|
|
|
+ this.rate[index].level = '非常满意'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- // radioChange(){
|
|
|
-
|
|
|
- // },
|
|
|
- groupChange(e) {
|
|
|
-
|
|
|
+ getVal(e) {
|
|
|
+ debugger
|
|
|
+ this.starIndex = e.value
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ checkboxChange(n) {
|
|
|
+ console.log('change', n);
|
|
|
+ },
|
|
|
+ // 删除图片
|
|
|
+ deletePic(event) {
|
|
|
+ this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
+ },
|
|
|
+ // 新增图片
|
|
|
+ async afterRead(event) {
|
|
|
+ // console.log(this[`fileList${event.name}`])
|
|
|
+ // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
+ let lists = [].concat(event.file)
|
|
|
+ let fileListLen = this[`fileList${event.name}`].length
|
|
|
+ lists.map((item) => {
|
|
|
+ this[`fileList${event.name}`].push({
|
|
|
+ ...item,
|
|
|
+ status: 'uploading',
|
|
|
+ message: '上传中'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ for (let i = 0; i < lists.length; i++) {
|
|
|
+ const result = await this.uploadFilePromise(lists[i], lists[i].url)
|
|
|
+ // console.log(result)
|
|
|
+ let item = this[`fileList${event.name}`][fileListLen]
|
|
|
+ this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
+ status: 'success',
|
|
|
+ message: '',
|
|
|
+ url: result
|
|
|
+ }))
|
|
|
+ fileListLen++
|
|
|
+ }
|
|
|
+ },
|
|
|
+ uploadFilePromise(file, url) {
|
|
|
+ debugger
|
|
|
+ uploadImage('image', url, 'appData/',
|
|
|
+ result => {
|
|
|
+ debugger
|
|
|
+ // 上传成功回调函数
|
|
|
+ console.log('图片地址', result)
|
|
|
+ that.imageList.push(result)
|
|
|
+ // this.dataDetails.certificateAddressUrl=this.dataDetails.certificateAddressUrl +',' +result
|
|
|
+
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ // 删除图片
|
|
|
+ deletePic(event) {
|
|
|
+ this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
},
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
- .center {
|
|
|
- padding: 30rpx;
|
|
|
+<style lang="scss">
|
|
|
+ .page_pingjia4 {
|
|
|
+ background-color: #ffffff;
|
|
|
+ padding: 20rpx;
|
|
|
+
|
|
|
+ .anniu {
|
|
|
+ margin-top: 48px;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .niming {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ziti {
|
|
|
+ color: #909090;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ width: 160rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .xkuang {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .xx {
|
|
|
+ margin-left: 24%;
|
|
|
+ padding-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .biaoti {
|
|
|
+ width: 80%;
|
|
|
+ margin: 0 auto;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .kuang {
|
|
|
+ background-color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tx-img {
|
|
|
+ width: 40rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ }
|
|
|
+ // .img-content{
|
|
|
+ // // display: flex;
|
|
|
+ // // justify-content: center;
|
|
|
+
|
|
|
+ // // display: inline-block;
|
|
|
+ // .img{
|
|
|
+ // width: 160rpx;
|
|
|
+ // height: 160rpx;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ .imgShow{
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
+ .img_item{
|
|
|
+ // height:0px;
|
|
|
+ height: 85px!important;
|
|
|
+ width: 30%;
|
|
|
+ background-color: #f1f1f1;
|
|
|
+ margin: 2px 1.66%;
|
|
|
+ border-radius: 10rpx;
|
|
|
}
|
|
|
</style>
|