<template>
	<view class="page">
		<view class="achievementInfo">
			<view class="infoTitle d-flex a-center">业绩信息</view>
			<view class="achievementStatistics d-flex">
				<view class="achievementStatistics_item d-flex flex-1 flex-column">
					<view class="d-flex a-center j-center">签单保费</view>
					<view class="d-flex a-center j-center">0</view>
				</view>
				<view class="achievementStatistics_item d-flex flex-1 flex-column">
					<view class="d-flex a-center j-center">出单人力</view>
					<view class="d-flex a-center j-center">0</view>
				</view>
				<view class="achievementStatistics_item d-flex flex-1 flex-column">
					<view class="d-flex a-center j-center">平均保费</view>
					<view class="d-flex a-center j-center">0</view>
				</view>
			</view>
			<view class="achievementAssessment d-flex">
				<view class="achievementAssessment_item d-flex a-center j-center flex-1">
					<view>机制考核</view><br />
					<view>守维持</view>
				</view>
				<view class="achievementAssessment_item d-flex flex-1 flex-column">
					<view>差距：3000 (标保)</view>
					<view>差距： (出单人力)</view>
					<view>差距： (继续率)</view>
				</view>
			</view>
		</view>
		<!-- <view class="teamInfo">
			<view class="teamInfo_item d-flex a-center j-sb" hover-class="teamInfo-list-hover">
				<view class="d-flex a-center">团队信息</view>
				<view class="icon iconfont icon-youjiantou" @tap="toTeam"></view>
			</view>
		</view> -->
		<view class="personInfo">
			<view class="infoTitle d-flex a-center">个人信息</view>
			<view class="personInfo_item d-flex a-center j-sb">
				<view class="d-flex a-center">姓名</view>
				<view>{{this.userInfo.sysUser.name}}</view>
			</view>
			<view class="personInfo_item d-flex a-center j-sb">
				<view class="d-flex a-center">会员号</view>
				<view>{{this.userInfo.sysUser.id}}</view>
			</view>
			<view class="personInfo_item d-flex a-center j-sb">
				<view class="d-flex a-center">手机</view>
				<view @tap="callPhone(this.userInfo.sysUser.mobile)" style="color: #007AFF;">
					{{this.userInfo.sysUser.mobile?(this.userInfo.sysUser.mobile.substring(0,3)+'****'+this.userInfo.sysUser.mobile.substring(7)):''}}
				</view>
			</view>
			<view class="personInfo_item d-flex a-center j-sb">
				<view class="d-flex a-center">注册时间</view>
				<view>{{this.userInfo.sysUser.createTime}}</view>
			</view>

		</view>


	</view>
</template>

<script>
	import {
		mapState
	} from "vuex";
	export default {
		data() {
			return {

			}
		},
		computed: {
			...mapState(['userInfo']),
			getHeight() {
				let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(770);
				return `height: ${height}px;`;
			}
		},
		// 监听导航栏的按钮
		onNavigationBarButtonTap(e) {
			if (e.index == 0) {
				this.navigate({
					url: '/pages/index/index'
				}, "switchTab", true);
			}
		},
		onLoad() {
			const eventChannel = this.getOpenerEventChannel()
			// 监听acceptData事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('acceptData', (data) => {})
		},
		methods: {
			callPhone(tel) {
				uni.makePhoneCall({
					phoneNumber: tel,
					success: () => {
						console.log("成功拨打电话")
					}
				})
			},
			// toTeam() {
			// 	this.navigate({
			// 		url: '/pages/tools/team/team?id=' + this.staffInfo.sysUser.id + '&name=' + this.staffInfo
			// 			.sysUser.name
			// 	}, "navigateTo", true)
			// }
		}
	}
</script>

<style>
	page {
		background: #F1F1F3;
	}

	.achievementInfo,
	.teamInfo,
	.personInfo {
		margin-top: 20rpx;
		background: #FFFFFF;
	}

	/* 业绩信息Start */
	.infoTitle {
		height: 80rpx;
		padding: 0rpx 20rpx;
		border-bottom: 1px solid #EDEDED;
	}

	.achievementStatistics {
		/* height: 140rpx; */
		border-bottom: 1px solid #EDEDED;
	}

	.achievementStatistics_item {
		padding: 10rpx 0;
		box-sizing: border-box;
	}

	.achievementStatistics_item>view:nth-of-type(1) {
		font-size: 32rpx;
		line-height: 60rpx;
		color: #4D4D4D;
	}

	.achievementStatistics_item>view:nth-of-type(2) {
		font-size: 32rpx;
		color: #D30500;
	}

	.achievementAssessment {
		border-bottom: 1px solid #EDEDED;
	}

	.achievementAssessment_item {
		padding: 15rpx 0;
	}

	.achievementAssessment .achievementAssessment_item:nth-child(1) {
		border-right: 1px solid #F1F1F1;
		flex: 2;
	}

	.achievementAssessment .achievementAssessment_item:nth-child(1)>view:nth-of-type(2) {
		display: inline-block;
		background-color: #007AFF;
		padding: 0rpx 10rpx;
		border-radius: 20rpx;
		font-size: 20rpx;
		text-align: center;
		color: #fff;
		margin-left: 20rpx;
	}

	.achievementAssessment .achievementAssessment_item:nth-child(2) {
		padding-left: 40rpx;
		box-sizing: border-box;
		flex: 3;
		color: #5F5F5F;
	}

	/* 业绩信息End */

	.teamInfo-list-hover {
		background: #f4f4f4;
	}

	.teamInfo_item>view:first-child {
		color: #000;
	}

	.teamInfo_item>view:last-child {
		color: #6A6A6A;
	}

	.personInfo_item,
	.teamInfo_item {
		padding: 15upx 30upx;
		border-top: 1upx solid #F4F4F4;
		border-bottom: 1upx solid #F4F4F4;
	}

	.personInfo_item>view:first-child {
		color: #3C3C3C;
	}

	.personInfo_item>view:first-child>view {
		margin-right: 20upx;
	}

	.personInfo_item>view:last-child {
		color: #6A6A6A;
	}
</style>