gxfor添加
This commit is contained in:
parent
06c8c955b1
commit
2c42020acf
|
@ -1232,7 +1232,7 @@ const getDatas = async (e, i) => {
|
|||
personTotal.value[1].ages = "近一年死亡";
|
||||
personTotal.value[1].percent = res.data.swrsPercent;
|
||||
res.data.age.forEach((item, index) => {
|
||||
if (index == 0) {
|
||||
if (index == 0 && item.age == 0) {
|
||||
personTotal.value.push({
|
||||
rksl: item.rksl,
|
||||
age: item.age + "",
|
||||
|
@ -1240,7 +1240,6 @@ const getDatas = async (e, i) => {
|
|||
percent: item.percent,
|
||||
});
|
||||
before_age = item.age;
|
||||
console.log("执行111", before_age);
|
||||
} else {
|
||||
if (item.age - before_age == 1) {
|
||||
personTotal.value.push({
|
||||
|
@ -1251,8 +1250,8 @@ const getDatas = async (e, i) => {
|
|||
});
|
||||
before_age = item.age;
|
||||
} else {
|
||||
for (let i = 0; i < item.age - before_age - 1; i++) {
|
||||
++before_age;
|
||||
for (let k = before_age; k < item.age - 1; k++) {
|
||||
before_age = before_age + 1;
|
||||
personTotal.value.push({
|
||||
rksl: 0,
|
||||
age: before_age + "",
|
||||
|
@ -1407,7 +1406,44 @@ const getDatas2 = async (e, i, cs) => {
|
|||
// });
|
||||
let before_age = "";
|
||||
res.data.age.forEach((item, index) => {
|
||||
if (index == 0) {
|
||||
// if (index == 0) {
|
||||
// personTotal.value.push({
|
||||
// rksl: item.rksl,
|
||||
// age: item.age + "",
|
||||
// ages: item.age + "岁",
|
||||
// percent: item.percent,
|
||||
// });
|
||||
// before_age = item.age;
|
||||
// console.log("执行111", before_age);
|
||||
// } else {
|
||||
// if (item.age - before_age == 1) {
|
||||
// personTotal.value.push({
|
||||
// rksl: item.rksl,
|
||||
// age: item.age + "",
|
||||
// ages: item.age + "岁",
|
||||
// percent: item.percent,
|
||||
// });
|
||||
// before_age = item.age;
|
||||
// } else {
|
||||
// for (let i = 0; i < item.age - before_age - 1; i++) {
|
||||
// ++before_age;
|
||||
// personTotal.value.push({
|
||||
// rksl: 0,
|
||||
// age: before_age + "",
|
||||
// ages: before_age + "岁",
|
||||
// percent: 0.0,
|
||||
// });
|
||||
// }
|
||||
// personTotal.value.push({
|
||||
// rksl: item.rksl,
|
||||
// age: item.age + "",
|
||||
// ages: item.age + "岁",
|
||||
// percent: item.percent,
|
||||
// });
|
||||
// before_age = item.age;
|
||||
// }
|
||||
// }
|
||||
if (index == 0 && item.age == 0) {
|
||||
personTotal.value.push({
|
||||
rksl: item.rksl,
|
||||
age: item.age + "",
|
||||
|
@ -1415,7 +1451,6 @@ const getDatas2 = async (e, i, cs) => {
|
|||
percent: item.percent,
|
||||
});
|
||||
before_age = item.age;
|
||||
console.log("执行111", before_age);
|
||||
} else {
|
||||
if (item.age - before_age == 1) {
|
||||
personTotal.value.push({
|
||||
|
@ -1426,8 +1461,8 @@ const getDatas2 = async (e, i, cs) => {
|
|||
});
|
||||
before_age = item.age;
|
||||
} else {
|
||||
for (let i = 0; i < item.age - before_age - 1; i++) {
|
||||
++before_age;
|
||||
for (let k = before_age; k < item.age - 1; k++) {
|
||||
before_age = before_age + 1;
|
||||
personTotal.value.push({
|
||||
rksl: 0,
|
||||
age: before_age + "",
|
||||
|
@ -1878,12 +1913,12 @@ const openMessage = (e) => {
|
|||
openD.value = false;
|
||||
reset_font2();
|
||||
//监听实现人物详情动态缩放
|
||||
window.addEventListener('resize', reset_font2);
|
||||
window.addEventListener("resize", reset_font2);
|
||||
};
|
||||
//关闭人物详情页面
|
||||
const closeDetail = () => {
|
||||
openD.value = true;
|
||||
window.removeEventListener('resize', reset_font2);
|
||||
window.removeEventListener("resize", reset_font2);
|
||||
};
|
||||
//获取人口列表接口
|
||||
const person_detail = (age) => {
|
||||
|
@ -2990,7 +3025,7 @@ const reset_font2 = () => {
|
|||
"scale(" + width / 1920 + "," + height / 1080 + ")";
|
||||
};
|
||||
onMounted(() => {
|
||||
tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
|
||||
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
|
||||
reset_font();
|
||||
initMap();
|
||||
getData();
|
||||
|
|
Loading…
Reference in New Issue