混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.0 KiB

1 week ago
  1. <template>
  2. <view class="content">
  3. <view class="mt40">
  4. <view class="re-card-p32" v-for="(ele,idx) in cars">
  5. <view class="re-empty" v-if="cars.length<1">
  6. <view>暂无数据</view>
  7. </view>
  8. <view class="flex-sb">
  9. <view>
  10. <image class="re-from-car" src="/static/icons/icon11.png"></image>
  11. <span>{{ele.carNo}}</span>
  12. </view>
  13. <view class="re-card-show" v-if="ele.status && +ele.status===0">
  14. <span style="color: limegreen;">系统审核中</span>
  15. </view>
  16. <view class="re-card-show" v-if="ele.status && +ele.status===2">
  17. <span style="color: #F40000;">未通过审核</span>
  18. </view>
  19. </view>
  20. <view class="flex-sb re-card-select mt20">
  21. <view>种类</view>
  22. <view class="flex" style="color: #9E9E9E;">
  23. <span v-if="!ele.type">请选择</span>
  24. <view style="color: #0d0d0d;" v-if="ele.type">{{ ele.type }}</view>
  25. <uni-icons v-if="!ele.type" type="down" size="28rpx" color="#9E9E9E"></uni-icons>
  26. </view>
  27. </view>
  28. <view class="flex-sb re-card-select">
  29. <view>轴数</view>
  30. <view class="flex" style="color: #9E9E9E;">
  31. <span v-if="!ele.mi">请选择</span>
  32. <view style="color: #0d0d0d;" v-if="ele.mi">{{ ele.mi }}</view>
  33. <uni-icons v-if="!ele.mi" type="down" size="28rpx" color="#9E9E9E"></uni-icons>
  34. </view>
  35. </view>
  36. <view class="flex-sb re-card-select">
  37. <view>上传证件</view>
  38. <view class="flex" style="color: #9E9E9E;" v-if="!ele.syximage" >
  39. <span>未上传</span>
  40. <uni-icons type="right" size="28rpx" color="#9E9E9E"></uni-icons>
  41. </view>
  42. <view class="flex" style="color: #0d0d0d;" v-if="ele.syximage" @click="clickCar(ele.id)">
  43. <span>查看证件信息</span>
  44. <uni-icons type="right" size="28rpx" color="#2d2d2d"></uni-icons>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="re-end-pand b-fiexd">
  49. <button @click="clickA()">新增设备</button>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. //cars: [{carNo: '湘·MUZ887', mi: '56米', info: {}, status: "0"},{carNo: '湘·MUZ888', mi: '42米', info: {}},{carNo: '湘·MUZ889', mi: '52米', info: {}, status: "2"}]
  59. cars: []
  60. }
  61. },
  62. onShow() {
  63. this.loadCars()
  64. },
  65. methods: {
  66. clickA(){
  67. uni.navigateTo({ url: `/pages/staff/car`})
  68. },
  69. clickCar(id){
  70. uni.navigateTo({ url: `/pages/base/showcar?id=${id}`})
  71. },
  72. loadCars(){
  73. this.$httpGet("/api/car/list", {enter_id: uni.getStorageSync("enter_id")}, (res) => {
  74. console.log('[/car/list]', res);
  75. if(res.data){
  76. this.cars = this.$utils.toArray(res.data)
  77. }
  78. })
  79. },
  80. }
  81. }
  82. </script>
  83. <style>
  84. page {
  85. background-color: #F5F5F5;
  86. }
  87. .re-from-car{
  88. width: 72rpx;
  89. height: 60rpx;
  90. margin: 0 16rpx -20rpx 0;
  91. }
  92. .b-fiexd{
  93. min-height: 88rpx;
  94. width: calc(100vw);
  95. padding: 30rpx 0;
  96. position: fixed;
  97. left: 0;
  98. bottom: 0;
  99. box-shadow: -20rpx 10rpx 10rpx #000;
  100. background-color: #ffffff;
  101. }
  102. </style>