glj-代码提交

This commit is contained in:
glj 2024-01-19 10:01:38 +08:00
parent a2f8e81735
commit ba65cb9501
4 changed files with 1476 additions and 1553 deletions

View File

@ -79,6 +79,16 @@ export function submit(data) {
}); });
} }
export function deleteDisasterInfoManage(id) {
return request({
url: '/api/' + moduleName + '/ui/disasterInfo/deleteDisasterInfoManage',
method: 'get',
params: {
id
}
});
}
export function responseEndedDisasterInfo(id) { export function responseEndedDisasterInfo(id) {
return request({ return request({
url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo', url: '/api/' + moduleName + '/ui/disasterInfo/responseEndedDisasterInfo',
@ -88,6 +98,7 @@ export function responseEndedDisasterInfo(id) {
} }
}); });
} }
export function deleteByIds(ids) { export function deleteByIds(ids) {
return request({ return request({
url: '/api/' + moduleName + '/ui/disasterInfo/deleteByIds', url: '/api/' + moduleName + '/ui/disasterInfo/deleteByIds',

View File

@ -1,132 +1,106 @@
<template> <template>
<div class="home-container layout-pd"> <div class="home-container layout-pd">
<el-row :gutter="15" <el-row :gutter="15" class="home-card-one mb15" style="margin-left: 0">
class="home-card-one mb15" style="margin-left:0"> <el-date-picker style="" v-model="state.year" type="year" placeholder="Select year" />
<el-date-picker style="" <el-button style="margin-left: 10px" @click="getDashBoradData">Search</el-button>
v-model="state.year"
type="year"
placeholder="Select year"
/>
<el-button style="margin-left: 10px;"
@click="getDashBoradData">Search</el-button>
</el-row> </el-row>
<!-- 第一行 --> <!-- 第一行 -->
<el-row :gutter="15" <el-row :gutter="15" class="home-card-one mb15">
class="home-card-one mb15"> <el-col
<el-col :xs="24" :xs="24"
:sm="12" :sm="12"
:md="12" :md="12"
:lg="6" :lg="6"
:xl="6" :xl="6"
v-for="(v, k) in state.homeOne" v-for="(v, k) in state.homeOne"
:key="k" :key="k"
:class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }"> :class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }"
>
<div class="home-card-item flex"> <div class="home-card-item flex">
<div class="flex-margin flex w100" <div class="flex-margin flex w100" :class="` home-one-animation${k}`">
:class="` home-one-animation${k}`">
<div class="flex-auto"> <div class="flex-auto">
<span class="font30">{{ v.num1 }}</span> <span class="font30">{{ v.num1 }}</span>
<span class="ml5 font16" <span class="ml5 font16" :style="{ color: v.color1 }">{{ v.num2 }}</span>
:style="{ color: v.color1 }">{{ v.num2 }}</span>
<div class="mt10">{{ v.num3 }}</div> <div class="mt10">{{ v.num3 }}</div>
</div> </div>
<div class="home-card-item-icon flex" <div class="home-card-item-icon flex" :style="{ background: `var(${v.color2})` }">
:style="{ background: `var(${v.color2})` }"> <i
<i class="flex-margin font32" class="flex-margin font32"
:class="v.num4" :class="v.num4"
:style="{ color: `var(${v.color3})`,width:'44px',height:'44px',background:'url(\'/home/'+(k+1)+'.png\') no-repeat', :style="{
backgroundSize: '70% 70%', backgroundPosition:'center'}"></i> color: `var(${v.color3})`,
width: '44px',
height: '44px',
background: 'url(\'/home/' + (k + 1) + '.png\') no-repeat',
backgroundSize: '70% 70%',
backgroundPosition: 'center',
}"
></i>
</div> </div>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第二行 --> <!-- 第二行 -->
<el-row :gutter="15" <el-row :gutter="15" class="home-card-two mb15">
class="home-card-two mb15">
<!-- 响应和发起量统计 --> <!-- 响应和发起量统计 -->
<el-col :xs="24" <!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
:sm="12"
:md="12"
:lg="12"
:xl="12">
<div class="home-card-item"> <div class="home-card-item">
<div style="height: 100%" ref="homeLineRef"></div> <div style="height: 100%" ref="homeLineRef"></div>
</div> </div>
</el-col> </el-col> -->
<!-- 全年用户访问量和下载量 --> <!-- 全年用户访问量和下载量 -->
<el-col :xs="24"
:sm="12" </el-row>
:md="12"
:lg="12" <!-- 第四行 -->
:xl="12"> <el-row :gutter="15" class="home-card-four mb15">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<div class="home-card-item" style="display: flex; height: 460px">
<div class="home-card-item"> <div class="home-card-item">
<div style="height: 100%" <div style="height: 100%; width: 100%" ref="homeTypeDRef"></div>
ref="homeVandDRef"></div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第三行 -->
<el-row :gutter="15" <el-row :gutter="15" class="home-card-two mb15">
class="home-card-three mb15"> <!-- 全年用户访问量和下载量 -->
<!-- chief管理 --> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<el-col :xs="24"
:sm="24"
:md="24"
:lg="12"
:xl="12">
<div class="home-card-item"> <div class="home-card-item">
<div style="height: 100%" <div style="height: 100%; width: 100%" ref="homeVandDRef"></div>
ref="homeUploadRef"></div> </div>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div class="home-card-item">
<div style="height: 100%; width: 90%" ref="homePieRef2"></div>
</div>
</el-col>
</el-row>
<!-- 第三行 -->
<el-row :gutter="15" class="home-card-three mb15">
<!-- chief管理 -->
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<div class="home-card-item">
<div style="height: 100%" ref="homeUploadRef"></div>
</div> </div>
</el-col> </el-col>
<!-- administrators管理 --> <!-- administrators管理 -->
<el-col :xs="24" <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
:sm="24"
:md="24"
:lg="12"
:xl="12">
<div class="home-card-item"> <div class="home-card-item">
<div style="height: 100%" <div style="height: 100%" ref="homeBarRef"></div>
ref="homeBarRef"></div>
</div>
</el-col>
</el-row>
<!-- 第四行 -->
<el-row :gutter="15"
class="home-card-four mb15">
<!-- 灾害发生区域占比 饼图-->
<el-col :xs="24"
:sm="24"
:md="24"
:lg="24"
:xl="24">
<div class="home-card-item" style="display: flex;height: 460px;">
<div style="height: 100%;width: 58%;"
ref="homePieRef2"></div>
<div style="height: 100%;width: 42%;overflow-y: auto;">
<el-table :data="state.typeTable" style="width: 100%">
<el-table-column type="index" label="TOP" width="100" align="center"/>
<el-table-column prop="name" label="Disaster Type" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="value" label="Number" show-overflow-tooltip align="center"></el-table-column>
</el-table>
</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 第五行 --> <!-- 第五行 -->
<el-row :gutter="15" <el-row :gutter="15" class="home-card-five mb15">
class="home-card-five mb15">
<!-- 灾害发生区域占比 饼图--> <!-- 灾害发生区域占比 饼图-->
<el-col :xs="24" <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
:sm="24" <div class="home-card-item" style="display: flex; height: 554px">
:md="24" <div style="height: 100%; width: 58%" ref="homePieRef"></div>
:lg="24" <div style="height: 100%; width: 42%; overflow-y: auto">
:xl="24">
<div class="home-card-item" style="display: flex;height: 554px;">
<div style="height: 100%;width: 58%;"
ref="homePieRef"></div>
<div style="height: 100%;width: 42%;overflow-y: auto;">
<el-table :data="state.countryTable" style="width: 100%"> <el-table :data="state.countryTable" style="width: 100%">
<el-table-column type="index" label="TOP" width="100" align="center" /> <el-table-column type="index" label="TOP" width="100" align="center" />
<el-table-column prop="name" label="Country" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="name" label="Country" show-overflow-tooltip align="center"></el-table-column>
@ -157,18 +131,22 @@ const homeUploadRef = ref();
const homePieRef = ref(); const homePieRef = ref();
const homePieRef2 = ref(); const homePieRef2 = ref();
const homeBarRef = ref(); const homeBarRef = ref();
//
const homeTypeDRef = ref();
const storesTagsViewRoutes = useTagsViewRoutes(); const storesTagsViewRoutes = useTagsViewRoutes();
const storesThemeConfig = useThemeConfig(); const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig); const { themeConfig } = storeToRefs(storesThemeConfig);
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes); const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
const state = reactive({ const state = reactive({
dataList:[],
param: { param: {
year:'' year: '',
}, },
year:new Date, year: new Date(),
global: { global: {
homeChartOne: null, homeChartOne: null,
homeVandD: null, homeVandD: null,
homeType: null,
homeUpload: null, homeUpload: null,
homeChartTwo: null, homeChartTwo: null,
homeCharThree: null, homeCharThree: null,
@ -221,80 +199,47 @@ const state = reactive({
color: '#303133', color: '#303133',
}, },
countryTable: [], countryTable: [],
typeTable:[] typeTable: [],
}); });
// //
const initLineChart = (xData,data1, data2) => { // const initLineChart = (xData, data1) => {
if (!state.global.dispose.some((b) => b === state.global.homeChartOne)) state.global.homeChartOne.dispose(); // if (!state.global.dispose.some((b) => b === state.global.homeChartOne)) state.global.homeChartOne.dispose();
state.global.homeChartOne = markRaw(echarts.init(homeLineRef.value, state.charts.theme)); // state.global.homeChartOne = markRaw(echarts.init(homeLineRef.value, state.charts.theme));
const option = { // const option = {
backgroundColor: state.charts.bgColor, // backgroundColor: state.charts.bgColor,
title: { // title: {
text: 'Annual User Response Application Statistics', // text: 'Annual User Response Application Statistics',
x: 'left', // x: 'left',
textStyle: { fontSize: '15', color: state.charts.color }, // textStyle: { fontSize: '15', color: state.charts.color },
}, // },
grid: { top: 70, right: 20, bottom: 30, left: 30 }, // grid: { top: 70, right: 20, bottom: 30, left: 30 },
tooltip: { trigger: 'axis' }, // tooltip: { trigger: 'axis' },
legend: { data: ['response','initiate'], right: 0 }, // legend: { data: ['response'], right: 0 },
xAxis: { // xAxis: {
data: xData // data: xData,
}, // },
yAxis: [ // yAxis: [
{ // {
type: 'value', // type: 'value',
name: 'response', // name: 'response',
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, // splitLine: { show: true, lineStyle: { type: 'dashed' } },
}, // },
{ // ],
type: 'value', // series: [
name: 'initiate', // {
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, // name: 'response',
nameTextStyle: { // type: 'line',
padding: [0, 40, 0, 0] // // symbolSize: 6,
}, // symbol: 'circle',
} // smooth: true,
], // data: data1,
series: [ // },
{ // ],
name: 'response', // };
type: 'line', // state.global.homeChartOne.setOption(option);
symbolSize: 6, // state.myCharts.push(state.global.homeChartOne);
symbol: 'circle', // };
smooth: true,
data: data1,
lineStyle: { color: '#fe9a8b' },
itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#fe9a8bb3' },
{ offset: 1, color: '#fe9a8b03' },
]),
},
},{
name: 'initiate',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data2,
lineStyle: { color: 'rgba(145,204,117,1)' },
itemStyle: { color: 'rgba(145,204,117,1)', borderColor: 'rgba(145,204,117,1)' },
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: 'rgba(145,204,117,1)' },
{ offset: 1, color: 'rgba(145,204,117,0)' },
]),
},
}
],
};
state.global.homeChartOne.setOption(option);
state.myCharts.push(state.global.homeChartOne);
};
// 访 // 访
const initLineVandDChart = (xData, data1, data2) => { const initLineVandDChart = (xData, data1, data2) => {
@ -324,9 +269,9 @@ const initLineVandDChart = (xData,data1, data2) => {
name: 'download', name: 'download',
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
nameTextStyle: { nameTextStyle: {
padding: [0, 40, 0, 0] // padding: [0, 40, 0, 0], //
},
}, },
}
], ],
series: [ series: [
{ {
@ -344,7 +289,8 @@ const initLineVandDChart = (xData,data1, data2) => {
{ offset: 1, color: 'rgba(84,112,198,0)' }, { offset: 1, color: 'rgba(84,112,198,0)' },
]), ]),
}, },
},{ },
{
name: 'download', name: 'download',
type: 'line', type: 'line',
symbolSize: 6, symbolSize: 6,
@ -359,13 +305,103 @@ const initLineVandDChart = (xData,data1, data2) => {
{ offset: 1, color: 'rgba(250,200,88,0)' }, { offset: 1, color: 'rgba(250,200,88,0)' },
]), ]),
}, },
} },
], ],
}; };
state.global.homeVandD.setOption(option); state.global.homeVandD.setOption(option);
state.myCharts.push(state.global.homeVandD); state.myCharts.push(state.global.homeVandD);
}; };
const initTypeChart = (xData, data1, data2, data3, data4, data5, data6, data7, data8) => {
if (!state.global.dispose.some((b) => b === state.global.homeType)) state.global.homeType.dispose();
state.global.homeType = markRaw(echarts.init(homeTypeDRef.value, state.charts.theme));
const option = {
backgroundColor: state.charts.bgColor,
title: {
text: 'Annual Disaster Statistics',
x: 'left',
textStyle: { fontSize: '15', color: state.charts.color },
},
grid: { top: 70, right: 20, bottom: 30, left: 30 },
tooltip: { trigger: 'axis' },
legend: { data: ['Earthquake', 'Volcano', 'Landslide', 'Flood', 'Hurricane', 'Drought', 'Emergency', 'response'], right: 0 },
xAxis: {
data: xData,
},
yAxis: [
{
type: 'value',
name: 'Type',
splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
}
],
series: [
{
name: 'Earthquake',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data1,
},
{
name: 'Volcano',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data2,
},{
name: 'Landslide',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data3,
},{
name: 'Flood',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data4,
},{
name: 'Hurricane',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data5,
},{
name: 'Drought',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data6,
},{
name: 'Emergency',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data7,
},{
name: 'response',
type: 'line',
symbolSize: 6,
symbol: 'circle',
smooth: true,
data: data8,
}
],
};
state.global.homeType.setOption(option);
state.myCharts.push(state.global.homeType);
};
// Chief // Chief
const initChiefChart = (xData, yData) => { const initChiefChart = (xData, yData) => {
if (!state.global.dispose.some((b) => b === state.global.homeUpload)) state.global.homeUpload.dispose(); if (!state.global.dispose.some((b) => b === state.global.homeUpload)) state.global.homeUpload.dispose();
@ -373,35 +409,35 @@ const initChiefChart = (xData,yData) => {
const option = { const option = {
backgroundColor: state.charts.bgColor, backgroundColor: state.charts.bgColor,
title: { title: {
text: 'Annual Chief Management Statistics TOP10', text: 'Top ten disasters initiated',
x: 'left', x: 'left',
textStyle: { fontSize: '15', color: state.charts.color }, textStyle: { fontSize: '15', color: state.charts.color },
}, },
//tooltip: { trigger: 'item', formatter: '{c}' }, //tooltip: { trigger: 'item', formatter: '{c}' },
tooltip: { tooltip: {
show:true show: true,
// trigger: 'axis', // trigger: 'axis',
// axisPointer: { // axisPointer: {
// type: 'shadow' // type: 'shadow'
// }, // },
// formatter: '{c}' // formatter: '{c}'
}, },
legend: { data: ['chief'], right: 0 }, legend: { data: ['user'], right: 0 },
grid: { top: 70, right: 80, bottom: 30, left: 80 }, grid: { top: 70, right: 80, bottom: 30, left: 80 },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: xData data: xData,
}, },
], ],
yAxis: [ yAxis: [
{ {
type:'value' type: 'value',
} },
], ],
series: [ series: [
{ {
name: 'chief', name: 'user',
type: 'bar', type: 'bar',
barWidth: 30, barWidth: 30,
itemStyle: { itemStyle: {
@ -412,8 +448,8 @@ const initChiefChart = (xData,yData) => {
// //
borderRadius: [30, 30, 0, 0], borderRadius: [30, 30, 0, 0],
}, },
data: yData data: yData,
} },
], ],
}; };
state.global.homeUpload.setOption(option); state.global.homeUpload.setOption(option);
@ -426,12 +462,12 @@ const initAdministratorsChart = (xData,yData) => {
const option = { const option = {
backgroundColor: state.charts.bgColor, backgroundColor: state.charts.bgColor,
title: { title: {
text: 'Annual Administrators Management Statistics TOP10', text: 'Top ten disaster response times',
x: 'left', x: 'left',
textStyle: { fontSize: '15', color: state.charts.color }, textStyle: { fontSize: '15', color: state.charts.color },
}, },
tooltip: { trigger: 'item', formatter: '{c}' }, tooltip: { trigger: 'item', formatter: '{c}' },
legend: { data: ['administrators'], right: 0 }, legend: { data: ['user'], right: 0 },
grid: { top: 70, right: 80, bottom: 30, left: 80 }, grid: { top: 70, right: 80, bottom: 30, left: 80 },
xAxis: [ xAxis: [
{ {
@ -454,7 +490,7 @@ const initAdministratorsChart = (xData,yData) => {
], ],
series: [ series: [
{ {
name: 'administrators', name: 'user',
type: 'bar', type: 'bar',
barWidth: 30, barWidth: 30,
yAxisIndex: 0, yAxisIndex: 0,
@ -548,7 +584,6 @@ const initPieChart2 = (data) => {
style: { style: {
image: themeConfig.value.isIsDark, image: themeConfig.value.isIsDark,
width: 230, width: 230,
height: 230, height: 230,
}, },
@ -586,28 +621,28 @@ const initEchartsResizeFun = () => {
* @param data * @param data
*/ */
const setHeadData = (data) => { const setHeadData = (data) => {
state.homeOne[0].num1 = data.applyCount state.homeOne[0].num1 = data.applyCount;
state.homeOne[1].num1 = data.actResponseNum state.homeOne[1].num1 = data.actResponseNum;
state.homeOne[2].num1 = data.visitCount state.homeOne[2].num1 = data.visitCount;
state.homeOne[3].num1 = data.downloadCount state.homeOne[3].num1 = data.downloadCount;
} };
/** /**
* 设置响应量和发起量 * 设置响应量和发起量
* @param data * @param data
*/ */
const setLineChart = (data) => { // const setLineChart = (data) => {
let xData = []; // let xData = [];
//let yData = []; // //let yData = [];
let data1 = [];//initiate // let data1 = []; //initiate
let data2 = [];//response // let data2 = []; //response
data.forEach(item=>{ // data.forEach((item) => {
xData.push(item.key) // xData.push(item.key);
data1.push(item.initiate) // data1.push(item.initiate);
data2.push(item.response) // // data2.push(item.response);
}) // });
// // //
initLineChart(xData,data1,data2); // initLineChart(xData, data1, data2);
} // };
/** /**
* 设置访问量 和下载次数 * 设置访问量 和下载次数
* @param data * @param data
@ -616,14 +651,43 @@ const setLineChart = (data) => {
let xData = []; let xData = [];
let data1 = []; let data1 = [];
let data2 = []; let data2 = [];
data.forEach(item=>{ data.forEach((item) => {
xData.push(item.key) xData.push(item.key);
data1.push(item.response) data1.push(item.response);
data2.push(item.initiate) data2.push(item.initiate);
}) });
//访 //访
initLineVandDChart(xData,data1, data2) initLineVandDChart(xData, data1, data2);
} };
const setDisasterInfoType = (data) => {
let xData = [];
let data1 = [];
let data2 = [];
let data3 = [];
let data4 = [];
let data5 = [];
let data6 = [];
let data7 = [];
let data8 = [];
data.forEach((item) => {
xData.push(item.key);
data1.push(item.Earthquake);
data2.push(item.Volcano);
data3.push(item.Landslide);
data4.push(item.Flood);
data5.push(item.Hurricane);
data6.push(item.Drought);
data7.push(item.Emergency);
});
state.dataList.forEach((item) => {
data8.push(item.initiate);
});
//访
initTypeChart(xData, data1, data2, data3, data4, data5, data6, data7,data8);
};
/** /**
* 管理员管理量 * 管理员管理量
* @param data * @param data
@ -631,16 +695,16 @@ const setLineChart = (data) => {
const setAdministratorsChart = (data) => { const setAdministratorsChart = (data) => {
let xData = []; let xData = [];
let yData = []; let yData = [];
data.forEach(item=>{ data.forEach((item) => {
xData.push(item.name) xData.push(item.name);
yData.push(item.val) yData.push(item.val);
}) });
// if (yData) { // if (yData) {
// xData.push(''); // xData.push('');
// yData.push(0); // yData.push(0);
// } // }
initAdministratorsChart(xData, yData); initAdministratorsChart(xData, yData);
} };
/** /**
* 管理员管理量 * 管理员管理量
* @param data * @param data
@ -648,31 +712,31 @@ const setAdministratorsChart = (data) => {
const setChiefChart = (data) => { const setChiefChart = (data) => {
let xData = []; let xData = [];
let yData = []; let yData = [];
data.forEach(item=>{ data.forEach((item) => {
xData.push(item.name) xData.push(item.name);
yData.push(item.val) yData.push(item.val);
}) });
if (yData) { if (yData) {
yData.push(0) yData.push(0);
} }
initChiefChart(xData, yData); initChiefChart(xData, yData);
} };
/** /**
* 设置灾种数量占比 * 设置灾种数量占比
* @param data * @param data
*/ */
const setDisasterType = (data) => { const setDisasterType = (data) => {
let arr = []; let arr = [];
data.forEach(item=>{ data.forEach((item) => {
arr.push({ name: item.name, value: item.val }); arr.push({ name: item.name, value: item.val });
}) });
// for(let [k , v] of Object.entries(data)){ // for(let [k , v] of Object.entries(data)){
// arr.push({ name: k, value: v}); // arr.push({ name: k, value: v});
// } // }
state.typeTable = arr state.typeTable = arr;
initPieChart2(arr) initPieChart2(arr);
} };
/** /**
* 设置发生区域灾害占比 Proportion of Disaster Occurred Areas TOP15 * 设置发生区域灾害占比 Proportion of Disaster Occurred Areas TOP15
@ -683,27 +747,31 @@ const setDisasterType = (data) => {
for (let [k, v] of Object.entries(data)) { for (let [k, v] of Object.entries(data)) {
arr.push({ name: k, value: v }); arr.push({ name: k, value: v });
} }
state.countryTable = arr state.countryTable = arr;
initPieChart(arr); initPieChart(arr);
} };
// //
const getDashBoradData = () => { const getDashBoradData = () => {
state.param.year = state.year.getFullYear() state.param.year = state.year.getFullYear();
statistics(state.param.year).then(res=>{ statistics(state.param.year).then((res) => {
// //
setHeadData(res.header); setHeadData(res.header);
// //
setLineChart(res.line) // setLineChart(res.line);
state.dataList = res.line;
setLineVandDChart(res.vandd); setLineVandDChart(res.vandd);
// //
setAdministratorsChart(res.admin) setAdministratorsChart(res.admin);
setChiefChart(res.chief) setChiefChart(res.chief);
// //
setDisasterType(res.disasterNum); setDisasterType(res.disasterNum);
//5 //5
setDisasterArea(res.country); setDisasterArea(res.country);
}) setDisasterInfoType(res.type);
}
});
};
// echarts resize // echarts resize
const initEchartsResize = () => { const initEchartsResize = () => {
window.addEventListener('resize', initEchartsResizeFun); window.addEventListener('resize', initEchartsResizeFun);

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,12 @@ const viteConfig = defineConfig((mode) => {
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },
'/vordmdoc': {
target: 'http://192.168.31.14:9000',
ws: false,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/vordmdoc/, ''),
},
}, },
}, },
build: { build: {