module-menu 0.2.42 → 0.2.44
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 +1 -1
- package/src/assets/dataApp/datafill.png +0 -0
- package/src/assets/dataApp/dataview.png +0 -0
- package/src/assets/dataApp/indicator.png +0 -0
- package/src/pages/ModuleMenu/constData.jsx +21 -12
- package/src/pages/ModuleMenu/index.jsx +21 -1
- package/src/pages/ModuleMenu/service.js +22 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -15,6 +15,11 @@ export const menuList = (stash = '') => [
|
|
|
15
15
|
// url: require('../../assets/datacollection_slogo.svg'),
|
|
16
16
|
url: stash !=='LNRD' ? require('../../assets/datacollection_slogo.svg') : require('../../assets/datacollection_slogo_LNRD.svg'),
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
childName: "数据填报",
|
|
20
|
+
path: "/datafill",
|
|
21
|
+
url: require('../../assets/dataApp/datafill.png'),
|
|
22
|
+
}
|
|
18
23
|
],
|
|
19
24
|
},
|
|
20
25
|
{
|
|
@@ -40,6 +45,11 @@ export const menuList = (stash = '') => [
|
|
|
40
45
|
// url: require('../../assets/quality_slogo.svg'),
|
|
41
46
|
url: stash !=='LNRD' ? require('../../assets/quality_slogo.svg') : require('../../assets/quality_slogo_LNRD.svg'),
|
|
42
47
|
},
|
|
48
|
+
{
|
|
49
|
+
childName: "指标管理",
|
|
50
|
+
path: "/indicator",
|
|
51
|
+
url: require('../../assets/dataApp/indicator.png'),
|
|
52
|
+
},
|
|
43
53
|
],
|
|
44
54
|
},
|
|
45
55
|
{
|
|
@@ -108,17 +118,6 @@ export const menuList = (stash = '') => [
|
|
|
108
118
|
// url: require('../../assets/jilianguanl_slogo.png'),
|
|
109
119
|
url: stash !=='LNRD' ? require('../../assets/jilianguanl_slogo.png') : require('../../assets/jilianguanl_slogo_LNRD.svg'),
|
|
110
120
|
},
|
|
111
|
-
{
|
|
112
|
-
childName: '综合评价系统',
|
|
113
|
-
path: '/evaluate',
|
|
114
|
-
// url: require('../../assets/ic_pingjia.png'),
|
|
115
|
-
url: stash !=='LNRD' ? require('../../assets/ic_pingjia.png') : require('../../assets/ic_pingjia_LNRD.svg'),
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
childName: '数据标签',
|
|
119
|
-
path: '/datatag/',
|
|
120
|
-
url: require('../../assets/ic_biaoqian.png'),
|
|
121
|
-
},
|
|
122
121
|
]
|
|
123
122
|
: [
|
|
124
123
|
{
|
|
@@ -145,10 +144,20 @@ export const menuList = (stash = '') => [
|
|
|
145
144
|
children: [
|
|
146
145
|
{
|
|
147
146
|
childName: '数据标签',
|
|
148
|
-
path: '',
|
|
147
|
+
path: '/datatag',
|
|
149
148
|
// url: require('../../assets/datalabel_slogo.svg'),
|
|
150
149
|
url: stash !=='LNRD' ? require('../../assets/datalabel_slogo.svg') : require('../../assets/datalabel_slogo_LNRD.svg'),
|
|
151
150
|
},
|
|
151
|
+
{
|
|
152
|
+
childName: "数据可视化",
|
|
153
|
+
path: "/dataview",
|
|
154
|
+
url: require("../../assets/dataApp/dataview.png"),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
childName: '综合评价系统',
|
|
158
|
+
path: '/evaluate',
|
|
159
|
+
url: stash !=='LNRD' ? require('../../assets/ic_pingjia.png') : require('../../assets/ic_pingjia_LNRD.svg'),
|
|
160
|
+
},
|
|
152
161
|
],
|
|
153
162
|
},
|
|
154
163
|
{
|
|
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef, useMemo } from 'react';
|
|
|
2
2
|
import { Popconfirm, message, Popover } from 'antd';
|
|
3
3
|
import { menuList as menuListInit, menuIconSrc, sysNameMap } from './constData';
|
|
4
4
|
import HeaderDropdown from '../ModuleUser/HeaderDropdown';
|
|
5
|
+
import { getInfoByName, getUrlByInfo } from './service.js'
|
|
5
6
|
import Axios from '../util/axios';
|
|
6
7
|
import _ from 'lodash';
|
|
7
8
|
import './index.less';
|
|
@@ -95,8 +96,21 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
95
96
|
return logoAndTitle;
|
|
96
97
|
};
|
|
97
98
|
|
|
99
|
+
const getUrl = async (name) => {
|
|
100
|
+
let res = null;
|
|
101
|
+
let obj = {}
|
|
102
|
+
res = await getInfoByName(name)
|
|
103
|
+
obj = {
|
|
104
|
+
clientId: res.data.data.clientId,
|
|
105
|
+
redirectUrl: encodeURIComponent(res.data.data.redirectUris[0]),
|
|
106
|
+
}
|
|
107
|
+
res = await getUrlByInfo(obj)
|
|
108
|
+
return res.data.data
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
|
|
98
112
|
// 跳转各个模块
|
|
99
|
-
const toModulePage = (nameStr) => {
|
|
113
|
+
const toModulePage = async (nameStr) => {
|
|
100
114
|
if (!sessionMenu || sessionMenu.length === 0) {
|
|
101
115
|
message.destroy();
|
|
102
116
|
message.warning('没有获取到菜单列表,请联系管理员添加权限');
|
|
@@ -180,6 +194,12 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
180
194
|
case '数据标签':
|
|
181
195
|
thirdPartyServiceJumpPath = '/datatag/';
|
|
182
196
|
break;
|
|
197
|
+
case '数据可视化':
|
|
198
|
+
thirdPartyServiceJumpPath = await this.getUrl('dataview')
|
|
199
|
+
break;
|
|
200
|
+
case '数据填报':
|
|
201
|
+
thirdPartyServiceJumpPath = await this.getUrl('datafill')
|
|
202
|
+
break;
|
|
183
203
|
default:
|
|
184
204
|
break;
|
|
185
205
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Axios from '../util/axios';
|
|
2
|
+
|
|
3
|
+
export function getInfoByName(name) {
|
|
4
|
+
return Axios(
|
|
5
|
+
'get',
|
|
6
|
+
`/admin-api/system/oauth2-client/getByName?name=${name}`,
|
|
7
|
+
'',
|
|
8
|
+
{},
|
|
9
|
+
)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function getUrlByInfo(obj) {
|
|
13
|
+
return Axios(
|
|
14
|
+
'post',
|
|
15
|
+
`/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`,
|
|
16
|
+
'',
|
|
17
|
+
{},
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|