list.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <block v-if="type=='car'">
  6. <view class="carlist" v-for="(ite,idx) in datainfo" :key="idx">
  7. <view class="ctop flexc">
  8. <image :src="cara" class="imgs" v-if="ite.type==1"></image>
  9. <image :src="carb" class="imgs" v-if="ite.type==2"></image>
  10. <view class="tit">皖A IC520</view>
  11. <view class="btn btna">新能源</view>
  12. <view class="btn btnb">小型车</view>
  13. <view class="flex1"></view>
  14. <view class="txt ca" v-if="ite.type==1">小区车辆</view>
  15. <view class="txt cb" v-if="ite.type==2">外来车辆</view>
  16. </view>
  17. <view class="clists">
  18. <view class="clist"><view class="tit">车库名称</view>地下停车场</view>
  19. <view class="clist"><view class="tit">进入时间</view>2024-11-27 16:27:48</view>
  20. <block v-if="topval=='sl'">
  21. <view class="clist"><view class="tit">驶离时间</view>2024-11-27 16:27:48</view>
  22. <view class="clist"><view class="tit">停车时长</view>3小时19分钟</view>
  23. </block>
  24. <view class="clist"><view class="tit">{{ite.type==1?'门户号 ':'来访门户'}}</view>8#303</view>
  25. <view class="clist"><view class="tit">手机号码</view>13656788668</view>
  26. </view>
  27. </view>
  28. </block>
  29. <block v-if="type=='carpark'">
  30. <view class="carlist" v-for="(ite,idx) in datainfo" :key="idx">
  31. <view class="ctop flexc">
  32. <image :src="cara" class="imgs" v-if="ite.type==1"></image>
  33. <image :src="carb" class="imgs" v-if="ite.type==2"></image>
  34. <view class="tit">皖A IC520</view>
  35. <view class="num" :class="ite.heiflag?'coff':''">(本年度2次)</view>
  36. <view class="flex1"></view>
  37. <view class="txt ca" v-if="ite.type==1">小区车辆</view>
  38. <view class="txt cb" v-if="ite.type==2">外来车辆</view>
  39. </view>
  40. <view class="clists">
  41. <view class="clist"><view class="tit">关联房号</view>12#1403</view>
  42. <view class="clist"><view class="tit">手机号码</view>13656788668</view>
  43. <view class="clist"><view class="tit">登记时间</view>2024-11-27 17:30:55</view>
  44. <view class="clist"><view class="tit">违停拍照</view>
  45. <view class="imgas">
  46. <image :src="cara" @click="getPreview(idx,cara)"></image>
  47. <image :src="cara"></image>
  48. <image :src="cara"></image>
  49. <image :src="cara"></image>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </block>
  55. <view class="shax">{{wtdt}}</view>
  56. </block>
  57. <!-- 无数据 -->
  58. <view class="nodata" v-else>
  59. <image :src="noiconpimg"></image>
  60. <view>
  61. 暂无数据
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import config from '@/config'
  68. export default{
  69. props:{
  70. datainfo: {
  71. type: Array,
  72. default () {
  73. return []
  74. }
  75. },
  76. wtdt:{
  77. type:String,
  78. default () {
  79. return ''
  80. }
  81. },
  82. type:{
  83. type:String,
  84. default () {
  85. return 0
  86. }
  87. },
  88. topval:{
  89. type:String,
  90. default () {
  91. return ''
  92. }
  93. }
  94. },
  95. data(){
  96. return{
  97. noiconpimg:require("@/work/static/nodata.png"),
  98. car:require("@/work/static/car/car.png"),
  99. cara:require("@/work/static/car/cara.png"),
  100. carb:require("@/work/static/car/carb.png"),
  101. baseUrl:config.baseUrl,
  102. }
  103. },
  104. mounted() {
  105. },
  106. methods:{
  107. getDetail(e){
  108. this.$emit('getdetail',e)
  109. },
  110. getPreview(idx,arr) {
  111. var newArr=[];
  112. arr.forEach(ite=>{
  113. var ds=this.baseUrl+ite
  114. newArr.push(ds)
  115. })
  116. uni.previewImage({
  117. urls: newArr,
  118. current:idx,
  119. success: function(data) {},
  120. fail: function(err) {}
  121. });
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .flex{display: flex;}
  128. .flexc{display: flex;align-items: center;}
  129. .mb10{margin-bottom: 20rpx;}
  130. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  131. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  132. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  133. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  134. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  135. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  136. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  137. }
  138. .txt{font-weight: 500;font-size: 26rpx;
  139. &.ca{color: #3565ED;}
  140. &.cb{color: #FE5A0E;}
  141. }
  142. .num{font-size: 24rpx;color: #AAAAAA;}
  143. }
  144. .clists{padding: 24rpx 24rpx 8rpx;
  145. .clist{font-weight: 500;margin-bottom: 16rpx;
  146. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  147. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  148. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  149. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  150. }
  151. }
  152. }
  153. }
  154. // 无数据
  155. .nodata{display: flex;flex-direction: column;align-items: center;
  156. image{width: 440rpx;height: 440rpx;}
  157. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  158. }
  159. </style>