<template>
	<view class="info_detail">
		<view class="info_item">
			<view class="basic_head">
				<view class="iconfont icon-arrows_right"></view>
				<view>基本信息</view>
			</view>
			<view class="basic_main">
				<view>头像</view>
				<view>
					<image :src="info.img ? info.img : BASE_IMG_URL+'headImg.png'" class="headerimg"  mode="scaleToFill"></image>
				</view>
			</view>
			<view class="basic_main">
				<view>姓名</view>
				<view>{{info.name}}</view>
			</view>
			<view class="basic_main">
				<view>性别</view>
				<view>{{info.sex == 1 ? '男' : '女'}}</view>
			</view>
			<view class="basic_main">
				<view>昵称</view>
				<view>{{info.nickname ? info.nickname : ''}}</view>
			</view>
			<view class="basic_main">
				<view>员工编号</view>
				<view>{{info.num ? info.num : ''}}</view>
			</view>
			<view class="basic_main">
				<view>角色</view>
				<view>{{info.role ? info.role : ''}}</view>
			</view>
			<view class="basic_main">
				<view>手机号</view>
				<view>{{info.mobile ? info.mobile : ''}}</view>
			</view>
			<view class="basic_main">
				<view>邮箱</view>
				<view>{{info.email ? info.email : ''}}</view>
			</view>
			<view class="basic_main">
				<view>岗位</view>
				<view>{{info.post ? info.post : ''}}</view>
			</view>
			<view class="basic_main">
				<view>上级</view>
				<view>{{info.parent_name ? info.parent_name : ''}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { BASE_IMG_URL } from '@/util/api.js'
	export default{
		props:{
			info:{
				type:Object,
				default:null
			}
		},
		data(){
			return{
				BASE_IMG_URL:BASE_IMG_URL,
			}
		}
	}
</script>

<style lang="scss" scoped>
	.info_detail {
		margin-bottom: 100rpx;
		.basic_head {
			display: flex;
			padding: 30rpx 24rpx 30rpx;
			:last-child {
				font-weight: 700;
				margin-left: 8rpx;
			}
		}
		.basic_main {
			display: flex;
			justify-content: space-between;
			background-color: #fff;
			line-height: 40rpx;
			border-bottom: 1rpx solid #EAEAEA;
			padding:20rpx 32rpx;
			:first-child {
				color: #999;
			}
			.headerimg{
				width:50rpx;
				height:50rpx;
				border-radius: 50%;
			}
		}
	}
</style>
