<template>
<view>
	<!-- 第一种样式  人员管理-->
	<block v-if="datainfo.length>0">
		<block v-if="type=='mycar'">
			<view class="carlist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.houseId)">
				<view class="carltop flexc">
					<view class="flex1">
						<view class="tit mb6" :class="ite.vehicleType==1?'co01':'co16'">{{ite.plateNumber}}</view>
						<view class="txt flexc">{{ite.plateNumber}}
							<view class="txtbtn flexcc">{{ite.vehicleType}}</view>
							<!-- <view class="txtbtn flexcc" v-if="ite.vehicleType==2">新能源</view> -->
						</view>
					</view>
					<image :src="cara" class="cara" v-if="ite.vehicleType==1"></image>
					<image :src="carb" class="carb" v-if="ite.vehicleType==2"></image>
				</view>
				<view class="carlf">
					<view class="clflist">发动机号码 ：{{ite.engineNumber}}</view>
					<view class="clflist">车辆识别代号：{{ite.identificationNumber}}</view>
					<view class="flexc">
						<view class="clflist w50">注册日期：{{ite.registrationDate}}</view>
						<view class="clflist w50">发证日期：{{ite.issueDate}}</view>
					</view>
				</view>
			</view>
		</block>
		<!-- 地址 -->
		<block v-if="type=='address'">
			<view class="adrlist flexc" :class="ite.isdefault?'act':''" v-for="(ite,idx) in datainfo" :key="idx">
				<view class="adrl flex1">
					<view class="tit mb5">安徽省 合肥市 蜀山区 高新技术产业开发区</view>
					<view class="txt mb5">幸福大街88号幸福小区12#1304</view>
					<view class="txts flexc">袁玥  <text class="ml8">18305687768</text>
						<text class="ml8 btns" v-if="ite.isdefault">默认</text>
						<text class="ml8 btns" v-if="ite.isuser">最近使用</text>
					</view>
				</view>
				<view class="adrr flexcc">
					<image :src="edit"></image>
				</view>
			</view>
		</block>
		<!-- 快递 -->
		<block v-if="type=='delivery'">
			<view class="kdlists flex" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
				<image :src="noiconpimg" class="kdll"></image>	
				<view class="kdlr over flex1">
					<view class="over tit">已发货</view>
					<view class="over tits">包裹正在等待揽收</view>
					<view class="over txt">淘宝 | 白色晚礼服平时可穿毕业洋装小白裙…</view>
				</view>
			</view>
		</block>
		<!-- 步骤条 -->
		<block v-if="type=='kdstep'">
			<view class="hfstep">
				<view class="hfslist flex">
					<view class="limg flexccc">
						<image :src="cira" class="imga"></image>
					</view>
					<view class="flex1">
						<view class="hfstit co01">运输中 11-25  12:24</view>
						<view class="hfstxt co27">【合肥市】快件已到达 合肥蜀山新产业园</view>
					</view>
				</view>
				<view class="hfslist flex">
					<view class="limg flexccc">
						<image :src="cirb" class="imgb"></image>
					</view>
					<view class="flex1">
						<view class="hfstit">11-25  07:23</view>
						<view class="hfstxt">【合肥市】快件已发往 合肥蜀山新产业园</view>
					</view>
				</view>
				<view class="hfslist flex">
					<view class="limg flexccc">
						<image :src="cirb" class="imgb"></image>
					</view>
					<view class="flex1">
						<view class="hfstit">11-25  07:20</view>
						<view class="hfstxt">【合肥市】快件已到达 合肥转运中心</view>
					</view>
				</view>
			</view>
		</block>
		<view class="shax" v-if="wtdt">{{wtdt}}</view>
	</block>
	<!-- 无数据 -->
	<view class="nodata" v-else>
		<image :src="noiconpimg"></image>
		<view>
			暂无数据
		</view>
	</view>
</view>
</template>

<script>
	import config from '@/config'
	export default{
		props:{
			datainfo: {
				type: Array,
				default () {
					return []
				}
			},
			wtdt:{
				type:String,
				default () {
					return ''
				}
			},
			type:{
				type:String,
				default () {
					return 0
				}
			},
		},
		data(){
			return{
				noiconpimg:require("@/static/images/nodata.png"),
				cara:require("@/mine/static/house/cara.png"),
				carb:require("@/mine/static/house/carb.png"),
				edit:require("@/mine/static/edit.png"),
				cira:require('@/news/static/complaint/cira.png'),
				cirb:require('@/news/static/complaint/cirb.png'),
				baseUrl:config.baseUrl,
				
			}
		},
		mounted() {
			
		},
		methods:{
			getDetail(e){
				this.$emit('getDetail',e)
			},
			getPreview(idx,arr) {
				var newArr=[];
				arr.forEach(ite=>{
					var ds=this.baseUrl+ite
					newArr.push(ds)
				})
				uni.previewImage({
					urls: newArr,
					current:idx,
					success: function(data) {},
					fail: function(err) {}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
.flex{display: flex;}
.flexc{display: flex;align-items: center;}
.mb10{margin-bottom: 20rpx;}
.carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 0 24rpx;
	.carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
		.tit{font-weight: bold;font-size: 32rpx;}
		.txt{font-weight: 500;font-size: 26rpx;color: #272727;}
		.txtbtn{min-width: 82rpx;
height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
		.cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
		.carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
	}
	.carlf{padding:26rpx 0 10rpx;
		.clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
	}
}
// 收货地址
.adrlist{border-bottom: 2rpx solid  #E5E5E5;padding: 34rpx 0 34rpx 8rpx;
	.tit{font-weight: 500;font-size: 22rpx;color: #666666;}
	.txt{font-size: 28rpx;color: #272727;font-weight: bold;}
	.txts{font-weight: 500;font-size: 26rpx;color: #272727;}
	.btns{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 2rpx 14rpx;display:inline-block;background: #C9DBFF;
border-radius: 10rpx;}
	.adrr{width: 40rpx;height: 40rpx;flex: 0 0 auto;margin-left: 12rpx;
		image{width: 22rpx;height: 22rpx;}
	}
	&.act{
		.tit{color: #0256FD;}
		.txt{color: #0256FD;}
		.txts{color: #0256FD;}
	}
}
// 快递
.kdlists{padding: 24rpx 26rpx;background-color: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
	.kdll{width: 140rpx;height: 140rpx;border-radius: 10rpx;margin-right: 32rpx;flex: 0 0 auto;}
	.kdlr{
		.tit{font-size: 30rpx;color: #272727;font-weight: bold;margin-bottom: 18rpx;margin-top: 4rpx;}
		.tits{font-size: 24rpx;color: #272727;font-weight: 500;margin-bottom: 14rpx;}
		.txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
	}
}
// 快递步骤条
.hfstep{padding: 0 32rpx 44rpx 32rpx;
	.hfslist{padding-bottom: 44rpx;position: relative;
		&::before{content: '';position: absolute;left: 14rpx;top:14rpx;height: 100%;width: 2rpx;background: #E6E6E6;}
		.limg{width: 30rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;margin-top:3rpx;
			.imga{width: 30rpx;height: 30rpx;}
			.imgb{width: 18rpx;height: 18rpx;}
		}
		.hfstit{font-weight: bold;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
		.hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;padding-left: 8rpx;}
	}
}
// 无数据
.nodata{display: flex;flex-direction: column;align-items: center;
	image{width: 440rpx;height: 440rpx;}
	view{font-size: 30rpx;color: #666666;font-weight: bold;}
}
</style>