<template>
	<div class="personnelInfo">
		<headNav
		@backPage="backPage"
		:title="'人员信息'"></headNav>
		
		<div class="info">
			<van-cell title="单位法人" :value="companyInfo.unitlegalPerson" />
			<van-cell title="联系方式" :value="companyInfo.principalPhone" />
		</div>
	</div>
</template>

<script>
	import headNav from '@/components/headNav.vue'
	import { get, post } from '@/utils/http.js'
	
	export default {
		name: 'personnelInfo',
		components: {
			headNav
		},
		data() {
			return {
				companyInfo: '',
			}
		},
		mounted() {
			this.init();
		},
		methods: {
			// 初始化
			init() {
				this.getCompanyInfoApi();
			},
			
			// 获取单位信息
			getCompanyInfoApi() {
				get(`/cdSuperObjE/get/${ this.$route.params.ID }`).then(res => {
					if (res.success == true) {
						this.companyInfo = res.data;
					}
				});
			},
			
			backPage() {
				this.$router.go(-1);
			},
		},
	}
</script>

<style lang="scss" scoped>
	.personnelInfo {
		font-size: 14px;
		
		.info {
			margin-top: 62px;
		}
	}
</style>

<style lang="scss">
	.personnelInfo {
		
		.van-cell {
			font-size: 12px;
			
			.van-cell__title {
				color: #4f4f4f;
			}
			
			&::after {
				border-bottom: 1px solid #f5f5f5;
			}
		}
	}
</style>
