<template>
	<div class="projectContent">
		<div class="left">
			<leftTop :projectData="projectData" class="leftTop"></leftTop>
			<leftCenter :statisticsCount="statisticsCount" class="leftCenter"></leftCenter>
			<leftBottom :statisticsCount="statisticsCount" class="leftBottom"></leftBottom>
		</div>
		<div class="center">
			<centerTop :projectData="projectData" class="centerTop"></centerTop>
			<centerBottom :projectData="projectData" class="centerBottom"></centerBottom>
		</div>
		<div class="right">
			<rightTop class="rightTop"></rightTop>
			<rightCenter class="rightCenter"></rightCenter>
			<rightBottom class="rightBottom"></rightBottom>
		</div>
	</div>
</template>

<script setup lang="ts">
import leftTop from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/leftTop.vue";
import leftCenter from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/leftCenter.vue";
import leftBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/leftBottom.vue";
import centerTop from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/centerTop.vue";
import centerBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/centerBottom.vue";
import rightTop from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightTop.vue";
import rightCenter from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightCenter.vue";
import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightBottom.vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import { getWorkerStatisticsCountApi, getProjectDetail } from "@/api/modules/projectOverview";
import { ref, onMounted } from "vue";
const statisticsCount = ref(null as any);

const projectData = ref(null as any);
//获取项目信息
const getProjectInfo = async () => {
	const res = await getProjectDetail({ projectSn: store.sn });
	// console.log("获取项目信息", res);
	// console.log("获取工程类别", projectTypeEnum);
	projectData.value = res.result;
};

//获取人员概览
const getPersonDetail = async () => {
	const res = await getWorkerStatisticsCountApi({ projectSn: store.sn });
	// console.log("获取人员概览", res);
	// console.log("获取工程类别", projectTypeEnum);
	statisticsCount.value = res.result;
};
onMounted(() => {
	getPersonDetail();
	getProjectInfo();
});
</script>
<style lang="scss" scoped>
.projectContent {
	width: 100%;
	height: 100%;
	display: flex;
	.left {
		width: 26%;
		.leftTop {
			height: 32%;
		}
		.leftCenter {
			height: 33%;
			margin: 3% 0 3% 0;
		}
		.leftBottom {
			height: 32%;
		}
	}
	.center {
		width: 46%;
		margin: 0 1%;

		.centerTop {
			height: 66%;
			margin-bottom: 2.1%;
		}
		.centerBottom {
			height: 32%;
		}
	}
	.right {
		width: 26%;

		.rightTop {
			height: 32%;
		}
		.rightCenter {
			height: 33%;
			margin: 3% 0 3% 0;
		}
		.rightBottom {
			height: 32%;
		}
	}
}
</style>
