module-menu 0.3.27 → 0.3.29
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/.umi/.cache/babel-loader/05da2ac7ce847f4ac142081bde816ecf.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/09d51f91f163540fd650c8a1579193b1.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/0f6549b9d10294232b89da8657360277.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/23b18f784e32600454794b2bc362f616.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/26d77603e66f6933c2dc1d0e465e6608.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/3ec5be4c29da5d1bd06763e648760136.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5a489674f73ba39a5ea1cc7d7b7503d0.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/61885cd5b516811a2c6c15d00a9f3fda.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/63806f9f0b8dc5e716b1990dfa732c6c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/666e69cb2b37533879036f47ada34243.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/6898c7f891a3bbc784f9cfaa31dcff9d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/758604ebb5da785db1de53c48cf32d93.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/7916b0fdcf4c601d822ebe0ebdafc760.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/80ff595ed07f19f8e201070c1a532ee6.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/8576178075465b8523afb6faba1bb689.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/976e4042042336ab582d7efa11aa30ec.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9acb2738363df2d92994bf7905ebd605.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a0c68b5b0e87cc6457701f3db882af8e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/ae22022b77a9646d4362586a54b3648a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/b88256ece0ad91969102136650dab7e2.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/be6e223e0841645799fe57c7a263605c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/c5faedc5006381dba70046d5df14b90f.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/caed628a77c5223738c833fd65e11e3c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/eaacb308e00b7984b48e9772681599e6.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/ed6d6139ccb9513b5ce61369e2824a3c.json.gz +0 -0
- package/src/pages/ModuleMenu/index.jsx +37 -0
- package/src/pages/ModuleUser/index.jsx +3 -3
- package/src/pages/index.jsx +14 -2
- package/src/pages/util/axios.js +1 -1
package/package.json
CHANGED
|
@@ -26,11 +26,47 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
26
26
|
const [showMenuList, setshowMenuList] = useState(false);
|
|
27
27
|
const [menuList, setMenuList] = useState([]);
|
|
28
28
|
const [canOperatExchange, setCanOperatExchange] = useState(false); //是否具有政务共享平台权限
|
|
29
|
+
const menuRef = useRef(null);
|
|
30
|
+
const hideTimerRef = useRef(null);
|
|
31
|
+
|
|
32
|
+
const handleMouseEnter = () => {
|
|
33
|
+
if (hideTimerRef.current) {
|
|
34
|
+
clearTimeout(hideTimerRef.current);
|
|
35
|
+
hideTimerRef.current = null;
|
|
36
|
+
}
|
|
37
|
+
setshowMenuList(true);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleMouseLeave = () => {
|
|
41
|
+
hideTimerRef.current = setTimeout(() => {
|
|
42
|
+
setshowMenuList(false);
|
|
43
|
+
}, 100);
|
|
44
|
+
};
|
|
45
|
+
|
|
29
46
|
useEffect(() => {
|
|
30
47
|
localStorage.setItem('stash', stash);
|
|
31
48
|
getSessionMenu();
|
|
32
49
|
}, []);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
const handleClickOutside = (event) => {
|
|
52
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
53
|
+
setshowMenuList(false);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
58
|
+
return () => {
|
|
59
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
33
62
|
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
return () => {
|
|
65
|
+
if (hideTimerRef.current) {
|
|
66
|
+
clearTimeout(hideTimerRef.current);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}, []);
|
|
34
70
|
const getSessionMenu = () => {
|
|
35
71
|
if (['integration', 'LNRD', 'HBJK'].includes(stash)) {
|
|
36
72
|
Axios(
|
|
@@ -444,6 +480,7 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
|
|
|
444
480
|
'menuIcon',
|
|
445
481
|
)}
|
|
446
482
|
onMouseOver={() => setshowMenuList(true)}
|
|
483
|
+
onMouseOut={() => setshowMenuList(false)}
|
|
447
484
|
style={{
|
|
448
485
|
// backgroundImage: `url(${menuIconSrc})`,
|
|
449
486
|
backgroundRepeat: 'no-repeat',
|
|
@@ -16,7 +16,7 @@ import cn from 'classnames'
|
|
|
16
16
|
import userLogo1 from '../../assets/userLogo1.png';
|
|
17
17
|
|
|
18
18
|
// stash存在则为一体化,否则为轻量级
|
|
19
|
-
const ModuleUser = ({ stash = '', isBigDataFoundationPlatform = false }) => {
|
|
19
|
+
const ModuleUser = ({ stash = '', isBigDataFoundationPlatform = false, PZCS = false }) => {
|
|
20
20
|
const [tenantList, setTenantList] = useState([]);
|
|
21
21
|
const [haveAppSystemPermission, setHaveAppSystemPermission] = useState(false);
|
|
22
22
|
const [getSystemPermission, setGetSystemPermission] = useState(false);
|
|
@@ -256,13 +256,13 @@ const ModuleUser = ({ stash = '', isBigDataFoundationPlatform = false }) => {
|
|
|
256
256
|
return (
|
|
257
257
|
<div className={cn(stash !== 'LNRD'? 'right_size':'right_size_LNRD', 'right')}>
|
|
258
258
|
{['integration', 'LNRD', 'HBJK'].includes(stash) && [
|
|
259
|
-
!isBigDataFoundationPlatform && (
|
|
259
|
+
!isBigDataFoundationPlatform && !PZCS && (
|
|
260
260
|
<Button type="link" onClick={jumpToExterHome}
|
|
261
261
|
className={cn(stash === 'LNRD'? 'fwmh_color_LNRD': stash === 'HBJK'? 'fwmh_color_HBJK' : null)}>
|
|
262
262
|
服务门户
|
|
263
263
|
</Button>
|
|
264
264
|
),
|
|
265
|
-
<Select
|
|
265
|
+
!PZCS && <Select
|
|
266
266
|
defaultValue={curTenantId}
|
|
267
267
|
className={stash === 'LNRD'? 'right-select_LNRD': stash === 'HBJK'? 'right-select_HBJK' : 'right-select'}
|
|
268
268
|
style={{
|
package/src/pages/index.jsx
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import ModuleMenu from './ModuleMenu';
|
|
2
2
|
import ModuleUser from './ModuleUser';
|
|
3
3
|
import Footer from './Footer';
|
|
4
|
+
|
|
4
5
|
export { ModuleMenu, ModuleUser, Footer };
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
export default function IndexPage() {
|
|
8
|
+
return (
|
|
9
|
+
<div>
|
|
10
|
+
<ModuleMenu stash="integration" />
|
|
11
|
+
<ModuleUser stash="integration" PZCS={true} />
|
|
12
|
+
<div style={{ padding: '50px', marginTop: '100px' }}>
|
|
13
|
+
<h1>测试页面</h1>
|
|
14
|
+
<p>ModuleMenu 组件已加载</p>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
package/src/pages/util/axios.js
CHANGED
|
@@ -5,7 +5,7 @@ import getStore from './userInfo';
|
|
|
5
5
|
import { checkToken } from './permessionUtils';
|
|
6
6
|
import CONSTANT from './constant';
|
|
7
7
|
|
|
8
|
-
let tokenValue = '
|
|
8
|
+
let tokenValue = '4e564b370fc8400982358cd88e73a566';
|
|
9
9
|
// 轻量级tokenInSessionStor存在(GZW跳/data-platform/#/login,否则/#/login),一体化tokenInSessionStor不存在
|
|
10
10
|
const tokenInSessionStor = window.sessionStorage.getItem(
|
|
11
11
|
'bigdata-access_token',
|