driverEvaluation.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view class="content">
  3. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
  4. <view class="content-list" v-for="(item,index) in list" :key='index'>
  5. <view class="top flex flex-space-between">
  6. <view class="left flex">
  7. <view>
  8. {{item.orderNumber}}
  9. </view>
  10. <u-icon name="arrow-right" color="#ccc" size="18"></u-icon>
  11. </view>
  12. <view class="right gray999">
  13. {{item.createDate.split(' ')[0]}}
  14. </view>
  15. </view>
  16. <view class="flex align-center name-row">
  17. <view class="sj-row hz-name">
  18. {{item.orderInfo.driverName}}:
  19. </view>
  20. <view class="xx">
  21. <start :count="count" v-model="item.count" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true' :readonly='true'>
  22. </start>
  23. </view>
  24. </view>
  25. <view class="gray999 xy-row">
  26. <view class='item'>
  27. 司机信用:{{item.driverCredit}}星
  28. </view>
  29. <view class='item'>
  30. 运费效率:{{item.tranEfficiency}}星
  31. </view>
  32. <view class='item'>
  33. 运输安全:{{item.tranSafety}}星
  34. </view>
  35. <view class='item'>
  36. 服务质量:{{item.serviceQuality}}星
  37. </view>
  38. <view class='item'>
  39. 满意度:{{item.satisfaction}}星
  40. </view>
  41. </view>
  42. <!--
  43. <view class="xkuang">
  44. <view style="display: flex;" class="flex-space-between" v-for="(item,index) in rate">
  45. <view class="ziti">{{item.name}}</view>
  46. <start :count="item.count" style="margin-top: 15px; margin-left: 50px;" size="35"
  47. activeIcon="heart-fill" inactiveIcon="heart" activeColor="#ffaa00" v-model="item.value1">
  48. </start>
  49. </view>
  50. </view> -->
  51. <view class="pl-style">
  52. {{item.ownerContent}}
  53. </view>
  54. <view class="color2979ff flex">
  55. <view @click="clickZK">展开</view>
  56. <u-icon name="arrow-down" color="#2979ff" size="18" v-if="isOpen"></u-icon>
  57. <u-icon name="arrow-up" color="#2979ff" size="18" v-else></u-icon>
  58. </view>
  59. <view v-if="isOpen" class="img-content">
  60. <u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img" v-for="(item1,index) in item.imgList"></u--image>
  61. </view>
  62. <u-line class="line"></u-line>
  63. <view class="gray999">
  64. {{item.ownerAnonymous==1?"匿名评价":''}}
  65. </view>
  66. </view>
  67. </mescroll-body>
  68. </view>
  69. </template>
  70. <script>
  71. var that
  72. import {
  73. mapState
  74. } from 'vuex';
  75. import start from '../../common/components/uni-rate.vue'
  76. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  77. export default {
  78. mixins: [MescrollMixin], // 使用mixin
  79. components: {
  80. start
  81. },
  82. data() {
  83. return {imgList:[],
  84. list:[],
  85. isOpen: true,
  86. count: '5',
  87. value: '3',
  88. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  89. rate: [{
  90. name: "司机信用",
  91. count: "5",
  92. value1: '5',
  93. },
  94. {
  95. name: "运输效率",
  96. count: "5",
  97. value1: '3',
  98. },
  99. {
  100. name: "运输安全",
  101. count: "5",
  102. value1: '5',
  103. },
  104. {
  105. name: "服务质量",
  106. count: "5",
  107. value1: '2',
  108. }, {
  109. name: "满意度",
  110. count: "5",
  111. value1: '1',
  112. }
  113. ],
  114. };
  115. },
  116. computed: {
  117. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  118. },
  119. onLoad() {
  120. that = this
  121. },
  122. methods: {
  123. upCallback(page) {
  124. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  125. ownerId: this.userInfo.id,
  126. flag:1,
  127. pageSize: page.size,
  128. currentPage: page.num
  129. }).then(res => {debugger
  130. if (page.num == 1) that.list = [];
  131. that.list = that.list.concat(res.data.records); //追加新数据
  132. for(let i = 0;i<that.list.length;i++){
  133. that.list[i].imgList = that.list[i].ownerUrl.split(',')
  134. that.list[i].count =(Number(that.list[i].driverCredit)+Number(that.list[i].tranEfficiency)+Number(that.list[i].tranSafety)+Number(that.list[i].serviceQuality)+Number(that.list[i].satisfaction))/25*5
  135. }
  136. that.mescroll.endBySize(res.data.records.length, res.data.total);
  137. uni.hideLoading()
  138. })
  139. .catch(res => {
  140. uni.$u.toast(res.message);
  141. });
  142. },
  143. clickZK() {
  144. this.isOpen = !this.isOpen
  145. },
  146. getList(){
  147. },
  148. },
  149. }
  150. </script>
  151. <style lang="scss">
  152. .ziti {
  153. color: #909090;
  154. margin-top: 23px;
  155. }
  156. .xkuang {
  157. margin-top: 20px;
  158. background-color: #FAFAFA;
  159. padding-left: 30px;
  160. }
  161. .content-list {
  162. margin: 20rpx;
  163. padding: 20rpx;
  164. background: white;
  165. border-radius: 20rpx;
  166. }
  167. .hz-name {
  168. color: #999;
  169. margin-right: 10rpx;
  170. }
  171. .gray999 {
  172. color: #999;
  173. }
  174. .name-row {
  175. margin: 20rpx 0;
  176. }
  177. .item {
  178. margin-right: 20rpx;
  179. font-size: 26rpx;
  180. display: inline-block;
  181. }
  182. .xy-row {
  183. margin-bottom: 40rpx;
  184. }
  185. .pl-style {
  186. margin-bottom: 40rpx;
  187. }
  188. .color2979ff {
  189. color: #2979ff;
  190. }
  191. .img-content{
  192. margin-top: 20rpx;
  193. .img{
  194. display: inline-block;
  195. margin-right: 10rpx;
  196. border-radius: 20rpx;
  197. }
  198. }
  199. .line{
  200. margin: 20rpx 0!important;
  201. }
  202. </style>