Bläddra i källkod

联合值守接口

Hwf 10 månader sedan
förälder
incheckning
237a5133c5

BIN
src/assets/images/emergencyCommandMap/duty/tr.png


+ 5 - 7
src/components/Map/YMap.vue

@@ -18,9 +18,9 @@
   </div>
 </template>
 <script setup lang="ts" name="YMap">
-import WMTSManager from "@/utils/wmtsManager";
-import QuickZoom from "@/components/Map/quickZoom.vue";
-import { reactive } from "vue";
+import WMTSManager from '@/utils/wmtsManager';
+import QuickZoom from '@/components/Map/quickZoom.vue';
+import { reactive } from 'vue';
 
 interface Props {
   activeMap: string;
@@ -89,7 +89,7 @@ const switchMap = (type) => {
     queryParamsArr = [
       {
         serviceCode: 'YZT1708679726700'
-      },
+      }
       // {
       //   serviceCode: 'YZT1695608158269',
       //   REQUEST: 'GetCapabilities'
@@ -148,9 +148,7 @@ const measureFunc = (e) => {
       // var area = turf.area(features[0]);
       // restrict to area to 2 decimal points
       var rounded_area = Math.round(area * 100) / 100;
-      var htmlStr = '<p>面积:<strong>' +
-        rounded_area +
-        '</strong> 平方米</p>';
+      var htmlStr = '<p>面积:<strong>' + rounded_area + '</strong> 平方米</p>';
       document.getElementById('resultD').innerHTML = htmlStr;
     }
   }

+ 1 - 1
src/views/emergencyCommandMap/RightSection/RenWuGengXin.vue

@@ -33,7 +33,7 @@
 
 <script lang="ts" setup>
 import { ref, reactive } from 'vue';
-import { updateTask } from '@/api/emergencyCommandMap/JointDuty.ts'; // 确保API路径正确
+import { updateTaskRegistration } from '@/api/emergencyCommandMap/JointDuty.ts'; // 确保API路径正确
 
 const showRegisterDialog = ref(false);
 const newTask = reactive({

+ 2 - 2
src/views/globalMap/index.vue

@@ -2,8 +2,8 @@
   <div id="globalMap">
     <div :class="isComponent ? 'global-map' : 'global-map bg'">
       <MapLogical v-if="activeMap === 'logical'" :map-data="mapData" />
-      <YMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" :activeMap="activeMap" />
-<!--      <YztMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" ref="map2Ref" :active-map="activeMap" :pointType="pointType" />-->
+<!--      <YMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" :activeMap="activeMap" />-->
+      <YztMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" ref="map2Ref" :active-map="activeMap" :pointType="pointType" />
       <Map v-else ref="mapRef" :active-map="activeMap" :pointType="pointType" />
       <!--左侧菜单-->
       <LeftMenu style="position: absolute; top: 20px; left: 20px" @click-menu="clickMenu" @select-search-marker="selectSearchMarker" />

+ 35 - 35
src/views/globalMapPage/index.vue

@@ -1,14 +1,14 @@
 <template>
-<!--  <div id="dashboard-container" ref="containerRef">-->
-<!--    <div class="dashboard-container">-->
-<!--      <HeaderSection />-->
-<!--      <div class="dashboard-content">-->
-<!--        <GlobalMap width="8798" height="2182" />-->
-<!--      </div>-->
-<!--      <FooterSection style="position: absolute; bottom: 0; left: 0" />-->
-<!--    </div>-->
-<!--  </div>-->
-  <YMap :active-map="'satellite2'" />
+  <div id="dashboard-container" ref="containerRef">
+    <div class="dashboard-container">
+      <HeaderSection />
+      <div class="dashboard-content">
+        <GlobalMap width="8798" height="2182" />
+      </div>
+      <FooterSection style="position: absolute; bottom: 0; left: 0" />
+    </div>
+  </div>
+<!--  <YMap :active-map="'satellite2'" />-->
 </template>
 
 <script lang="ts" setup name="globalMapPage">
@@ -20,16 +20,16 @@ const containerRef = ref();
 let scale = ref({ scaleX: 1, scaleY: 1 });
 provide('containerScale', () => scale.value);
 onMounted(() => {
-  // const a = autofit.init(
-  //   {
-  //     dw: 8960,
-  //     dh: 2520,
-  //     el: '#dashboard-container',
-  //     resize: false,
-  //     ignore: ['#aMap', '#YztMap']
-  //   },
-  //   false
-  // );
+  const a = autofit.init(
+    {
+      dw: 8960,
+      dh: 2520,
+      el: '#dashboard-container',
+      resize: false,
+      ignore: ['#aMap', '#YztMap']
+    },
+    false
+  );
   scale.value = getTransformScale(containerRef.value);
 });
 onUnmounted(() => {
@@ -38,19 +38,19 @@ onUnmounted(() => {
 </script>
 
 <style lang="scss" scoped>
-//.dashboard-container {
-//  width: 8960px;
-//  height: 2560px;
-//  font-size: 74px;
-//  background: url('@/assets/images/bg.jpg') no-repeat 100% 100%;
-//  background-size: cover;
-//  font-family: 'PingFang SC', sans-serif;
-//  position: relative;
-//  .dashboard-content {
-//    padding: 0 81px;
-//    display: flex;
-//    height: calc(2560px - 228px - 150px);
-//    overflow: hidden;
-//  }
-//}
+.dashboard-container {
+  width: 8960px;
+  height: 2560px;
+  font-size: 74px;
+  background: url('@/assets/images/bg.jpg') no-repeat 100% 100%;
+  background-size: cover;
+  font-family: 'PingFang SC', sans-serif;
+  position: relative;
+  .dashboard-content {
+    padding: 0 81px;
+    display: flex;
+    height: calc(2560px - 228px - 150px);
+    overflow: hidden;
+  }
+}
 </style>