evaluate.vue 4.9 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 class="flex" style='align-items: center;'>
  8. <image style='width:60rpx;height:60rpx;margin-right: 10px;border-radius:50%;'
  9. :src="item.ownerPortrait" mode=""></image>
  10. {{item.ownerAnonymous=='1'?'匿名评价':item.ownerName}}
  11. </view>
  12. <!-- <u-icon name="arrow-right" color="#ccc" size="18"></u-icon> -->
  13. </view>
  14. <view class="right gray999">
  15. {{item.createDate.split(' ')[0]}}
  16. </view>
  17. </view>
  18. <view class="flex align-center name-row">
  19. <view class="sj-row hz-name">
  20. 打分:
  21. </view>
  22. <view class="xx">
  23. <start :value="item.satisfaction" :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>
  41. <!--
  42. <view class="xkuang">
  43. <view style="display: flex;" class="flex-space-between" v-for="(item,index) in rate">
  44. <view class="ziti">{{item.name}}</view>
  45. <start :count="item.count" style="margin-top: 15px; margin-left: 50px;" size="35"
  46. activeIcon="heart-fill" inactiveIcon="heart" activeColor="#ffaa00" v-model="item.value1">
  47. </start>
  48. </view>
  49. </view> -->
  50. <view class="pl-style">
  51. {{item.ownerContent}}
  52. </view>
  53. <view 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 v-if='index!=list.length-1' 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. imgList: [],
  80. list: [],
  81. isOpen: true,
  82. count: '5',
  83. value: '3',
  84. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  85. rate: [{
  86. name: "司机信用",
  87. count: "5",
  88. value1: '5',
  89. },
  90. {
  91. name: "运输效率",
  92. count: "5",
  93. value1: '3',
  94. },
  95. {
  96. name: "运输安全",
  97. count: "5",
  98. value1: '5',
  99. },
  100. {
  101. name: "服务质量",
  102. count: "5",
  103. value1: '2',
  104. }, {
  105. name: "满意度",
  106. count: "5",
  107. value1: '1',
  108. }
  109. ],
  110. };
  111. },
  112. computed: {
  113. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  114. },
  115. onLoad() {
  116. that = this
  117. },
  118. methods: {
  119. upCallback(page) {
  120. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  121. evaluatoredId: this.userInfo.id,
  122. flag: 2,
  123. pageSize: page.size,
  124. currentPage: page.num,
  125. }).then(res => {
  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.$set(that.list[i],'isOpen',false)
  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(item) {
  145. item.isOpen = !item.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>