<template>
	<view>
		<view class="top">
			<image src="./icon/top.jpg" mode=""></image>
		</view>
		<view class="content">

			<view class="charts-box">
				<qiun-data-charts type="ring" :opts="ring_1" :chartData="chartData" background="none" />
			</view>

			<view class="list">
				<view class="item" v-for="(item,index) in 3" :key="index">
					<view class="title">红柳煤矿</view>
					<view class="inner">
						<view class="box">
							<view class="name">井下人数</view>
							<view class="num">286个</view>
						</view>
						<view class="box">
							<view class="name">矿级领导</view>
							<view class="num">1个</view>
						</view>
						<view class="box">
							<view class="name">公司领导</view>
							<view class="num">0个</view>
						</view>
					</view>
					<view class="right_arrow">
						<view class="text">查看详情</view>
						<view class="icon"></view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				chartData: {
					categories: [],
					"series": [{
						"data": [{
								"name": "一班",
								"value": 50
							},
							{
								"name": "二班",
								"value": 30
							},
							{
								"name": "三班",
								"value": 20
							},
							{
								"name": "四班",
								"value": 18
							},
							{
								"name": "五班",
								"value": 8
							}
						]
					}]
				},
				ring_1: {
					"dataLabel": false,
					"legend": {
						"position": "bottom",
					},
					"title": {
						"name": "下矿总人数",
						"color": "#555",
					},
					"subtitle": {
						"name": "3515人",
						"color": "#333",
					},
					"extra": {
						"ring": {
							"centerColor": "#F1F1F1",
							"border": false,
						},

					}
				}

			};
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F1F1F1;
	}

	.top {
		image {
			width: 750rpx;
			height: 360rpx;
		}
	}

	/* 请根据需求修改图表容器尺寸，如果父容器没有高度图表则会显示异常 */
	.charts-box {
		width: 100%;
		height: 300px;
	}

	.content {
		width: 750rpx;

		box-sizing: border-box;
		padding: 25rpx;
	}

	.list {
		.item {
			width: 700rpx;
			background-color: #FFFFFF;
			border-radius: 8px;
			overflow: hidden;

			margin-bottom: 25rpx;

			.title {
				line-height: 80rpx;
				padding-left: 20rpx;
				border-left: 8rpx solid #83DCFC;
				border-bottom: 1px solid #eee;
			}

			.inner {
				display: flex;
				justify-content: space-around;

				.box {
					padding: 30rpx 0;
					color: #999;
					text-align: center;

					.name {
						line-height: 60rpx;
					}

					.num {
						color: #49C27D;
					}
				}

				.box:nth-child(2) {
					.num {
						color: #B85A56;
					}
				}

				.box:nth-child(3) {
					.num {
						color: #34383D;
					}
				}
			}

			.right_arrow {
				width: 160rpx;
				height: 60rpx;
				margin-left: 520rpx;

				display: flex;
				align-items: center;

				.text {
					font-size: 28rpx;
					color: #999999;
					margin-right: 8rpx;
				}

				.icon {
					width: 30rpx;
					height: 30rpx;
					background-image: url(./icon/right.png);
					background-size: cover;
					background-repeat: no-repeat;
				}

			}
		}
	}
</style>
