From dbd1193679906fd5a35aa3784482efcad238bb12 Mon Sep 17 00:00:00 2001
From: ival <610568032@qq.com>
Date: Mon, 12 Aug 2019 15:39:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E6=B6=9F?=
=?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BB=A5=E5=8F=8A=E5=A4=A7=E5=B1=8F=E7=AD=89?=
=?UTF-8?q?=E5=85=B6=E4=BB=96=E7=B3=BB=E7=BB=9F=E6=97=B6=EF=BC=8C=E4=B8=BB?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B9=9F=E8=B7=B3=E8=BD=AC=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/Entry.vue | 12 ++
src/layout/components/Navbar.vue | 103 +++++++++---------
src/layout/components/Sidebar/SidebarItem.vue | 59 +++++-----
src/store/modules/permission.js | 6 +-
src/store/modules/user.js | 4 +-
5 files changed, 101 insertions(+), 83 deletions(-)
diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue
index b1d44f734..6bf43b0fd 100644
--- a/src/layout/components/Entry.vue
+++ b/src/layout/components/Entry.vue
@@ -3,16 +3,25 @@
{{ item.name }}
+
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index b4c45a5b4..6ef9d3747 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -8,58 +8,63 @@
text-color="#fff"
active-text-color="#ffd04b"
>
-
-
-
- {{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}
-
-
-
-
- {{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}
-
-
-
-
- {{ $t(item.meta.i18n) || item.meta.title }}
-
-
-
-
-
- {{ child.meta.title || $t(item.meta.i18n) }}
-
-
-
-
- {{ $t(grandchild.meta.title || grandchild.meta.i18n) }}
-
-
-
-
-
-
-
- {{ child.meta.title || $t(child.meta.i18n) }}
+
+
+
+
+
+ {{ $t(item.children[0].meta.i18n) }}
-
+
+
+
+ {{ $t(item.children[0].meta.i18n) }}
+
+
+
+
+
+ {{ $t(item.meta.i18n) }}
+
+
+
+
+
+
+ {{ $t(child.meta.i18n) }}
+
+
+
+
+
+ {{ $t(grandchild.meta.i18n) }}
+
+
+
+
+
+
+
+
+ {{ $t(child.meta.i18n) }}
+
+
+
+
+
+
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index 22d1f24b8..f7714e1cf 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -1,36 +1,37 @@
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 16a88202c..cd75fad78 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -63,9 +63,9 @@ function convertRouterRoles({ roles, permissionType }) {
*/
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
return asyncRouter.filter(route => {
- if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1){
- route.hidden = true;
- }
+ if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1) {
+ route.hidden = true;
+ }
if (hasPermission(roles, route, parentsRoles)) {
if (route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 8518170ee..d0d4e79d9 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -100,8 +100,8 @@ const user = {
return new Promise((resolve, reject) => {
// 设置user域token值
commit(token.key, token.value);
- // let header = { group: '', 'X-Token': token.value };
- // creatSubscribe(perpetualTopic, header);
+ const header = { group: '', 'X-Token': token.value };
+ creatSubscribe(perpetualTopic, header);
// 获取用户参数
dispatch('GetUserConfigInfo').then(response => {
resolve(response);