|
@@ -0,0 +1,480 @@
|
|
|
+<template>
|
|
|
+ <div class="right-section">
|
|
|
+ <div class="data-box1" style="margin-top: 9px">
|
|
|
+ <div class="title-box">
|
|
|
+ <div class="gradient-text">区县级减灾能力评估排行</div>
|
|
|
+ </div>
|
|
|
+ <div class="box-content">
|
|
|
+ <div class="btn" @click="showExportReport = true">综合分析报告</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="data-box1" style="margin-top: 9px">
|
|
|
+ <div class="title-box">
|
|
|
+ <div class="gradient-text">区县减灾能力统计表</div>
|
|
|
+ </div>
|
|
|
+ <div class="box-content" style="padding: 5px 0 5px 5px; height: 255px">
|
|
|
+ <div class="box4">
|
|
|
+ <div class="common-table">
|
|
|
+ <div class="table-header">
|
|
|
+ <div class="td" style="width: 90px">区县名称</div>
|
|
|
+ <div class="td" style="width: 90px">政府减灾能力</div>
|
|
|
+ <div class="td" style="width: 90px">社会组织减灾能力</div>
|
|
|
+ <div class="td" style="width: 90px">乡镇减灾能力</div>
|
|
|
+ <div class="td" style="width: 90px">社区减灾能力</div>
|
|
|
+ <div class="td" style="width: 90px">家庭减灾能力</div>
|
|
|
+ </div>
|
|
|
+ <div v-for="(item, index) in tableData" :key="index" class="tr">
|
|
|
+ <div class="td">{{ item.area }}</div>
|
|
|
+ <div class="td">{{ item.data1 }}</div>
|
|
|
+ <div class="td">{{ item.data2 }}</div>
|
|
|
+ <div class="td">{{ item.data3 }}</div>
|
|
|
+ <div class="td">{{ item.data4 }}</div>
|
|
|
+ <div class="td">{{ item.data5 }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <Dialog v-model="showExportReport" type="xs" title="导出综合分析报告" hide-footer>
|
|
|
+ <div class="flex-box">
|
|
|
+ <div class="icon-chart"></div>
|
|
|
+ <div>暂无数据导出</div>
|
|
|
+ </div>
|
|
|
+ </Dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup name="RightSection">
|
|
|
+import { setHighText } from '@/utils';
|
|
|
+const props = defineProps({
|
|
|
+ time: String
|
|
|
+});
|
|
|
+let showExportReport = ref(false);
|
|
|
+let riskOverviewData = ref({
|
|
|
+ time1: '',
|
|
|
+ time2: '',
|
|
|
+ text: ''
|
|
|
+});
|
|
|
+let colorText = ref([
|
|
|
+ { text: '低风险', color: '#40c75f' },
|
|
|
+ { text: '中低风险', color: '#3180f6' },
|
|
|
+ { text: '中风险', color: '#efec93' },
|
|
|
+ { text: '中高风险', color: '#f07d00' },
|
|
|
+ { text: '极高风险', color: '#aa0d1c' }
|
|
|
+]);
|
|
|
+// 风险分布
|
|
|
+let riskDistributionState = reactive({
|
|
|
+ showLevel: '1',
|
|
|
+ countyLevel: [
|
|
|
+ { name: '极高风险区县', value: '0', icon: 'icon5', text: 'red-text' },
|
|
|
+ { name: '中高风险区县', value: '0', icon: 'icon4', text: 'orange-text' },
|
|
|
+ { name: '中风险区县', value: '0', icon: 'icon3', text: 'yellow-text' },
|
|
|
+ { name: '中低风险区县', value: '0', icon: 'icon2', text: 'blue-text' },
|
|
|
+ { name: '低风险区县', value: '0', icon: 'icon1', text: 'green-text' }
|
|
|
+ ],
|
|
|
+ townShipLevel: [
|
|
|
+ { name: '极高风险镇街', value: '0', icon: 'icon5', text: 'red-text' },
|
|
|
+ { name: '中高风险镇街', value: '0', icon: 'icon4', text: 'orange-text' },
|
|
|
+ { name: '中风险镇街', value: '0', icon: 'icon3', text: 'yellow-text' },
|
|
|
+ { name: '中低风险镇街', value: '0', icon: 'icon2', text: 'blue-text' },
|
|
|
+ { name: '低风险镇街', value: '0', icon: 'icon1', text: 'green-text' }
|
|
|
+ ]
|
|
|
+});
|
|
|
+//
|
|
|
+const tableData = ref([]);
|
|
|
+const getData = () => {
|
|
|
+ const data = {
|
|
|
+ time1: '2024-10-31 09:00:00',
|
|
|
+ time2: '2024-10-31 09:00:00',
|
|
|
+ text: '经系统研判,当前茂名市海洋风险为低风险当前全市林火中高风险区县共有1个,为信宜市。林火中风险区县共有1个,为化州市,林火中低危险区县共有1个,为高州市,电白区、茂南区为低风险。'
|
|
|
+ };
|
|
|
+ data.text = setHighText(data.text, colorText.value);
|
|
|
+ riskOverviewData.value = data;
|
|
|
+
|
|
|
+ const data2 = {
|
|
|
+ data1: '0',
|
|
|
+ data2: '0',
|
|
|
+ data3: '21',
|
|
|
+ data4: '258',
|
|
|
+ data5: '34'
|
|
|
+ };
|
|
|
+ const data3 = {
|
|
|
+ data1: '0',
|
|
|
+ data2: '0',
|
|
|
+ data3: '6',
|
|
|
+ data4: '156',
|
|
|
+ data5: '6'
|
|
|
+ };
|
|
|
+ riskDistributionState.countyLevel[0].value = data2.data1;
|
|
|
+ riskDistributionState.countyLevel[1].value = data2.data2;
|
|
|
+ riskDistributionState.countyLevel[2].value = data2.data3;
|
|
|
+ riskDistributionState.countyLevel[3].value = data2.data4;
|
|
|
+ riskDistributionState.countyLevel[4].value = data2.data5;
|
|
|
+ riskDistributionState.townShipLevel[0].value = data3.data1;
|
|
|
+ riskDistributionState.townShipLevel[1].value = data3.data2;
|
|
|
+ riskDistributionState.townShipLevel[2].value = data3.data3;
|
|
|
+ riskDistributionState.townShipLevel[3].value = data3.data4;
|
|
|
+ riskDistributionState.townShipLevel[4].value = data3.data5;
|
|
|
+
|
|
|
+ tableData.value = [
|
|
|
+ { area: '茂南区', data1: '强', data2: '强', data3: '强', data4: '强', data5: '强' },
|
|
|
+ { area: '电白区', data1: '中等', data2: '中等', data3: '中等', data4: '中等', data5: '中等' },
|
|
|
+ { area: '高州区', data1: '强', data2: '强', data3: '强', data4: '强', data5: '强' },
|
|
|
+ { area: '化州区', data1: '较强', data2: '较强', data3: '较强', data4: '较强', data5: '较强' },
|
|
|
+ { area: '信宜区', data1: '中等', data2: '中等', data3: '中等', data4: '中等', data5: '中等' }
|
|
|
+ ];
|
|
|
+};
|
|
|
+const parseTime2 = (dateStr) => {
|
|
|
+ if (!dateStr) return '';
|
|
|
+ let time = dateStr.replace(/年/g, '-').replace(/月/g, '-').replace(/日/g, '');
|
|
|
+ // 将字符串转换为 Date 对象
|
|
|
+ const date = new Date(time);
|
|
|
+
|
|
|
+ // 设置时间为 00:00:00
|
|
|
+ date.setHours(0, 0, 0, 0);
|
|
|
+
|
|
|
+ // 格式化输出为所需的字符串格式
|
|
|
+ const year = date.getFullYear();
|
|
|
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要+1
|
|
|
+ const day = String(date.getDate()).padStart(2, '0');
|
|
|
+ const formattedDate = `${year}年${month}月${day}日 00:00:00`;
|
|
|
+
|
|
|
+ return formattedDate;
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ getData();
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.right-section {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ color: #ffffff;
|
|
|
+ padding-right: 20px;
|
|
|
+ .data-box1 {
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+ width: 517px;
|
|
|
+ height: 19px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/line.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin-top: -8px;
|
|
|
+ }
|
|
|
+ .title-box {
|
|
|
+ width: 516px;
|
|
|
+ height: 40px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/titleBox.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding-left: 50px;
|
|
|
+ .gradient-text {
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .box-content {
|
|
|
+ min-height: 123px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/box.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding: 5px 28px;
|
|
|
+ .btn {
|
|
|
+ width: 106px;
|
|
|
+ height: 40px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/btn.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #edfaff;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ padding-left: 15px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .box1 {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ width: 235px;
|
|
|
+ height: 20px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/box1.png') no-repeat bottom left;
|
|
|
+ background-size: 100% 13px;
|
|
|
+ .icon-address {
|
|
|
+ width: 11px;
|
|
|
+ height: 10px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/address.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ .text1 {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #edfaff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .box2 {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin-top: 8px;
|
|
|
+ .box-item {
|
|
|
+ display: flex;
|
|
|
+ margin-left: 42px;
|
|
|
+ &:nth-child(1),
|
|
|
+ &:nth-child(4) {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ .icon1 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/iconRisk1.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon2 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/iconRisk2.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon3 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/iconRisk3.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon4 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/iconRisk4.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon5 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/iconRisk5.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon1,
|
|
|
+ .icon2,
|
|
|
+ .icon3,
|
|
|
+ .icon4,
|
|
|
+ .icon5 {
|
|
|
+ width: 48px;
|
|
|
+ height: 49px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .text-box {
|
|
|
+ margin-left: 8px;
|
|
|
+ .text-box2 {
|
|
|
+ display: flex;
|
|
|
+ align-items: baseline;
|
|
|
+ margin-bottom: 6px;
|
|
|
+ .red-text,
|
|
|
+ .orange-text,
|
|
|
+ .yellow-text,
|
|
|
+ .blue-text,
|
|
|
+ .green-text {
|
|
|
+ min-width: 25px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: transparent;
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ background-clip: text;
|
|
|
+ display: inline-block;
|
|
|
+ font-family: BEBAS-1;
|
|
|
+ }
|
|
|
+ .red-text {
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #ffc4be 50%, #ff2f3c 100%);
|
|
|
+ }
|
|
|
+ .orange-text {
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #ffddc7 50%, #f88726 100%);
|
|
|
+ }
|
|
|
+ .yellow-text {
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #fcfed0 50%, #f7f71e 100%);
|
|
|
+ }
|
|
|
+ .blue-text {
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #c1dbff 50%, #2c81ff 100%);
|
|
|
+ }
|
|
|
+ .green-text {
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #d1ffdb 50%, #22fb81 100%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .text1 {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #a8ccde;
|
|
|
+ }
|
|
|
+ .text2 {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .box3 {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .item {
|
|
|
+ width: 116px;
|
|
|
+ height: 58px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/box2.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 40px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .icon1 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/town.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon2 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/population.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon3 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/area.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon4 {
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/gdp.png') no-repeat;
|
|
|
+ }
|
|
|
+ .icon1,
|
|
|
+ .icon2,
|
|
|
+ .icon3,
|
|
|
+ .icon4 {
|
|
|
+ position: absolute;
|
|
|
+ left: -32px;
|
|
|
+ top: -24px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ display: inline-block;
|
|
|
+ width: 106px;
|
|
|
+ height: 106px;
|
|
|
+ margin-right: 10px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .text-box {
|
|
|
+ .text1 {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ .text-box2 {
|
|
|
+ display: flex;
|
|
|
+ align-items: baseline;
|
|
|
+ .text2 {
|
|
|
+ font-size: 16px;
|
|
|
+ min-width: 40px;
|
|
|
+ color: transparent;
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ background-clip: text;
|
|
|
+ display: inline-block;
|
|
|
+ font-family: BEBAS-1;
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #c1dbff 50%, #2c81ff 100%);
|
|
|
+ }
|
|
|
+ .text3 {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #a8ccde;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .box4 {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-items: center;
|
|
|
+ .item {
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-top: 5px;
|
|
|
+ padding-left: 70px;
|
|
|
+ width: 163px;
|
|
|
+ height: 57px;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-top: 7px;
|
|
|
+ //&:nth-child(1),
|
|
|
+ //&:nth-child(2),
|
|
|
+ //&:nth-child(3) {
|
|
|
+ // margin-top: 0;
|
|
|
+ //}
|
|
|
+ &:nth-child(3n + 1) {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ .text1 {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .text2 {
|
|
|
+ font-size: 18px;
|
|
|
+ color: transparent;
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ background-clip: text;
|
|
|
+ display: inline-block;
|
|
|
+ font-family: BEBAS-1;
|
|
|
+ background-image: linear-gradient(to bottom, #ffffff 30%, #c1dbff 50%, #2c81ff 100%);
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .data-box2 {
|
|
|
+ width: 506px;
|
|
|
+ height: 135px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/box2.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding: 8px 10px;
|
|
|
+ .box-header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .header-left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .header-title {
|
|
|
+ font-size: 16px;
|
|
|
+ color: transparent;
|
|
|
+ background-image: linear-gradient(to bottom, #fff 40%, #65a3ff 70%, #3385ff 100%);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ background-clip: text;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .time {
|
|
|
+ color: #edfaff;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-left: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .box-content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .icon {
|
|
|
+ display: inline-block;
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 64px;
|
|
|
+ height: 65px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/riskOverview.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .line {
|
|
|
+ width: 1.5px;
|
|
|
+ height: 39px;
|
|
|
+ margin: 0 10px;
|
|
|
+ background-color: #535353;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 4;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.flex-box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #c9daf0;
|
|
|
+ .icon-chart {
|
|
|
+ width: 79px;
|
|
|
+ height: 62px;
|
|
|
+ background: url('@/assets/images/censusDataAnalysis/forestFire/chart.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+.common-table {
|
|
|
+ .table-header {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ .tr {
|
|
|
+ padding: 2px 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|