<template>
	<view>
		<view class="inner_box">
			<view class="inner_title">
				<view class="name name_1">姓名</view>
				<view class="name name_2">部门</view>
				<view class="name name_3">下井时间</view>
			</view>
			<view class="list_item">
				<view class="item" v-for="(item,index) in peoples" :key="index">
					<view class="text text_1">{{item.name}}</view>
					<view class="text text_2">{{item.depart_name}}</view>
					<view class="text text_3">{{item.down_time}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				peoples:[]
			};
		},
		onLoad(options) {
			const station_id = console.log(options.station_id)
			
			this.getPeoples(options.station_id)
			
			uni.setNavigationBarTitle({
				title:options.station_name
			})
		},
		methods:{
			async getPeoples(station_id){
				const res = await this.$myRequest({
					method:"POST",
				    url: '/personnel/mine/people',
					header: {
						'Content-Type': 'application/json', 
					},
					data:{
						station_id:station_id
					}
				})
				const data = res.data.data
				this.peoples = data
				console.log(this.peoples)
			},
		}
		

	}
</script>

<style lang="scss">
	.inner_box{
		.inner_title{
			
			padding: 0 25rpx;
			
			height: 94rpx;
			background: #F3F6FA;
			
			display: flex;
			align-items: center;
			.name{
				font-size: 27rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #232627;
				text-align: center;
			}
			.name_1{
				width: 125rpx;
			}
			.name_2{
				margin: 0 15rpx;
				width: 420rpx;
			}
			.name_3{
				width: 125rpx;
			}
		}
		.list_item{
			.item{
				padding: 0 24rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				
				border-bottom: 1px solid #f3f3f3;
				.text{
					font-size: 25rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					line-height: 94rpx;
					text-align: center;
				}
				.text_1{
					width: 125rpx;
				}
				.text_2{
					margin: 0 15rpx;
					width: 420rpx;
				}
				.text_3{
					width: 125rpx;
				}
			}
		}
	}

</style>
