diff --git a/packages/screen/src/assets/MaMap_img/蓝色@2x (1).png b/packages/screen/src/assets/MaMap_img/桥梁icon@2x.png similarity index 100% rename from packages/screen/src/assets/MaMap_img/蓝色@2x (1).png rename to packages/screen/src/assets/MaMap_img/桥梁icon@2x.png diff --git a/packages/screen/src/assets/MaMap_img/线路icon定位@2x.png b/packages/screen/src/assets/MaMap_img/线路icon定位@2x.png new file mode 100644 index 0000000..17adfbe Binary files /dev/null and b/packages/screen/src/assets/MaMap_img/线路icon定位@2x.png differ diff --git a/packages/screen/src/assets/MaMap_img/队伍icon定位@2x.png b/packages/screen/src/assets/MaMap_img/队伍icon@2x.png similarity index 100% rename from packages/screen/src/assets/MaMap_img/队伍icon定位@2x.png rename to packages/screen/src/assets/MaMap_img/队伍icon@2x.png diff --git a/packages/screen/src/assets/MaMap_img/隧洞icon定位@2x.png b/packages/screen/src/assets/MaMap_img/隧洞icon@2x.png similarity index 100% rename from packages/screen/src/assets/MaMap_img/隧洞icon定位@2x.png rename to packages/screen/src/assets/MaMap_img/隧洞icon@2x.png diff --git a/packages/screen/src/views/RiskWarning/Dialog/mapInfoDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/mapInfoDialog.vue new file mode 100644 index 0000000..f68c16c --- /dev/null +++ b/packages/screen/src/views/RiskWarning/Dialog/mapInfoDialog.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/packages/screen/src/views/RiskWarning/Dialog/tunnelInfoDialog.vue b/packages/screen/src/views/RiskWarning/Dialog/tunnelInfoDialog.vue index 330cfbe..5e57899 100644 --- a/packages/screen/src/views/RiskWarning/Dialog/tunnelInfoDialog.vue +++ b/packages/screen/src/views/RiskWarning/Dialog/tunnelInfoDialog.vue @@ -22,7 +22,7 @@ {{ item.value }} -
+ @@ -47,9 +47,9 @@ const props = defineProps({ data: { type: Object, default: () => ({ - title: "隧道信息", + title: "项目信息", items: [ - { label: "隧道名称", value: "蔺市隧道右线" }, + { label: "项目名称", value: "蔺市隧道右线" }, { label: "编号", value: "G212线" }, { label: "所属区县", value: "涪陵" }, { label: "隧道长度", value: "1782(米)" }, diff --git a/packages/screen/src/views/RiskWarning/bottom.vue b/packages/screen/src/views/RiskWarning/bottom.vue index d8b4be2..0e1ed6e 100644 --- a/packages/screen/src/views/RiskWarning/bottom.vue +++ b/packages/screen/src/views/RiskWarning/bottom.vue @@ -6,7 +6,7 @@ :key="index" class="nav-item" :class="{ active: activeIndex === index }" - @click="activeIndex = index" + @click="handleClick(index)" >
@@ -101,14 +102,14 @@
- +
- +
@@ -306,6 +307,40 @@ const dialogVisible = ref({ warningSituation: false, tunnelInfo: false }); +const activeIndex = ref(0); + +// 地图组件引用 +const chongqingMapRef = ref(null); + +// 切换导航项时触发 +const changeActiveIndex = (index) => { + activeIndex.value = index; +}; + +// 打开资源详情(队伍、人员、装备、物资) +const openResourceDetail = (item) => { + console.log("打开资源详情:", item); + // 判断是否为队伍或人员 + if (item.label === "全市普通公路抢险队伍" || item.label === "人员") { + // 调用地图组件的获取应急力量方法 + if (chongqingMapRef.value) { + chongqingMapRef.value.getEmergencyForceData(); + } + } + // 打开对应的弹窗 + const key = item.label.toLowerCase().replace(/[^a-z]/g, ""); + if (dialogVisible.value[key] !== undefined) { + dialogVisible.value[key] = true; + } +}; + +// 清除地图标记 +const clearMapMarkers = () => { + console.log("清除地图标记"); + if (chongqingMapRef.value) { + chongqingMapRef.value.clearProjectMarkers(); + } +}; // 打开弹窗 const openDialog = (dialogName) => { diff --git a/packages/screen/src/views/RiskWarning/right.vue b/packages/screen/src/views/RiskWarning/right.vue index fee29fd..84e9fbe 100644 --- a/packages/screen/src/views/RiskWarning/right.vue +++ b/packages/screen/src/views/RiskWarning/right.vue @@ -12,6 +12,7 @@ v-for="(item, index) in resourceData" :key="index" class="resource-item" + @click="handleResourceClick(item)" > @@ -215,7 +216,11 @@ import icon62 from "../../assets/RiskWarning_img/路径62@2x.png"; import icon621 from "../../assets/RiskWarning_img/路径62@2x (1).png"; import icon622 from "../../assets/RiskWarning_img/路径62@2x (2).png"; -const emit = defineEmits(["openClearanceSituation", "openControlSituation"]); +const emit = defineEmits([ + "openClearanceSituation", + "openControlSituation", + "openResourceDetail", +]); // 组件挂载时获取数据 onMounted(() => { @@ -251,6 +256,7 @@ const getYhYjllList = async () => { resourceData.value[1].unit = "人"; } resourceData.value[0].value = gl1Yjllmcs; + } } catch (error) { console.error("获取应急力量列表失败:", error); @@ -369,6 +375,11 @@ const resourceData = ref([ }, ]); +// 点击资源项 +const handleResourceClick = (item) => { + emit("openResourceDetail", item); +}; + // 管控路段数据 const controlData1 = [ { label: "封闭管控数", value: "40" }, diff --git a/packages/screen/vite.config.js b/packages/screen/vite.config.js index 8962074..84e66ad 100644 --- a/packages/screen/vite.config.js +++ b/packages/screen/vite.config.js @@ -93,9 +93,9 @@ export default defineConfig(({ command, mode }) => { cors: true, proxy: { '/snow-ops-platform': { - target: 'http://192.168.110.16:8661/', + // target: 'http://192.168.110.16:8661/', // target: 'http://8.137.54.85:8661/', //测试环境 - // target: 'http://192.168.110.36:8661/', //张启生本地环境 + target: 'http://192.168.110.36:8661/', //张启生本地环境 changeOrigin: true, }, }