evaluate.vue 5.1 KB

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