evaluateList.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. evaluatorId: this.userInfo.id,
  121. flag: 1,
  122. pageSize: page.size,
  123. currentPage: page.num
  124. }).then(res => {
  125. if (page.num == 1) that.list = [];
  126. that.list = that.list.concat(res.data.records); //追加新数据
  127. for (let i = 0; i < that.list.length; i++) {
  128. that.list[i].imgList = that.list[i].driverUrl.split(',')
  129. that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  130. .freightPayment) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  131. }
  132. that.mescroll.endBySize(res.data.records.length, res.data.total);
  133. uni.hideLoading()
  134. })
  135. .catch(res => {
  136. uni.$u.toast(res.message);
  137. });
  138. },
  139. clickZK() {
  140. this.isOpen = !this.isOpen
  141. },
  142. },
  143. }
  144. </script>
  145. <style lang="scss">
  146. .ziti {
  147. color: #909090;
  148. margin-top: 23px;
  149. }
  150. .xkuang {
  151. margin-top: 20px;
  152. background-color: #FAFAFA;
  153. padding-left: 30px;
  154. }
  155. .content-list {
  156. margin: 20rpx;
  157. padding: 20rpx;
  158. background: white;
  159. border-radius: 20rpx;
  160. }
  161. .hz-name {
  162. color: #999;
  163. margin-right: 10rpx;
  164. }
  165. .gray999 {
  166. color: #999;
  167. }
  168. .name-row {
  169. margin: 20rpx 0;
  170. }
  171. .item {
  172. margin-right: 20rpx;
  173. font-size: 26rpx;
  174. }
  175. .xy-row {
  176. margin-bottom: 40rpx;
  177. }
  178. .pl-style {
  179. margin-bottom: 40rpx;
  180. }
  181. .color2979ff {
  182. color: #2979ff;
  183. }
  184. .img-content{
  185. margin-top: 20rpx;
  186. .img{
  187. display: inline-block;
  188. margin-right: 10rpx;
  189. border-radius: 20rpx;
  190. }
  191. }
  192. .line{
  193. margin: 20rpx 0!important;
  194. }
  195. </style>