module-menu 0.3.31 → 0.3.33
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
|
@@ -21,7 +21,7 @@ import cn from 'classnames';
|
|
|
21
21
|
轻量级-国资委 GZW
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
24
|
+
const ModuleMenu = ({ sysName, stash = '', xiangtan = false }) => {
|
|
25
25
|
const [sessionMenu, setSessionMenu] = useState([]);
|
|
26
26
|
const [showMenuList, setshowMenuList] = useState(false);
|
|
27
27
|
const [menuList, setMenuList] = useState([]);
|
|
@@ -172,7 +172,11 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
172
172
|
.then((res) => {
|
|
173
173
|
if (res.data.code === 0) {
|
|
174
174
|
if (res.data.data.search('http') !== -1) {
|
|
175
|
-
|
|
175
|
+
if (xiangtan) {
|
|
176
|
+
window.open(res.data.data, '_blank');
|
|
177
|
+
} else {
|
|
178
|
+
window.location.href = res.data.data;
|
|
179
|
+
}
|
|
176
180
|
}
|
|
177
181
|
} else {
|
|
178
182
|
message.warning(res.data.msg || '获取信息失败');
|
|
@@ -298,6 +302,8 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
298
302
|
].includes(nameStr)
|
|
299
303
|
) {
|
|
300
304
|
window.open(thirdPartyServiceJumpPath, '_blank');
|
|
305
|
+
} else if (xiangtan) {
|
|
306
|
+
window.open(thirdPartyServiceJumpPath, '_blank');
|
|
301
307
|
} else {
|
|
302
308
|
window.location.href = thirdPartyServiceJumpPath;
|
|
303
309
|
}
|
|
@@ -306,11 +312,16 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
306
312
|
// 跳转首页
|
|
307
313
|
const toHomePage = (index) => {
|
|
308
314
|
if (index === 0) {
|
|
309
|
-
|
|
315
|
+
const homeUrl = ['integration', 'LNRD', 'HBJK'].includes(stash)
|
|
310
316
|
? '/dataadmin/#/index'
|
|
311
317
|
: stash === 'GZW'
|
|
312
318
|
? '/data-platform/#/index'
|
|
313
319
|
: '/#/index';
|
|
320
|
+
if (xiangtan) {
|
|
321
|
+
window.open(homeUrl, '_blank');
|
|
322
|
+
} else {
|
|
323
|
+
window.location.href = homeUrl;
|
|
324
|
+
}
|
|
314
325
|
}
|
|
315
326
|
};
|
|
316
327
|
const getNewMenuList = (menuGet) => {
|
|
@@ -47,7 +47,7 @@ const ModuleUser = ({
|
|
|
47
47
|
})
|
|
48
48
|
.catch((e) => console.log('e', e));
|
|
49
49
|
} else if (stash === 'integration') {
|
|
50
|
-
|
|
50
|
+
Axios('get', '/admin-api/system/auth/systemPage', '', {})
|
|
51
51
|
.then((res) => {
|
|
52
52
|
if (res.data.code === 0) {
|
|
53
53
|
window.location.href = `/admin-ui${res.data.data.path}`;
|
|
@@ -134,7 +134,7 @@ const ModuleUser = ({
|
|
|
134
134
|
};
|
|
135
135
|
});
|
|
136
136
|
let haveAppSystem_Permission =
|
|
137
|
-
menuGet?.some((item) => item.name === '
|
|
137
|
+
menuGet?.some((item) => item.name === '数据源管理') || false;
|
|
138
138
|
setHaveAppSystemPermission(haveAppSystem_Permission);
|
|
139
139
|
}
|
|
140
140
|
})
|
|
@@ -283,7 +283,7 @@ const ModuleUser = ({
|
|
|
283
283
|
alt=""
|
|
284
284
|
style={{ marginRight: '10px', marginTop: '-3px' }}
|
|
285
285
|
/>
|
|
286
|
-
<span
|
|
286
|
+
<span>数据源管理</span>
|
|
287
287
|
</Menu.Item>
|
|
288
288
|
)}
|
|
289
289
|
<Menu.Item key="logout" onClick={() => logout()}>
|