添加name记录
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
onMounted(() => {
|
||||
// 加载点
|
||||
const ids: string[] = pointsHandle.addPoints(
|
||||
const result: { ids: string[]; names: string[] } = pointsHandle.addPoints(
|
||||
props.basePoints,
|
||||
props.getDisasterIcon,
|
||||
props.prefix,
|
||||
@@ -34,7 +34,7 @@
|
||||
// 记录id
|
||||
useLoadingResourceStore().addLoadingResource(
|
||||
props.loadingResourceField!,
|
||||
ids
|
||||
result
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
// 记录行政区划id
|
||||
useLoadingResourceStore().addLoadingResource(
|
||||
LoadingResource.ADMINISTRATIVE_DIVISION,
|
||||
areasId
|
||||
{ ids: areasId, names: [] } // 此处name不进行记录
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -108,14 +108,14 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.HIDDEN_DANGER_POINT
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏隐患点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.HIDDEN_DANGER_POINT
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,13 +98,13 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载桥梁点 -->
|
||||
<LoadingPoints
|
||||
v-if="
|
||||
useStatusStore().appLoadingCompleted && bridgeList.length > 0
|
||||
"
|
||||
v-if="useStatusStore().appLoadingCompleted && bridgeList.length > 0"
|
||||
:base-points="bridgeList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.bridgePointId"
|
||||
@@ -101,16 +99,14 @@
|
||||
if (newValue) {
|
||||
// 显示桥梁点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.BRIDGE
|
||||
)
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.BRIDGE)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏桥梁点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.BRIDGE
|
||||
)
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.BRIDGE)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,14 +103,14 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.DANGEROUS_SOURCE
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏危险源
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.DANGEROUS_SOURCE
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,14 +104,14 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.EMERGENCY_SHELTER
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏避难所
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.EMERGENCY_SHELTER
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,14 +103,14 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.FIRE_STATION
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏消防站
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.FIRE_STATION
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,11 +100,13 @@
|
||||
// 显示医院
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.HOSPITAL)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏医院
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.HOSPITAL)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,12 +99,16 @@
|
||||
if (newValue) {
|
||||
// 显示水库
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.RESERVOIR)
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.RESERVOIR
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏水库
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.RESERVOIR)
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.RESERVOIR
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,11 +100,13 @@
|
||||
// 显示学校
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.SCHOOL)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏学校
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.SCHOOL)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载物资储备点 -->
|
||||
<LoadingPoints
|
||||
v-if="
|
||||
useStatusStore().appLoadingCompleted && storePointsList.length > 0
|
||||
"
|
||||
v-if="useStatusStore().appLoadingCompleted && storePointsList.length > 0"
|
||||
:base-points="storePointsList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.storePointsPointId"
|
||||
@@ -103,14 +101,14 @@
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.STORE_POINTS
|
||||
)
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏物资储备点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.STORE_POINTS
|
||||
)
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<div>
|
||||
<!-- 加载地铁站点点位 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatusStore().appLoadingCompleted && subwayStationList.length > 0"
|
||||
v-if="
|
||||
useStatusStore().appLoadingCompleted && subwayStationList.length > 0
|
||||
"
|
||||
:base-points="subwayStationList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.subwayStationPointId"
|
||||
@@ -99,12 +101,16 @@
|
||||
if (newValue) {
|
||||
// 显示地铁站点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.SUBWAY_STATION)
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.SUBWAY_STATION
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏地铁站点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResourceStore().getLoadingResource(LoadingResource.SUBWAY_STATION)
|
||||
useLoadingResourceStore().getLoadingResource(
|
||||
LoadingResource.SUBWAY_STATION
|
||||
).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user