evaluate.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 :count="count" v-model="item.satisfaction" size="35" activeColor="#ffaa00" :size="18"
  24. :allowHalf='true' :readonly='true'>
  25. </start>
  26. </view>
  27. </view>
  28. <view class="gray999 xy-row">
  29. <view class='item'>
  30. 信用:{{item.driverCredit}}星
  31. </view>
  32. <view class='item'>
  33. 效率:{{item.tranEfficiency}}星
  34. </view>
  35. <view class='item'>
  36. 安全:{{item.tranSafety}}星
  37. </view>
  38. <view class='item'>
  39. 服务:{{item.serviceQuality}}星
  40. </view>
  41. </view>
  42. <!--
  43. <view class="xkuang">
  44. <view style="display: flex;" class="flex-space-between" v-for="(item,index) in rate">
  45. <view class="ziti">{{item.name}}</view>
  46. <start :count="item.count" style="margin-top: 15px; margin-left: 50px;" size="35"
  47. activeIcon="heart-fill" inactiveIcon="heart" activeColor="#ffaa00" v-model="item.value1">
  48. </start>
  49. </view>
  50. </view> -->
  51. <view class="pl-style">
  52. {{item.ownerContent}}
  53. </view>
  54. <view 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 v-if='index!=list.length-1' 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. that.$set(that.list[i],'isOpen',false)
  131. if( that.list[i].ownerUrl){
  132. that.list[i].imgList = that.list[i].ownerUrl.split(',')
  133. }
  134. that.list[i].count = (Number(that.list[i].driverCredit) + Number(that.list[i]
  135. .tranEfficiency) + Number(that.list[i].tranSafety) + Number(that.list[i]
  136. .serviceQuality) + Number(that.list[i].satisfaction)) / 25 * 5
  137. }
  138. that.mescroll.endBySize(res.data.records.length, res.data.total);
  139. uni.hideLoading()
  140. })
  141. .catch(res => {
  142. uni.$u.toast(res.message);
  143. });
  144. },
  145. clickZK(item) {
  146. item.isOpen = !item.isOpen
  147. },
  148. getList() {
  149. },
  150. },
  151. }
  152. </script>
  153. <style lang="scss">
  154. .ziti {
  155. color: #909090;
  156. margin-top: 23px;
  157. }
  158. .xkuang {
  159. margin-top: 20px;
  160. background-color: #FAFAFA;
  161. padding-left: 30px;
  162. }
  163. .content-list {
  164. margin: 20rpx;
  165. padding: 20rpx;
  166. background: white;
  167. border-radius: 20rpx;
  168. }
  169. .hz-name {
  170. color: #999;
  171. margin-right: 10rpx;
  172. }
  173. .gray999 {
  174. color: #999;
  175. }
  176. .name-row {
  177. margin: 20rpx 0;
  178. }
  179. .item {
  180. margin-right: 20rpx;
  181. font-size: 26rpx;
  182. display: inline-block;
  183. }
  184. .xy-row {
  185. margin-bottom: 40rpx;
  186. }
  187. .pl-style {
  188. margin-bottom: 40rpx;
  189. }
  190. .color2979ff {
  191. color: #2979ff;
  192. }
  193. .img-content {
  194. margin-top: 20rpx;
  195. .img {
  196. display: inline-block;
  197. margin-right: 10rpx;
  198. border-radius: 20rpx;
  199. }
  200. }
  201. .line {
  202. margin: 20rpx 0 !important;
  203. }
  204. </style>