<template>
	<div class="left_two">
    <CommonTitle title="抗震加固" />
		<div class="content"  v-loading="isLoading"
         element-loading-background="rgba(0, 22, 52, 0.75)">
			<div class="bg three_bg">
				<div class="content_item item_left">
					<div class="item_top center">
						{{arr[0] && arr[0].kzjgSf}}
					</div>
					<div class="item_bottom center">
						<div class="bottom_left">
							{{arr[0] && arr[0].per}}
						</div>
						<div class="bottom_right">
							万栋
						</div>
					</div>
				</div>
				<div class="content_item">
					<div class="item_top center">
						{{arr[1] && arr[1].kzjgSf}}
					</div>
					<div class="item_bottom center">
						<div class="bottom_left">
							{{arr[1] && arr[1].per}}
						</div>
						<div class="bottom_right">
							万栋
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script setup>
	import {
		ref,
		onMounted,
		nextTick
	} from 'vue'
	import {
		getSelectKzjgCount
	} from '../service/http.js'
  import CommonTitle from "@/views/c-cpns/CommonTitle.vue";
	let arr = ref([]);
  const isLoading = ref(false);
	onMounted(() => {
    isLoading.value = true;
		getSelectKzjgCount().then(res => {
      isLoading.value = false;
			arr.value = res.data.data.Rows
			arr.value.forEach(item=>{
				item['per'] = (Number(item.dataCount)/10000).toFixed(2)
			})
		})
		
	})
</script>

<style lang="scss" scoped>
	.center {
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}
	.three_bg {
		background: url("@/assets/imgs/kzjg.png") no-repeat;
	}
	.left_two {
		height: 16%;
		padding-top: 10px;
		box-sizing: border-box;
		.content {
			height: 85%;
			margin: 0 20px;
			display: flex;
	
			.bg {
				width: 100%;
				height: 100px;
				margin: auto 0;
				//background-size: cover;
				display: flex;
				align-items: center;
	
				.item_left {
					margin-left: 94px;
				}
	
				.content_item {
					width: 40%;
					height: 80%;
	
					.item_top {
						height: 50%;
						font-family: Microsoft YaHei;
						font-size: 18px;
						color: #C0E7FF;
					}
	
					.item_bottom {
						height: 50%;
	
						.bottom_left {
							font-family: YouSheBiaoTiHei;
							font-weight: bold;
							font-size: 24px;
							color: #26DEFF;
						}
	
						.bottom_right {
							margin-left: 7px;
							font-family: Microsoft YaHei;
							font-weight: 400;
							font-size: 14px;
							color: #C0E7FF;
							opacity: 0.6;
						}
					}
				}
			}
		}
	}
</style>