guhongwei 3 سال پیش
والد
کامیت
9920278806

+ 27 - 3
src/assets/icon/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2911975 */
-  src: url('iconfont.woff2?t=1635921999379') format('woff2'),
-       url('iconfont.woff?t=1635921999379') format('woff'),
-       url('iconfont.ttf?t=1635921999379') format('truetype');
+  src: url('iconfont.woff2?t=1636777270008') format('woff2'),
+       url('iconfont.woff?t=1636777270008') format('woff'),
+       url('iconfont.ttf?t=1636777270008') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,30 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-caigou:before {
+  content: "\e887";
+}
+
+.icon-caiwu:before {
+  content: "\e8ae";
+}
+
+.icon-daishouhuo:before {
+  content: "\e640";
+}
+
+.icon-cangku_kucun:before {
+  content: "\eac8";
+}
+
+.icon-leixing:before {
+  content: "\e614";
+}
+
+.icon-shenbao:before {
+  content: "\e6aa";
+}
+
 .icon-yonghu:before {
   content: "\e8c8";
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
src/assets/icon/iconfont.js


+ 42 - 0
src/assets/icon/iconfont.json

@@ -5,6 +5,48 @@
   "css_prefix_text": "icon-",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "1727267",
+      "name": "05采购",
+      "font_class": "caigou",
+      "unicode": "e887",
+      "unicode_decimal": 59527
+    },
+    {
+      "icon_id": "1727399",
+      "name": "43财务",
+      "font_class": "caiwu",
+      "unicode": "e8ae",
+      "unicode_decimal": 59566
+    },
+    {
+      "icon_id": "2811146",
+      "name": "待收货",
+      "font_class": "daishouhuo",
+      "unicode": "e640",
+      "unicode_decimal": 58944
+    },
+    {
+      "icon_id": "5387400",
+      "name": "仓库_库存",
+      "font_class": "cangku_kucun",
+      "unicode": "eac8",
+      "unicode_decimal": 60104
+    },
+    {
+      "icon_id": "11032209",
+      "name": "类型",
+      "font_class": "leixing",
+      "unicode": "e614",
+      "unicode_decimal": 58900
+    },
+    {
+      "icon_id": "12327872",
+      "name": "申报",
+      "font_class": "shenbao",
+      "unicode": "e6aa",
+      "unicode_decimal": 59050
+    },
     {
       "icon_id": "1727459",
       "name": "224用户",

BIN
src/assets/icon/iconfont.ttf


BIN
src/assets/icon/iconfont.woff


BIN
src/assets/icon/iconfont.woff2


+ 11 - 1
src/components/admin-frame/Sidebar.vue

@@ -67,9 +67,19 @@ export default {
   methods: {
     getMenu() {
       let list = _.cloneDeep(this.items);
-      list.push(...userMenu);
+      let r = this.filterMenu(_.cloneDeep(userMenu), this.user.type);
+      list.push(...r);
       this.$set(this, `items`, _.uniqBy(list, 'index'));
     },
+    filterMenu(menus, umod) {
+      let nm = menus.map(menu => {
+        let mod = _.get(menu, 'module');
+        if ((mod && mod.includes(umod)) || !mod) {
+          return menu;
+        }
+      });
+      return _.compact(nm);
+    },
   },
   computed: {
     ...mapState(['user']),

+ 17 - 8
src/layout/deploy/menu.js

@@ -1,40 +1,49 @@
+// 系统: 1;
+// 审核: 2;
+// 库存: 3;
+// 财务: 4;
 export const system = [{ icon: 'icon-shouye', index: '/adminCenter/homeIndex', title: '系统首页' }];
 export const userMenu = [
   {
     icon: 'icon-yonghu',
     index: '/adminCenter/user/index',
     title: '用户管理',
+    module: '1',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-shenbao',
     index: '/adminCenter/declare/index',
     title: '申报审核',
+    module: '1|2',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-caigou',
     index: '/adminCenter/purchase/index',
     title: '采购管理',
+    module: '1|2',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-daishouhuo',
     index: '/adminCenter/collect/index',
     title: '收货管理',
+    module: '1|3',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-cangku_kucun',
     index: '/adminCenter/stock/index',
     title: '库存管理',
+    module: '1|3',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-caiwu',
     index: '/adminCenter/finance/index',
     title: '财务管理',
+    module: '1|4',
   },
   {
-    icon: 'icon-yonghu',
+    icon: 'icon-leixing',
     index: '/adminCenter/type/index',
     title: '商品类型',
+    module: '1',
   },
-  // { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '审核管理' },
-  // { icon: 'icon-ceshi', index: '/adminCenter/user/index', title: '库存管理' },
 ];