zhiyuan007 1 year ago
parent
commit
af6c319831

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
     "js-base64": "^3.7.4",
     "lib-flexible-computer": "^1.0.2",
     "node-sass": "^8.0.0",
-    "pinia": "^2.0.30",
+    "pinia": "^2.0.36",
     "postcss-pxtorem": "^6.0.0",
     "sass": "^1.58.0",
     "sass-loader": "^13.2.0",

+ 39 - 0
src/assets/font/iconfont/iconfont.css

@@ -0,0 +1,39 @@
+@font-face {
+  font-family: "iconfont"; /* Project id 4150993 */
+  src: url('iconfont.woff2?t=1689151518147') format('woff2'),
+       url('iconfont.woff?t=1689151518147') format('woff'),
+       url('iconfont.ttf?t=1689151518147') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-zhuzhuangtu:before {
+  content: "\e868";
+}
+
+.icon-shezhi-xianxing:before {
+  content: "\e8b7";
+}
+
+.icon-wenjianguanli:before {
+  content: "\e615";
+}
+
+.icon-zhuzhuangtu-:before {
+  content: "\e612";
+}
+
+.icon-medal:before {
+  content: "\e629";
+}
+
+.icon-xinyong:before {
+  content: "\e60f";
+}
+

File diff suppressed because it is too large
+ 1 - 1
src/assets/font/iconfont/iconfont.js


+ 40 - 5
src/assets/font/iconfont/iconfont.json

@@ -6,11 +6,46 @@
   "description": "",
   "glyphs": [
     {
-      "icon_id": "1269",
-      "name": "加",
-      "font_class": "jia",
-      "unicode": "e600",
-      "unicode_decimal": 58880
+      "icon_id": "35172478",
+      "name": "柱状图",
+      "font_class": "zhuzhuangtu",
+      "unicode": "e868",
+      "unicode_decimal": 59496
+    },
+    {
+      "icon_id": "1727421",
+      "name": "205设置-线性",
+      "font_class": "shezhi-xianxing",
+      "unicode": "e8b7",
+      "unicode_decimal": 59575
+    },
+    {
+      "icon_id": "2199033",
+      "name": "文件管理",
+      "font_class": "wenjianguanli",
+      "unicode": "e615",
+      "unicode_decimal": 58901
+    },
+    {
+      "icon_id": "8821275",
+      "name": "柱状图-01",
+      "font_class": "zhuzhuangtu-",
+      "unicode": "e612",
+      "unicode_decimal": 58898
+    },
+    {
+      "icon_id": "9512592",
+      "name": "奖牌",
+      "font_class": "medal",
+      "unicode": "e629",
+      "unicode_decimal": 58921
+    },
+    {
+      "icon_id": "12017578",
+      "name": "信用",
+      "font_class": "xinyong",
+      "unicode": "e60f",
+      "unicode_decimal": 58895
     }
   ]
 }

+ 0 - 19
src/assets/font/iconfont/iconfont.scss

@@ -1,19 +0,0 @@
-@font-face {
-  font-family: "iconfont"; /* Project id 4150993 */
-  src: url('@/assets/font/iconfont/iconfont.woff2?t=1688457478404') format('woff2'),
-       url('@/assets/font/iconfont/iconfont.woff?t=1688457478404') format('woff'),
-       url('@/assets/font/iconfont/iconfont.ttf?t=1688457478404') format('truetype');
-}
-
-.iconfont {
-  font-family: "iconfont" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-.icon-add:before {
-  content: "\e600";
-}
-

BIN
src/assets/font/iconfont/iconfont.ttf


BIN
src/assets/font/iconfont/iconfont.woff


BIN
src/assets/font/iconfont/iconfont.woff2


+ 2 - 10
src/assets/styles/element-plus.scss

@@ -53,18 +53,10 @@
   .layer-1-title{
     &:hover{
       color: #36639E;
+      font-weight: 800;
     }
     color: #3E86C2;
   }
-  .layer-2-menu{
-    .el-sub-menu__title{
-      font-weight: 400;
-      &:hover{
-        font-weight: 600;
-        color: #36639E !important;
-      }
-    }
-  }
   .el-sub-menu{
     &.is-active.layer-1-menu{
       .layer-1-title{
@@ -101,4 +93,4 @@
       border-left: 3px solid  #3F51B5;
     }
   }
-}
+}

+ 7 - 0
src/assets/styles/global.scss

@@ -119,6 +119,13 @@ hr{
 .has{
   color: red !important;
 }
+
+.iconColor{
+  color:#36639E;
+  font-size: 25px;
+  font-weight: 400;
+}
+
 .my-breadcrumb{
   padding: 15px 10px 15px 10px;
   border-bottom: 1px solid #e7eaec !important;

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

@@ -1,6 +1,6 @@
 @import "init";
 @import "global";
 //@import "../font/aswsome/awesome.scss";
-@import "../font/iconfont/iconfont.scss";
+@import "../font/iconfont/iconfont.css";
 //@import "../font/glyphicons/glyphicons.scss";
 @import "element-plus.scss";

+ 46 - 0
src/components/common/Menul.vue

@@ -0,0 +1,46 @@
+<template>
+  <template v-for="item in menuList">
+    <el-sub-menu v-if="item.children" :key="item.path  + item.name"  :index="item.path + item.name">
+      <template #title>
+        <!--        <el-icon >-->
+        <!--          <edit />-->
+        <!--        </el-icon>-->
+        <span class="layer-1-title">{{item.name}}</span>
+      </template>
+      <menu-i :menu-list="item.children"/>
+    </el-sub-menu>
+    <el-menu-item @click="homeCountAdd" v-else :key="item.path  + item.name" :route="{name:item.path}" :index="item.path + item.name" >
+      <template #title>
+        <div class="layer-1-title">{{item.name}}</div>
+      </template>
+    </el-menu-item>
+  </template>
+</template>
+
+<script>
+//import {Edit} from "@element-plus/icons-vue";
+import {useRootStore} from "@/pinia/useStore";
+
+export default {
+  name: "MenuI",
+  //components: {Edit},
+  props:{
+    menuList:{
+
+    }
+  },
+  setup() {
+    const store= useRootStore()
+    function homeCountAdd() {
+      store.toHomeCounter++
+    }
+    return {
+      homeCountAdd
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 62 - 130
src/pinia/useStore.js

@@ -6,192 +6,124 @@ export const useRootStore = defineStore('root',{
             userInfo:{},
             leftMenuList:[
                 {
-                    "CODE":119,
-                    "childList":[
+                    "children":[
                         {
-                            "CODE":140,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"政策法规信息"
+                            "path":"/",
+                            "name":"政策法规信息"
                         },
                         {
-                            "CODE":141,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"备忘录管理"
+                            "path":"/",
+                            "name":"备忘录管理"
                         }
                     ],
-                    "O_LCON":"iconfont icon-add",
-                    "O_PATH":"/",
-                    "HIGHER":"116",
-                    "NAME":"政策法规管理"
+                    "O_LCON":"iconfont icon-wenjianguanli iconColor",
+                    "path":"/",
+                    "name":"政策法规管理"
                 },
                 {
-                    "CODE":117,
-                    "childList":[
+                    "children":[
                         {
-                            "CODE":142,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"市信用信息平台查询"
+                            "path":"/",
+                            "name":"市信用信息平台查询"
                         },
                         {
-                            "CODE":143,
-                            "childList":[
+                            "children":[
                                 {
-                                    "CODE":119,
-                                    "childList":[],
-                                    "O_PATH":"/",
-                                    "HIGHER":"118",
-                                    "NAME":"按相对人查询"
+                                    "path":"/",
+                                    "name":"按相对人查询"
                                 },
                                 {
-                                    "CODE":120,
-                                    "childList":[],
-                                    "O_PATH":"/",
-                                    "HIGHER":"118",
-                                    "NAME":"按事项查询"
+                                    "path":"/",
+                                    "name":"按事项查询"
                                 }
                             ],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"委信用信息库查询"
+                            "path":"/",
+                            "name":"委信用信息库查询"
                         },
                         {
-                            "CODE":144,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"委三清单信息管理"
+                            "path":"/",
+                            "name":"委三清单信息管理"
                         },
                         {
-                            "CODE":145,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"委信用信息管理"
+                            "path":"/",
+                            "name":"委信用信息管理"
                         }
                     ],
-                    "O_LCON":"iconfont icon-add",
-                    "O_PATH":"/",
-                    "HIGHER":"116",
-                    "NAME":"信用信息"
+                    "O_LCON":"iconfont icon-xinyong iconColor",
+                    "path":"/",
+                    "name":"信用信息"
                 },
                 {
-                    "CODE":121,
-                    "childList":[
+                    "children":[
                         {
-                            "CODE":146,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"备忘录管理"
+                            "path":"/",
+                            "name":"备忘录管理"
                         },
                         {
-                            "CODE":147,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"奖惩措施管理"
+                            "path":"/",
+                            "name":"奖惩措施管理"
                         },
                         {
-                            "CODE":148,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"联合奖惩案例信息"
+                            "path":"/",
+                            "name":"联合奖惩案例信息"
                         },
                     ],
-                    "O_LCON":"iconfont icon-add",
-                    "O_PATH":"/",
-                    "HIGHER":"116",
-                    "NAME":"联合奖惩"
+                    "O_LCON":"iconfont icon-medal iconColor",
+                    "path":"/",
+                    "name":"联合奖惩"
                 },
                 {
-                    "CODE":120,
-                    "childList":[
+                    "children":[
                         {
-                            "CODE":146,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"数据归集推送"
+                            "path":"/",
+                            "name":"数据归集推送"
                         },
                         {
-                            "CODE":147,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"应用情况"
+                            "path":"/",
+                            "name":"应用情况"
                         },
                         {
-                            "CODE":148,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"信用修复"
+                            "path":"/",
+                            "name":"信用修复"
                         },
                         {
-                            "CODE":149,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"联合奖惩"
+                            "path":"/",
+                            "name":"联合奖惩"
                         },
                         {
-                            "CODE":150,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"数据日志"
+                            "path":"/",
+                            "name":"数据日志"
                         },
                     ],
-                    "O_LCON":"iconfont icon-add",
-                    "O_PATH":"/",
-                    "HIGHER":"116",
-                    "NAME":"信用数据"
+                    "O_LCON":"iconfont icon-zhuzhuangtu iconColor",
+                    "path":"/",
+                    "name":"信用数据"
                 },
                 {
-                    "CODE":116,
-                    "childList":[
+                    "children":[
                         {
-                            "CODE":156,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"用户管理"
+                            "path":"/",
+                            "name":"用户管理"
                         },
                         {
-                            "CODE":157,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"单位管理"
+                            "path":"/",
+                            "name":"单位管理"
                         },
                         {
-                            "CODE":158,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"用户日志"
+                            "path":"/",
+                            "name":"用户日志"
                         },
                         {
-                            "CODE":159,
-                            "childList":[],
-                            "O_PATH":"/",
-                            "HIGHER":"117",
-                            "NAME":"系统说明"
+                            "path":"/",
+                            "name":"系统说明"
                         },
                     ],
-                    "O_LCON":"iconfont icon-add",
-                    "O_PATH":"/",
-                    "HIGHER":"116",
-                    "NAME":"系统管理"
+                    "O_LCON":"iconfont icon-shezhi-xianxing iconColor",
+                    "path":"/",
+                    "name":"系统管理"
                 },
             ],
+            toHomeCounter:0,
         }
     }
 })

+ 15 - 93
src/views/main/c-cpns/MyMenu.vue

@@ -1,113 +1,35 @@
 <template>
-  <el-menu
-      router
-      :unique-opened="true"
-      text-color="#a7b1c2"
-      active-text-color="#36639E"
-      :default-active="defaultActive"
-      class="my-menu"
-  >
-    <template v-for="item in store.leftMenuList" :key="item.CODE">
-      <el-sub-menu class="layer-1-menu" :index="item.CODE + ''"  v-if="(item.childList.length > 0)" >
-        <template #title>
-          <span class="menu_icon" :class="item.O_LCON"></span>
-          <span class="layer-1-title">{{item.NAME}}</span>
-        </template>
-<!--        <el-menu-item class="layer-3" v-for="child in item.childList" :route="{path:child.O_PATH}" :index="child.O_PATH + ''" >-->
-<!--          <div class="name-item">-->
-<!--            {{child.NAME}}-->
-<!--          </div>-->
-<!--        </el-menu-item>-->
-
-        <template v-for="child in item.childList">
-          <template v-if="!(child.childList.length > 0)">
-            <el-menu-item :route="{
-              path:'/main' + child.O_PATH
-            }" :index="child.CODE + ''">{{child.NAME}}</el-menu-item>
-          </template>
-          <template v-else>
-            <el-sub-menu class="layer-2-menu" :index="child.CODE + ''">
-              <template #title >{{child.NAME}}</template>
-              <el-menu-item :route="{
-              path:'/main' + childchild.O_PATH
-            }" v-for="childchild in child.childList" :index="childchild.CODE + ''" >{{childchild.NAME}}</el-menu-item>
-            </el-sub-menu>
-          </template>
-        </template>
-
-
-
-      </el-sub-menu>
-      <el-menu-item  v-else class="one-menu" :route="{path:item.O_PATH}"  :index="item.O_PATH + ''" >
-        <div class="layer-1-title">
-          {{item.NAME}}
-        </div>
-      </el-menu-item>
-    </template>
-  </el-menu>
-
+  <menu-i :menu-list="store.leftMenuList"/>
 </template>
 
 <script>
-import {useRootStore} from "../../../pinia/useStore";
-import {computed, onMounted, ref, toRef, watch} from "vue";
+import {computed, ref} from "vue";
+import {useRootStore} from "@/pinia/useStore";
 import {useRoute} from "vue-router";
+import MenuI from "@/components/common/Menul.vue";
 
 export default {
   name: "MyMenu",
+  components: {MenuI},
   setup() {
-
-    const route = useRoute()
-    const defaultActive = ref('')
-    watch(() => route.path,(val) => {
-      console.log('变化le',route.meta)
-      defaultActive.value = route.meta.CODE + ''
-    },{
-      immediate:true
-    })
-
+    const route =useRoute()
     const store = useRootStore()
-    // const menus = ref([...store.leftMenuList])
-
-
+    debugger
+    // const currentM = computed(() => {
+    //   return otherReflectArr.find(i => i.name === store.pageType).menus
+    // })
+    function homeCountAdd() {
+      store.toHomeCounter++
+    }
     return {
       store,
-      // menus,
-      defaultActive
-
+      homeCountAdd,
+      //otherReflectArr
     }
-
   }
 }
 </script>
 
 <style scoped lang="scss">
 
-.el-menu-vertical-demo{
-  height: 100%;
-  overflow: auto;
-  &::-webkit-scrollbar {
-    width: 7px;
-    background-color: transparent;
-  }
-  &::-webkit-scrollbar-thumb {
-    border-radius: 7px;
-    background-color: rgba(0, 0, 0, 0.4);
-  }
-  .el-aside{
-
-  }
-  :deep(.el-sub-menu__title){
-    //padding-left: 50px !important;
-  }
-  :deep(.el-menu-item){
-    white-space: normal !important;
-  }
-  font-weight: 600;
-  font-family: '微软雅黑';
-}
-.menu_icon{
-
-  margin-right: 10px;
-}
 </style>