list.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. <!-- 快递 -->
  44. <block v-if="type=='delivery'">
  45. <view class="kdlists flex" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  46. <image :src="noiconpimg" class="kdll"></image>
  47. <view class="kdlr over flex1">
  48. <view class="over tit">已发货</view>
  49. <view class="over tits">包裹正在等待揽收</view>
  50. <view class="over txt">淘宝 | 白色晚礼服平时可穿毕业洋装小白裙…</view>
  51. </view>
  52. </view>
  53. </block>
  54. <!-- 步骤条 -->
  55. <block v-if="type=='kdstep'">
  56. <view class="hfstep">
  57. <view class="hfslist flex">
  58. <view class="limg flexccc">
  59. <image :src="cira" class="imga"></image>
  60. </view>
  61. <view class="flex1">
  62. <view class="hfstit co01">运输中 11-25 12:24</view>
  63. <view class="hfstxt co27">【合肥市】快件已到达 合肥蜀山新产业园</view>
  64. </view>
  65. </view>
  66. <view class="hfslist flex">
  67. <view class="limg flexccc">
  68. <image :src="cirb" class="imgb"></image>
  69. </view>
  70. <view class="flex1">
  71. <view class="hfstit">11-25 07:23</view>
  72. <view class="hfstxt">【合肥市】快件已发往 合肥蜀山新产业园</view>
  73. </view>
  74. </view>
  75. <view class="hfslist flex">
  76. <view class="limg flexccc">
  77. <image :src="cirb" class="imgb"></image>
  78. </view>
  79. <view class="flex1">
  80. <view class="hfstit">11-25 07:20</view>
  81. <view class="hfstxt">【合肥市】快件已到达 合肥转运中心</view>
  82. </view>
  83. </view>
  84. </view>
  85. </block>
  86. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  87. </block>
  88. <!-- 无数据 -->
  89. <view class="nodata" v-else>
  90. <image :src="noiconpimg"></image>
  91. <view>
  92. 暂无数据
  93. </view>
  94. </view>
  95. </view>
  96. </template>
  97. <script>
  98. import config from '@/config'
  99. export default{
  100. props:{
  101. datainfo: {
  102. type: Array,
  103. default () {
  104. return []
  105. }
  106. },
  107. wtdt:{
  108. type:String,
  109. default () {
  110. return ''
  111. }
  112. },
  113. type:{
  114. type:String,
  115. default () {
  116. return 0
  117. }
  118. },
  119. },
  120. data(){
  121. return{
  122. noiconpimg:require("@/static/images/nodata.png"),
  123. cara:require("@/mine/static/house/cara.png"),
  124. carb:require("@/mine/static/house/carb.png"),
  125. edit:require("@/mine/static/edit.png"),
  126. cira:require('@/news/static/complaint/cira.png'),
  127. cirb:require('@/news/static/complaint/cirb.png'),
  128. baseUrl:config.baseUrl,
  129. }
  130. },
  131. mounted() {
  132. },
  133. methods:{
  134. getDetail(e){
  135. this.$emit('getDetail',e)
  136. },
  137. getPreview(idx,arr) {
  138. var newArr=[];
  139. arr.forEach(ite=>{
  140. var ds=this.baseUrl+ite
  141. newArr.push(ds)
  142. })
  143. uni.previewImage({
  144. urls: newArr,
  145. current:idx,
  146. success: function(data) {},
  147. fail: function(err) {}
  148. });
  149. },
  150. }
  151. }
  152. </script>
  153. <style lang="scss" scoped>
  154. .flex{display: flex;}
  155. .flexc{display: flex;align-items: center;}
  156. .mb10{margin-bottom: 20rpx;}
  157. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 0 24rpx;
  158. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  159. .tit{font-weight: bold;font-size: 32rpx;}
  160. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  161. .txtbtn{min-width: 82rpx;
  162. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  163. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  164. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  165. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  166. }
  167. .carlf{padding:26rpx 0 10rpx;
  168. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  169. }
  170. }
  171. // 收货地址
  172. .adrlist{border-bottom: 2rpx solid #E5E5E5;padding: 34rpx 0 34rpx 8rpx;
  173. .tit{font-weight: 500;font-size: 22rpx;color: #666666;}
  174. .txt{font-size: 28rpx;color: #272727;font-weight: bold;}
  175. .txts{font-weight: 500;font-size: 26rpx;color: #272727;}
  176. .btns{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 2rpx 14rpx;display:inline-block;background: #C9DBFF;
  177. border-radius: 10rpx;}
  178. .adrr{width: 40rpx;height: 40rpx;flex: 0 0 auto;margin-left: 12rpx;
  179. image{width: 22rpx;height: 22rpx;}
  180. }
  181. &.act{
  182. .tit{color: #0256FD;}
  183. .txt{color: #0256FD;}
  184. .txts{color: #0256FD;}
  185. }
  186. }
  187. // 快递
  188. .kdlists{padding: 24rpx 26rpx;background-color: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  189. .kdll{width: 140rpx;height: 140rpx;border-radius: 10rpx;margin-right: 32rpx;flex: 0 0 auto;}
  190. .kdlr{
  191. .tit{font-size: 30rpx;color: #272727;font-weight: bold;margin-bottom: 18rpx;margin-top: 4rpx;}
  192. .tits{font-size: 24rpx;color: #272727;font-weight: 500;margin-bottom: 14rpx;}
  193. .txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  194. }
  195. }
  196. // 快递步骤条
  197. .hfstep{padding: 0 32rpx 44rpx 32rpx;
  198. .hfslist{padding-bottom: 44rpx;position: relative;
  199. &::before{content: '';position: absolute;left: 14rpx;top:14rpx;height: 100%;width: 2rpx;background: #E6E6E6;}
  200. .limg{width: 30rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;margin-top:3rpx;
  201. .imga{width: 30rpx;height: 30rpx;}
  202. .imgb{width: 18rpx;height: 18rpx;}
  203. }
  204. .hfstit{font-weight: bold;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
  205. .hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;padding-left: 8rpx;}
  206. }
  207. }
  208. // 无数据
  209. .nodata{display: flex;flex-direction: column;align-items: center;
  210. image{width: 440rpx;height: 440rpx;}
  211. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  212. }
  213. </style>