<template>
	<div>
		<common @asynCallBack="asynCallBack"></common>
		<top-header :pageTitle="pageTitle"></top-header>

		<div class="mui-content vongi-qingjiadt">
			<div class="mui-content-padded">
				<h5>个人信息</h5>
			</div>
			<form class="mui-input-group">
				<div class="mui-input-row">
					<label>姓名</label>
					<span v-html="detail.name">王后雄</span>
				</div>
				<div class="mui-input-row">
					<label>手机号</label>
					<span v-html="detail.phone"> </span>
				</div>
				<div class="mui-input-row">
					<label>公司名称</label>
					<span v-html="detail.position1"></span>
				</div>
				<div class="mui-input-row">
					<label>所属部门</label>
					<span v-html="detail.position2"></span>
				</div>
				<div class="mui-input-row">
					<label>岗位</label>
					<span v-html="detail.position3"></span>
				</div>

			</form>
			<div class="mui-content-padded">
				<h5>健康状态</h5>
			</div>
			<form class="mui-input-group">
				<div class="mui-input-row">
					<label style="width:50%">自身健康情况</label>
					<span v-html="detail.personHealthLedger.healthStatusN" style="width:50%"> </span>
				</div>
				<div class="mui-input-row">
					<label>今日体温</label>
					<span v-html="detail.personHealthLedger.temperature+'°C'">36.3</span>
				</div>
				<div class="mui-input-row">
					<label>其他情况</label>
					<span v-html="detail.personHealthLedger.healthRemark">无</span>

				</div>
				<div class="mui-input-row">
					<label style="width:70%">家庭成员身体健康情况</label>
					<span v-html="detail.personHealthLedger.familyStatusN" style="width:30%">健康</span>
				</div>
				<div class="mui-input-row">
					<label style="width:50%">家庭成员健康码</label>
					<span class="vongi-yddk-dat-photo" style="width:50%">
						<div class="flew">
							<div class="mui-col-xs-3" v-for="(code,index) in detail.personHealthLedger.familyGreenCode.split(',')">
								<img v-if="code" :src="code+ '?x-oss-process=image/resize,m_fill,w_128,h_128'" width="100%" />
							</div>
						</div>
					</span>
				</div>
				<div class="mui-input-row">
					<label style="width:70%">假期是否曾前往重点疫区</label>
					<span style="width:30%"  v-html="detail.personHealthLedger.isGoto?'是':'否'">否</span>
				</div>
				<div class="mui-input-row">
					<label style="width:70%" >是否接触重点疫区高危人群</label>
					<span style="width:30%" v-html="detail.personHealthLedger.isTouch?'是':'否'">否</span>
				</div>
			</form>

		</div>
		<loading :visible="isLoading"></loading>

	</div>
</template>


<script>
	import * as API_Health from '@/apis/Master/health'
	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	import {
		currentTimeStamp,
		parseUnixTime
	} from '$project/utils'
	export default {
		name: 'MasterHealthWorkerInfo',
		components: {
			Common,
			Loading,
			TopHeader
		},
		data() {
			return {
				pageTitle: '职工台账详情',

				id: '',
				detail: {
					personHealthLedger: {
						healthStatusN: null,
						familyGreenCode: ""
					}
				},
				isLoading: false,
			}
		},
		created() {
			this.id = this.$route.query.id;
		},
		methods: {
			//获取详情
			getDetail() {
				this.isLoading = true;

				API_Health.getDetail(this.id, '3').then(response => {
					this.isLoading = false;

					this.detail = response;
				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {},
		},
		mounted() {
			this.getDetail();

		},


		destroyed() {

		},
		computed: {
			...mapGetters({
				openId: 'wx_openid',
				token: 'token',
				person_data: 'person_data',
				person_popedom: 'person_popedom',
			})
		}
	}
</script>

<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/iconfont.css"></style>
<style>
</style>
