list.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <block v-if="type=='mycar'">
  6. <view class="carlist" v-for="(ite,idx) in datainfo" :key="idx">
  7. <view class="carltop flexc">
  8. <view class="flex1">
  9. <view class="tit mb6" :class="ite.type==1?'co01':'co16'">皖A 86KY2·白</view>
  10. <view class="txt flexc">奔驰·E300L
  11. <view class="txtbtn flexcc" v-if="ite.type==2">新能源</view>
  12. </view>
  13. </view>
  14. <image :src="cara" class="cara" v-if="ite.type==1"></image>
  15. <image :src="carb" class="carb" v-if="ite.type==2"></image>
  16. </view>
  17. <view class="carlf">
  18. <view class="clflist">发动机号码 :916509</view>
  19. <view class="clflist">车辆识别代号:LFV2A21K7D4044585</view>
  20. <view class="flexc">
  21. <view class="clflist w50">注册日期:2015-03-18</view>
  22. <view class="clflist w50">发证日期:2015-03-18</view>
  23. </view>
  24. </view>
  25. </view>
  26. </block>
  27. <!-- 地址 -->
  28. <block v-if="type=='address'">
  29. <view class="adrlist flexc" :class="ite.isdefault?'act':''" v-for="(ite,idx) in datainfo" :key="idx">
  30. <view class="adrl flex1">
  31. <view class="tit mb5">安徽省 合肥市 蜀山区 高新技术产业开发区</view>
  32. <view class="txt mb5">幸福大街88号幸福小区12#1304</view>
  33. <view class="txts flexc">袁玥 <text class="ml8">18305687768</text>
  34. <text class="ml8 btns" v-if="ite.isdefault">默认</text>
  35. <text class="ml8 btns" v-if="ite.isuser">最近使用</text>
  36. </view>
  37. </view>
  38. <view class="adrr flexcc">
  39. <image :src="edit"></image>
  40. </view>
  41. </view>
  42. </block>
  43. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  44. </block>
  45. <!-- 无数据 -->
  46. <view class="nodata" v-else>
  47. <image :src="noiconpimg"></image>
  48. <view>
  49. 暂无数据
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import config from '@/config'
  56. export default{
  57. props:{
  58. datainfo: {
  59. type: Array,
  60. default () {
  61. return []
  62. }
  63. },
  64. wtdt:{
  65. type:String,
  66. default () {
  67. return ''
  68. }
  69. },
  70. type:{
  71. type:String,
  72. default () {
  73. return 0
  74. }
  75. },
  76. topval:{
  77. type:String,
  78. default () {
  79. return ''
  80. }
  81. }
  82. },
  83. data(){
  84. return{
  85. noiconpimg:require("@/mine/static/nodata.png"),
  86. cara:require("@/mine/static/house/cara.png"),
  87. carb:require("@/mine/static/house/carb.png"),
  88. edit:require("@/mine/static/edit.png"),
  89. baseUrl:config.baseUrl,
  90. }
  91. },
  92. mounted() {
  93. },
  94. methods:{
  95. getDetail(e){
  96. this.$emit('getdetail',e)
  97. },
  98. getPreview(idx,arr) {
  99. var newArr=[];
  100. arr.forEach(ite=>{
  101. var ds=this.baseUrl+ite
  102. newArr.push(ds)
  103. })
  104. uni.previewImage({
  105. urls: newArr,
  106. current:idx,
  107. success: function(data) {},
  108. fail: function(err) {}
  109. });
  110. },
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .flex{display: flex;}
  116. .flexc{display: flex;align-items: center;}
  117. .mb10{margin-bottom: 20rpx;}
  118. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 0 24rpx;
  119. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  120. .tit{font-weight: bold;font-size: 32rpx;}
  121. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  122. .txtbtn{min-width: 82rpx;
  123. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  124. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  125. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  126. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  127. }
  128. .carlf{padding:26rpx 0 10rpx;
  129. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  130. }
  131. }
  132. // 收货地址
  133. .adrlist{border-bottom: 2rpx solid #E5E5E5;padding: 34rpx 0 34rpx 8rpx;
  134. .tit{font-weight: 500;font-size: 22rpx;color: #666666;}
  135. .txt{font-size: 28rpx;color: #272727;font-weight: bold;}
  136. .txts{font-weight: 500;font-size: 26rpx;color: #272727;}
  137. .btns{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 2rpx 14rpx;display:inline-block;background: #C9DBFF;
  138. border-radius: 10rpx;}
  139. .adrr{width: 40rpx;height: 40rpx;flex: 0 0 auto;margin-left: 12rpx;
  140. image{width: 22rpx;height: 22rpx;}
  141. }
  142. &.act{
  143. .tit{color: #0256FD;}
  144. .txt{color: #0256FD;}
  145. .txts{color: #0256FD;}
  146. }
  147. }
  148. // 无数据
  149. .nodata{display: flex;flex-direction: column;align-items: center;
  150. image{width: 440rpx;height: 440rpx;}
  151. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  152. }
  153. </style>