module-menu-vue 0.0.55 → 0.0.57

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.55",
3
+ "version": "0.0.57",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
@@ -87,8 +87,8 @@ 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 () {
@@ -119,7 +119,15 @@ export default {
119
119
  let logoAndTitle = { logoSrc: "", title: "" };
120
120
  if (sysInfo) {
121
121
  logoAndTitle.logoSrc = sysInfo.logoSrc;
122
- logoAndTitle.title = sysInfo.title;
122
+ if (this.sysName === 'admin') {
123
+ if (this.stash === "integration") {
124
+ // logoAndTitle.title = location.href.indexOf('/appSystem/index') !== -1 ? '应用系统管理' : '数据源管理'
125
+ } else {
126
+ logoAndTitle.title = sysInfo.title;
127
+ }
128
+ } else {
129
+ logoAndTitle.title = sysInfo.title;
130
+ }
123
131
  }
124
132
  return logoAndTitle;
125
133
  },
@@ -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
  // {
@@ -27,7 +27,7 @@
27
27
  import Axios from '../Util/axios.js'
28
28
  import { userMenuIcon } from './constant.js'
29
29
  import { getUserName } from './../Util/userInfo.js'
30
- // import { integrationLogout } from './service.js'
30
+ import { integrationLogout } from './service.js'
31
31
  export default {
32
32
  name: 'UserInfo',
33
33
  data () {
@@ -60,24 +60,24 @@ export default {
60
60
  let url = ''
61
61
  if (flag === 'single') {
62
62
  url = this.stash === "integration" ? '/admin-ui/user/profile' : '/#/info/index'
63
+ location.href = url;
63
64
  } else if (flag === 'systerm') {
64
65
  url = this.stash === "integration" ? '/admin-ui/bpm/manager/user-group' : '/#/admin/user/index'
66
+ location.href = url;
65
67
  } else if (flag === 'logout') {
66
68
  this.logoutFunc()
67
69
  }
68
- location.href = url;
69
70
  },
70
71
  async logoutFunc () {
71
72
  console.log('开始调用退出接口...')
72
73
  if (this.stash === 'integration') {
73
- this.$emit('logout')
74
+ await integrationLogout();
75
+ this.logoutUrl()
74
76
  } else {
75
77
  const url = this.stash === 'integration' ? '/admin-api/system/auth/logout' : '/auth/token/logout'
76
78
  const method = this.stash === 'integration'? 'post' : 'delete'
77
79
  Axios(url, method).then(() => {
78
- localStorage.clear();
79
- sessionStorage.clear();
80
- location.href = this.stash === "integration" ? '/admin-ui/login' : '/#/login'
80
+ this.logoutUrl();
81
81
  })
82
82
  .catch((err) => {
83
83
  console.log('err: ', err)