<template>
  <view class="page">
    <u-navbar class="u-navbar" title="人员信息录入" placeholder @leftClick="leftClick" leftIconColor="#fff"  bgColor="#00337A"  :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
    <view class="btn" @click="addPerson">新增人员信息</view>
    <view class="btn" @click="searchPerson">修改人员信息</view>
    <view class="btn" @click="facePerson">人员识别查找</view>
	
	<!-- 新增人员表单 -->
	<u-popup :show="addPopup" mode="center" @close="closeAdd"  >
		<view style="width:600rpx;height: 100%;position: relative;background-color: #fff;">
			<view class="add-header">
				<view style="width: 10%;height: 80rpx;"></view>
				<view style="width: 80%;height: 80rpx;line-height: 80rpx;text-align: center;font-weight: bold;">选择人员类型</view>
				<u-icon style="width: 10%;" name="close" color="#000" size="24" @click="closeAdd"></u-icon>
			</view>
			<view class="add-form">
				<view class="btn2" @click="tempPeople">临时人员</view>
				<view class="btn2" @click="fixedPeople">固定人员</view>
				<view class="btn2" @click="subPeople">分包管理人员</view>
			</view>
		</view>
	</u-popup>
	
	
	
	
  </view>
</template>

<script>
export default {
  data() {
    return {
		addPopup:false,
		
    }
  },
  onLoad() {
    console.log('?? ~ mounted ~ mounted-index:')  
  },
  onShow() {
  },
  methods: {
	//新增人员信息
	addPerson(){
		this.addPopup=true;
	},
	closeAdd() {
		this.addPopup = false
	},
	//临时
	tempPeople(){
		this.addPopup = false;
		uni.navigateTo({
			url: `/pages/realName/workbench/personEnter/addPeople?workerType=0`
		})
	},
	//固定
	fixedPeople(){
		this.addPopup = false;
		uni.navigateTo({
			url: `/pages/realName/workbench/personEnter/addPeople?workerType=1`
		})
	},
	//分包管理
	subPeople(){
		this.addPopup = false;
		uni.navigateTo({
			url: `/pages/realName/workbench/personEnter/addPeople?workerType=2`
		})
	},
	searchPerson(){
		uni.navigateTo({
			url: `/pages/realName/workbench/personEnter/searchPeople`
		})
	},
	facePerson(){
		uni.navigateTo({
			url: `/pages/realName/workbench/personEnter/facePeople`
		})
	},
	
	
    // 返回
    leftClick() {
      console.log('返回')
      uni.navigateBack({
      	delta: 1 // 返回
      });
    }
  },

}
</script>

<style lang="scss">
.page {
	width: 100vw;
	height: 100vh;
	background-color: #EFEFEF;
	box-sizing: border-box;
	padding: 0 20px;
	.btn{
		margin-top: 20rpx;
		padding: 20rpx;
	}
	.btn2{
		color: #999;
		margin-top: 20rpx;
		margin-left: 20rpx;
		padding: 20rpx;
	}
	.add-header{
		width: 100%;
		height: 80rpx;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #fff;
	}
	.add-form{
		width: 100%;
		height: 20vh;
		background-color: #fff;
	}
}
</style>
