<template>
	<view class="container">
		<view class="page">
			<view class="property">
				<view class="user" style="background-image: url('../../static/images/bg_cost.png');">
					<view class="name">张一 15214525682</view>
					<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
				</view>
				<view class="screening">
					<view class="title">
						<view class="picker on">
							<picker @change="bindPickerChange" :value="year" :range="yearList">
								<view class="uni-input">{{yearList[index]}}</view>
							</picker>
							<image src="../../static/images/icon_up.png" class="icon"></image>
						</view>
						<view class="picker">
							<picker @change="bindPickerChange1" :value="month" :range="monthList">
								<view class="uni-input">{{monthList[index1]}}</view>
							</picker>
							<image src="../../static/images/icon_up.png" class="icon"></image>
						</view>
					</view>
					<view class="content">
						<view class="text">
							<view class="name">合计金额（元）</view>120
						</view>
						<view class="text">
							<view class="name">缴费单位</view>汉江之星物业公司
						</view>
					</view>
					<view class="bottom">2023年度物业费累计：220元</view>
				</view>
				<view class="statistical">
					<qiun-data-charts type="line" :chartData="chartData" :opts="opts" background="none" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				year: '',
				index: 0,
				yearList: ['2023年', '2022年', '2021年'],
				month: '',
				index1: 0,
				monthList: ['全部', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
				chartData: {
					categories: ["2023年", "2022年", "2021年"],
					series: [{
						"name": "费用统计",
						"data": [2000, 2050, 1000]
					}]
				},
				opts: {
					color: ["#6A59F2", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
						"#ea7ccc"
					],
					padding: [15, 10, 0, 15],
					enableScroll: false,
					legend: {},
					xAxis: {
						disableGrid: true
					},
					yAxis: {
						gridType: "dash",
						dashLength: 2
					},
					extra: {
						line: {
							type: "curve",
							width: 2,
							activeType: "hollow"
						}
					},
				}
			}
		},
		methods: {
			bindPickerChange: function(e) {
				this.index = e.detail.value
			},
			bindPickerChange1: function(e) {
				this.index1 = e.detail.value
			},
		},
		onLoad() {

		},
		onShow() {

		}
	}
</script>
<style>
	page {
		background-color: #F8F6F9;
	}
</style>
<style lang="scss" scoped>
	.page {
		padding: 30rpx;
	}

	.property {

		.user {
			background-position: top center;
			background-repeat: no-repeat;
			background-size: cover;
			border-radius: 16rpx;
			padding: 40rpx;

			.name {
				font-size: 32rpx;
				color: #ffffff;
				margin-bottom: 20rpx;
			}

			.add {
				font-size: 28rpx;
				color: #D5DCFF;
			}
		}

		.screening {
			margin: 30rpx 0;
			background-color: #ffffff;
			border-radius: 16rpx;
			padding: 30rpx;

			.title {
				display: flex;

				.picker {
					display: flex;
					align-items: center;

					.uni-input {
						font-size: 28rpx;
						color: #373737;
					}

					.icon {
						width: 20rpx;
						height: 12rpx;
						margin-left: 15rpx;
					}
				}

				.on {
					padding-right: 40rpx;
					margin-right: 40rpx;
					border-right: 1px solid #F0F0F2;
				}
			}

			.content {
				padding: 20rpx 0;
				margin: 30rpx 0;
				border-top: 1px solid #F0F0F2;
				border-bottom: 1px solid #F0F0F2;

				.text {
					display: flex;
					font-size: 28rpx;
					color: #373737;
					margin: 15rpx 0;

					.name {
						width: 230rpx;
						color: #9D9CA6;
					}
				}
			}

			.bottom {
				font-size: 28rpx;
				color: #6A59F2;
			}

		}

		.statistical {
			background-color: #ffffff;
			border-radius: 16rpx;
			padding: 30rpx 10rpx;
		}

	}
</style>