Hwf 7 месяцев назад
Родитель
Сommit
456ecf3119

+ 8 - 0
src/types/components.d.ts

@@ -23,6 +23,7 @@ declare module 'vue' {
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCard: typeof import('element-plus/es')['ElCard']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
@@ -43,12 +44,17 @@ declare module 'vue' {
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
+    ElPopover: typeof import('element-plus/es')['ElPopover']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
     ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
     ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
@@ -59,6 +65,7 @@ declare module 'vue' {
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
+    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
     FooterSection: typeof import('./../components/FooterSection/index.vue')['default']
@@ -69,6 +76,7 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
+    IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 5 - 5
src/views/globalMap/RightMenu/DrawTools.vue

@@ -4,7 +4,7 @@
       <div class="item-label">画笔选择</div>
       <i class="color-box" :style="{ backgroundColor: colorList[drawerColorIndex]?.value }" />
       <!--弹窗选择器-->
-      <div v-show="showColorSelect" ref="selectBoxRef" class="select-box" style="top: -149px; padding-bottom: 20px">
+      <div v-show="showColorSelect" ref="selectBoxRef" class="select-box" style="top: -242px; padding-bottom: 20px">
         <div class="box-content">
           <div
             v-for="(item, index) in colorList"
@@ -21,7 +21,7 @@
     <div class="draw-item" @mouseover="showDrawTypeSelect = true" @mouseleave="showDrawTypeSelect = false">
       <div class="item-label">框面类型</div>
       <!--弹窗选择器-->
-      <div v-show="showDrawTypeSelect" ref="selectBoxRef2" class="select-box" style="top: -82px; padding-bottom: 20px">
+      <div v-show="showDrawTypeSelect" ref="selectBoxRef2" class="select-box" style="top: -127px; padding-bottom: 20px">
         <div class="box-content">
           <div
             v-for="(item, index) in drawTypeList"
@@ -37,7 +37,7 @@
     <div class="draw-item" @mouseover="showGraphicsTypeSelect = true" @mouseleave="showGraphicsTypeSelect = false">
       <div class="item-label">图像类型</div>
       <!--弹窗选择器-151-->
-      <div v-show="showGraphicsTypeSelect" ref="selectBoxRef2" class="select-box" style="top: -115.5px; padding-bottom: 20px">
+      <div v-show="showGraphicsTypeSelect" ref="selectBoxRef2" class="select-box" style="top: -184.5px; padding-bottom: 20px">
         <div class="box-content">
           <div
             v-for="(item, index) in graphicsTypeList"
@@ -345,8 +345,8 @@ const analysisSpatial = (data) => {
 <style lang="scss" scoped>
 .draw-tools-container {
   position: absolute;
-  left: -2400px;
-  bottom: -530px;
+  right: 255px;
+  bottom: 390px;
   background-color: #304468;
   border-radius: 5px;
   display: flex;

+ 13 - 7
src/views/globalMap/RightMenu/SpatialAnalysis.vue

@@ -30,15 +30,16 @@
       </div>
     </div>
   </div>
-  <DrawTools @handleAnalysisData="handleAnalysisData" />
 </template>
 
 <script lang="ts" setup name="AnalyzeDataDialog">
-import DrawTools from './DrawTools.vue';
 import { validateNum } from '@/utils/ruoyi';
 import { getSpatialAnalysis } from '@/api/globalMap';
 import { deepClone } from '@/utils';
 
+const props = defineProps({
+  updateLocation: []
+});
 const emits = defineEmits(['handleMenu']);
 const keyword = ref('');
 let analysisData = ref({
@@ -77,6 +78,16 @@ const filteredSubItems = (parentItem) => {
   });
 };
 const location = ref([]);
+watch(
+  () => props.updateLocation,
+  () => {
+    location.value = props.updateLocation;
+  },
+  {
+    immediate: true,
+    deep: true
+  }
+);
 watch(
   () => location,
   () => {
@@ -98,11 +109,6 @@ watch(
     deep: true
   }
 );
-
-const handleAnalysisData = (data) => {
-  location.value = data;
-  emits('handleMenu', '空间分析');
-};
 </script>
 
 <style lang="scss" scoped>

+ 14 - 6
src/views/globalMap/RightMenu/index.vue

@@ -23,7 +23,7 @@
         <!--图层分析-->
         <LayerAnalysis v-if="menuState.showMenu && menuState.menuData[menuState.activeIndex]?.name === '图层分析'" :point-type="pointType" />
         <!--空间分析-->
-        <SpatialAnalysis v-if="menuState.showMenu && menuState.menuData[menuState.activeIndex]?.name === '空间分析'" @handle-menu="handleMenu" />
+        <SpatialAnalysis v-if="menuState.showMenu && menuState.menuData[menuState.activeIndex]?.name === '空间分析'" :updateLocation="location" @handle-menu="handleMenu" />
         <!--江湖河库-->
         <Reservoir v-if="menuState.showMenu && menuState.menuData[menuState.activeIndex]?.name === '江湖河库'" />
         <!--路网视频-->
@@ -109,13 +109,19 @@ const clickMenu = (index) => {
   menuState.showMenu = true;
   menuState.activeIndex = index;
 };
-
+let location = ref([]);
 // 显示菜单
-const handleMenu = (name) => {
+const handleMenu = (name, data) => {
   let index = menuState.menuData.findIndex((item) => {
     return item.name === name;
   });
-  if (index > -1) {
+  if (name === '空间分析') {
+    menuState.showMenu = true;
+    menuState.activeIndex = index;
+    nextTick(() => {
+      location.value = data;
+    });
+  } else if (index > -1) {
     clickMenu(index);
   }
 };
@@ -142,8 +148,10 @@ const updateMenu = (type, menu) => {
     }
   }
 };
-
-defineExpose({ handleMenu, clickContractMenu, updateMenu });
+const getMenuState = () => {
+  return menuState;
+};
+defineExpose({ handleMenu, clickContractMenu, updateMenu, getMenuState });
 </script>
 
 <style lang="scss" scoped>

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

@@ -13,6 +13,7 @@
       <SwitchMapTool :active-map="activeMap" class="tool-box" @switch-map="switchMap" />
       <!--时间轴-->
       <TimeAxis />
+      <DrawTools v-if="showDrawTools" @handleAnalysisData="handleAnalysisData" />
       <NearbyVideos v-if="showNearbyVideos" v-model="showNearbyVideos" :location="location" />
     </div>
   </div>
@@ -30,6 +31,7 @@ import { deepClone } from '@/utils';
 import { getPointInfo } from '@/api/globalMap';
 import RightMenu from './RightMenu/index.vue';
 import { PointType } from '@/api/globalMap/type';
+import DrawTools from '@/views/globalMap/RightMenu/DrawTools.vue';
 
 const rightMenuRef = ref(null);
 const mapData = reactive(logicalData);
@@ -41,7 +43,6 @@ let activeMap = ref('logical');
 const switchMap = (key) => {
   activeMap.value = key;
 };
-
 let pointType = ref<PointType[]>([]);
 let markerList = ref([]);
 const addMarkers = (item) => {
@@ -142,7 +143,9 @@ const selectSearchMarker = (item) => {
   }
   dom.addSearchMarker(item2);
 };
-
+const handleAnalysisData = (data) => {
+  rightMenuRef.value.handleMenu('空间分析', data);
+};
 // 获取地图元素操作
 const getMap = () => {
   if (['satellite2', 'satellite3'].includes(activeMap.value)) {