evaluate.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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">
  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 :value="item.ownerCredit" :disabled="true" :is_score='true' :size="36" >
  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 :value="item.freightPayment" :disabled="true" :is_score='true' :size="36" >
  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 :score="score1" :value="item.comprehensiveSatisfaction" :disabled="true" :is_score='true' :size="36">
  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 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. score1:['极不满意','不满意','尚可','满意','非常满意'],
  102. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  103. rate: [{
  104. name: "司机信用",
  105. count: "5",
  106. value1: '5',
  107. },
  108. {
  109. name: "运输效率",
  110. count: "5",
  111. value1: '3',
  112. },
  113. {
  114. name: "运输安全",
  115. count: "5",
  116. value1: '5',
  117. },
  118. {
  119. name: "服务质量",
  120. count: "5",
  121. value1: '2',
  122. }, {
  123. name: "满意度",
  124. count: "5",
  125. value1: '1',
  126. }
  127. ],
  128. };
  129. },
  130. computed: {
  131. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  132. },
  133. onLoad() {
  134. that = this
  135. },
  136. methods: {
  137. upCallback(page) {
  138. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  139. evaluatoredId: this.userInfo.id,
  140. flag: 2,
  141. pageSize: page.size,
  142. currentPage: page.num
  143. }).then(res => {
  144. if (page.num == 1) that.list = [];
  145. //追加新数据
  146. that.list = that.list.concat(res.data.records);
  147. for (let i = 0; i < that.list.length; i++) {
  148. // that.list[i].isOpen=false
  149. this.$set(that.list[i],'isOpen',false)
  150. that.$set(that.list[i],'imgList',that.list[i].driverUrl.split(','))
  151. // that.list[i].imgList = that.list[i].driverUrl.split(',')
  152. that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
  153. .freightPayment) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
  154. }
  155. that.mescroll.endBySize(res.data.records.length, res.data.total);
  156. uni.hideLoading()
  157. })
  158. .catch(res => {
  159. uni.$u.toast(res.message);
  160. });
  161. },
  162. clickZK(item) {
  163. this.$set(item,'isOpen',!item.isOpen)
  164. console.log(item)
  165. },
  166. },
  167. }
  168. </script>
  169. <style lang="scss">
  170. .ziti {
  171. color: #909090;
  172. margin-top: 23px;
  173. }
  174. .xkuang {
  175. margin-top: 20px;
  176. background-color: #FAFAFA;
  177. padding-left: 30px;
  178. }
  179. .content-list {
  180. margin: 20rpx;
  181. padding: 20rpx;
  182. background: white;
  183. border-radius: 20rpx;
  184. }
  185. .hz-name {
  186. color: #999;
  187. margin-right: 10rpx;
  188. }
  189. .gray999 {
  190. color: #999;
  191. }
  192. .name-row {
  193. margin: 20rpx 0;
  194. }
  195. .item {
  196. margin-right: 20rpx;
  197. font-size: 26rpx;
  198. }
  199. .xy-row {
  200. margin-bottom: 40rpx;
  201. }
  202. .pl-style {
  203. margin-bottom: 40rpx;
  204. }
  205. .color2979ff {
  206. color: #2979ff;
  207. }
  208. .img-content{
  209. margin-top: 20rpx;
  210. .img{
  211. display: inline-block;
  212. margin-right: 10rpx;
  213. border-radius: 20rpx;
  214. }
  215. }
  216. .line{
  217. margin: 20rpx 0!important;
  218. }
  219. </style>