Browse Source

菜单报错 BUG 修复。

Koishi 1 year ago
parent
commit
54fb68fe27

+ 210 - 0
npminstall-debug.log

@@ -0,0 +1,210 @@
+{
+  root: 'D:\\fe\\jn_sis_zhfx',
+  registry: 'https://registry.npmmirror.com',
+  pkgs: [
+    {
+      name: 'element-plus',
+      version: 'latest',
+      type: 'tag',
+      alias: undefined,
+      arg: [Result]
+    },
+    {
+      name: '@element-plus/icons-vue',
+      version: 'latest',
+      type: 'tag',
+      alias: undefined,
+      arg: [Result]
+    }
+  ],
+  production: false,
+  cacheStrict: false,
+  cacheDir: 'C:\\Users\\28656\\.npminstall_tarball',
+  env: {
+    npm_config_registry: 'https://registry.npmmirror.com',
+    npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\28656\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","element-plus","@element-plus/icons-vue"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\28656\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","element-plus","@element-plus/icons-vue"]}',
+    npm_config_user_agent: 'npminstall/7.11.1 npm/? node/v16.14.2 win32 x64',
+    npm_config_cache: 'C:\\Users\\28656\\.npminstall_tarball',
+    NODE: 'C:\\Program Files\\nodejs\\node.exe',
+    npm_node_execpath: 'C:\\Program Files\\nodejs\\node.exe',
+    npm_execpath: 'C:\\Users\\28656\\AppData\\Roaming\\nvm\\v16.14.2\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
+    npm_config_userconfig: 'C:\\Users\\28656\\.cnpmrc',
+    npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
+    npm_config_r: 'https://registry.npmmirror.com',
+    COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
+    NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
+    NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
+    PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
+    CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
+    OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
+    CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
+    ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
+    ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
+    SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
+    SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
+    NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
+    PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+    PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+    PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
+    SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
+    SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
+    RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
+    RE2_DOWNLOAD_SKIP_PATH: 'true',
+    PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
+    npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
+    npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
+    npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
+    npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
+    npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
+    npm_rootpath: 'D:\\fe\\jn_sis_zhfx',
+    INIT_CWD: 'D:\\fe\\jn_sis_zhfx'
+  },
+  binaryMirrors: {
+    ENVS: {
+      COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
+      NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
+      NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
+      PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
+      CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
+      OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
+      CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
+      ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
+      ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
+      SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
+      SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
+      NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
+      PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+      PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
+      PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
+      SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
+      SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
+      RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
+      RE2_DOWNLOAD_SKIP_PATH: 'true',
+      PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
+      npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
+      npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
+      npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
+      npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
+      npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
+    },
+    '@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
+    sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
+    '@tensorflow/tfjs-node': {
+      replaceHostFiles: [Array],
+      replaceHostRegExpMap: [Object],
+      replaceHostMap: [Object]
+    },
+    cypress: {
+      host: 'https://cdn.npmmirror.com/binaries/cypress',
+      newPlatforms: [Object]
+    },
+    'utf-8-validate': {
+      host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
+    },
+    xprofiler: {
+      remote_path: './xprofiler/v{version}/',
+      host: 'https://cdn.npmmirror.com/binaries'
+    },
+    leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
+    couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
+    gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
+    sqlite3: {
+      host: 'https://cdn.npmmirror.com/binaries/sqlite3',
+      remote_path: 'v{version}'
+    },
+    '@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
+    grpc: {
+      host: 'https://cdn.npmmirror.com/binaries',
+      remote_path: '{name}/v{version}'
+    },
+    'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
+    wrtc: {
+      host: 'https://cdn.npmmirror.com/binaries',
+      remote_path: '{name}/v{version}'
+    },
+    fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
+    nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
+    canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
+    'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
+    'flow-bin': {
+      replaceHost: 'https://github.com/facebook/flow/releases/download/v',
+      host: 'https://cdn.npmmirror.com/binaries/flow/v'
+    },
+    'jpegtran-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
+    },
+    'cwebp-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
+    },
+    'zopflipng-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
+    },
+    'optipng-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
+    },
+    mozjpeg: {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
+    },
+    gifsicle: {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
+    },
+    'pngquant-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
+      replaceHostMap: [Object]
+    },
+    'pngcrush-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
+    },
+    'jpeg-recompress-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
+    },
+    'advpng-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
+    },
+    'pngout-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
+    },
+    'jpegoptim-bin': {
+      replaceHost: [Array],
+      host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
+    },
+    argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
+    'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
+    'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
+    'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' },
+    'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' }
+  },
+  forbiddenLicenses: null,
+  flatten: false,
+  proxy: undefined,
+  prune: false,
+  disableFallbackStore: false,
+  workspacesMap: Map(0) {},
+  enableWorkspace: false,
+  workspaceRoot: 'D:\\fe\\jn_sis_zhfx',
+  isWorkspaceRoot: true,
+  isWorkspacePackage: false,
+  offline: false,
+  strictSSL: true,
+  ignoreScripts: false,
+  foregroundScripts: false,
+  ignoreOptionalDependencies: false,
+  detail: false,
+  forceLinkLatest: false,
+  trace: false,
+  engineStrict: false,
+  registryOnly: false,
+  client: false,
+  autoFixVersion: [Function: autoFixVersion]
+}

+ 1 - 1
package.json

@@ -110,4 +110,4 @@
     "last 2 versions",
     "not dead"
   ]
-}
+}

+ 9 - 10
src/App.vue

@@ -32,7 +32,7 @@
         :class="{ hover: isFixed ? true : isShowMenu }"
         @mouseenter="showMenu"
         @mouseleave="hideMenu"
-        v-show="$store.state.menuData.length"
+        v-show="$store.state?.menuData?.length"
       >
         <Menu />
       </div>
@@ -131,14 +131,13 @@ export default {
       return this.$store.state.user?.loginState;
     },
     isFixed() {
-      return this.$store.state.isFixed;
+      return this.$store.state?.isFixed;
     },
     menuLength() {
-      return this.$store.state.menuData.length;
+      return this.$store.state?.menuData?.length;
     },
   },
-  created() {
-  },
+  created() {},
   mounted() {
     let that = this;
     that.setScale();
@@ -173,14 +172,14 @@ export default {
     showMenu() {
       if (!this.isFixed) {
         this.isShowMenu = true;
-        this.memuCloseTimeout && clearTimeout(this.memuCloseTimeout);
+        clearTimeout(this.memuCloseTimeout);
+        this.memuCloseTimeout = null;
       }
     },
     hideMenu() {
       if (!this.isFixed) {
-        const that = this;
-        this.memuCloseTimeout = setTimeout(function () {
-          that.isShowMenu = false;
+        this.memuCloseTimeout = setTimeout(() => {
+          this.isShowMenu = false;
         }, 500);
       }
     },
@@ -203,7 +202,7 @@ export default {
 
   watch: {
     "$store.state.menuData"(res) {
-      this.menuData = res;
+      this.menuData = res || [];
     },
     isLogined: {
       handler(res) {

+ 3 - 3
src/assets/styles/theme/dark/dark-jsc.css

@@ -37,8 +37,8 @@
 #appBody.dark .tab-box .tab-item span svg use {
   transition: 0.25s;
 }
-#appBody.dark .header-body .header-title svg g:nth-child(1) path,
-#appBody.dark .header-body .header-title svg g:nth-child(1) polygon {
+#appBody.dark . .header-title svg g:nth-child(1) path,
+#appBody.dark . .header-title svg g:nth-child(1) polygon {
   transition: 0.25s;
 }
 #appBody.dark .weather-info span svg use {
@@ -90,7 +90,7 @@
 }
 #appBody.dark .com-panel-3,
 #appBody.dark .com-panel,
-#appBody.dark .header-body {
+#appBody.dark . {
   transition: 0.25s;
 }
 #appBody.dark .com-panel-3 .dot,

+ 4 - 4
src/assets/styles/theme/light/light-jsc.css

@@ -65,12 +65,12 @@
   fill: #000;
   transition: 0.25s;
 }
-#appBody.light .header-body {
+#appBody.light . {
   border: 0;
   transition: 0.25s;
 }
-#appBody.light .header-body .header-title svg g:nth-child(1) path,
-#appBody.light .header-body .header-title svg g:nth-child(1) polygon {
+#appBody.light . .header-title svg g:nth-child(1) path,
+#appBody.light . .header-title svg g:nth-child(1) polygon {
   fill: #000;
   transition: 0.25s;
 }
@@ -231,7 +231,7 @@
 }
 #appBody.light .com-panel-3,
 #appBody.light .com-panel,
-#appBody.light .header-body {
+#appBody.light . {
   background: #fff;
   transition: 0.25s;
 }

+ 7 - 0
src/store/index.js

@@ -21,6 +21,7 @@ const state = {
   alarmList: JSON.parse(localStorage.getItem("alarmList")) || [],
   warnList: [],
   setConfig: 1,
+  menuState: 1,
 };
 
 //改变状态的方法`
@@ -92,6 +93,9 @@ const mutations = {
   emptyWarning(state) {
     state.warnList = [];
   },
+  changeMenuState(state) {
+    state.menuState++;
+  },
 };
 
 const actions = {
@@ -111,6 +115,9 @@ const actions = {
     context.commit("changeModuleName", str);
     localStorage.setItem("ModuleName", str);
   },
+  changeMenuState(state, data) {
+    context.commit("changeMenuState");
+  },
 };
 
 export default createStore({

+ 3 - 4
src/views/economicsOperation/windAnalyse/singleWindAnasyle/index.vue

@@ -104,7 +104,6 @@
             :label="item.title"
             show-overflow-tooltip
             align="center"
-        
           >
             <!-- <template #header="scope">
               <div v-if="scope.column.label.indexOf('(') > 0">
@@ -121,11 +120,11 @@
               </div>
               <div v-else>{{ scope.column.label }}</div>
             </template> -->
-            <!-- <template #default="scope" v-if="item.title === '操作'">
+            <template #default="scope" v-if="item.title === '操作'">
               <span class="historyBtn" @click="seachHistoryData(scope.row)"
                 >历史</span
               >
-            </template> -->
+            </template>
             <template #default="scope">
               <span>{{ scope.row[item.code] }}</span>
             </template>
@@ -228,7 +227,7 @@ export default {
         { title: "年排行榜", code: "yearTop" },
         { title: "年拟合优度(%)", code: "yearGoodness" },
         { title: "年风速(m/s)", code: "yearSpeed" },
-        // { title: "操作" },
+        { title: "操作" },
       ],
       tableHeaderGf: [
         { title: "逆变器", code: "wtname" },

+ 209 - 81
src/views/layout/Menu.vue

@@ -1,54 +1,59 @@
 <template>
-  <div class="menu">
-    <ul class="menu-list">
-      <li
-        class="menu-item"
-        v-for="(menu, index) in currentMenu"
-        :key="index"
-        @click="click(index)"
-        :class="{ active: activeIndex == index }"
-      >
-        <router-link
-          :to="menu.path"
-          v-if="menu.children"
-          @mouseenter="subMenuShow(menu.children, index)"
+  <template v-if="$store.state.menuState % 2">
+    <div class="menu">
+      <ul class="menu-list">
+        <li
+          class="menu-item"
+          v-for="(menu, index) in currentMenu"
+          :key="index"
+          @click="click(index)"
+          :class="{ active: activeIndex == index }"
         >
-          <el-tooltip
-            class="item"
-            effect="dark"
-            :content="menu.text"
-            placement="bottom"
-            :show-after="500"
-            :enterable="false"
-            hide-after="10"
+          <router-link
+            :to="menu.path"
+            v-if="menu?.children?.length"
+            @mouseenter="subMenuShow(menu?.children, index)"
           >
-            <div
-              class="menu-icon svg-icon"
-              :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'"
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="menu.text"
+              placement="bottom"
+              :show-after="500"
+              :enterable="false"
+              hide-after="10"
             >
-              <SvgIcon :svgid="menu.icon"></SvgIcon>
-            </div>
-          </el-tooltip>
-        </router-link>
-        <router-link :to="menu.path" v-else>
-          <el-tooltip
-            class="item"
-            effect="dark"
-            :content="menu.text"
-            placement="bottom"
-            :show-after="500"
-            :enterable="false"
-            hide-after="10"
-          >
-            <div
-              class="menu-icon svg-icon"
-              :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'"
+              <div
+                class="menu-icon svg-icon"
+                :class="
+                  activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'
+                "
+              >
+                <SvgIcon :svgid="menu.icon"></SvgIcon>
+              </div>
+            </el-tooltip>
+          </router-link>
+          <router-link :to="menu.path" v-else>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="menu.text"
+              placement="bottom"
+              :show-after="500"
+              :enterable="false"
+              hide-after="10"
             >
-              <SvgIcon :svgid="menu.icon"></SvgIcon>
-            </div>
-          </el-tooltip>
-        </router-link>
-        <!-- <el-tooltip
+              <div
+                class="menu-icon svg-icon"
+                :class="
+                  activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'
+                "
+              >
+                <SvgIcon :svgid="menu.icon"></SvgIcon>
+              </div>
+            </el-tooltip>
+          </router-link>
+          <!-- <el-tooltip
           v-else
           class="item"
           effect="dark"
@@ -65,40 +70,147 @@
             <SvgIcon :svgid="menu.icon"></SvgIcon>
           </div>
         </el-tooltip> -->
-      </li>
-    </ul>
-  </div>
-  <div class="sub-menu" v-show="isShowSubMenu" @mouseleave="subMenuHide">
-    <ul class="menu-list">
-      <li
-        class="menu-item"
-        v-for="(menus, indexs) in subMenu"
-        @click="subclick(indexs)"
-        :key="indexs"
-        :class="{ active: subIndex == parentIndex + '' + indexs }"
-      >
-        <router-link :to="menus.path">
-          <div class="menu-icon svg-icon">
-            <!-- <SvgIcon :svgid="menu.icon"></SvgIcon> -->
-          </div>
+        </li>
+      </ul>
+    </div>
+    <div class="sub-menu" v-show="isShowSubMenu" @mouseleave="subMenuHide">
+      <ul class="menu-list">
+        <li
+          class="menu-item"
+          v-for="(menus, indexs) in subMenu"
+          @click="subclick(indexs)"
+          :key="indexs"
+          :class="{ active: subIndex == parentIndex + '' + indexs }"
+        >
+          <router-link :to="menus.path">
+            <div class="menu-icon svg-icon">
+              <!-- <SvgIcon :svgid="menu.icon"></SvgIcon> -->
+            </div>
+            <div
+              class="sub-menu-text"
+              :class="subIndex == activeIndex + '' + indexs ? 'green' : 'gray'"
+            >
+              {{ menus.text }}
+            </div>
+          </router-link>
+        </li>
+      </ul>
+    </div>
+    <div
+      class="icon-fixed svg-icon"
+      :class="fixed ? 'svg-icon-green' : 'svg-icon-gray'"
+      @click="handleClickFixed"
+    >
+      <SvgIcon svgid="svg-unfixed" v-if="fixed == false"></SvgIcon>
+      <SvgIcon svgid="svg-fixed" v-if="fixed == true"></SvgIcon>
+    </div>
+  </template>
+  <template v-else>
+    <div class="menu">
+      <ul class="menu-list">
+        <li
+          class="menu-item"
+          v-for="(menu, index) in currentMenu"
+          :key="index"
+          @click="click(index)"
+          :class="{ active: activeIndex == index }"
+        >
+          <router-link
+            :to="menu.path"
+            v-if="menu?.children?.length"
+            @mouseenter="subMenuShow(menu?.children, index)"
+          >
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="menu.text"
+              placement="bottom"
+              :show-after="500"
+              :enterable="false"
+              hide-after="10"
+            >
+              <div
+                class="menu-icon svg-icon"
+                :class="
+                  activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'
+                "
+              >
+                <SvgIcon :svgid="menu.icon"></SvgIcon>
+              </div>
+            </el-tooltip>
+          </router-link>
+          <router-link :to="menu.path" v-else>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="menu.text"
+              placement="bottom"
+              :show-after="500"
+              :enterable="false"
+              hide-after="10"
+            >
+              <div
+                class="menu-icon svg-icon"
+                :class="
+                  activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'
+                "
+              >
+                <SvgIcon :svgid="menu.icon"></SvgIcon>
+              </div>
+            </el-tooltip>
+          </router-link>
+          <!-- <el-tooltip
+          v-else
+          class="item"
+          effect="dark"
+          :content="menu.text"
+          placement="bottom"
+          :show-after="500"
+          :enterable="false"
+          hide-after="10"
+        >
           <div
-            class="sub-menu-text"
-            :class="subIndex == activeIndex + '' + indexs ? 'green' : 'gray'"
+            class="menu-icon svg-icon"
+            :class="activeIndex == index ? 'svg-icon-green' : 'svg-icon-gray'"
           >
-            {{ menus.text }}
+            <SvgIcon :svgid="menu.icon"></SvgIcon>
           </div>
-        </router-link>
-      </li>
-    </ul>
-  </div>
-  <div
-    class="icon-fixed svg-icon"
-    :class="fixed ? 'svg-icon-green' : 'svg-icon-gray'"
-    @click="handleClickFixed"
-  >
-    <SvgIcon svgid="svg-unfixed" v-if="fixed == false"></SvgIcon>
-    <SvgIcon svgid="svg-fixed" v-if="fixed == true"></SvgIcon>
-  </div>
+        </el-tooltip> -->
+        </li>
+      </ul>
+    </div>
+    <div class="sub-menu" v-show="isShowSubMenu" @mouseleave="subMenuHide">
+      <ul class="menu-list">
+        <li
+          class="menu-item"
+          v-for="(menus, indexs) in subMenu"
+          @click="subclick(indexs)"
+          :key="indexs"
+          :class="{ active: subIndex == parentIndex + '' + indexs }"
+        >
+          <router-link :to="menus.path">
+            <div class="menu-icon svg-icon">
+              <!-- <SvgIcon :svgid="menu.icon"></SvgIcon> -->
+            </div>
+            <div
+              class="sub-menu-text"
+              :class="subIndex == activeIndex + '' + indexs ? 'green' : 'gray'"
+            >
+              {{ menus.text }}
+            </div>
+          </router-link>
+        </li>
+      </ul>
+    </div>
+    <div
+      class="icon-fixed svg-icon"
+      :class="fixed ? 'svg-icon-green' : 'svg-icon-gray'"
+      @click="handleClickFixed"
+    >
+      <SvgIcon svgid="svg-unfixed" v-if="fixed == false"></SvgIcon>
+      <SvgIcon svgid="svg-fixed" v-if="fixed == true"></SvgIcon>
+    </div>
+  </template>
 </template>
 <script>
 import SvgIcon from "@com/coms/icon/svg-icon.vue";
@@ -140,6 +252,10 @@ export default {
       subIndex: -1,
       fixed: true,
       reFresh: true,
+      rePagePath: [
+        "/economicsOperation/stationAnalyse/stationElectricAnalyse",
+        "/economicsOperation/windAnalyse/singleWindAnasyle",
+      ],
     };
   },
   methods: {
@@ -156,7 +272,7 @@ export default {
     subMenuShow(children, index) {
       this.isShowSubMenu = true;
       this.parentIndex = index;
-      this.subMenu = children;
+      this.subMenu = Array.isArray(children) ? children : [];
     },
     subMenuHide() {
       this.isShowSubMenu = false;
@@ -182,10 +298,10 @@ export default {
         let currData = [];
         if (routeObj && Object.keys(routeObj).length) {
           let a = JSON.parse(JSON.stringify(routeObj));
-          if (a.children) {
+          if (a?.children?.length) {
             a.children.forEach((path) => {
               if (!path.hidden) {
-                if (path.showChild != true && path.children) {
+                if (path.showChild != true && path?.children?.length) {
                   currData.push({
                     text: path.meta.title,
                     icon: path.meta.icon,
@@ -212,6 +328,7 @@ export default {
                         text: cputh.meta.title,
                         icon: cputh.meta.icon,
                         path: `/${this.currRoot}/${path.path}/${caputh}`,
+                        children: [],
                       });
                     }
                   });
@@ -222,6 +339,7 @@ export default {
                     icon: path.meta.icon,
                     fullPath: path.path,
                     path: `/${this.currRoot}/${path.path}`,
+                    children: [],
                   });
                 }
               }
@@ -289,6 +407,16 @@ export default {
           }
         }
         this.reFresh = true;
+        const someRes = this.rePagePath.some((path) => {
+          return path === val.path;
+        });
+        if (someRes) {
+          this.$nextTick(() => {
+            this.$store.commit("changeMenuState");
+          });
+        } else {
+          this.$store.commit("changeMenuState");
+        }
       },
       //深度观察监听
       deep: true,
@@ -403,4 +531,4 @@ export default {
 .icon-fixed {
   padding-bottom: 20px;
 }
-</style>
+</style>