evaluationRecord.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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 class="left flex">
  7. <view @click='toDetail(item.orderId)'>
  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 flex-space-between 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 flex-space-between 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 flex-space-between 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 flex-space-between 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 flex-space-between 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="img-content">
  102. <u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img"
  103. v-for="item1 in item.imgList"></u--image>
  104. </view>
  105. <u-line class="line"></u-line>
  106. <view class="flex flex-space-between">
  107. <view class="gray999">
  108. {{item.ownerAnonymous==1?"匿名评价":'未匿名'}}
  109. </view>
  110. <view style='color:red;' @click='del(item)' class="">
  111. 删除
  112. </view>
  113. </view>
  114. </view>
  115. </mescroll-body>
  116. <u-toast ref="uToast"></u-toast>
  117. </view>
  118. </template>
  119. <script>
  120. var that
  121. import {
  122. mapState
  123. } from 'vuex';
  124. import start from '../../common/components/uni-rate.vue'
  125. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  126. export default {
  127. mixins: [MescrollMixin], // 使用mixin
  128. components: {
  129. start
  130. },
  131. data() {
  132. return {
  133. imgList: [],
  134. list: [],
  135. isOpen: true,
  136. count: '5',
  137. value: '3',
  138. src: 'https://cdn.uviewui.com/uview/album/1.jpg',
  139. rate: [{
  140. name: "司机信用",
  141. count: "5",
  142. value1: '5',
  143. },
  144. {
  145. name: "运输效率",
  146. count: "5",
  147. value1: '3',
  148. },
  149. {
  150. name: "运输安全",
  151. count: "5",
  152. value1: '5',
  153. },
  154. {
  155. name: "服务质量",
  156. count: "5",
  157. value1: '2',
  158. }, {
  159. name: "满意度",
  160. count: "5",
  161. value1: '1',
  162. }
  163. ],
  164. };
  165. },
  166. computed: {
  167. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
  168. },
  169. onLoad() {
  170. that = this
  171. },
  172. methods: {
  173. del(item){
  174. var that=this
  175. uni.showModal({
  176. title: '提示',
  177. content: '确定删除评价吗?',
  178. success: ({
  179. confirm,
  180. cancel
  181. }) => {
  182. if (confirm) {
  183. uni.showLoading({title: '加载中',mask:true})
  184. that.$request.baseRequest('post', '/evaluateInfo/api/deleteEvaluateInfo', {
  185. id: item.id,
  186. }).then(res => {
  187. that.$refs.uToast.show({
  188. type: 'success',
  189. message: '删除评论成功',
  190. })
  191. uni.hideLoading()
  192. that.upCallback({size:10,num:1})
  193. })
  194. .catch(res => {
  195. uni.$u.toast(res.message);
  196. });
  197. }
  198. }
  199. });
  200. },
  201. toDetail(id) {
  202. uni.$u.route('/pages/order/orderDetails', {
  203. id: id,
  204. });
  205. },
  206. upCallback(page) {
  207. that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
  208. evaluatorId: this.userInfo.id,
  209. flag: 1,
  210. pageSize: page.size,
  211. currentPage: page.num
  212. }).then(res => {
  213. if (page.num == 1) that.list = [];
  214. that.list = that.list.concat(res.data.records); //追加新数据
  215. for (let i = 0; i < that.list.length; i++) {
  216. that.$set(that.list[i],'isOpen',false)
  217. if(that.list[i].ownerUrl){
  218. that.$set(that.list[i],'imgList',that.list[i].ownerUrl.split(','))
  219. }else{
  220. that.list[i].imgList = []
  221. }
  222. that.list[i].count = (Number(that.list[i].driverCredit) + Number(that.list[i]
  223. .tranEfficiency) + Number(that.list[i].tranSafety) + Number(that.list[i]
  224. .serviceQuality) + Number(that.list[i].satisfaction)) / 25 * 5
  225. }
  226. that.mescroll.endBySize(res.data.records.length, res.data.total);
  227. uni.hideLoading()
  228. })
  229. .catch(res => {
  230. uni.$u.toast(res.message);
  231. });
  232. },
  233. clickZK(item) {
  234. that.$set(item,'isOpen',!item.isOpen)
  235. // item.isOpen = !item.isOpen
  236. },
  237. getList() {
  238. },
  239. },
  240. }
  241. </script>
  242. <style lang="scss">
  243. .ziti {
  244. color: #909090;
  245. margin-top: 23px;
  246. }
  247. .xkuang {
  248. margin-top: 20px;
  249. background-color: #FAFAFA;
  250. padding-left: 30px;
  251. }
  252. .content-list {
  253. margin: 20rpx;
  254. padding: 20rpx;
  255. background: white;
  256. border-radius: 20rpx;
  257. }
  258. .driver{
  259. background:rgb(255, 170, 0);
  260. color:#fff;font-size:28rpx;padding:8rpx;
  261. border-radius: 10rpx;
  262. margin-right:10rpx;
  263. }
  264. .hz-name {
  265. color: #999;
  266. margin-right: 10rpx;
  267. }
  268. .gray999 {
  269. color: #999;
  270. }
  271. .name-row {
  272. margin: 20rpx 0;
  273. }
  274. .item {
  275. margin-right: 20rpx;
  276. font-size: 26rpx;
  277. display: inline-block;
  278. }
  279. .xy-row {
  280. margin-bottom: 40rpx;
  281. }
  282. .pl-style {
  283. margin-bottom: 40rpx;
  284. }
  285. .color2979ff {
  286. color: #2979ff;
  287. }
  288. .img-content {
  289. margin-top: 20rpx;
  290. .img {
  291. display: inline-block;
  292. margin-right: 10rpx;
  293. border-radius: 20rpx;
  294. }
  295. }
  296. .line {
  297. margin: 20rpx 0 !important;
  298. }
  299. </style>