190 lines
5.6 KiB
Vue
Raw Normal View History

2025-03-14 17:52:05 +08:00
<template>
<div class="data-home-index">
2025-04-17 13:54:01 +08:00
<baseBg ref="homebase" :name-val="'home'" top-title=" ">
<!-- <template #top> </template> -->
2025-03-14 17:52:05 +08:00
<template #center>
<el-row style="width: 100%; height: 100%">
<el-col :span="6" class="left-charts">
<div class="left-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="综合数据统计" :top-postion="'left'">
<template #back>
<comprehensive></comprehensive>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
<div class="left-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="土地分布数据统计" :top-postion="'left'">
<template #back>
<rolllist :items="rollDataList"></rolllist>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
<div class="left-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="种养殖数据统计" :top-postion="'left'">
<template #back>
<plantBreedCharts></plantBreedCharts>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
</el-col>
2025-03-17 17:34:32 +08:00
<el-col :span="12">
<centerMap></centerMap>
2025-03-14 17:52:05 +08:00
</el-col>
<el-col :span="6" class="right-charts">
<div class="right-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="使用投入品数据统计" :top-postion="'left'">
<template #back>
<inputs></inputs>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
<div class="right-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="经营主体数据统计" :top-postion="'left'">
<template #back>
<entitiesCharts></entitiesCharts>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
<div class="right-charts-item">
2025-03-19 14:47:11 +08:00
<customBack top-title="溯源赋码与扫码数据统计" :top-postion="'left'">
<template #back>
<traceCharts></traceCharts>
</template>
</customBack>
2025-03-14 17:52:05 +08:00
</div>
</el-col>
</el-row>
</template>
</baseBg>
2025-03-17 17:34:32 +08:00
<div class="home-index-top-warp">
2025-03-19 14:47:11 +08:00
<div class="home-index-top" :style="{ 'background-image': 'url(' + getAssetsFile('images/vsualized/home/hometopbg.png') + ')' }">
2025-04-17 13:54:01 +08:00
<div class="home-data-p">
<h3 class="home-title">耿马县农产品销售情况</h3>
<div class="home-data-top">1284.624</div>
<div class="home-data-contrast">
<span class="tips">同比去年</span>
<span class="value">4684.629</span>
<el-icon style="vertical-align: middle" class="contrast-icon" color="#6beff9">
<TopRight />
</el-icon>
</div>
2025-03-17 17:34:32 +08:00
</div>
</div>
</div>
2025-03-14 17:52:05 +08:00
</div>
</template>
<script setup>
2025-03-17 17:34:32 +08:00
import centerMap from '@/components/centerMap.vue';
2025-03-14 17:52:05 +08:00
import comprehensive from './components/comprehensive.vue';
import plantBreedCharts from './components/plantBreedCharts.vue';
import entitiesCharts from './components/entitiesCharts.vue';
import inputs from './components/inputs.vue';
import traceCharts from './components/traceCharts.vue';
import rolllist from './components/rolllist.vue';
import { isEmpty, getAssetsFile } from '@/utils';
2025-03-17 17:34:32 +08:00
import { ref, reactive, onMounted, onUnmounted } from 'vue';
2025-03-14 17:52:05 +08:00
let rollDataList = reactive([
2025-03-17 17:34:32 +08:00
{ title: '勐腊镇', value: 533.1 },
{ title: '孟定镇', value: 1069.2 },
{ title: '孟永镇', value: 411.8 },
{ title: '耿马镇', value: 429.4 },
{ title: '大兴乡', value: 162.7 },
{ title: '勐简乡', value: 2309.9 },
2025-03-14 17:52:05 +08:00
// 更多项...
]);
2025-03-17 17:34:32 +08:00
// const homebase = ref(null);
// onMounted(() => {
// homebase.value && homebase.value.startTime();
// });
// onUnmounted(() => {
// homebase.value && homebase.value.chearTime();
// });
2025-03-14 17:52:05 +08:00
</script>
<style lang="scss" scoped>
.data-home-index {
2025-03-17 17:34:32 +08:00
.home-index-top-warp {
position: fixed;
top: 0;
left: 0;
width: 100%;
2025-04-17 13:54:01 +08:00
height: 120px;
2025-03-17 17:34:32 +08:00
text-align: center;
2025-04-17 13:54:01 +08:00
padding-top: 24px;
2025-03-17 17:34:32 +08:00
.home-index-top {
margin: auto;
2025-04-17 13:54:01 +08:00
width: calc(100% - 400px);
height: 100%;
2025-03-19 14:47:11 +08:00
background-repeat: no-repeat;
2025-04-17 13:54:01 +08:00
background-position: center bottom;
2025-03-19 14:47:11 +08:00
background-size: contain;
2025-04-17 13:54:01 +08:00
position: relative;
.home-data-p {
position: absolute;
left: 0;
top: -12px;
width: 100%;
}
2025-03-17 17:34:32 +08:00
.home-title {
display: inline-block;
font-size: 18px;
font-weight: bold;
transform: skewX(-10deg);
background: linear-gradient(to bottom, '#ff7e5f', '#548fff');
-webkit-background-clip: text;
color: #fff;
letter-spacing: 4px;
text-shadow: -2px 0 0 1px #add8f1;
}
.home-data-top {
font-size: 18px;
font-weight: bold;
color: #fff;
letter-spacing: 8px;
2025-04-17 13:54:01 +08:00
margin-top: 9px;
2025-03-17 17:34:32 +08:00
}
.home-data-contrast {
.tips {
font-size: 10px;
2025-03-21 16:48:39 +08:00
color: #6beff9;
2025-03-17 17:34:32 +08:00
}
.value {
padding: 0 8px;
font-size: 12px;
font-weight: bold;
color: #fff;
}
}
}
}
2025-03-14 17:52:05 +08:00
.left-charts {
display: flex;
justify-content: space-around;
width: 100%;
height: 100%;
flex-direction: column;
}
.left-charts-item {
width: 100%;
height: calc((100% - 30px) / 3);
background: transparent;
}
.right-charts {
display: flex;
justify-content: space-around;
width: 100%;
height: 100%;
flex-direction: column;
}
.right-charts-item {
width: 100%;
height: calc((100% - 30px) / 3);
}
}
</style>