ソースを参照

空文件处理

Hwf 7 ヶ月 前
コミット
0b6f0b7b6f

+ 7 - 0
src/api/duty/eventing.ts

@@ -8,6 +8,13 @@ export function getEvent(params) {
     params: params
   });
 }
+// 获取不是临时事件、未结束、未关闭的事件列表接口
+export function getEventActiveList() {
+  return request({
+    url: '/api/event_management/event/list_active',
+    method: 'post'
+  });
+}
 //获取天气
 export function getWeather(params) {
   return request({

+ 1 - 1
src/assets/styles/sidebar.scss

@@ -187,7 +187,7 @@
         }
       }
     }
-    & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
+    //& .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
     & .theme-dark .el-sub-menu .el-menu-item.is-active {
       background-color: #2c81ff !important;
     }

+ 1 - 1
src/components/Map/index.vue

@@ -108,7 +108,7 @@ const {
   version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
   pitch: mapState.isThreeDimensional ? 45 : 0,
   zoom: mapState.zoom,
-  center: [mapState.center[0], mapState.center[1]],
+  // center: [],
   dragEnable: true,
   scrollWheel: true,
   showScale: true,

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

@@ -1,120 +0,0 @@
-/* eslint-disable */
-/* prettier-ignore */
-// @ts-nocheck
-// Generated by unplugin-vue-components
-// Read more: https://github.com/vuejs/core/pull/3399
-export {}
-
-declare module 'vue' {
-  export interface GlobalComponents {
-    ApprovalRecord: typeof import('./../components/Process/approvalRecord.vue')['default']
-    BpmnDesign: typeof import('./../components/BpmnDesign/index.vue')['default']
-    BpmnView: typeof import('./../components/BpmnView/index.vue')['default']
-    Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
-    BuildCode: typeof import('./../components/BuildCode/index.vue')['default']
-    Chart: typeof import('./../components/Chart/index.vue')['default']
-    ChunkUpload: typeof import('./../components/ChunkUpload/index.vue')['default']
-    CompanyMap: typeof import('./../components/Map/company-map.vue')['default']
-    ContactSelect: typeof import('./../components/ContactSelect/index.vue')['default']
-    Dialog: typeof import('./../components/Dialog/index.vue')['default']
-    DictTag: typeof import('./../components/DictTag/index.vue')['default']
-    DistributionMap: typeof import('./../components/Map/YztMap/DistributionMap.vue')['default']
-    Editor: typeof import('./../components/Editor/index.vue')['default']
-    ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
-    ElBadge: typeof import('element-plus/es')['ElBadge']
-    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']
-    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
-    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
-    ElDialog: typeof import('element-plus/es')['ElDialog']
-    ElDivider: typeof import('element-plus/es')['ElDivider']
-    ElDrawer: typeof import('element-plus/es')['ElDrawer']
-    ElDropdown: typeof import('element-plus/es')['ElDropdown']
-    ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
-    ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
-    ElEmpty: typeof import('element-plus/es')['ElEmpty']
-    ElForm: typeof import('element-plus/es')['ElForm']
-    ElFormItem: typeof import('element-plus/es')['ElFormItem']
-    ElIcon: typeof import('element-plus/es')['ElIcon']
-    ElImage: typeof import('element-plus/es')['ElImage']
-    ElInput: typeof import('element-plus/es')['ElInput']
-    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
-    ElLink: typeof import('element-plus/es')['ElLink']
-    ElMenu: typeof import('element-plus/es')['ElMenu']
-    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']
-    ElSegmented: typeof import('element-plus/es')['ElSegmented']
-    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']
-    ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
-    ElSwitch: typeof import('element-plus/es')['ElSwitch']
-    ElTable: typeof import('element-plus/es')['ElTable']
-    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
-    ElTag: typeof import('element-plus/es')['ElTag']
-    ElText: typeof import('element-plus/es')['ElText']
-    ElTimeline: typeof import('element-plus/es')['ElTimeline']
-    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']
-    ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
-    FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
-    FooterSection: typeof import('./../components/FooterSection/index.vue')['default']
-    Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
-    HeaderSearch: typeof import('./../components/HeaderSearch/index.vue')['default']
-    HeaderSection: typeof import('./../components/HeaderSection/index.vue')['default']
-    HikvisionH5player: typeof import('./../components/HKVideo/hikvision-h5player.vue')['default']
-    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']
-    IFrame: typeof import('./../components/iFrame/index.vue')['default']
-    ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
-    ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
-    Index2: typeof import('./../components/Dialog/index2.vue')['default']
-    LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
-    LineWidthSelect: typeof import('./../components/LineWidthSelect/index.vue')['default']
-    Map: typeof import('./../components/Map/index.vue')['default']
-    ModalVideo: typeof import('./../components/HKVideo/modal-video.vue')['default']
-    MultiInstanceUser: typeof import('./../components/Process/multiInstanceUser.vue')['default']
-    NearbyVideos: typeof import('./../components/NearbyVideos/index.vue')['default']
-    Pagination: typeof import('./../components/Pagination/index.vue')['default']
-    ParentView: typeof import('./../components/ParentView/index.vue')['default']
-    QuickZoom: typeof import('./../components/Map/quickZoom.vue')['default']
-    Render: typeof import('./../components/BuildCode/render.vue')['default']
-    RightToolbar: typeof import('./../components/RightToolbar/index.vue')['default']
-    RoleSelect: typeof import('./../components/RoleSelect/index.vue')['default']
-    RouterLink: typeof import('vue-router')['RouterLink']
-    RouterView: typeof import('vue-router')['RouterView']
-    Screenfull: typeof import('./../components/Screenfull/index.vue')['default']
-    SizeSelect: typeof import('./../components/SizeSelect/index.vue')['default']
-    Step: typeof import('./../components/Step/index.vue')['default']
-    SubmitVerify: typeof import('./../components/Process/submitVerify.vue')['default']
-    SvgIcon: typeof import('./../components/SvgIcon/index.vue')['default']
-    TimeAxis: typeof import('./../components/TimeAxis/index.vue')['default']
-    TopNav: typeof import('./../components/TopNav/index.vue')['default']
-    TreeSelect: typeof import('./../components/TreeSelect/index.vue')['default']
-    UserSelect: typeof import('./../components/UserSelect/index.vue')['default']
-    VideoContainer: typeof import('./../components/HKVideo/video-container.vue')['default']
-    VideoContainer2: typeof import('./../components/HKVideo/video-container2.vue')['default']
-    YztMap: typeof import('./../components/Map/YztMap/index.vue')['default']
-  }
-  export interface ComponentCustomProperties {
-    vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-  }
-}

+ 5 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/GodownManagement.vue

@@ -1 +1,5 @@
-<!--仓库管理-->
+<template>
+  <!--仓库管理-->
+</template>
+<script lang="ts"></script>
+<style lang="scss" scoped></style>

+ 5 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/InboundManagement.vue

@@ -1 +1,5 @@
-<!--入库管理-->
+<template>
+  <!--入库管理-->
+</template>
+<script lang="ts"></script>
+<style lang="scss" scoped></style>

+ 6 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/MaterialInformation.vue

@@ -1 +1,6 @@
-<!--物资信息管理-->
+<template>
+  <!--物资信息管理-->
+</template>
+<script lang="ts">
+</script>
+<style lang="scss" scoped></style>

+ 6 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/MaterialStatistics.vue

@@ -1 +1,6 @@
-<!--物资统计-->
+<template>
+  <!--物资统计-->
+</template>
+<script lang="ts">
+</script>
+<style lang="scss" scoped></style>

+ 6 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/TypesMaterialsManagement.vue

@@ -1 +1,6 @@
-<!--物资种类管理-->
+<template>
+  <!--物资种类管理-->
+</template>
+<script lang="ts">
+</script>
+<style lang="scss" scoped></style>

+ 6 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/WarehouseManagement.vue

@@ -1 +1,6 @@
-<!--库房管理-->
+<template>
+  <!--库房管理-->
+</template>
+<script lang="ts">
+</script>
+<style lang="scss" scoped></style>

+ 166 - 0
src/views/comprehensiveGuarantee/electronicDisasterMapManage/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div ref="containerRef" class="map-container">
+    <div id="aMap" class="map"></div>
+    <!--左上事件列表-->
+    <div class="event-box">
+      <div class="tabs">
+        <div class="tab">事件位置</div>
+        <el-button type="primary">定点选取</el-button>
+        <!--        <div class="btn">定点选取</div>-->
+      </div>
+      <div class="event-list">
+        <div v-for="(item, index) in eventList" :key="index" class="event-item">
+          {{ item.event_title }}
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup name="electronicDisasterMapManage">
+// 初始化地图
+import { useAMap } from '@/hooks/AMap/useAMap';
+import { getEventActiveList } from '@/api/duty/eventing';
+
+let AMap, map, driving;
+let routeData = ref([]);
+const { getAMap, getMap, creatMask, switchMap } = useAMap({
+  key: '30d3d8448efd68cb0b284549fd41adcf', // 申请好的Web端开发者Key,首次调用 load 时必填
+  version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+  zoom: 9.5,
+  center: [110.925175, 22],
+  dragEnable: true,
+  scrollWheel: true,
+  plugins: ['AMap.Driving', 'AMap.DistrictSearch'],
+  // layers: 'satellite',
+  // 加载完成事件
+  onLoadCompleted: () => {
+    AMap = getAMap();
+    map = getMap();
+    creatMask([{ strokeWeight: 2 }]);
+    switchMap('satellite');
+    //构造路线导航类
+    driving = new AMap.Driving({
+      map: map
+    });
+    // 起点和终点
+    let start = [116.31252, 40.008924]; // 天安门
+    let end = [116.481028, 39.989643]; // 北京西站
+    calculateRoutes(start, end, 0);
+  },
+  onMarkerClick: (data) => {}
+});
+let eventList = ref([]);
+// 计算并展示三条路线
+const calculateRoutes = (start, end, index) => {
+  if (index >= 3) {
+    return;
+  }
+  // 不同的策略或参数来生成不同的路线
+  const policyMap = [
+    AMap.DrivingPolicy.LEAST_TIME, // 最短时间
+    AMap.DrivingPolicy.LEAST_DISTANCE, // 最短距离
+    AMap.DrivingPolicy.LEAST_FEE // 最少费用
+  ];
+  driving.setPolicy(policyMap[index]);
+
+  driving.search(new AMap.LngLat(start[0], start[1]), new AMap.LngLat(end[0], end[1]), function (status, result) {
+    if (status === 'complete' && result.info === 'OK') {
+      var route = result.routes[0];
+      var polyline = new AMap.Polyline({
+        path: route.path,
+        strokeColor: '#FF33FF', // 线颜色
+        strokeOpacity: 1, // 线透明度
+        strokeWeight: 6, // 线宽
+        strokeStyle: 'solid', // 线样式
+        strokeDasharray: [10, 5] // 虚线样式
+      });
+
+      // 根据索引设置不同的虚线样式或颜色
+      if (index === 1) {
+        polyline.setStrokeColor('#33FF33');
+      } else if (index === 2) {
+        polyline.setStrokeColor('#3333FF');
+      }
+
+      map.add(polyline);
+      if (index === 0) {
+        routeData.value = []
+      }
+      routeData.value.push(polyline);
+    }
+
+    // 计算下一条路线
+    calculateRoutes(start, end, index + 1);
+  });
+};
+const initData = () => {
+  getEventActiveList().then((res) => {
+    eventList.value = res.data;
+  });
+};
+onMounted(() => {
+  initData();
+});
+</script>
+
+<style lang="scss" scoped>
+.map-container {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  .map {
+    width: 100%;
+    height: 100%;
+    position: relative;
+    overflow: hidden;
+  }
+  .event-box {
+    position: absolute;
+    top: 10px;
+    left: 10px;
+    width: 200px;
+    min-height: 200px;
+    background-color: #213567;
+    color: #ffffff;
+    .tabs {
+      padding: 10px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      position: relative;
+      .tab {
+        font-size: 14px;
+      }
+      .btn {
+        position: absolute;
+        top: 0;
+        right: 0;
+        width: 134px;
+        height: 66px;
+        background: url('@/assets/images/common/btnPrimary3.png') no-repeat center center;
+        background-size: 100% 100%;
+        color: #ffffff;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        cursor: pointer;
+      }
+    }
+    .event-list {
+      display: flex;
+      flex-direction: column;
+      max-height: 250px;
+      overflow-y: auto;
+      .event-item {
+        cursor: pointer;
+        padding: 5px 10px;
+        &:hover {
+          background-color: #335293;
+        }
+      }
+    }
+  }
+}
+</style>