evaluate.vue 5.5 KB

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