index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="container">
  3. <uni-navbar title="车辆审批"></uni-navbar>
  4. <view class="box">
  5. <view class="commonMb commonMt">
  6. <view class="car-content" v-for="item in carList" :key="item.id">
  7. <view class="car-info commonBj">
  8. <view class="person-top">
  9. <view class="imgName">
  10. <image style="width: 60rpx;height: 60rpx;" src="../../static/images/city/gongsi.png"
  11. mode="widthFix"></image>
  12. <text>{{item.companyName}}</text>
  13. </view>
  14. <view class="shenpiButton" @tap="gotoCar(item.id)">
  15. 审 批
  16. </view>
  17. </view>
  18. <view class="person-bottom" style="margin-top: 38rpx;">
  19. <view class="carinfo-bottom listText">
  20. <image style="width: 22rpx;height: 22rpx;" src="../../static/images/car/lb_01.png"
  21. mode="widthFix"></image>
  22. <text class="width100">车牌号: {{item.carNumber}}</text>
  23. </view>
  24. <view class="carinfo-bottom listText" style="margin-left: 60rpx;">
  25. <image style="width: 22rpx;height: 22rpx;" src="../../static/images/car/lb_01.png"
  26. mode="widthFix"></image>
  27. <text>车&nbsp;&nbsp;&nbsp;型: {{item.carType}}</text>
  28. </view>
  29. </view>
  30. <view class="person-bottom" style="margin-top: 0rpx;">
  31. <view class="carinfo-bottom listText">
  32. <image style="width: 22rpx;height: 22rpx;" src="../../static/images/car/lb_03.png"
  33. mode="widthFix"></image>
  34. <text class="width100">载重量: {{item.carCarry}}</text>
  35. </view>
  36. <view class="carinfo-bottom listText" style="margin-left: 60rpx;">
  37. <image style="width: 22rpx;height: 22rpx;" src="../../static/images/car/lb_02.png"
  38. mode="widthFix"></image>
  39. <text>车&nbsp;&nbsp;&nbsp;系: {{item.carSeries}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script>
  49. import {
  50. carList
  51. } from "@/api/city/car.js"
  52. export default {
  53. data() {
  54. return {
  55. carList: []
  56. }
  57. },
  58. methods: {
  59. async getCarList() {
  60. const res = await carList()
  61. console.log('车辆列表', res);
  62. this.carList = res.rows.filter(item => {
  63. return item.auditType === 0
  64. })
  65. console.log(this.carList);
  66. },
  67. gotoCar(id) {
  68. this.$tab.navigateTo(`/pages/cityCarDetail/index?id=${id}`)
  69. }
  70. },
  71. onShow() {
  72. this.getCarList()
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .width100 {
  78. width: 228rpx;
  79. }
  80. .person-bottom {
  81. display: flex;
  82. justify-content: start;
  83. align-items: center;
  84. flex-wrap: wrap;
  85. }
  86. .person-top {
  87. display: flex;
  88. align-items: center;
  89. justify-content: space-between;
  90. uni-text {
  91. font-size: 28rpx;
  92. font-weight: bold;
  93. color: #333333;
  94. margin-left: 25rpx;
  95. }
  96. }
  97. .imgName {
  98. display: flex;
  99. align-items: center;
  100. }
  101. .shenpiButton {
  102. width: 103rpx;
  103. height: 45rpx;
  104. background: linear-gradient(90deg, #FF2D04 0%, #FFA53E 100%);
  105. box-shadow: 0px 2rpx 13rpx 0px rgba(27, 43, 95, 0.25);
  106. border-radius: 23rpx;
  107. font-size: 26rpx;
  108. font-weight: bold;
  109. color: #FFFFFF;
  110. text-align: center;
  111. line-height: 45rpx;
  112. }
  113. .car-content {
  114. display: flex;
  115. flex-direction: column;
  116. margin-top: 20rpx;
  117. margin-bottom: 30rpx;
  118. }
  119. .car-info {
  120. padding: 18rpx 30rpx;
  121. box-sizing: border-box;
  122. // margin-top: 24rpx;
  123. .carInfo-top {
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. // margin-bottom: 17rpx;
  128. .top-left {
  129. display: flex;
  130. align-items: center;
  131. uni-text {
  132. font-size: 28rpx;
  133. font-weight: bold;
  134. color: #333333;
  135. margin-left: 25rpx;
  136. }
  137. }
  138. .top-right {
  139. display: flex;
  140. align-items: center;
  141. uni-text {
  142. // font-size: 24rpx;
  143. // font-weight: 400;
  144. // color: #485B93;
  145. margin-left: 19rpx;
  146. }
  147. }
  148. }
  149. }
  150. .car-info:nth-child(1) {
  151. margin-top: 0rpx !important;
  152. }
  153. .carinfo-bottom::before {
  154. content: '';
  155. display: table;
  156. }
  157. .carinfo-bottom {
  158. display: flex;
  159. align-items: center;
  160. margin-bottom: 14rpx;
  161. uni-text {
  162. margin-left: 19rpx;
  163. }
  164. }
  165. </style>