rui.jiang 1 week geleden
bovenliggende
commit
efb675f7fb

+ 36 - 36
src/components/map/index.vue

@@ -265,44 +265,44 @@ export default {
     });
 
     // -------------【添加山西省真实边界线】------------- 定位全国的时候注释这个代码
-    if (this.$route.path === "/home/cockpitManage") {
-      // 通过导入的 JSON 文件加载边界数据(GeoJSON 格式),并解析成矢量要素
-      const shanxiSource = new Vector({
-        features: new GeoJSON().readFeatures(shanxiBoundary, {
-          featureProjection: "EPSG:4326",
-        }),
-      });
-      // 创建矢量图层,仅显示边界线(填充颜色设为透明)
-      const shanxiLayer = new VectorLayer({
-        source: shanxiSource,
-        style: new Style({
-          stroke: new Stroke({
-            color: "rgba(59, 130, 246, 0.5)",
-            width: 3,
-          }),
-          fill: new Fill({
-            color: "rgba(59, 130, 246, 0.05)", // 透明填充
-          }),
-        }),
-      });
-      this.map.addLayer(shanxiLayer);
+    // if (this.$route.path === "/home/cockpitManage") {
+    //   // 通过导入的 JSON 文件加载边界数据(GeoJSON 格式),并解析成矢量要素
+    //   const shanxiSource = new Vector({
+    //     features: new GeoJSON().readFeatures(shanxiBoundary, {
+    //       featureProjection: "EPSG:4326",
+    //     }),
+    //   });
+    //   // 创建矢量图层,仅显示边界线(填充颜色设为透明)
+    //   const shanxiLayer = new VectorLayer({
+    //     source: shanxiSource,
+    //     style: new Style({
+    //       stroke: new Stroke({
+    //         color: "rgba(59, 130, 246, 0.5)",
+    //         width: 3,
+    //       }),
+    //       fill: new Fill({
+    //         color: "rgba(59, 130, 246, 0.05)", // 透明填充
+    //       }),
+    //     }),
+    //   });
+    //   this.map.addLayer(shanxiLayer);
 
-      const markerLayer = this.map
-        .getLayers()
-        .getArray()
-        .find((layer) => {
-          return layer.get("id") === "marker";
-        });
-      if (markerLayer) {
-        markerLayer.setZIndex(10);
-      }
+    //   const markerLayer = this.map
+    //     .getLayers()
+    //     .getArray()
+    //     .find((layer) => {
+    //       return layer.get("id") === "marker";
+    //     });
+    //   if (markerLayer) {
+    //     markerLayer.setZIndex(10);
+    //   }
 
-      // 同时设置高亮图层 zIndex 较低
-      shanxiLayer.setZIndex(1);
-      // -------------【结束】-------------
-      const targetExtent = [106.8, 34.3, 118.6, 41.2];
-      this.map.getView().fit(targetExtent, { duration: 2000 });
-    }
+    //   // 同时设置高亮图层 zIndex 较低
+    //   shanxiLayer.setZIndex(1);
+    //   // -------------【结束】-------------
+    //   const targetExtent = [106.8, 34.3, 118.6, 41.2];
+    //   this.map.getView().fit(targetExtent, { duration: 2000 });
+    // }
     // 这个放在外面
     this.initEvent();
   },

+ 2 - 2
src/router/index.js

@@ -28,8 +28,8 @@ const createRouter = () =>
             iconName: "gps",
             component: () =>
               import(
-                // /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/Index.vue"
-                /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/HD.vue"
+                /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/Index.vue"
+                // /*webpackChunkName:'home-cockpitManage'*/ "../views/admin/cockpitManage/HD.vue"
               ),
           },
           {

+ 6 - 3
src/views/health/malfunction.vue

@@ -91,7 +91,7 @@
           end-placeholder="结束日期"
         />
       </p>
-      <el-button type="primary" size="small" @click="conditions(1)">查询</el-button>
+      <el-button type="primary" size="small" @click="conditions(1)" class="search-btn">查询</el-button>
     </div>
 
     <!-- 动态组件内容 -->
@@ -386,11 +386,11 @@ export default {
   margin-bottom: 10px;
   align-items: center;
   flex-wrap: wrap;
-  padding-top: 10px;
+  // padding-top: 10px;
   p {
     margin-right: 10px;
     margin-bottom: 0;
-    //margin-top: 10px;
+    margin-top: 10px;
     display: flex;
     align-items: center;
 
@@ -403,6 +403,9 @@ export default {
   .el-select {
     width: 180px;
   }
+  .search-btn {
+    margin-top: 10px;
+  }
 }
 .main-body {
   margin-top: 10px;

+ 1 - 1
src/views/home/Index.vue

@@ -52,7 +52,7 @@ export default {
   data() {
     return {
       loading: false,
-      isShowHd: true, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
+      isShowHd: false, //true 则展示华电的菜单样式,false 则展示默认的左侧边栏菜单
     };
   },
   methods: {

+ 22 - 26
src/views/home/components/MenuHD.vue

@@ -1,20 +1,22 @@
-56<template>
+<template>
+  <div class="menuBox">
+
+  
   <el-menu
     collapse-transition
     ref="menu"
     mode="horizontal"
-    class="mt-3 el-menu-vertical-demo"
+    class="mt-3 el-menu-vertical-demo my-menu-wrapper"
     @open="handleOpen"
     @close="handleClose"
-
     :router="true"
     :default-active="defaultActive"
     :default-openeds="openMenus"
     background-color="#1b3b7f"
-  text-color="#fff"
-  active-text-color="#ffd04b"
+    text-color="#fff"
+    active-text-color="#ffd04b"
   >
-  <!--     :active-text-color="activeTextColor" -->
+    <!--     :active-text-color="activeTextColor" -->
     <template v-for="(item, indexMenu) in routerList">
       <!-- 判断是否是中间位置 -->
       <el-menu-item
@@ -55,7 +57,6 @@
           :key="child.id"
           :index="`${child.path}?id=${child.id}`"
           @click="handleChangeMenuUrl(child, `${child.path}?id=${child.id}`)"
-
         >
           <span>{{ child.name }}</span>
         </el-menu-item>
@@ -86,6 +87,7 @@
       </el-menu-item>
     </template>
   </el-menu>
+  </div>
 </template>
 
 <script>
@@ -370,28 +372,22 @@ export default {
   display: block !important;
 }
 
-
-
-
 /* 当前选中项的颜色 */
 .el-menu--horizontal .el-menu-item.is-active {
   color: #ffffff !important;
-
 }
-
-
 </style>
 
-<style >
-.el-menu--popup {
-  min-width: 120px !important;
-  width: 100% !important;
-}
-
-.el-menu--popup .el-menu-item {
-  width: 100% !important;
-  min-width: unset !important;
-  text-align: center;
-  padding: 0 5px !important;
-}
-</style>
+<style lang="scss" >
+/* 华电时的菜单打开这个 */
+// .el-menu--popup {
+//   width: 100% !important;
+//     min-width: 120px !important;
+//   .el-menu-item {
+//     width: 100% !important;
+//     min-width: unset !important;
+//     text-align: center;
+//     padding: 0 5px !important;
+//   }
+// }
+</style>