<template>
	<view class="page">
		<u-navbar title="运维工单" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
			height='38'></u-navbar>
		<view class="box">
			<u-picker mode="time" v-model="show" :params="params" @confirm="confirm"></u-picker>
			<view class="date">
				<text @click="btnks(1)">{{selector}}</text> -- <text @click="btnks(2)">{{selectors}}</text>
			</view>
			
			<view class="list">
				<view class="top">
					<view class="title">
						数据类型
					</view>
					<view class="title">
						数量
					</view>
					<view class="title">
						占比
					</view>
					<view class="title">
						明细
					</view>
				</view>
				<view class="list_val" v-for="(item,index) in 9" :key="index">
					<view class="val_shu">
						<view class="val_wz">
							空仓机柜
						</view>
						<view class="val_wz">
							0
						</view>
						<view class="val_wz">
							0
						</view>
						<view @click="btnmx" class="val_wz" style="text-decoration:underline; text-decoration-position: under;text-underline-offset: 10rpx;">
							明细
						</view>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				selector: '2024-4-9',
				selectors: '2024-4-9',
				show: false,
				params: {
					year: true,
					month: true,
					day: true,
					hour: false,
					minute: false,
					second: false
				},
			}
		},
		methods: {
			btnks(num) {
				this.show = true
				if (num == 1) {
					this.num = 1
				} else {
					this.num = 2
				}
			},
			confirm(e) {
				if (this.num == 1) {
					this.selector = e.year + '-' + e.month + '-' + e.day
				} else {
					this.selectors = e.year + '-' + e.month + '-' + e.day
				}
			},
			btnmx(){
				uni.navigateTo({
					url:'/page_user/yunying/gongdan/mingxi'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
	}

	.page {
		width: 750rpx;
		position: fixed;
		top: 0;
		left: 0;

		.box {
			width: 750rpx;
			height: 1440rpx;
			background: #F4F5F7;
			border-radius: 0rpx 0rpx 0rpx 0rpx;
            .list{
				width: 680rpx;
				height: 876rpx;
				background: #FFFFFF;
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				margin: auto;
				.top{
					display: flex;
					justify-content: space-between;
					padding: 32rpx 50rpx;
					box-sizing: border-box;
					.title{
						font-weight: 600;
						font-size: 28rpx;
						color: #3D3D3D;
					}
				}
				.list_val{
					.val_shu{
						border-top: 1px solid #ccc;
						display: flex;
						justify-content: space-between;
						padding: 24rpx 50rpx;
						box-sizing: border-box;
						.val_wz{
							font-size: 28rpx;
							color: #3D3D3D;
						}
					}
				}
			}
			.date {
				padding-left: 80rpx;
				padding-right: 80rpx;
				box-sizing: border-box;
				display: flex;
				justify-content: space-between;
				margin-top: 26rpx;
				width: 750rpx;
				height: 116rpx;
				background: #FFFFFF;
                padding-top: 38rpx;
				margin-bottom: 36rpx;
				text {
					padding: 6rpx 18rpx;
					box-sizing: border-box;
					background: #eee;
					height: 46rpx;
					border-radius: 10rpx 10rpx 10rpx 10rpx;
					font-size: 24rpx;
					color: #808080;
				}
			}
		}
	}
</style>