<template>
	<view class="jiazheng-uni-list">
		<view class="icon-title-navBar-box">
			<view @click="goUpPage" class="nav-bar-icon"></view>
			<text class="nav-bar-title">家政人员信息</text>
		</view>
		<view>
			<img style="width: 100rpx;height: 100rpx;" :src="jianliInfo.icon" alt="" />
			<view>{{jianliInfo.zhuangtai}}</view>
			<view>
				<p>{{jianliInfo.realName}}</p>
				<p>{{jianliInfo.nianling}}岁|{{jianliInfo.jiguan}}人</p>
			</view>
		</view>

		<view>
			类型：{{jianliInfo.leixing}}
		</view>
		<view>
			<view>
				<h1>基本信息</h1>
				<view>
					学历:{{jianliInfo.xieli}}
				</view>
				<view>
					民族:{{jianliInfo.minzu}}
				</view>
				<view>
					属相:{{jianliInfo.shuxiang}}
				</view>
				<view>
					星座:{{jianliInfo.xingzuo}}
				</view>
				<view>
					性别:{{jianliInfo.gender}}
				</view>
				<view>
					婚姻状况:{{jianliInfo.hunyin}}
				</view>
				<view>
					现住地址:{{jianliInfo.juzhuDizhi}}
				</view>
				<view>
					家政公司:{{jianliInfo.jzName}}
				</view>
				<view>
				{{jianliInfo.tips}}
				</view>
			</view>
		</view>

	</view>
	<view>
		<view @click="goJiazhengManage">
			资料编辑
		</view>
		<view>
			资料编辑2
		</view>
	</view>
</template>
<script>
	import {
		ref
	} from "vue";
	import {
		getJiazhengJianli
	} from "@/api/jiazheng.js";
	export default {
		data() {
			return {
				pageInfo: {},
				jianliInfo:{}
			}
		},
		components: {

		},
		onLoad(options) {
			let data = JSON.parse(options.pageInfo)
			this.pageInfo.status = data.status
			this.pageInfo.id = data.id
			this.pageInfo.userId = data.userId
			this.getJianliInfo()
		},
		methods: {
			getJianliInfo() {
				let req = {
					id: this.pageInfo.id
				}
				getJiazhengJianli(req).then(res => {
					console.log('res', res);
					if(res.code ==0){
						this.jianliInfo = { ...res.data };
					}
				})
			},
			goJiazhengManage() {
				let pageInfo = {
					status: 'edit',
					id: this.pageInfo.id,
					userId: this.pageInfo.userId
				}
				uni.redirectTo({
					url: "/pages/admin/Jiazheng/jiazhengUserManager?pageInfo=" + JSON.stringify(pageInfo)
				})
			},
			goUpPage() {
				uni.redirectTo({
					url: "/pages/admin/ShouYe/shouye"
				})
			},

		}
	}
</script>



<style>
	.jiazheng-uni-list {
		display: flex;
		width: 100%;
		flex-direction: column;
	}

	.jiazheng-uni-list-left {
		position: relative;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
</style>