whx 10 hours ago
parent
commit
31289c4586

File diff suppressed because it is too large
+ 1 - 1
virgo.wzfrontend/src/main/resources/static/workark/index.html


virgo.wzfrontend/src/main/resources/static/workark/static/css/5188.ae8f2d1d.css → virgo.wzfrontend/src/main/resources/static/workark/static/css/9531.ae8f2d1d.css


File diff suppressed because it is too large
+ 0 - 1
virgo.wzfrontend/src/main/resources/static/workark/static/js/5188.493aa2e5.js


File diff suppressed because it is too large
+ 1 - 0
virgo.wzfrontend/src/main/resources/static/workark/static/js/9531.2402b39c.js


File diff suppressed because it is too large
+ 2 - 2
virgo.wzfrontend/src/main/resources/static/workark/static/js/app.fcd1cbce.js


+ 2 - 3
virgo.wzfrontend/workark/src/layout/setLayout.vue

@@ -41,9 +41,8 @@
 		},
 		methods: {
 			init() {
-				this.menuList = this.$store.getters.menuData.filter(node => node.title === '系统设置' || node.title ===
-					'优惠管理' || node.title === '商品管理');
-				console.log(this.menuList);
+				this.menuList = this.$store.getters.menuData.filter(node => this.$systemMenu.filter(item => item === node
+					.title).length > 0);
 			}
 		},
 		components: {

+ 20 - 6
virgo.wzfrontend/workark/src/layout/workLayout.vue

@@ -7,7 +7,7 @@
 					<sub-menu :menuData="menuList" :menuIndex="1"></sub-menu>
 				</el-menu>
 			</div>
-			<div class="app-main-button" @click="set">
+			<div class="app-main-button" @click="$router.push(setPath)" v-if="setPath">
 				<i class="iconfont huifont-shezhi"></i>
 				<div>后台设置</div>
 			</div>
@@ -96,7 +96,8 @@
 				badge: 0,
 				badges: 0,
 				isCustomer: false,
-				chatType: 1
+				chatType: 1,
+				setPath: ''
 			}
 		},
 		mounted() {
@@ -106,7 +107,7 @@
 		},
 		methods: {
 			init() {
-				this.menuList = this.$store.getters.menuData.filter(node => node.title != '系统设置' && node.title != '优惠管理' && node.title != '商品管理');
+				this.initMenu();
 				this.$chat.getConversationList(data => {
 					this.countNumber('badge', data.data)
 				});
@@ -124,6 +125,22 @@
 					}
 				})
 			},
+			initMenu() {
+				this.menuList = this.$store.getters.menuData.filter(node => this.$systemMenu.filter(item => item === node
+					.title).length === 0);
+				let list = this.$store.getters.menuData.filter(node => this.$systemMenu.filter(item => item === node.title)
+					.length > 0);
+				this.findPath(list);
+			},
+			findPath(data) {
+				if (this.setPath) return;
+				for (let i = 0; i < data.length; i++) {
+					if (!this.setPath) {
+						if (data[i].index) this.setPath = data[i].index;
+						if (data[i].children) this.findPath(data[i].children);
+					}
+				}
+			},
 			openChat(type) {
 				this.chatType = type;
 				this.visible = true;
@@ -151,9 +168,6 @@
 						this.initCoupon();
 					}
 				})
-			},
-			set() {
-
 			}
 		},
 		components: {

+ 3 - 1
virgo.wzfrontend/workark/src/main.js

@@ -10,7 +10,7 @@ Vue.use(ElementUI);
 Vue.config.productionTip = false
 
 import dayjs from 'dayjs';
-Vue.prototype.$dayjs = dayjs;
+Vue.prototype.$dayjs = dayjs;
 
 //自定义弹窗
 import './uitls/dialogDrag'
@@ -46,6 +46,8 @@ Vue.prototype.$confirm = (title, callback) => {
 	}).then(callback).catch(() => {});
 };
 
+Vue.prototype.$systemMenu = ['系统设置', '优惠管理', '商品管理'];
+
 import './uitls/permission.js'
 import './router/permission.js'