index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="history">
  3. <view class="history-card" v-for="(item, index) in dataList" :key="index">
  4. <view class="header">
  5. <image :src="baseImgUrl + item.carLogo" alt="">
  6. <view class="title">
  7. {{item.carModelName}}
  8. </view>
  9. </view>
  10. <view class="content">
  11. {{item.describes}}
  12. </view>
  13. <view class="history-img" v-if="item.status==1">
  14. <view v-for="(items, indexs) in item.imgUrls.split(',')" :key="indexs">
  15. <image v-if="items.indexOf('png'||'jpg')!= -1" :src="baseImgUrl+items" alt="">
  16. </view>
  17. <video v-if="item.videoUrl != ''" :src="baseImgUrl+item.videoUrl"></video>
  18. </view>
  19. <view class="bottom">
  20. <view class="leftView">
  21. <view class="history-type" :style="item.status==1?'color: #FF6000;':'color: #005CFF;'">
  22. {{item.status==1?'评估中':'已评估'}}
  23. </view>
  24. <view class="history-time">
  25. {{item.time}}
  26. </view>
  27. </view>
  28. <view class="rightView" @click="toDetail(item.id)">
  29. 估价详情
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. getEvaluationList
  38. } from "@/api/maintain.js"
  39. export default {
  40. data: function() {
  41. return {
  42. baseImgUrl: "https://biaodianfuhao.oss-cn-beijing.aliyuncs.com/",
  43. dataList: [],
  44. pageNo: 1,
  45. pageSize: 20,
  46. }
  47. },
  48. onLoad() {
  49. this.getPage()
  50. },
  51. onReachBottom() {
  52. this.getPage()
  53. },
  54. methods: {
  55. getPage() {
  56. let that = this;
  57. getEvaluationList({
  58. pageNo: that.pageNo,
  59. pageSize: that.pageSize
  60. }).then((res) => {
  61. that.dataList = that.dataList.concat(res.data.rows)
  62. console.log(that.dataList);
  63. that.pageNo++
  64. })
  65. },
  66. toDetail(id) {
  67. this.$yrouter.push({
  68. path: "/pages/maintenance/evaluate/history/detail?id=" + id
  69. });
  70. }
  71. },
  72. }
  73. </script>
  74. <style lang="less">
  75. page {
  76. background: #F5F5F5;
  77. }
  78. .history {
  79. .history-card {
  80. width: 650rpx;
  81. background: #FFFFFF;
  82. border-radius: 10rpx;
  83. margin: 20rpx;
  84. padding: 30rpx;
  85. .header {
  86. display: flex;
  87. image {
  88. width: 130rpx;
  89. height: 130rpx;
  90. background: #FFFFFF;
  91. border: 2rpx solid #F4F4F4;
  92. border-radius: 10rpx;
  93. }
  94. .title {
  95. width: 455rpx;
  96. font-size: 32rpx;
  97. font-family: PingFang SC;
  98. font-weight: bold;
  99. color: #333333;
  100. line-height: 44rpx;
  101. padding-left: 32rpx;
  102. }
  103. }
  104. .content {
  105. height: 162rpx;
  106. background: #F5F5F5;
  107. border-radius: 10rpx;
  108. padding: 25rpx 51rpx 32rpx 29rpx;
  109. font-size: 26rpx;
  110. font-family: PingFang SC;
  111. font-weight: 500;
  112. color: #666666;
  113. line-height: 40rpx;
  114. margin-top: 18rpx;
  115. }
  116. .history-img {
  117. display: flex;
  118. overflow-y: auto;
  119. image {
  120. width: 116rpx;
  121. height: 116rpx;
  122. background: #F9A9A9;
  123. border-radius: 8rpx;
  124. margin: 18rpx 18rpx 0 0;
  125. }
  126. video {
  127. width: 116rpx;
  128. height: 116rpx;
  129. background: #F9A9A9;
  130. border-radius: 8rpx;
  131. margin: 18rpx 18rpx 0 0;
  132. }
  133. }
  134. .bottom {
  135. display: flex;
  136. justify-content: space-between;
  137. margin-top: 28rpx;
  138. .leftView {
  139. .history-type {
  140. font-size: 28rpx;
  141. font-family: PingFang SC;
  142. font-weight: 500;
  143. }
  144. .history-time {
  145. font-size: 26rpx;
  146. font-family: PingFang SC;
  147. font-weight: 500;
  148. color: #666666;
  149. line-height: 31rpx;
  150. }
  151. }
  152. .rightView {
  153. width: 180rpx;
  154. height: 64rpx;
  155. background: linear-gradient(0deg, #005AFF 0%, #0078FF 100%);
  156. border-radius: 32rpx;
  157. font-size: 28rpx;
  158. font-family: PingFang SC;
  159. font-weight: 500;
  160. color: #FFFFFF;
  161. line-height: 64rpx;
  162. text-align: center;
  163. }
  164. }
  165. }
  166. }
  167. </style>