module-menu-vue 0.0.56 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "module-menu-vue",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -87,23 +87,27 @@ export default {
87
87
  },
88
88
  methods: {
89
89
  toHref () {
90
- if (this.sysName === 'admin') {
91
- location.href = this.stash === "integration" ? '/dataadmin/#/datasource' : '/#/admin/user/index'
90
+ if (this.sysName === 'admin' && this.stash !== "integration") {
91
+ location.href = '/#/admin/user/index'
92
92
  }
93
93
  },
94
94
  async getSessionMenu () {
95
95
  // 一体化
96
96
  if (this.stash === "integration") {
97
97
  const rsp = await getMenuList()
98
- if (rsp.data.data) {
99
- const pathList = rsp.data.data.map(item => {
100
- return {
101
- ...item,
102
- path: item.path.indexOf('/') === -1 ? '/' + item.path : item.path
103
- }
104
- })
105
- this.sessionMenu = [...pathList]
106
- this.getNewMenuList();
98
+ const rspData = rsp.data.data
99
+ if (rspData && rspData.length > 0) {
100
+ const routesList = rspData[0].routes
101
+ if (rsp.data.data) {
102
+ const pathList = routesList.map(item => {
103
+ return {
104
+ ...item,
105
+ path: item.path.indexOf('/') === -1 ? '/' + item.path : item.path
106
+ }
107
+ })
108
+ this.sessionMenu = [...pathList]
109
+ this.getNewMenuList();
110
+ }
107
111
  }
108
112
  } else {
109
113
  // 轻量级
@@ -119,7 +123,15 @@ export default {
119
123
  let logoAndTitle = { logoSrc: "", title: "" };
120
124
  if (sysInfo) {
121
125
  logoAndTitle.logoSrc = sysInfo.logoSrc;
122
- logoAndTitle.title = sysInfo.title;
126
+ if (this.sysName === 'admin') {
127
+ if (this.stash === "integration") {
128
+ // logoAndTitle.title = location.href.indexOf('/appSystem/index') !== -1 ? '应用系统管理' : '数据源管理'
129
+ } else {
130
+ logoAndTitle.title = sysInfo.title;
131
+ }
132
+ } else {
133
+ logoAndTitle.title = sysInfo.title;
134
+ }
123
135
  }
124
136
  return logoAndTitle;
125
137
  },
@@ -177,7 +177,7 @@ export const sysNameMap = [
177
177
  },
178
178
  {
179
179
  sysName: 'admin',
180
- title: token ? '数据源管理' : '系统管理',
180
+ title: token ? '' : '系统管理',
181
181
  logoSrc: require('../../assets/admin_logo.svg'),
182
182
  },
183
183
  // {
@@ -40,9 +40,9 @@
40
40
  color: #4091f7;
41
41
  }
42
42
  .childMenu {
43
- width: 30%;
43
+ width: 27%;
44
44
  display: inline-block;
45
- font-size: 13px;
45
+ font-size: 14px;
46
46
  }
47
47
  .middle {
48
48
  vertical-align: middle;
@@ -1,6 +1,6 @@
1
1
  import request from 'axios'
2
2
  export const getMenuList = () => {
3
- return request(`/admin-api/system/user/getUserMenusList`, {
3
+ return request(`/admin-api/system/user/get-user-menu-List?menuName=数据平台`, {
4
4
  method: 'get'
5
5
  })
6
6
  }
@@ -71,7 +71,6 @@ export default {
71
71
  async logoutFunc () {
72
72
  console.log('开始调用退出接口...')
73
73
  if (this.stash === 'integration') {
74
- // this.$emit('logout')
75
74
  await integrationLogout();
76
75
  this.logoutUrl()
77
76
  } else {
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios';
2
2
  import getStore from './userInfo';
3
3
  import { checkToken } from './permessionUtils';
4
- let tokenValue = '05774990fd19482ab86e90a46b88abf0';
4
+ let tokenValue = '39e212bf726b439180dadb352a57a8c9';
5
5
  axios.interceptors.response.use(
6
6
  (response) => {
7
7
  if (response.status === 200) {