Merge remote-tracking branch 'origin/main' into dsz

This commit is contained in:
zhuangzhuang2000
2026-04-25 20:27:47 +08:00
5 changed files with 34 additions and 18 deletions
+14 -1
View File
@@ -6,10 +6,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useAdministrativeDivision } from '@/hooks/map/useAdministrativeDivision'; import { useAdministrativeDivision } from '@/hooks/map/useAdministrativeDivision';
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore'; import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore';
import { useStatusStore } from '@/stores/useStatusStore';
import { LoadingResource } from '@/types/common/LoadingResourceType'; import { LoadingResource } from '@/types/common/LoadingResourceType';
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils'; import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
import { Color } from 'cesium'; import { Color } from 'cesium';
import { onMounted } from 'vue'; import { onMounted, watch } from 'vue';
// 配置参数 // 配置参数
const { areas, areasId, areasColor, areaTransparency, labelTransparency } = const { areas, areasId, areasColor, areaTransparency, labelTransparency } =
@@ -49,6 +50,18 @@
areasId areasId
); );
}); });
// 监听显示状态改变
watch(
() => useStatusStore().mapLayers.showAdministrativeDivision.show,
(newValue: boolean) => {
if (newValue) {
CesiumUtilsSingleton.batchShowGeoJsonLayers(areasId);
} else {
CesiumUtilsSingleton.batchHideGeoJsonLayers(areasId);
}
}
);
</script> </script>
<style scoped></style> <style scoped></style>
@@ -1,5 +1,8 @@
<template> <template>
<div class="control-show-panel-box"> <div
class="control-show-panel-box"
v-show="useStatusStore().uiComponents.controlPanel.show"
>
<div class="title-box"> <div class="title-box">
<header>控制显示</header> <header>控制显示</header>
</div> </div>
@@ -20,6 +23,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useLoadingInformationStore } from '@/stores/useLoadingInformation.ts'; import { useLoadingInformationStore } from '@/stores/useLoadingInformation.ts';
import { useStatusStore } from '@/stores/useStatusStore';
defineProps<{ defineProps<{
constrolShowList: { constrolShowList: {
@@ -1,5 +1,6 @@
<template> <template>
<div <div
v-show="useStatusStore().uiComponents.leftButton.show"
class="left-button-box" class="left-button-box"
:style="{ :style="{
left: `${useStatusStore().uiComponents.disasterChainPointShow.show ? 575 : 100}px`, left: `${useStatusStore().uiComponents.disasterChainPointShow.show ? 575 : 100}px`,
+14 -5
View File
@@ -1,4 +1,4 @@
import { ref } from 'vue'; import { ref, watch } from 'vue';
import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots'; import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
import type { PaginationType } from '@/types/common/PaginationType'; import type { PaginationType } from '@/types/common/PaginationType';
import { PointType } from '@/types/common/DisasterType'; import { PointType } from '@/types/common/DisasterType';
@@ -31,12 +31,12 @@ export const useRainDisasterChain = () => {
/** /**
* 下拉选项 * 下拉选项
*/ */
const selectOptions = [ const selectOptions = ref([
{ value: PointType.LANDSLIDE, label: '滑坡' }, { value: PointType.LANDSLIDE, label: '滑坡' },
{ value: PointType.DEBRIS_FLOW, label: '泥石流' }, { value: PointType.DEBRIS_FLOW, label: '泥石流' },
{ value: PointType.FLASH_FLOOD, label: '山洪' }, { value: PointType.FLASH_FLOOD, label: '山洪' },
{ value: PointType.WATER_LOGGING, label: '内涝' }, { value: PointType.WATER_LOGGING, label: '内涝' },
]; ]);
/** /**
* 表格数据 * 表格数据
@@ -46,12 +46,12 @@ export const useRainDisasterChain = () => {
/** /**
* 表头配置 * 表头配置
*/ */
const tableColumns = [ const tableColumns = ref([
{ title: '名称', key: 'disasterName' }, { title: '名称', key: 'disasterName' },
{ title: '位置', key: 'position' }, { title: '位置', key: 'position' },
{ title: '规模等级', key: 'scaleGrade' }, { title: '规模等级', key: 'scaleGrade' },
{ title: '险情等级', key: 'riskGrade' }, { title: '险情等级', key: 'riskGrade' },
]; ]);
/** /**
* 分页配置 * 分页配置
@@ -303,6 +303,15 @@ export const useRainDisasterChain = () => {
]; ];
}; };
// 监听条件变化
watch(
conditions,
() => {
console.log('条件改变');
},
{ deep: true }
);
return { return {
conditions, conditions,
selectOptions, selectOptions,
@@ -71,13 +71,11 @@
import { useRainDisasterChain } from '@/hooks/rainstorm/useRainDisasterChain'; import { useRainDisasterChain } from '@/hooks/rainstorm/useRainDisasterChain';
import { useStatusStore } from '@/stores/useStatusStore'; import { useStatusStore } from '@/stores/useStatusStore';
import { DisasterType } from '@/types/common/DisasterType.ts'; import { DisasterType } from '@/types/common/DisasterType.ts';
import { watch } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
const route = useRoute(); const route = useRoute();
const { const {
conditions,
selectOptions, selectOptions,
tableDatas, tableDatas,
tableColumns, tableColumns,
@@ -89,15 +87,6 @@
changeConditions, changeConditions,
changeCurrentPage, changeCurrentPage,
} = useRainDisasterChain(); } = useRainDisasterChain();
// 监听条件变化
watch(
conditions,
() => {
console.log('条件改变');
},
{ deep: true }
);
</script> </script>
<style scoped></style> <style scoped></style>