<template>
	<view>
		<view class="content">
			<view class="title">
				当前井下人员
			</view>
			<view class="inner">
				<slot></slot>
			</view>


			<!-- 当前下井领导 -->
			<view class="list" v-if="people_list.length > 0">
				<view class="label">
					<view class="text box_1">姓名</view>
					<view class="text box_2">下井时间</view>
					<view class="text box_3">当前位置</view>
				</view>
				<view class="item" v-for="(item,index) in people_list" :key="index">
					<view class="text box_1">{{item.name}}</view>
					<view class="text box_2">{{item.down_time}}</view>
					<view class="text box_3">{{item.station_name}}</view>
				</view>
			</view>
		</view>
	</view>
</template>


<script>
	export default {
		props: ['mine'],
		data() {
			return {
				// mine:"",
				people_list: [],
				
			}
		},
		watch: {
			// mine: function(newVal, oldVal) {
			// 	this.mine = newVal
			// 	console.log(newVal)
			// }
		},
		created() {
			this.$p_api.personnel_people_now({
				mine: this.mine
			}).then((res) => {
				console.log(res)
				this.people_list = res.data.data.people_list
			})
		}
	}
</script>



<style lang="scss">
	.content {
		margin-top: 16rpx;
		background: #FFFFFF;
		box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
		border-radius: 20rpx;

		.title {
			line-height: 96rpx;
			text-align: center;


			font-size: 30rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #232627;

			border-bottom: 2rpx solid #f3f3f3;
		}

		.inner {
			// height: 500px;
		}
	}

	.list {
		padding: 0 10rpx;

		.label {
			display: flex;
			align-items: center;
			height: 82rpx;
			background: #F3F6FA;

			.text {
				text-align: center;
				font-size: 27rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #232627;

				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}

			.box_1 {
				width: 150rpx;
			}

			.box_2 {
				width: 150rpx;
			}

			.box_3 {
				text-align: right;
				width: 400rpx;
				padding-right: 15rpx;
			}
		}

		.item {
			display: flex;
			align-items: center;
			height: 82rpx;

			.text {
				text-align: center;
				font-size: 27rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #232627;

				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}

			.box_1 {
				width: 150rpx;
			}

			.box_2 {
				width: 150rpx;
			}

			.box_3 {
				text-align: right;
				width: 400rpx;
				padding-right: 15rpx;
			}
		}
	}
</style>
