evaluate.vue 5.0 KB

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