driverEvaluation.vue 5.0 KB

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