up
This commit is contained in:
@ -259,7 +259,7 @@ import * as echarts from 'echarts';
|
||||
import TimeLine from '@/components/TimeLine/TimeLine.vue';
|
||||
// import * as turf from '@turf/turf';
|
||||
import { useEcharts } from '@/hooks/useEcharts';
|
||||
import { getarea, getTownship, getvillage, getareas, dow } from '@/api/crops/classify.js';
|
||||
import { getarea, getTownship, getvillage, dow } from '@/api/crops/classify.js';
|
||||
import axios from 'axios';
|
||||
import 'echarts-gl';
|
||||
import { download } from '@/utils/request';
|
||||
@ -448,7 +448,6 @@ let TypeTime = {
|
||||
// 组件挂载完成后执行
|
||||
onMounted(() => {
|
||||
getArea(); //请求
|
||||
getaArea(); //面积
|
||||
getTownships();
|
||||
getvillages(); //村
|
||||
|
||||
@ -1085,28 +1084,6 @@ const getvillages = () => {
|
||||
Township.brr = res.features;
|
||||
});
|
||||
};
|
||||
//面积
|
||||
const getaArea = () => {
|
||||
getareas().then(res => {
|
||||
Township.crr = res.features;
|
||||
data.title.forEach((item, index) => {
|
||||
let town = res.features.map(i => {
|
||||
if (item === i.properties.town) {
|
||||
return i.properties;
|
||||
}
|
||||
});
|
||||
Object.keys(dd).forEach(it => {
|
||||
const index = town.findIndex(a => a && a.crop === it);
|
||||
if (index > -1) {
|
||||
dd[it].push(town[index].Shape_Area);
|
||||
} else {
|
||||
dd[it].push(null);
|
||||
}
|
||||
});
|
||||
});
|
||||
ASdivision();
|
||||
});
|
||||
};
|
||||
|
||||
const selectTab = () => {
|
||||
getArea();
|
||||
|
Reference in New Issue
Block a user