<!-- 数据看板-预警处置 -->
<template>
	<view class="warningDispose">
		<view class="chart">
			<img class="chart-bg" src="@/pages/images/dataBoard/dataBoard-icon4.png">
			<view class="chart-n">
				<view class="chart-t">
					<view class="chart-t-li" @click="dateClick(index)" :class="dateIndex==index?'color-A':'color-B'"
						v-for="(item,index) in dateList">
						<view class="chart-t-li-t">{{item.num}}</view>
						<view class="chart-t-li-b">{{item.letterNUm}}</view>
					</view>
				</view>
				<view class="chart-b">
					<view class="chart-b-li" v-for="(item,index) in deptList" :key="index"
						:style="'top:'+item.top+'rpx;left:'+item.left+'rpx;'">
						<view>{{item.name}}</view>
						<img src="@/pages/images/dataBoard/img_xyzc_bg.png">
					</view>
				</view>
			</view>
		</view>
		<view class="statistics">
			<view class="statistics-b">
				<view class="statistics-b-li">
					<view class="statistics-b-li-t">13</view>
					<view class="statistics-b-li-b">昨日预警处置数</view>
				</view>
				<view class="line"></view>
				<view class="statistics-b-li">
					<view class="statistics-b-li-t">9</view>
					<view class="statistics-b-li-b">今日预警处置数</view>
				</view>
				<view class="line"></view>
				<view class="statistics-b-li">
					<view class="statistics-b-li-t-tow">
						<text class="color-B">0.9%</text>
						<img src="@/pages/images/dataBoard/dataBoard-icon3.png">
					</view>
					<view class="statistics-b-li-b">环比增长</view>
				</view>
			</view>
		</view>
		<view class="table">
			<uni-card>
				<view style="height: 200px">
					<zb-table :columns="column" :stripe="false" :border="false" :data="dataList"></zb-table>
				</view>
			</uni-card>
		</view>
	</view>
</template>

<script>
	import {
		config
	} from '@/api/request/config.js'
	import {

	} from '@/pages_basics/api/index.js'
	export default {
		name: "warningDispose",
		components: {

		},
		data() {
			return {
				dateList: [{
						num: '1',
						letterNUm: 'Mon',
					},
					{
						num: '2',
						letterNUm: 'Tue',
					},
					{
						num: '3',
						letterNUm: 'Wed',
					},
					{
						num: '4',
						letterNUm: 'Thur',
					},
					{
						num: '5',
						letterNUm: 'Fri',
					},
					{
						num: '6',
						letterNUm: 'Sat',
					},
					{
						num: '7',
						letterNUm: 'Sun',
					},
				],
				dateIndex: 0,
				deptList: [{
						name: "农学院",
						value: "0",
						top: 18,
						left: 46,
					},
					{
						name: "理学院",
						value: "0",
						top: 18,
						left: 508,
					},
					{
						name: "化学与药物",
						value: "0",
						top: 100,
						left: 136,
					},
					{
						name: "生命科学",
						value: "0",
				  top: 85,
						left: 370,
					},
					{
						name: "园林艺术",
						value: "0",
						top: 146,
						left: 546,
					},
					{
						name: "植物保护",
						value: "0",
						top: 271,
						left: 533,
					},
					{
						name: "资源环境",
						value: "0",
						top: 208,
						left: 42,
					},
					{
				  name: "国重楼",
						value: "0",
						top: 200,
						left: 333,
					},
				],
				// 查询参数
				queryParams: {
					page: 1,
					pageSize: 10,
				},
				column: [{
						type: 'index',
						label: '排行',
						fixed: true,
						width: 60,
						align: 'center',
					},
					{
						name: 'data1',
						label: '学院单位',
						fixed: true,
						width: 80,
						align: 'center',
					},
					{
						name: 'data2',
						label: '总数',
						align: 'center',
					},
					{
						name: 'data3',
						label: '昨日',
						align: 'center',
					},
					{
						name: 'data4',
						label: '今日',
						align: 'center',
					},
					{
						name: 'data5',
						label: '环比',
						align: 'center',
					},
				],
				dataList: [{
						data1: '植物保护',
						data2: '102',
						data3: '47',
						data4: '22',
						data5: '13',
					},
					{
						data1: '资源环境',
						data2: '74',
						data3: '8',
						data4: '32',
						data5: '18',
					},
					{
						data1: '生命科学',
						data2: '66',
						data3: '28',
						data4: '10',
						data5: '8',
					},
					{
						data1: '园林艺术',
						data2: '56',
						data3: '23',
						data4: '17',
						data5: '5',
					},
					{
						data1: '化学与药物',
						data2: '34',
						data3: '12',
						data4: '11',
						data5: '21',
					},
				],
				total: 0,
			}
		},
		created() {

		},
		beforeMount() {

		},
		mounted() {},
		methods: {
			dateClick(index) {
				this.dateIndex = index;
			},
		},
	}
</script>

<style lang="stylus" scoped>
	.warningDispose {
		height: 100%;
		width: 100%;
		background: #363744;
		padding: 20rpx 0rpx 36rpx;
		box-sizing: border-box;

		.chart {
			width: 750rpx;
			height: 500rpx;

			position: relative;

			.chart-bg {
				width: 750rpx;
				height: 500rpx;
				position: absolute;
				z-index: 100;
			}

			.chart-n {
				padding: 34rpx 0rpx 26rpx;
				box-sizing: border-box;
				position: absolute;
				z-index: 200;

				.chart-t {
					display: flex;
					justify-content: space-between;
					margin: 0 30rpx;

					.chart-t-li {
						width: 76rpx;
						height: 100rpx;

						.chart-t-li-t {
							font-weight: 400;
							font-size: 30rpx;

							line-height: 42rpx;
							text-align: center;
							margin-top: 8rpx;
						}

						.chart-t-li-b {
							font-weight: 400;
							font-size: 28rpx;

							line-height: 39rpx;
							text-align: center;
							margin-top: 4rpx;
						}
					}

					.color-A {
						background: #0183FA;
						border-radius: 10rpx 10rpx 10rpx 10rpx;

						.chart-t-li-t {
							color: #FFFFFF;
						}

						.chart-t-li-b {
							color: #FFFFFF;
						}
					}

					.color-B {
						background: none;

						.chart-t-li-t {
							color: #FFFFFF;
						}

						.chart-t-li-b {
							color: #FFFFFF;
						}
					}
				}

				.chart-b {
					width: 690rpx;
					height: 350rpx;
					position: absolute;

					.chart-b-li {
						position: absolute;
						z-index: 300;
						width: 200rpx;
						height: 46rpx;

						>img {
							width: 200rpx;
							height: 46rpx;
							position: absolute;
							z-index: 400;
						}

						>view {
							padding-left: 16rpx;
							box-sizing: border-box;
							width: 200rpx;
							height: 46rpx;
							position: absolute;
							z-index: 500;
							font-weight: 400;
							font-size: 24rpx;
							color: #FFFFFF;
							line-height: 46rpx;
							text-align: left;
						}

					}
				}
			}


		}

		.statistics {
			width: 750rpx;
			height: 120rpx;
			background: #3E414F;

			.statistics-b {
				display: flex;
				justify-content: space-between;
				align-items: center;

				.statistics-b-li {
					flex: 1;
					text-align: center;

					.statistics-b-li-t {
						font-weight: 400;
						font-size: 36rpx;
						color: #FFFFFF;
						line-height: 50rpx;
						margin-top: 10rpx;

					}

					.statistics-b-li-t-tow {
						margin-top: 10rpx;
						display: flex;
						justify-content: center;
						align-items: center;

						>text {
							font-weight: 400;
							font-size: 28rpx;
							line-height: 50rpx;
						}

						>img {
							width: 22rpx;
							height: 28rpx;
						}
					}

					.color-A {
						color: #FF0000;
					}

					.color-B {
						color: #2EA805;
					}


					.statistics-b-li-b {
						font-weight: 400;
						font-size: 24rpx;
						color: #FFFFFF;
						line-height: 34rpx;
						margin-top: 9rpx;
					}
				}

				.line {
					width: 2rpx;
					height: 30rpx;
					background: #D8D8D8;
				}
			}
		}

		.table {
			width: 690rpx;
			margin-top: 20rpx;
			border-radius: 20rpx 20rpx 0 0;
			overflow: hidden;
			margin-left: 30rpx;
		}
	}
</style>
