evaluateList.vue 4.7 KB

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