evaluationRecord.vue 6.8 KB

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