riku
2023-11-10 2a53d3e6774678eeebf2b0f028c6aec2c70a4774
src/components/core/SiderMenu.vue
@@ -17,95 +17,11 @@
      </el-space>
    </el-row>
    <el-scrollbar :height="menuHeight" v-if="!collapse">
      <template v-for="(item, i) in routes" :key="`${i}`">
        <el-sub-menu v-if="item.children" :index="`${i}`">
          <template #title>
            <el-icon>
              <component :is="item.icon"></component>
            </el-icon>
            <span>{{ item.name }}</span>
          </template>
          <template v-for="(child, i2) in item.children" :key="`${i}-${i2}`">
            <el-menu-item-group v-if="child.group" :title="child.name">
              <el-menu-item
                v-for="(child2, i3) in child.children"
                :key="`${i}-${i2}-${i3}`"
                :index="child2.path"
                @click="navPage(item, child, child2)"
              >
                <el-icon v-if="child2.icon">
                  <component :is="child2.icon"></component>
                </el-icon>
                <template #title>{{ child2.name }}</template>
              </el-menu-item>
            </el-menu-item-group>
            <el-menu-item
              v-else
              :index="child.path"
              @click="navPage(item, child)"
            >
              <el-icon v-if="child.icon">
                <component :is="child.icon"></component>
              </el-icon>
              <template #title>{{ child.name }}</template>
            </el-menu-item>
          </template>
        </el-sub-menu>
        <el-menu-item v-else :index="item.path" @click="navPage(item)">
          <el-icon>
            <component :is="item.icon"></component>
          </el-icon>
          <template #title>{{ item.name }}</template>
        </el-menu-item>
      </template>
      <MenuItems :routes="routes" @navPage="navPage"> </MenuItems>
    </el-scrollbar>
    <template v-else>
      <template v-for="(item, i) in routes" :key="`${i}`">
        <el-sub-menu v-if="item.children" :index="`${i}`">
          <template #title>
            <el-icon>
              <component :is="item.icon"></component>
            </el-icon>
            <span>{{ item.name }}</span>
          </template>
          <template v-for="(child, i2) in item.children" :key="`${i}-${i2}`">
            <el-menu-item-group v-if="child.group" :title="child.name">
              <el-menu-item
                v-for="(child2, i3) in child.children"
                :key="`${i}-${i2}-${i3}`"
                :index="child2.path"
                @click="navPage(item, child, child2)"
              >
                <el-icon v-if="child2.icon">
                  <component :is="child2.icon"></component>
                </el-icon>
                <template #title>{{ child2.name }}</template>
              </el-menu-item>
            </el-menu-item-group>
            <el-menu-item
              v-else
              :index="child.path"
              @click="navPage(item, child)"
            >
              <el-icon v-if="child.icon">
                <component :is="child.icon"></component>
              </el-icon>
              <template #title>{{ child.name }}</template>
            </el-menu-item>
          </template>
        </el-sub-menu>
        <el-menu-item v-else :index="item.path" @click="navPage(item)">
          <el-icon>
            <component :is="item.icon"></component>
          </el-icon>
          <template #title>{{ item.name }}</template>
        </el-menu-item>
      </template>
      <MenuItems :routes="routes" @navPage="navPage"> </MenuItems>
    </template>
    <el-row ref="subTitleRef" class="sub-title" justify="center">
@@ -126,7 +42,6 @@
  emits: ['navPage'],
  data() {
    return {
      isCollapsed: this.collapse,
      menuHeight: '600px',
      title: '生态环境线上监管',
      subTitle: '©上海飞羽环保科技有限公司',
@@ -140,70 +55,70 @@
              icon: 'Search',
              name: '问题审核',
            },
            {
              path: '/changecheck',
              icon: 'Search',
              name: '整改审核',
            },
            // {
            //   path: '/changecheck',
            //   icon: 'Search',
            //   name: '整改审核',
            // },
          ],
        },
        {
          path: '/ledger',
          icon: 'Search',
          name: '台账审核',
        },
        {
          icon: 'Search',
          name: '业务分析',
          children: [
            {
              path: '/analysis/profollow',
              icon: 'Search',
              name: '问题动态跟踪',
            },
            {
              path: '/analysis/proanalysis',
              icon: 'Search',
              name: '问题整改分析',
            },
            {
              path: '/analysis/standardjudge',
              icon: 'Search',
              name: '规范性评估',
            },
          ],
        },
        {
          path: '/dailyreport',
          icon: 'Search',
          name: '日报管理',
        },
        {
          icon: 'Search',
          name: '场景报告',
          children: [
            {
              path: '/scenereport/construction',
              icon: 'Search',
              name: '工地',
            },
            {
              path: '/scenereport/wharf',
              icon: 'Search',
              name: '码头',
            },
            {
              path: '/scenereport/mixing',
              icon: 'Search',
              name: '搅拌站',
            },
            {
              path: '/scenereport/storage',
              icon: 'Search',
              name: '堆场',
            },
          ],
        },
        // {
        //   path: '/ledger',
        //   icon: 'Search',
        //   name: '台账审核',
        // },
        // {
        //   icon: 'Search',
        //   name: '业务分析',
        //   children: [
        //     {
        //       path: '/analysis/profollow',
        //       icon: 'Search',
        //       name: '问题动态跟踪',
        //     },
        //     {
        //       path: '/analysis/proanalysis',
        //       icon: 'Search',
        //       name: '问题整改分析',
        //     },
        //     {
        //       path: '/analysis/standardjudge',
        //       icon: 'Search',
        //       name: '规范性评估',
        //     },
        //   ],
        // },
        // {
        //   path: '/dailyreport',
        //   icon: 'Search',
        //   name: '日报管理',
        // },
        // {
        //   icon: 'Search',
        //   name: '场景报告',
        //   children: [
        //     {
        //       path: '/scenereport/construction',
        //       icon: 'Search',
        //       name: '工地',
        //     },
        //     {
        //       path: '/scenereport/wharf',
        //       icon: 'Search',
        //       name: '码头',
        //     },
        //     {
        //       path: '/scenereport/mixing',
        //       icon: 'Search',
        //       name: '搅拌站',
        //     },
        //     {
        //       path: '/scenereport/storage',
        //       icon: 'Search',
        //       name: '堆场',
        //     },
        //   ],
        // },
        {
          path: '/notice',
          icon: 'Search',
@@ -217,10 +132,10 @@
              group: true,
              name: '飞羽监管',
              children: [
                {
                  path: '/fysp/userInfo',
                  name: '账户信息',
                },
                // {
                //   path: '/fysp/userInfo',
                //   name: '账户信息',
                // },
                {
                  path: '/fysp/sceneInfo',
                  name: '场景信息',
@@ -240,14 +155,64 @@
          ],
        },
        {
          path: '/scenereport/storage',
          icon: 'Search',
          name: '排污抽运',
          name: '业务分析',
          children: [
            {
              group: true,
              name: '飞羽监管',
              children: [
                {
                  path: '/fysp/userInfo',
                  name: '账户信息',
                },
                {
                  path: '/fysp/sceneInfo',
                  name: '场景信息',
                },
              ],
            },
            {
              group: true,
              name: '飞羽环境',
              children: [
                // {
                //   path: '/fytz/userInfo',
                //   name: '账户信息',
                // },
              ],
            },
          ],
        },
        // {
        //   path: '/scenereport/storage',
        //   icon: 'Search',
        //   name: '排污抽运',
        // },
        // {
        //   path: '/common/userMatch',
        //   icon: 'Connection',
        //   name: '账户匹配',
        // },
        {
          icon: 'Search',
          name: '资源管理',
          children: [
            {
              path: '/fytz/enforceCase',
              icon: 'Search',
              name: '督察案例',
            },
            // {
            //   path: '/changecheck',
            //   icon: 'Search',
            //   name: '整改审核',
            // },
          ],
        },
      ],
    };
  },
  watch: {},
  computed: {
    homePage() {
      return this.routes[0].children
@@ -258,10 +223,6 @@
  methods: {
    handleOpen() {},
    handleClose() {},
    collapsedSider() {
      this.isCollapsed = !this.isCollapsed;
      this.$emit('collapsedSider', this.isCollapsed);
    },
    navPage(...item) {
      const titles = item.map((value) => {
        return value.name;