<template>
	<view class="text-color-12 " style="position: relative;left: -15rpx;">
		<view class="content p-30 sys-background-fff r-30 identity">
			<view class="row-c">
				<view class="dot"></view>
				<text class="size-26 sys-weight-600 m-l10">基本信息</text>
			</view>
			<view class="sys-from-background-color r-30 p-20 m-t30 size-26">
				<view class="row-c">
					<view class="capsule sys-bg-BFD2CC" v-if="verifyKey('education_type')">{{business.education_name}}
					</view>
					<view class="capsule sys-bg-BFD2CC m-l10" v-if="verifyKey('employ_type')">
						{{business.employ_type===1?'受薪':'自雇'}}
					</view>
				</view>
				<view class="row-c m-t20" v-if="verifyKey('identity_one')">
					<EnImage :list="[business.identity_one,business.identity_two]"></EnImage>
				</view>
				<view class="row-c m-b20" v-if="verifyKey('id_number')">
					<image class="wh-30 m-r20" src="/page_task/static/img/task-details/number.png" mode="aspectFill">
					</image>
					<view class="row-c">
						<text class="text-color-666">证件号：</text>
						<text>{{business.id_number}}</text>
					</view>
				</view>
				<view class="row m-tb20" v-if="verifyKey('resident_city')">
					<view class="row line-30">
						<image class="wh-30 m-r20" src="/page_task/static/img/task-details/address.png"
							mode="aspectFill">
						</image>
						<text class="text-color-666">居住：</text>
					</view>
					<text class="flex line-30">{{business.resident_city}}{{business.resident_address}}</text>
				</view>
				<view class="row m-tb20" v-if="verifyKey('firm_name')">
					<view class="row line-30">
						<image class="wh-30 m-r20" src="/page_task/static/img/task-details/company.png"
							mode="aspectFill">
						</image>
						<text class="text-color-666">公司：</text>
					</view>
					<text class="flex line-30">{{business.firm_name}}</text>
				</view>
				<view class="row m-t20" v-if="verifyKey('firm_city')">
					<view class="row line-30">
						<image class="wh-30 m-r20" src="/page_task/static/img/task-details/address.png"
							mode="aspectFill">
						</image>
						<text class="text-color-666">地址：</text>
					</view>
					<text class="flex line-30">{{business.firm_city+business.firm_address}}</text>
				</view>
			</view>
			<view v-if="verifyKey('social_num') || verifyKey('reserved_money')">
				<view class="row-c m-t30">
					<view class="dot"></view>
					<text class="size-26 sys-weight-600 m-l10">社保信息</text>
				</view>
				<view class="sys-from-background-color r-30 p-20 m-t30 size-26">
					<view class="row-c">
						<image class="wh-30 m-r20" src="/page_task/static/img/task-details/safeguard.png"
							mode="aspectFill">
						</image>
						<text v-if="verifyKey('social_num')">{{business.social_num}}个月</text>
						<view v-if="verifyKey('social_num') && verifyKey('reserved_money')" class="line-box m-lr16">
						</view>
						<text v-if="verifyKey('reserved_money')">{{business.reserved_money}}元</text>
					</view>
				</view>
			</view>
			<view v-if="verifyKey('marriage_type')">
				<view class="row-c m-t30">
					<view class="dot"></view>
					<text class="size-26 sys-weight-600 m-l10">婚姻信息</text>
				</view>
				<view class="sys-from-background-color r-30 p-20 m-t30 size-26">
					<view class="size-24 text-color-333 m-b20" v-if="verifyKey('marriage_type')">
						{{business.marriage_name}}
					</view>
					<EnImage v-if="business.marriage_type>1" :list=" business.marriage_img"></EnImage>
					<view v-if="business.marriage_type===2">
						<view class="spouse p-l20">
							<text class="size-24">配偶信息</text>
						</view>
						<view class="row-c m-t20" v-if="verifyKey('m_identity_one')">
							<EnImage :list="[business.m_identity_one,business.m_identity_two]"></EnImage>
						</view>
						<view class="">
							<text class="size-26 sys-weight-600"
								v-if="verifyKey('mate_name')">{{business.mate_name}}</text>
							<view class="row-c m-t20" v-if="verifyKey('mate_phone')">
								<image class="wh-30 m-r20" src="/page_task/static/img/task-details/phone.png"
									mode="aspectFill">
								</image>
								<view class="row-c">
									<text class="text-color-666">电话：</text>
									<text>{{business.mate_phone}}</text>
								</view>
							</view>
							<view class="row-c m-t20" v-if="verifyKey('mate_id_number')">
								<image class="wh-30 m-r20" src="/page_task/static/img/task-details/number.png"
									mode="aspectFill">
								</image>
								<view class="row-c">
									<text class="text-color-666">证件号：</text>
									<text>{{business.mate_id_number}}</text>
								</view>
							</view>
							<view class="row-c m-tb20" v-if="verifyKey('mate_firm')">
								<image class="wh-30 m-r20" src="/page_task/static/img/task-details/company.png"
									mode="aspectFill">
								</image>
								<view class="row-c">
									<text class="text-color-666">公司：</text>
									<text>{{business.mate_firm}}</text>
								</view>
							</view>
						</view>
					</view>

				</view>

			</view>

			<view class="m-t30" v-if="linkmanKey.length>0">
				<view class="row-c p-b10">
					<view class="dot"></view>
					<text class="size-26 sys-weight-600 m-l10">其他联系人信息</text>
				</view>
				<view class="sys-from-background-color row-justify-sb center m-t20 r-20 p-20 line-30"
					v-for="(item,index) in linkman">
					<view class="row-c">
						<view class="num-item size-24">
							{{index+1}}
						</view>
						<text class="size-26 m-lr20 sys-weight-600" v-if="verifyKey('name',2)">{{item.name}}</text>
						<view class="capsule sys-bg-BFD2CC m-l10 siz-24" v-if="verifyKey('relation_name',2)">
							{{item.relation_name}}
						</view>
					</view>
					<view class="row-c" v-if="verifyKey('phone',2)">
						<image class="wh-30 m-r10" src="/page_task/static/img/task-details/phone.png" mode=""></image>
						<text class="size-26 text-color-333">{{item.phone}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import EnImage from "@/components/en-utils/en-image/en-image.vue"

	export default {
		props: {
			business: {
				default: {}
			},
			linkman: {
				default: []
			},
			clientKey: {
				default: []
			},
			linkmanKey: {
				default: []
			},
		},
		components: {
			EnImage
		},
		data() {
			return {}
		},
		methods: {
			verifyKey(key, type) {
				if (type !== 2) {
					return this.clientKey.indexOf(key) >= 0
				} else {
					return this.linkmanKey.indexOf(key) >= 0
				}

			}
		},
	}
</script>

<style lang="scss" scoped>
	.identity {
		padding-top: 90rpx;
		background-image: url('/page_task/static/img/task-details/bg-one.png');
		background-repeat: no-repeat;
		background-size: 100% auto;

		.bg-box {
			width: 710rpx;
			height: 80rpx;
		}

		.dot {
			width: 12rpx;
			height: 12rpx;
			border-radius: 50%;
			background: #0FB160;
		}

		.capsule {
			color: #00542A;
			width: 114rpx;
			height: 42rpx;
			line-height: 42rpx;
			border-radius: 99rpx;
			text-align: center;
			background: rgba(31, 190, 111, 0.1);
		}
	}

	.card {
		width: 160rpx;
		height: 90rpx;
		display: block;
	}

	.line-box {
		width: 2rpx;
		height: 26rpx;
		background: #121212;
	}

	.spouse {
		width: 345rpx;
		height: 48rpx;
		line-height: 48rpx;
		color: #003A1D;
		border-radius: 100rpx;
		background: linear-gradient(90deg, rgba(15, 177, 96, 0.2) 0%, rgba(15, 177, 96, 0) 61%);
	}

	.num-item {
		width: 30rpx;
		height: 30rpx;
		color: #fff;
		line-height: 30rpx;
		text-align: center;
		border-radius: 50%;
		background: #0FB160;
	}
</style>