修改组件中store的调用方式
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
// 点处理钩子
|
||||
const pointsHandle = usePointsHandle();
|
||||
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
onMounted(() => {
|
||||
// 加载点
|
||||
@@ -35,7 +35,7 @@
|
||||
);
|
||||
|
||||
// 记录id
|
||||
useLoadingResource.addLoadingResource(props.loadingResourceField!, result);
|
||||
loadingResourceStore.addLoadingResource(props.loadingResourceField!, result);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
const { areas, areasId, areasColor, areaTransparency, labelTransparency } =
|
||||
useAdministrativeDivision();
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
onMounted(async () => {
|
||||
// 构建批量添加配置数组
|
||||
@@ -48,7 +48,7 @@
|
||||
await CesiumUtilsSingleton.batchAddGeoJsonLayers(layerConfigs);
|
||||
|
||||
// 记录行政区划id
|
||||
useLoadingResource.addLoadingResource(
|
||||
loadingResourceStore.addLoadingResource(
|
||||
LoadingResource.ADMINISTRATIVE_DIVISION,
|
||||
{ ids: areasId, info: [] } // 此处info不进行记录
|
||||
);
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
// 监听显示状态改变
|
||||
watch(
|
||||
() => useStatus.mapLayers.showAdministrativeDivision.show,
|
||||
() => statusStore.mapLayers.showAdministrativeDivision.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
CesiumUtilsSingleton.batchShowGeoJsonLayers(areasId);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<!-- 行政区划 -->
|
||||
<AdministrativeDivision
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.mapLayers.showAdministrativeDivision.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.mapLayers.showAdministrativeDivision.loading
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
@@ -31,7 +31,7 @@
|
||||
automaticallyAdjustThePerspective,
|
||||
prohibitedEvents,
|
||||
} = useMap();
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
onBeforeMount(() => {
|
||||
resetScene();
|
||||
@@ -52,7 +52,7 @@
|
||||
});
|
||||
|
||||
// 设置状态
|
||||
useStatus.appLoadingCompleted = true;
|
||||
statusStore.appLoadingCompleted = true;
|
||||
|
||||
// 注册全局点击监听器
|
||||
registerAndClickOnTheListener();
|
||||
|
||||
@@ -9,40 +9,40 @@
|
||||
<!-- 滑坡隐患点 -->
|
||||
<LandslideComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showLandslideHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showLandslideHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 泥石流隐患点 -->
|
||||
<DebrisFlowComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showDebrisFlowHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showDebrisFlowHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 内涝隐患点 -->
|
||||
<WaterLoggingComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showWaterLoggingHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showWaterLoggingHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 山洪隐患点 -->
|
||||
<FlashFloodComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showFlashFloodHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showFlashFloodHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 降雨栅格图层组件 -->
|
||||
<RainfallGridComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.weatherLayers.showRainfallGrid.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.weatherLayers.showRainfallGrid.loading
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
@@ -52,16 +52,16 @@
|
||||
<!-- 滑坡隐患点 -->
|
||||
<LandslideComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showLandslideHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showLandslideHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 泥石流隐患点 -->
|
||||
<DebrisFlowComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showDebrisFlowHiddenPoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showDebrisFlowHiddenPoint.loading
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
@@ -69,8 +69,8 @@
|
||||
<!-- 风险点组件 -->
|
||||
<RiskPointComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.mapLayers.riskPointShow.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.mapLayers.riskPointShow.loading
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
@@ -87,7 +87,7 @@
|
||||
import RainfallGridComponent from '@/component/rain-earthquake/detail-panels/RainfallGridComponent.vue';
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 获取父组件传递德数据
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="control-show-panel-box"
|
||||
v-show="useStatus.uiComponents.controlPanel.show"
|
||||
v-show="statusStore.uiComponents.controlPanel.show"
|
||||
>
|
||||
<div class="title-box">
|
||||
<header>图例与控制</header>
|
||||
@@ -65,8 +65,8 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import { computed } from 'vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
|
||||
const props = defineProps<{
|
||||
constrolShowList: {
|
||||
@@ -108,7 +108,7 @@
|
||||
callback: (...args: unknown[]) => unknown
|
||||
) => {
|
||||
// 重置信息框状态,隐藏显示
|
||||
useLoadingInformation.resetStatue();
|
||||
loadingInformationStore.resetStatue();
|
||||
|
||||
// 调用回调函数
|
||||
callback(status);
|
||||
|
||||
@@ -2,109 +2,109 @@
|
||||
<!-- 医院 -->
|
||||
<HospitalComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showHospital.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showHospital.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 危险源 -->
|
||||
<DangerousSourceComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showDangerSource.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showDangerSource.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 避难所 -->
|
||||
<EmergencyShelterComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showRefugeeShelter.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showRefugeeShelter.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 消防站 -->
|
||||
<FireStationComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showFireStation.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showFireStation.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 物资储备点 -->
|
||||
<StorePointsComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showReservePoint.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showReservePoint.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 学校 -->
|
||||
<SchoolComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showSchool.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showSchool.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 人口网格 -->
|
||||
<PopulationGridComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showPopulationGrid.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showPopulationGrid.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 管网系统 -->
|
||||
<WaterPipeComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showNetworkSystem.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showNetworkSystem.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 交通道路 -->
|
||||
<TrafficRoadComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showTrafficRoad.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showTrafficRoad.loading
|
||||
"
|
||||
/>
|
||||
<!-- 高速 -->
|
||||
<HighwayComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showHighway.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showHighway.loading
|
||||
"
|
||||
/>
|
||||
<!-- 国道 -->
|
||||
<NationRoadComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showMainRoad.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showMainRoad.loading
|
||||
"
|
||||
/>
|
||||
<!-- 桥梁 -->
|
||||
<BridgeComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showBridge.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showBridge.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 水库 -->
|
||||
<ReservoirComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.infrastructureLayers.showReservoir.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.infrastructureLayers.showReservoir.loading
|
||||
"
|
||||
/>
|
||||
|
||||
<!-- 地铁站点 -->
|
||||
<SubwayStationComponent
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.poiLayers.showSubwayStation.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.poiLayers.showSubwayStation.loading
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
@@ -126,7 +126,7 @@
|
||||
import ReservoirComponent from '@/component/rain-earthquake/detail-panels/ReservoirComponent.vue';
|
||||
import SubwayStationComponent from '@/component/rain-earthquake/detail-panels/SubwayStationComponent.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
type="primary"
|
||||
@click="changeStatus"
|
||||
circle
|
||||
:title="`${useStatus.uiComponents.disasterChainPointShow.show ? '关闭' : '打开'}灾害链影响点列表`"
|
||||
:title="`${statusStore.uiComponents.disasterChainPointShow.show ? '关闭' : '打开'}灾害链影响点列表`"
|
||||
>{{
|
||||
useStatus.uiComponents.disasterChainPointShow.show ? '-' : '+'
|
||||
statusStore.uiComponents.disasterChainPointShow.show ? '-' : '+'
|
||||
}}</el-button
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="disaster-list-box"
|
||||
v-show="useStatus.uiComponents.disasterChainPointShow.show"
|
||||
v-show="statusStore.uiComponents.disasterChainPointShow.show"
|
||||
>
|
||||
<header class="table-title">
|
||||
<span>灾害链影响点列表</span>
|
||||
@@ -84,7 +84,7 @@
|
||||
import type { PaginationType } from '@/types/common/PaginationType';
|
||||
import { ref, watch, computed, type Ref } from 'vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 接收父组件的参数
|
||||
const props = defineProps<{
|
||||
@@ -126,8 +126,8 @@
|
||||
|
||||
// 切换面板显示状态
|
||||
const changeStatus = () => {
|
||||
useStatus.uiComponents.disasterChainPointShow.show =
|
||||
!useStatus.uiComponents.disasterChainPointShow.show;
|
||||
statusStore.uiComponents.disasterChainPointShow.show =
|
||||
!statusStore.uiComponents.disasterChainPointShow.show;
|
||||
};
|
||||
|
||||
// 上一页
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<!-- 周边分析组件 -->
|
||||
<AroundAnalysis
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted &&
|
||||
useStatus.functionStatus.aroundAnalysis.loading
|
||||
statusStore.appLoadingCompleted &&
|
||||
statusStore.functionStatus.aroundAnalysis.loading
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
@@ -12,7 +12,7 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import AroundAnalysis from './function-child/AroundAnalysis.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div
|
||||
v-show="useStatus.uiComponents.leftButton.show"
|
||||
v-show="statusStore.uiComponents.leftButton.show"
|
||||
class="left-button-box"
|
||||
:style="{
|
||||
left: `${useStatus.uiComponents.disasterChainPointShow.show ? 575 : 100}px`,
|
||||
left: `${statusStore.uiComponents.disasterChainPointShow.show ? 575 : 100}px`,
|
||||
}"
|
||||
>
|
||||
<ul class="left-button-ul">
|
||||
@@ -11,7 +11,7 @@
|
||||
<button
|
||||
@click="handelButton(index, buttonItem.callback)"
|
||||
:style="{
|
||||
'background-image': `url(${useButtonSelectedId.leftButtonSelectedId == index ? leftOrangeButton : leftBlueButton})`,
|
||||
'background-image': `url(${buttonSelectedIdStore.leftButtonSelectedId == index ? leftOrangeButton : leftBlueButton})`,
|
||||
}"
|
||||
>
|
||||
{{ buttonItem.name }}
|
||||
@@ -27,8 +27,8 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useButtonSelectedId = useButtonSelectedIdStore();
|
||||
const statusStore = useStatusStore();
|
||||
const buttonSelectedIdStore = useButtonSelectedIdStore();
|
||||
|
||||
// 接收父组件传递的参数
|
||||
const props = defineProps<{
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
// 如果找到了选中的按钮,设置选中状态,同时执行回调函数
|
||||
if (lastSelectedIndex !== -1) {
|
||||
useButtonSelectedId.leftButtonSelectedId = lastSelectedIndex;
|
||||
buttonSelectedIdStore.leftButtonSelectedId = lastSelectedIndex;
|
||||
props.buttonList[lastSelectedIndex].callback();
|
||||
}
|
||||
});
|
||||
@@ -63,23 +63,23 @@
|
||||
callback: (...args: unknown[]) => unknown
|
||||
) => {
|
||||
// 取消选中
|
||||
if (index == useButtonSelectedId.leftButtonSelectedId) {
|
||||
if (index == buttonSelectedIdStore.leftButtonSelectedId) {
|
||||
callback(false);
|
||||
useButtonSelectedId.leftButtonSelectedId = -1;
|
||||
buttonSelectedIdStore.leftButtonSelectedId = -1;
|
||||
return;
|
||||
} else if (
|
||||
useButtonSelectedId.leftButtonSelectedId != -1 &&
|
||||
useButtonSelectedId.leftButtonSelectedId != index
|
||||
buttonSelectedIdStore.leftButtonSelectedId != -1 &&
|
||||
buttonSelectedIdStore.leftButtonSelectedId != index
|
||||
) {
|
||||
console.error('当前按钮选中有误,请选择正确的按钮。');
|
||||
return;
|
||||
}
|
||||
useButtonSelectedId.leftButtonSelectedId = index;
|
||||
buttonSelectedIdStore.leftButtonSelectedId = index;
|
||||
callback(true);
|
||||
|
||||
// 如果该按钮只执行一次,则取消选中
|
||||
if (props.buttonList[index].executeOnce) {
|
||||
useButtonSelectedId.leftButtonSelectedId = -1;
|
||||
buttonSelectedIdStore.leftButtonSelectedId = -1;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
<div
|
||||
class="legend-container"
|
||||
v-show="
|
||||
useStatus.uiComponents.leftLegend.show &&
|
||||
Object.keys(useLeftLegend.legendListInfo).length > 0
|
||||
statusStore.uiComponents.leftLegend.show &&
|
||||
Object.keys(leftLegendStore.legendListInfo).length > 0
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="legend-box"
|
||||
v-for="key in Object.keys(useLeftLegend.legendListInfo)"
|
||||
v-for="key in Object.keys(leftLegendStore.legendListInfo)"
|
||||
:key="key"
|
||||
>
|
||||
<div class="legend-title">
|
||||
{{ useLeftLegend.legendListInfo[key].title }}
|
||||
{{ leftLegendStore.legendListInfo[key].title }}
|
||||
</div>
|
||||
<div
|
||||
class="legend-item"
|
||||
v-for="(item, index) in useLeftLegend.legendListInfo[key].list"
|
||||
v-for="(item, index) in leftLegendStore.legendListInfo[key].list"
|
||||
:key="index"
|
||||
>
|
||||
<div
|
||||
@@ -36,8 +36,8 @@
|
||||
import { useLeftLegendStore } from '@/stores/useLeftLegendStore';
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLeftLegend = useLeftLegendStore();
|
||||
const statusStore = useStatusStore();
|
||||
const leftLegendStore = useLeftLegendStore();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div
|
||||
class="right-button-box"
|
||||
v-show="useStatus.uiComponents.rightButton.show"
|
||||
v-show="statusStore.uiComponents.rightButton.show"
|
||||
>
|
||||
<ul class="right-button-ul">
|
||||
<li v-for="(buttonItem, index) in buttonList" :key="index">
|
||||
<button
|
||||
@click="handelButton(index, buttonItem.callback)"
|
||||
:style="{
|
||||
'background-image': `url(${useButtonSelectedId.rightButtonSelectedId == index ? rightOrangeButton : rightBlueButton})`,
|
||||
'background-image': `url(${buttonSelectedIdStore.rightButtonSelectedId == index ? rightOrangeButton : rightBlueButton})`,
|
||||
}"
|
||||
>
|
||||
{{ buttonItem.name }}
|
||||
@@ -24,8 +24,8 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useButtonSelectedId = useButtonSelectedIdStore();
|
||||
const statusStore = useStatusStore();
|
||||
const buttonSelectedIdStore = useButtonSelectedIdStore();
|
||||
|
||||
// 接收父组件传递的参数
|
||||
const props = defineProps<{
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
// 如果找到了选中的按钮,设置选中状态,同时执行回调函数
|
||||
if (lastSelectedIndex !== -1) {
|
||||
useButtonSelectedId.rightButtonSelectedId = lastSelectedIndex;
|
||||
buttonSelectedIdStore.rightButtonSelectedId = lastSelectedIndex;
|
||||
props.buttonList[lastSelectedIndex].callback(true);
|
||||
}
|
||||
});
|
||||
@@ -59,20 +59,20 @@
|
||||
index: number,
|
||||
callback: (...args: unknown[]) => unknown
|
||||
) => {
|
||||
if (index == useButtonSelectedId.rightButtonSelectedId) {
|
||||
useButtonSelectedId.rightButtonSelectedId = -1;
|
||||
if (index == buttonSelectedIdStore.rightButtonSelectedId) {
|
||||
buttonSelectedIdStore.rightButtonSelectedId = -1;
|
||||
callback(false);
|
||||
return;
|
||||
} else if (
|
||||
useButtonSelectedId.rightButtonSelectedId != -1 &&
|
||||
useButtonSelectedId.rightButtonSelectedId != index
|
||||
buttonSelectedIdStore.rightButtonSelectedId != -1 &&
|
||||
buttonSelectedIdStore.rightButtonSelectedId != index
|
||||
) {
|
||||
return;
|
||||
}
|
||||
useButtonSelectedId.rightButtonSelectedId = index;
|
||||
buttonSelectedIdStore.rightButtonSelectedId = index;
|
||||
callback(true);
|
||||
if (props.buttonList[index].executeOnce) {
|
||||
useButtonSelectedId.rightButtonSelectedId = -1;
|
||||
buttonSelectedIdStore.rightButtonSelectedId = -1;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="step-box" v-show="useStatus.uiComponents.stepBar.show">
|
||||
<div class="step-box" v-show="statusStore.uiComponents.stepBar.show">
|
||||
<el-steps
|
||||
style="width: 100%; background-color: #ffffff00"
|
||||
:active="useStep.currentStep"
|
||||
:active="stepStore.currentStep"
|
||||
finish-status="success"
|
||||
simple
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) in useStep.stepList"
|
||||
v-for="(item, index) in stepStore.stepList"
|
||||
:key="index"
|
||||
:title="item"
|
||||
/>
|
||||
@@ -19,8 +19,8 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import { useStepStore } from '@/stores/useStepStore';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useStep = useStepStore();
|
||||
const statusStore = useStatusStore();
|
||||
const stepStore = useStepStore();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载泥石流隐患点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && debrisFlowPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && debrisFlowPoints.length > 0"
|
||||
:base-points="debrisFlowPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.debrisFlowHiddenPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="debrisFlowPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.debrisFlowHiddenPoint.loading"
|
||||
v-if="loadingInformationStore.debrisFlowHiddenPoint.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.debrisFlowHiddenPoint.id"
|
||||
:key="loadingInformationStore.debrisFlowHiddenPoint.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -44,9 +44,9 @@
|
||||
|
||||
const debrisFlowPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.debrisFlowHiddenPoint.id,
|
||||
() => loadingInformationStore.debrisFlowHiddenPoint.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取泥石流隐患点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
useLoadingInformation.debrisFlowHiddenPoint.id
|
||||
loadingInformationStore.debrisFlowHiddenPoint.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -95,7 +95,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.debrisFlowHiddenPoint.loading = true;
|
||||
loadingInformationStore.debrisFlowHiddenPoint.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -104,19 +104,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showDebrisFlowHiddenPoint.show,
|
||||
() => statusStore.poiLayers.showDebrisFlowHiddenPoint.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示泥石流隐患点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.DEBRIS_FLOW_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏泥石流隐患点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.DEBRIS_FLOW_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载山洪隐患点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && flashFloodPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && flashFloodPoints.length > 0"
|
||||
:base-points="flashFloodPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.flashFloodHiddenPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="flashFloodPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.flashFloodHiddenPoint.loading"
|
||||
v-if="loadingInformationStore.flashFloodHiddenPoint.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.flashFloodHiddenPoint.id"
|
||||
:key="loadingInformationStore.flashFloodHiddenPoint.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -44,9 +44,9 @@
|
||||
|
||||
const flashFloodPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.flashFloodHiddenPoint.id,
|
||||
() => loadingInformationStore.flashFloodHiddenPoint.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取山洪隐患点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
useLoadingInformation.flashFloodHiddenPoint.id
|
||||
loadingInformationStore.flashFloodHiddenPoint.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -95,7 +95,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.flashFloodHiddenPoint.loading = true;
|
||||
loadingInformationStore.flashFloodHiddenPoint.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -104,19 +104,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showFlashFloodHiddenPoint.show,
|
||||
() => statusStore.poiLayers.showFlashFloodHiddenPoint.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示山洪隐患点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.FLASH_FLOOD_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏山洪隐患点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.FLASH_FLOOD_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载滑坡隐患点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && landslidePoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && landslidePoints.length > 0"
|
||||
:base-points="landslidePoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.landslideHiddenPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="landslidePointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.landslideHiddenPoint.loading"
|
||||
v-if="loadingInformationStore.landslideHiddenPoint.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.landslideHiddenPoint.id"
|
||||
:key="loadingInformationStore.landslideHiddenPoint.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -44,9 +44,9 @@
|
||||
|
||||
const landslidePoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -65,13 +65,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.landslideHiddenPoint.id,
|
||||
() => loadingInformationStore.landslideHiddenPoint.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取滑坡隐患点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
useLoadingInformation.landslideHiddenPoint.id
|
||||
loadingInformationStore.landslideHiddenPoint.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -95,7 +95,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.landslideHiddenPoint.loading = true;
|
||||
loadingInformationStore.landslideHiddenPoint.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -104,19 +104,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showLandslideHiddenPoint.show,
|
||||
() => statusStore.poiLayers.showLandslideHiddenPoint.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示滑坡隐患点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.LANDSLIDE_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏滑坡隐患点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.LANDSLIDE_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载风险点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && riskPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && riskPoints.length > 0"
|
||||
:base-points="riskPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.riskPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="riskPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.riskPoint.loading"
|
||||
v-if="loadingInformationStore.riskPoint.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.riskPoint.id"
|
||||
:key="loadingInformationStore.riskPoint.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const riskPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -58,13 +58,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.riskPoint.id,
|
||||
() => loadingInformationStore.riskPoint.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取风险点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -72,7 +72,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.riskSpots.getPointDetailById(
|
||||
useLoadingInformation.riskPoint.id
|
||||
loadingInformationStore.riskPoint.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -87,7 +87,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.riskPoint.loading = true;
|
||||
loadingInformationStore.riskPoint.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -96,17 +96,17 @@
|
||||
|
||||
// 监听显示隐藏风险点
|
||||
watch(
|
||||
() => useStatus.mapLayers.riskPointShow.show,
|
||||
() => statusStore.mapLayers.riskPointShow.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- 加载内涝隐患点 -->
|
||||
<LoadingPoints
|
||||
v-if="
|
||||
useStatus.appLoadingCompleted && waterLoggingPoints.length > 0
|
||||
statusStore.appLoadingCompleted && waterLoggingPoints.length > 0
|
||||
"
|
||||
:base-points="waterLoggingPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
@@ -17,11 +17,11 @@
|
||||
<InformationBox
|
||||
:data="waterLoggingPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.waterLoggingHiddenPoint.loading"
|
||||
v-if="loadingInformationStore.waterLoggingHiddenPoint.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.waterLoggingHiddenPoint.id"
|
||||
:key="loadingInformationStore.waterLoggingHiddenPoint.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -46,9 +46,9 @@
|
||||
|
||||
const waterLoggingPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -67,13 +67,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.waterLoggingHiddenPoint.id,
|
||||
() => loadingInformationStore.waterLoggingHiddenPoint.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取内涝隐患点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -81,7 +81,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
useLoadingInformation.waterLoggingHiddenPoint.id
|
||||
loadingInformationStore.waterLoggingHiddenPoint.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -97,7 +97,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.waterLoggingHiddenPoint.loading = true;
|
||||
loadingInformationStore.waterLoggingHiddenPoint.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -106,19 +106,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showWaterLoggingHiddenPoint.show,
|
||||
() => statusStore.poiLayers.showWaterLoggingHiddenPoint.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示内涝隐患点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.WATER_LOGGING_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏内涝隐患点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.WATER_LOGGING_HIDDEN_POINT
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载桥梁点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && bridgeList.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && bridgeList.length > 0"
|
||||
:base-points="bridgeList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.bridgePointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="storePointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.bridge.loading"
|
||||
v-if="loadingInformationStore.bridge.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.bridge.id"
|
||||
:key="loadingInformationStore.bridge.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const bridgeList = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.bridge.id,
|
||||
() => loadingInformationStore.bridge.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取桥梁点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.bridges.getPointDetailById(
|
||||
useLoadingInformation.bridge.id
|
||||
loadingInformationStore.bridge.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.bridge.loading = true;
|
||||
loadingInformationStore.bridge.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,18 +98,18 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showBridge.show,
|
||||
() => statusStore.infrastructureLayers.showBridge.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示桥梁点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.BRIDGE)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.BRIDGE)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏桥梁点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.BRIDGE)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.BRIDGE)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载危险源 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && dangerousSourcePoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && dangerousSourcePoints.length > 0"
|
||||
:base-points="dangerousSourcePoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.dangerousSourcePointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="dangerousSourcePointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.dangerousSource.loading"
|
||||
v-if="loadingInformationStore.dangerousSource.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.dangerousSource.id"
|
||||
:key="loadingInformationStore.dangerousSource.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const dangerousSourcePoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.dangerousSource.id,
|
||||
() => loadingInformationStore.dangerousSource.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取危险源数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.dangerousSource.getPointDetailById(
|
||||
useLoadingInformation.dangerousSource.id
|
||||
loadingInformationStore.dangerousSource.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.dangerousSource.loading = true;
|
||||
loadingInformationStore.dangerousSource.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showDangerSource.show,
|
||||
() => statusStore.poiLayers.showDangerSource.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示危险源
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.DANGEROUS_SOURCE
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏危险源
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.DANGEROUS_SOURCE
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载避难所 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && emergencyShelterPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && emergencyShelterPoints.length > 0"
|
||||
:base-points="emergencyShelterPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.emergencyShelterPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="emergencyShelterPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.emergencyShelter.loading"
|
||||
v-if="loadingInformationStore.emergencyShelter.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.emergencyShelter.id"
|
||||
:key="loadingInformationStore.emergencyShelter.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const emergencyShelterPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.emergencyShelter.id,
|
||||
() => loadingInformationStore.emergencyShelter.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取避难所数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.emergencyShelter.getPointDetailById(
|
||||
useLoadingInformation.emergencyShelter.id
|
||||
loadingInformationStore.emergencyShelter.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.emergencyShelter.loading = true;
|
||||
loadingInformationStore.emergencyShelter.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showRefugeeShelter.show,
|
||||
() => statusStore.poiLayers.showRefugeeShelter.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示避难所
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.EMERGENCY_SHELTER
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏避难所
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.EMERGENCY_SHELTER
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载消防站 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && fireStationPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && fireStationPoints.length > 0"
|
||||
:base-points="fireStationPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.fireStationPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="fireStationPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.fireStation.loading"
|
||||
v-if="loadingInformationStore.fireStation.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.fireStation.id"
|
||||
:key="loadingInformationStore.fireStation.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const fireStationPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.fireStation.id,
|
||||
() => loadingInformationStore.fireStation.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取消防站数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.firefighter.getPointDetailById(
|
||||
useLoadingInformation.fireStation.id
|
||||
loadingInformationStore.fireStation.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.fireStation.loading = true;
|
||||
loadingInformationStore.fireStation.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showFireStation.show,
|
||||
() => statusStore.poiLayers.showFireStation.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示消防站
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.FIRE_STATION
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏消防站
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.FIRE_STATION
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { onMounted, watch } from 'vue';
|
||||
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 保存图层引用
|
||||
let highwayLayer: ImageryLayer | null = null;
|
||||
@@ -21,7 +21,7 @@
|
||||
onMounted(() => {
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showHighway.show,
|
||||
() => statusStore.infrastructureLayers.showHighway.show,
|
||||
(newValue: boolean) => {
|
||||
highwayLayer!.show = newValue;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载医院 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && hospitalPoints.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && hospitalPoints.length > 0"
|
||||
:base-points="hospitalPoints"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.hospitalPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="hospitalPointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.hospital.loading"
|
||||
v-if="loadingInformationStore.hospital.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.hospital.id"
|
||||
:key="loadingInformationStore.hospital.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const hospitalPoints = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.hospital.id,
|
||||
() => loadingInformationStore.hospital.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取医院数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.hospitals.getPointDetailById(
|
||||
useLoadingInformation.hospital.id
|
||||
loadingInformationStore.hospital.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.hospital.loading = true;
|
||||
loadingInformationStore.hospital.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,18 +98,18 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showHospital.show,
|
||||
() => statusStore.poiLayers.showHospital.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示医院
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.HOSPITAL)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.HOSPITAL)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏医院
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.HOSPITAL)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.HOSPITAL)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { onMounted, watch } from 'vue';
|
||||
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 保存图层引用
|
||||
let mainRoadLayer: ImageryLayer | null = null;
|
||||
@@ -21,7 +21,7 @@
|
||||
onMounted(() => {
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showMainRoad.show,
|
||||
() => statusStore.infrastructureLayers.showMainRoad.show,
|
||||
(newValue: boolean) => {
|
||||
mainRoadLayer!.show = newValue;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { onMounted, watch } from 'vue';
|
||||
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 保存图层引用
|
||||
let populationLayer: ImageryLayer | null = null;
|
||||
@@ -21,7 +21,7 @@
|
||||
onMounted(() => {
|
||||
// 监听显示
|
||||
watch(
|
||||
() => useStatus.poiLayers.showPopulationGrid.show,
|
||||
() => statusStore.poiLayers.showPopulationGrid.show,
|
||||
(newValue: boolean) => {
|
||||
populationLayer!.show = newValue;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载水库点位 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && reservoirList.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && reservoirList.length > 0"
|
||||
:base-points="reservoirList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.reservoirPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="reservoirDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.reservoir.loading"
|
||||
v-if="loadingInformationStore.reservoir.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.reservoir.id"
|
||||
:key="loadingInformationStore.reservoir.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -32,7 +32,7 @@
|
||||
import config from '@/config/config.json';
|
||||
import InformationBox from '@/component/common/InformationBox.vue';
|
||||
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||
import { useLoadingInformationStore } from '@/stores/useLoadingInformation.ts';
|
||||
import { useLoadingInformationStore } from '@/stores/useLoadingInformation';
|
||||
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils.ts';
|
||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||
import { useReservoirPoint } from '@/hooks/rain-earthquake/useReservoirPoint.ts';
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const reservoirList = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.reservoir.id,
|
||||
() => loadingInformationStore.reservoir.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取水库数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.reservoirs.getPointDetailById(
|
||||
useLoadingInformation.reservoir.id
|
||||
loadingInformationStore.reservoir.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.reservoir.loading = true;
|
||||
loadingInformationStore.reservoir.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,21 +98,17 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showReservoir?.show,
|
||||
() => statusStore.infrastructureLayers.showReservoir?.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示水库
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
LoadingResource.RESERVOIR
|
||||
).ids
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.RESERVOIR).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏水库
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
LoadingResource.RESERVOIR
|
||||
).ids
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.RESERVOIR).ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载学校点位 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && schoolList.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && schoolList.length > 0"
|
||||
:base-points="schoolList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.schoolPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="schoolDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.school.loading"
|
||||
v-if="loadingInformationStore.school.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.school.id"
|
||||
:key="loadingInformationStore.school.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const schoolList = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.school.id,
|
||||
() => loadingInformationStore.school.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取学校数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.schools.getPointDetailById(
|
||||
useLoadingInformation.school.id
|
||||
loadingInformationStore.school.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.school.loading = true;
|
||||
loadingInformationStore.school.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,18 +98,18 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showSchool?.show,
|
||||
() => statusStore.poiLayers.showSchool?.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示学校
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.SCHOOL)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.SCHOOL)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏学校
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(LoadingResource.SCHOOL)
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.SCHOOL)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载物资储备点 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && storePointsList.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && storePointsList.length > 0"
|
||||
:base-points="storePointsList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.storePointsPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="storePointDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.storePoints.loading"
|
||||
v-if="loadingInformationStore.storePoints.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.storePoints.id"
|
||||
:key="loadingInformationStore.storePoints.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const storePointsList = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.storePoints.id,
|
||||
() => loadingInformationStore.storePoints.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取物资储备点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.storePoints.getPointDetailById(
|
||||
useLoadingInformation.storePoints.id
|
||||
loadingInformationStore.storePoints.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.storePoints.loading = true;
|
||||
loadingInformationStore.storePoints.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showReservePoint.show,
|
||||
() => statusStore.poiLayers.showReservePoint.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示物资储备点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.STORE_POINTS
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏物资储备点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.STORE_POINTS
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<!-- 加载地铁站点点位 -->
|
||||
<LoadingPoints
|
||||
v-if="useStatus.appLoadingCompleted && subwayStationList.length > 0"
|
||||
v-if="statusStore.appLoadingCompleted && subwayStationList.length > 0"
|
||||
:base-points="subwayStationList"
|
||||
:get-disaster-icon="getDisasterIcon"
|
||||
:prefix="config.prefix.subwayStationPointId"
|
||||
@@ -15,11 +15,11 @@
|
||||
<InformationBox
|
||||
:data="subwayStationDetail as Record<string, any>"
|
||||
:field="field"
|
||||
v-if="useLoadingInformation.subwayStation.loading"
|
||||
v-if="loadingInformationStore.subwayStation.loading"
|
||||
:title="informationBoxTitle"
|
||||
:offset-x="offsetX"
|
||||
:offset-y="offsetY"
|
||||
:key="useLoadingInformation.subwayStation.id"
|
||||
:key="loadingInformationStore.subwayStation.id"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
const subwayStationList = ref<Point[]>([]);
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const useLoadingInformation = useLoadingInformationStore();
|
||||
const useLoadingResource = useLoadingResourceStore();
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
// 监听id变化
|
||||
watch(
|
||||
() => useLoadingInformation.subwayStation.id,
|
||||
() => loadingInformationStore.subwayStation.id,
|
||||
async (newId: number) => {
|
||||
if (newId === -1) {
|
||||
return;
|
||||
}
|
||||
// 获取地铁站点数据
|
||||
const clickObject = useLoadingInformation.clickObject;
|
||||
const clickObject = loadingInformationStore.clickObject;
|
||||
|
||||
if (!clickObject || !clickObject.primitive) {
|
||||
console.warn('点击对象或图元不存在');
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
const res = await $api.subwayStations.getPointDetailById(
|
||||
useLoadingInformation.subwayStation.id
|
||||
loadingInformationStore.subwayStation.id
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -89,7 +89,7 @@
|
||||
offsetY.value = screenPos.y;
|
||||
|
||||
// 显示新的信息框
|
||||
useLoadingInformation.subwayStation.loading = true;
|
||||
loadingInformationStore.subwayStation.loading = true;
|
||||
} catch (error) {
|
||||
throw new Error(`坐标转换失败:${error}`);
|
||||
}
|
||||
@@ -98,19 +98,19 @@
|
||||
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.poiLayers.showSubwayStation?.show,
|
||||
() => statusStore.poiLayers.showSubwayStation?.show,
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
// 显示地铁站点
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.SUBWAY_STATION
|
||||
).ids
|
||||
);
|
||||
} else {
|
||||
// 隐藏地铁站点
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
useLoadingResource.getLoadingResource(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.SUBWAY_STATION
|
||||
).ids
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { onMounted, watch } from 'vue';
|
||||
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 保存图层引用
|
||||
let trafficRoadLayer: ImageryLayer | null = null;
|
||||
@@ -21,7 +21,7 @@
|
||||
onMounted(() => {
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showTrafficRoad.show,
|
||||
() => statusStore.infrastructureLayers.showTrafficRoad.show,
|
||||
(newValue: boolean) => {
|
||||
trafficRoadLayer!.show = newValue;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { onMounted, watch } from 'vue';
|
||||
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
|
||||
// 保存图层引用
|
||||
let waterPipeLayer: ImageryLayer | null = null;
|
||||
@@ -21,7 +21,7 @@
|
||||
onMounted(() => {
|
||||
// 监听显示隐藏
|
||||
watch(
|
||||
() => useStatus.infrastructureLayers.showNetworkSystem.show,
|
||||
() => statusStore.infrastructureLayers.showNetworkSystem.show,
|
||||
(newValue: boolean) => {
|
||||
waterPipeLayer!.show = newValue;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="around-analysis-box"
|
||||
v-show="useStatus.functionStatus.aroundAnalysis.show"
|
||||
v-show="statusStore.functionStatus.aroundAnalysis.show"
|
||||
>
|
||||
<!-- 搜索组件 -->
|
||||
<SearchComponent />
|
||||
@@ -20,7 +20,7 @@
|
||||
import ButtonComponent from './around-analysis/ButtonComponent.vue';
|
||||
import SearchComponent from './around-analysis/SearchComponent.vue';
|
||||
|
||||
const useStatus = useStatusStore();
|
||||
const statusStore = useStatusStore();
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user