module-menu-vue 0.0.96 → 0.0.98

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.96",
3
+ "version": "0.0.98",
4
4
  "description": "城市大数据平台菜单--Vue版",
5
5
  "main": "/index.js",
6
6
  "scripts": {
Binary file
Binary file
Binary file
@@ -46,7 +46,7 @@
46
46
  <script>
47
47
  import { menuList as menuListInit, menuList_PANWEI, menuIconSrc, sysNameMap, lnrdMenuList, lnrdSysNameMap } from './constant.js'
48
48
  import './menu.css'
49
- import {getMenuList, isLogoutThird} from './service.js'
49
+ import { getMenuList, isLogoutThird, getInfoByName, getUrlByInfo } from './service.js'
50
50
  export default {
51
51
  name: 'ModuleMenu',
52
52
  props: {
@@ -172,8 +172,19 @@ export default {
172
172
  }
173
173
  return logoAndTitle;
174
174
  },
175
+ async getUrl(name) {
176
+ let res = null;
177
+ let obj = {}
178
+ res = await getInfoByName(name)
179
+ obj = {
180
+ clientId: res.data.data.clientId,
181
+ redirectUrl: encodeURIComponent(res.data.data.redirectUris[0]),
182
+ }
183
+ res = await getUrlByInfo(obj)
184
+ return res.data.data
185
+ },
175
186
  // 跳转各个模块
176
- toModulePage (nameStr) {
187
+ async toModulePage (nameStr) {
177
188
  console.log('nameStr', nameStr)
178
189
  if (nameStr === '平台运行总览') {
179
190
  window.open('/dataadmin/#/overview', '_blank');
@@ -181,6 +192,15 @@ export default {
181
192
  }
182
193
  let thirdPartyServiceJumpPath = ""; // 第三方服务跳转路径
183
194
  switch (nameStr) {
195
+ case '数据可视化':
196
+ thirdPartyServiceJumpPath = await this.getUrl('dataview')
197
+ break;
198
+ case '数据填报':
199
+ thirdPartyServiceJumpPath = await this.getUrl('datafill')
200
+ break;
201
+ case '数据标签':
202
+ thirdPartyServiceJumpPath = '/datatag/';
203
+ break;
184
204
  case "数据集成":
185
205
  thirdPartyServiceJumpPath = "/datacollect/";
186
206
  break;
@@ -1,5 +1,5 @@
1
1
  const token = localStorage.getItem('ACCESS_TOKEN')
2
- console.log('token', token)
2
+
3
3
  export const menuList = [{
4
4
  name: '首页',
5
5
  url: require('../../assets/home.svg'),
@@ -8,11 +8,18 @@ export const menuList = [{
8
8
  {
9
9
  name: '数据汇聚',
10
10
  url: require('../../assets/ic_shujuhuiju_m.svg'),
11
- children: [{
12
- childName: '数据集成',
13
- path: token ? '/datacollect' : '/datacollection',
14
- url:require('../../assets/datacollection_slogo.svg'),
15
- }]
11
+ children: [
12
+ {
13
+ childName: '数据集成',
14
+ path: token ? '/datacollect' : '/datacollection',
15
+ url:require('../../assets/datacollection_slogo.svg'),
16
+ },
17
+ {
18
+ childName: "数据填报",
19
+ path: "/datafill",
20
+ url: require('../../assets/dataApp/datafill.png'),
21
+ }
22
+ ]
16
23
  },
17
24
  {
18
25
  name: '数据治理',
@@ -30,7 +37,12 @@ export const menuList = [{
30
37
  {
31
38
  childName: '数据质量',
32
39
  path: token ? '/quality' : '/quality/',
33
- url:require('../../assets/quality_slogo.svg'),
40
+ url: require('../../assets/quality_slogo.svg'),
41
+ },
42
+ {
43
+ childName: "指标管理",
44
+ path: "/indicator",
45
+ url: require('../../assets/dataApp/indicator.png'),
34
46
  }]
35
47
  },
36
48
  {
@@ -85,20 +97,28 @@ export const menuList = [{
85
97
  path: "/cascade",
86
98
  url: require("../../assets/ic_jilianguanli.png"),
87
99
  },
88
- {
89
- childName: '综合评价系统',
90
- path: '/evaluate',
91
- url: require("../../assets/ic_pingjia.png"),
92
- }]
100
+ ]
93
101
  },
94
102
  {
95
103
  name: '数据应用',
96
104
  url: require('../../assets/ic_shujuyingyong_m.svg'),
97
- children: [{
98
- childName: '数据标签',
99
- path: '',
100
- url:require('../../assets/datalabel_slogo.svg'),
101
- }]
105
+ children: [
106
+ {
107
+ childName: '数据标签',
108
+ path: '',
109
+ url: require('../../assets/datalabel_slogo.svg'),
110
+ },
111
+ {
112
+ childName: "数据可视化",
113
+ path: "/dataview",
114
+ url: require("../../assets/dataApp/dataview.png"),
115
+ },
116
+ {
117
+ childName: '综合评价系统',
118
+ path: '/evaluate',
119
+ url: require("../../assets/ic_pingjia.png"),
120
+ }
121
+ ]
102
122
  },
103
123
  {
104
124
  name: '公共模块',
@@ -133,6 +153,7 @@ export const menuList = [{
133
153
  url: require('../../assets/ic_zonglan.png'),
134
154
  }]
135
155
  }];
156
+
136
157
  export const menuList_PANWEI = [{
137
158
  name: '首页',
138
159
  url: require('../../assets/home.svg'),
@@ -180,7 +201,9 @@ export const menuList_PANWEI = [{
180
201
  },
181
202
  ]
182
203
  }];
204
+
183
205
  export const menuIconSrc = require('../../assets/menuIcon.svg');
206
+
184
207
  export const sysNameMap = [
185
208
  {
186
209
  sysName: 'datasecurity',
@@ -1,4 +1,5 @@
1
1
  import request from 'axios'
2
+
2
3
  export const getMenuList = () => {
3
4
  return request(`/admin-api/system/user/get-user-menu-List?menuName=数据平台`, {
4
5
  method: 'get'
@@ -8,4 +9,18 @@ export const getMenuList = () => {
8
9
  // 是否跳转到第三方
9
10
  export const isLogoutThird = () => {
10
11
  return request('/admin/social/logoutUri');
12
+ }
13
+
14
+ export function getInfoByName(name) {
15
+ return request({
16
+ url: `/admin-api/system/oauth2-client/getByName?name=${name}`,
17
+ method: 'get',
18
+ })
19
+ }
20
+
21
+ export function getUrlByInfo(obj) {
22
+ return request({
23
+ url: `/admin-api/system/oauth2/authorize?response_type=code&client_id=${obj.clientId}&redirect_uri=${obj.redirectUrl}&auto_approve=true&scope=%7B"user.read":true%7D`,
24
+ method: 'post',
25
+ })
11
26
  }
package/vue.config.js CHANGED
@@ -1,9 +1,4 @@
1
- /**npm
2
- * 配置参考:
3
- * https://cli.vuejs.org/zh/config/
4
- */
5
- const url = 'https://10.136.106.131:31950'
6
- // const url = 'https://192.168.108.86:30011/'
1
+ const url = 'https://192.168.108.203:31950'
7
2
  module.exports = {
8
3
  lintOnSave: true,
9
4
  productionSourceMap: false,
@@ -28,7 +23,7 @@ module.exports = {
28
23
  },
29
24
  },
30
25
  '/admin-api': {
31
- target: 'https://10.136.106.131:31950',
26
+ target: url,
32
27
  changeOrigin: true,
33
28
  pathRewrite: { '^': '' },
34
29
  }