module-menu 0.2.40 → 0.2.42

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",
3
- "version": "0.2.40",
3
+ "version": "0.2.42",
4
4
  "description": "城市大数据平台公共头部及尾部",
5
5
  "main": "src/pages/index.jsx",
6
6
  "scripts": {
Binary file
Binary file
@@ -114,6 +114,11 @@ export const menuList = (stash = '') => [
114
114
  // url: require('../../assets/ic_pingjia.png'),
115
115
  url: stash !=='LNRD' ? require('../../assets/ic_pingjia.png') : require('../../assets/ic_pingjia_LNRD.svg'),
116
116
  },
117
+ {
118
+ childName: '数据标签',
119
+ path: '/datatag/',
120
+ url: require('../../assets/ic_biaoqian.png'),
121
+ },
117
122
  ]
118
123
  : [
119
124
  {
@@ -301,11 +306,11 @@ export const sysNameMap = (stash = '') => [
301
306
  // logoSrc: require('../../assets/datasharing_logo.svg'),
302
307
  logoSrc: stash !=='LNRD'? require('../../assets/datasharing_logo.svg'): require('../../assets/datasharing_logo_LNRD.svg'),
303
308
  },
304
- // {
305
- // sysName: 'dataManager',
306
- // title: '数据标签',
307
- // logoSrc: require('../../assets/datalabel_logo.svg'),
308
- // },
309
+ {
310
+ sysName: 'datatag',
311
+ title: '数据标签',
312
+ logoSrc: require('../../assets/biaoqian_logo.png'),
313
+ },
309
314
  {
310
315
  sysName: 'operate',
311
316
  title: '运维中心',
@@ -1,361 +1,364 @@
1
- import { useState, useEffect, useRef, useMemo } from 'react';
2
- import { Popconfirm, message, Popover } from 'antd';
3
- import { menuList as menuListInit, menuIconSrc, sysNameMap } from './constData';
4
- import HeaderDropdown from '../ModuleUser/HeaderDropdown';
5
- import Axios from '../util/axios';
6
- import _ from 'lodash';
7
- import './index.less';
8
- import cn from 'classnames'
9
- /*
10
- *stash:
11
- 一体化 integration
12
- 一体化 - 辽宁人大 LNRD
13
- 轻量级 不传
14
- 轻量级-国资委 GZW
15
- *
16
- */
17
- const ModuleMenu = ({ sysName, stash = '' }) => {
18
- const [sessionMenu, setSessionMenu] = useState([]);
19
- const [showMenuList, setshowMenuList] = useState(false);
20
- const [menuList, setMenuList] = useState([]);
21
- const [canOperatExchange, setCanOperatExchange] = useState(false); //是否具有政务共享平台权限
22
- useEffect(() => {
23
- localStorage.setItem('stash', stash)
24
- getSessionMenu();
25
- }, []);
26
-
27
- const getSessionMenu = () => {
28
- if(['integration', 'LNRD'].includes(stash)){
29
- Axios(
30
- 'get',
31
- '/admin-api/system/user/get-user-menu-List?menuName=数据平台',
32
- '',
33
- {},
34
- )
35
- .then((res) => {
36
- // const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
37
- // let menuGet =
38
- // (resD?.map((item) => {
39
- // return {
40
- // ...item,
41
- // path:
42
- // item.path.indexOf('/') !== -1
43
- // ? item.path
44
- // : '/' + item.path,
45
- // };
46
- // })) ||
47
- // [];
48
- // console.log('menuGet', menuGet)
49
- // setSessionMenu(menuGet);
50
- // const menuLists = getNewMenuList(menuGet);
51
- // setMenuList(menuLists);
52
-
53
- if (res.data.code === 0) {
54
- let menuGet =
55
- (res.data.data &&
56
- res.data.data[0]?.routes?.map((item) => {
57
- return {
58
- ...item,
59
- path:
60
- item.path.indexOf('/') !== -1
61
- ? item.path
62
- : '/' + item.path,
63
- };
64
- })) ||
65
- [];
66
- console.log('menuGet', menuGet)
67
- setSessionMenu(menuGet);
68
- const menuLists = getNewMenuList(menuGet);
69
- setMenuList(menuLists);
70
- }
71
- })
72
- .catch((e) => console.log('e', e));
73
- }else{
74
- const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
75
- let menuGet = menuObj?.content || [];
76
- setSessionMenu(menuGet);
77
- const menuLists = getNewMenuList(menuGet);
78
- setMenuList(menuLists);
79
- let exchangeInfo =
80
- menuGet && menuGet.find((item) => item.path === '/exchange');
81
- if (exchangeInfo) {
82
- setCanOperatExchange(true);
83
- }
84
- }
85
- };
86
-
87
- // 获取系统logo及title
88
- const getLogoAndTitle = () => {
89
- let sysInfo = sysNameMap(stash).find((item) => item.sysName === sysName);
90
- let logoAndTitle = { logoSrc: '', title: '' };
91
- if (sysInfo) {
92
- logoAndTitle.logoSrc = sysInfo.logoSrc;
93
- logoAndTitle.title = sysInfo.title;
94
- }
95
- return logoAndTitle;
96
- };
97
-
98
- // 跳转各个模块
99
- const toModulePage = (nameStr) => {
100
- if (!sessionMenu || sessionMenu.length === 0) {
101
- message.destroy();
102
- message.warning('没有获取到菜单列表,请联系管理员添加权限');
103
- return;
104
- }
105
-
106
- if (nameStr === '政务共享交换平台') {
107
- Axios('get', '/admin/social/logoutUri', '', {})
108
- .then((res) => {
109
- if (res.data.code === 0) {
110
- if (res.data.data.search('http') !== -1) {
111
- window.location.href = res.data.data;
112
- }
113
- } else {
114
- message.warning(res.data.msg || '获取信息失败');
115
- }
116
- })
117
- .catch((error) => {
118
- console.error('Error while logging out, error:', error);
119
- message.error('服务器错误,请稍后重试');
120
- });
121
- } else {
122
- if (nameStr === '平台运行总览') {
123
- window.open('/dataadmin/#/overview', '_blank');
124
- return;
125
- }
126
- let thirdPartyServiceJumpPath = ''; // 第三方服务跳转路径
127
- switch (nameStr) {
128
- case '数据集成':
129
- thirdPartyServiceJumpPath = '/datacollect/';
130
- break;
131
- case '数据治理':
132
- thirdPartyServiceJumpPath = '/datamanage/';
133
- break;
134
- case '元数据管理':
135
- thirdPartyServiceJumpPath = '/metadata/';
136
- break;
137
- case '数据质量':
138
- thirdPartyServiceJumpPath = '/quality/';
139
- break;
140
- case '离线开发':
141
- thirdPartyServiceJumpPath = '/datadev/';
142
- break;
143
- case '实时开发':
144
- thirdPartyServiceJumpPath = '/dataanalytic/';
145
- break;
146
- case '数据服务':
147
- thirdPartyServiceJumpPath = '/dataservice/';
148
- break;
149
- case '数据资产':
150
- thirdPartyServiceJumpPath = '/dataasset/';
151
- break;
152
- case '数据共享':
153
- thirdPartyServiceJumpPath = '/datasharing/';
154
- break;
155
- case '运维中心':
156
- thirdPartyServiceJumpPath = '/operate/';
157
- break;
158
- case '消息中心':
159
- thirdPartyServiceJumpPath = '/alert/';
160
- break;
161
- case '数据安全':
162
- thirdPartyServiceJumpPath = '/datasecurity/';
163
- break;
164
- case '目录管理':
165
- thirdPartyServiceJumpPath = '/admin-ui/catalog';
166
- break;
167
- case '资源管理':
168
- thirdPartyServiceJumpPath = '/admin-ui/resource/tableResource/list';
169
- break;
170
- case '供需对接':
171
- thirdPartyServiceJumpPath =
172
- '/admin-ui/supply-and-demand-docking/dataRequirement/propose/list';
173
- break;
174
- case '数据直达':
175
- thirdPartyServiceJumpPath = '/admin-ui/cascade';
176
- break;
177
- case '综合评价系统':
178
- thirdPartyServiceJumpPath = '/admin-ui/evaluate';
179
- break;
180
- default:
181
- break;
182
- }
183
- // 判断第三方服务是否有对应服务的菜单权限
184
- window.location.href = thirdPartyServiceJumpPath;
185
- }
186
- };
187
- // 跳转首页
188
- const toHomePage = (index) => {
189
- if (index === 0) {
190
- window.location.href = ['integration', 'LNRD'].includes(stash) ? '/dataadmin/#/index' : (stash === 'GZW' ? '/data-platform/#/index' : '/#/index')
191
- }
192
- };
193
- const getNewMenuList = (menuGet) => {
194
- let newMenuList = _.cloneDeep(menuListInit(stash));
195
- if (menuGet) {
196
- const pathList = menuGet.map((item) => item.path);
197
- // 过滤掉没有权限的子菜单(PS:如果模块下面子菜单都没有,则不显示该模块)
198
- for (let index = newMenuList.length - 1; index >= 0; index--) {
199
- const menuItem = newMenuList[index];
200
- for (
201
- let index_ch = menuItem.children.length - 1;
202
- index_ch >= 0;
203
- index_ch--
204
- ) {
205
- const child = menuItem.children[index_ch];
206
- if (!pathList.includes(child.path)) {
207
- newMenuList[index].children.splice(index_ch, 1);
208
- }
209
- }
210
- if (menuItem.children.length === 0 && menuItem.name !== '首页') {
211
- newMenuList.splice(index, 1);
212
- }
213
- }
214
- }
215
- return newMenuList;
216
- };
217
- const menu = menuList.map((item, index) => {
218
- return (
219
- <div
220
- key={item.name}
221
- className="cardLine"
222
- style={{
223
- height:
224
- item.children.length > 6
225
- ? '140px'
226
- : item.children.length > 3
227
- ? '90px'
228
- : '',
229
- }}
230
- >
231
- <div
232
- className="leftMenu"
233
- style={{
234
- height:
235
- item.children.length > 6
236
- ? '140px'
237
- : item.children.length > 3
238
- ? '96px'
239
- : '70px',
240
- lineHeight:
241
- item.children.length > 6
242
- ? '140px'
243
- : item.children.length > 3
244
- ? '45px'
245
- : '70px',
246
- }}
247
- >
248
- <img src={item.url} className={stash !== 'LNRD'? 'middle' : 'middle_LNRD'} />
249
- <span
250
- className={cn(stash !== 'LNRD'? 'middle' : 'middle_LNRD', 'textPad')}
251
- // className=`${{stash !== 'LNRD'? 'middle' : 'middle_LNRD'}} textPad`
252
- onClick={() => {
253
- toHomePage(index);
254
- }}
255
- >
256
- {item.name}
257
- </span>
258
- </div>
259
- <div
260
- className="rightMenu"
261
- style={{
262
- height:
263
- item.children.length > 6
264
- ? '140px'
265
- : item.children.length > 3
266
- ? '96px'
267
- : '70px',
268
- lineHeight:
269
- item.children.length > 6
270
- ? '45px'
271
- : item.children.length > 3
272
- ? '45px'
273
- : '70px',
274
- borderBottom:
275
- index === menuList.length - 1 ? '0px' : '1px solid #E9E9E9',
276
- }}
277
- >
278
- {index === 0 && canOperatExchange ? (
279
- <div key={'政务共享交换平台'}>
280
- <img
281
- src={require('../../assets/exchange_slogo.svg')}
282
- className="middle exchangeIcon"
283
- />
284
- <span
285
- className="middle exchangeCss"
286
- onClick={() => {
287
- toModulePage('政务共享交换平台');
288
- }}
289
- >
290
- 政务共享交换平台
291
- </span>
292
- </div>
293
- ) : (
294
- item.children.map((child, idx) => {
295
- return (
296
- <span key={child.childName}>
297
- <img src={child.url}
298
- className ={cn(stash !== 'LNRD'? 'middle': 'middle_LNRD', 'iconPad')}
299
- // className="middle iconPad"
300
- />
301
- <span
302
- className ={cn(stash !== 'LNRD'? 'childMenu' : 'childMenu_LNRD', stash !== 'LNRD'? 'middle' : 'middle_LNRD','textPad')}
303
- // className="childMenu textPad middle"
304
- onClick={() => {
305
- toModulePage(child.childName);
306
- }}
307
- >
308
- {child.childName}
309
- </span>
310
- </span>
311
- );
312
- })
313
- )}
314
- </div>
315
- </div>
316
- );
317
- });
318
-
319
- return (
320
- <div>
321
- <div className="menuPopupAndTitle">
322
- <div
323
- className={cn(stash !== 'LNRD'? 'menuIcon_size':'menuIcon_size_LNRD', 'menuIcon')}
324
- onMouseOver={() => setshowMenuList(true)}
325
- style={{
326
- // backgroundImage: `url(${menuIconSrc})`,
327
- backgroundRepeat: 'no-repeat',
328
- backgroundSize: '50%',
329
- backgroundPosition: 'center',
330
- backgroundColor: stash !== 'LNRD'? '#4091F7':'#EA1A1A'
331
- }}
332
- >
333
- <img src={menuIconSrc} className={cn(stash !== 'LNRD'? null:'menuIcon_img')}></img>
334
- </div>
335
- <div className={cn(stash !== 'LNRD'? 'menu_title_content_size':'menu_title_content_size_LNRD', 'menu_title_content')}
336
-
337
- >
338
- <img
339
- className="menu_title_content_img"
340
- src={getLogoAndTitle().logoSrc}
341
- alt="logo"
342
- />
343
- <span
344
- className={cn(stash !== 'LNRD'? 'menu_title_color':'menu_title_color_LNRD', 'menu_title')}
345
- // className="menu_title"
346
- >{getLogoAndTitle().title}</span>
347
- </div>
348
- </div>
349
- <div
350
- className={cn(stash !== 'LNRD'? 'menu_list_content_top':'menu_list_content_top_LNRD', 'menu_list_content')}
351
- // className="menu_list_content"
352
- style={{ display: showMenuList ? 'block' : 'none' }}
353
- onMouseOver={() => setshowMenuList(true)}
354
- onMouseOut={() => setshowMenuList(false)}
355
- >
356
- {menu}
357
- </div>
358
- </div>
359
- );
360
- };
361
- export default ModuleMenu;
1
+ import { useState, useEffect, useRef, useMemo } from 'react';
2
+ import { Popconfirm, message, Popover } from 'antd';
3
+ import { menuList as menuListInit, menuIconSrc, sysNameMap } from './constData';
4
+ import HeaderDropdown from '../ModuleUser/HeaderDropdown';
5
+ import Axios from '../util/axios';
6
+ import _ from 'lodash';
7
+ import './index.less';
8
+ import cn from 'classnames'
9
+ /*
10
+ *stash:
11
+ 一体化 integration
12
+ 一体化 - 辽宁人大 LNRD
13
+ 轻量级 不传
14
+ 轻量级-国资委 GZW
15
+ *
16
+ */
17
+ const ModuleMenu = ({ sysName, stash = '' }) => {
18
+ const [sessionMenu, setSessionMenu] = useState([]);
19
+ const [showMenuList, setshowMenuList] = useState(false);
20
+ const [menuList, setMenuList] = useState([]);
21
+ const [canOperatExchange, setCanOperatExchange] = useState(false); //是否具有政务共享平台权限
22
+ useEffect(() => {
23
+ localStorage.setItem('stash', stash)
24
+ getSessionMenu();
25
+ }, []);
26
+
27
+ const getSessionMenu = () => {
28
+ if(['integration', 'LNRD'].includes(stash)){
29
+ Axios(
30
+ 'get',
31
+ '/admin-api/system/user/get-user-menu-List?menuName=数据平台',
32
+ '',
33
+ {},
34
+ )
35
+ .then((res) => {
36
+ // const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
37
+ // let menuGet =
38
+ // (resD?.map((item) => {
39
+ // return {
40
+ // ...item,
41
+ // path:
42
+ // item.path.indexOf('/') !== -1
43
+ // ? item.path
44
+ // : '/' + item.path,
45
+ // };
46
+ // })) ||
47
+ // [];
48
+ // console.log('menuGet', menuGet)
49
+ // setSessionMenu(menuGet);
50
+ // const menuLists = getNewMenuList(menuGet);
51
+ // setMenuList(menuLists);
52
+
53
+ if (res.data.code === 0) {
54
+ let menuGet =
55
+ (res.data.data &&
56
+ res.data.data[0]?.routes?.map((item) => {
57
+ return {
58
+ ...item,
59
+ path:
60
+ item.path.indexOf('/') !== -1
61
+ ? item.path
62
+ : '/' + item.path,
63
+ };
64
+ })) ||
65
+ [];
66
+ console.log('menuGet', menuGet)
67
+ setSessionMenu(menuGet);
68
+ const menuLists = getNewMenuList(menuGet);
69
+ setMenuList(menuLists);
70
+ }
71
+ })
72
+ .catch((e) => console.log('e', e));
73
+ }else{
74
+ const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
75
+ let menuGet = menuObj?.content || [];
76
+ setSessionMenu(menuGet);
77
+ const menuLists = getNewMenuList(menuGet);
78
+ setMenuList(menuLists);
79
+ let exchangeInfo =
80
+ menuGet && menuGet.find((item) => item.path === '/exchange');
81
+ if (exchangeInfo) {
82
+ setCanOperatExchange(true);
83
+ }
84
+ }
85
+ };
86
+
87
+ // 获取系统logo及title
88
+ const getLogoAndTitle = () => {
89
+ let sysInfo = sysNameMap(stash).find((item) => item.sysName === sysName);
90
+ let logoAndTitle = { logoSrc: '', title: '' };
91
+ if (sysInfo) {
92
+ logoAndTitle.logoSrc = sysInfo.logoSrc;
93
+ logoAndTitle.title = sysInfo.title;
94
+ }
95
+ return logoAndTitle;
96
+ };
97
+
98
+ // 跳转各个模块
99
+ const toModulePage = (nameStr) => {
100
+ if (!sessionMenu || sessionMenu.length === 0) {
101
+ message.destroy();
102
+ message.warning('没有获取到菜单列表,请联系管理员添加权限');
103
+ return;
104
+ }
105
+
106
+ if (nameStr === '政务共享交换平台') {
107
+ Axios('get', '/admin/social/logoutUri', '', {})
108
+ .then((res) => {
109
+ if (res.data.code === 0) {
110
+ if (res.data.data.search('http') !== -1) {
111
+ window.location.href = res.data.data;
112
+ }
113
+ } else {
114
+ message.warning(res.data.msg || '获取信息失败');
115
+ }
116
+ })
117
+ .catch((error) => {
118
+ console.error('Error while logging out, error:', error);
119
+ message.error('服务器错误,请稍后重试');
120
+ });
121
+ } else {
122
+ if (nameStr === '平台运行总览') {
123
+ window.open('/dataadmin/#/overview', '_blank');
124
+ return;
125
+ }
126
+ let thirdPartyServiceJumpPath = ''; // 第三方服务跳转路径
127
+ switch (nameStr) {
128
+ case '数据集成':
129
+ thirdPartyServiceJumpPath = '/datacollect/';
130
+ break;
131
+ case '数据治理':
132
+ thirdPartyServiceJumpPath = '/datamanage/';
133
+ break;
134
+ case '元数据管理':
135
+ thirdPartyServiceJumpPath = '/metadata/';
136
+ break;
137
+ case '数据质量':
138
+ thirdPartyServiceJumpPath = '/quality/';
139
+ break;
140
+ case '离线开发':
141
+ thirdPartyServiceJumpPath = '/datadev/';
142
+ break;
143
+ case '实时开发':
144
+ thirdPartyServiceJumpPath = '/dataanalytic/';
145
+ break;
146
+ case '数据服务':
147
+ thirdPartyServiceJumpPath = '/dataservice/';
148
+ break;
149
+ case '数据资产':
150
+ thirdPartyServiceJumpPath = '/dataasset/';
151
+ break;
152
+ case '数据共享':
153
+ thirdPartyServiceJumpPath = '/datasharing/';
154
+ break;
155
+ case '运维中心':
156
+ thirdPartyServiceJumpPath = '/operate/';
157
+ break;
158
+ case '消息中心':
159
+ thirdPartyServiceJumpPath = '/alert/';
160
+ break;
161
+ case '数据安全':
162
+ thirdPartyServiceJumpPath = '/datasecurity/';
163
+ break;
164
+ case '目录管理':
165
+ thirdPartyServiceJumpPath = '/admin-ui/catalog';
166
+ break;
167
+ case '资源管理':
168
+ thirdPartyServiceJumpPath = '/admin-ui/resource/tableResource/list';
169
+ break;
170
+ case '供需对接':
171
+ thirdPartyServiceJumpPath =
172
+ '/admin-ui/supply-and-demand-docking/dataRequirement/propose/list';
173
+ break;
174
+ case '数据直达':
175
+ thirdPartyServiceJumpPath = '/admin-ui/cascade';
176
+ break;
177
+ case '综合评价系统':
178
+ thirdPartyServiceJumpPath = '/admin-ui/evaluate';
179
+ break;
180
+ case '数据标签':
181
+ thirdPartyServiceJumpPath = '/datatag/';
182
+ break;
183
+ default:
184
+ break;
185
+ }
186
+ // 判断第三方服务是否有对应服务的菜单权限
187
+ window.location.href = thirdPartyServiceJumpPath;
188
+ }
189
+ };
190
+ // 跳转首页
191
+ const toHomePage = (index) => {
192
+ if (index === 0) {
193
+ window.location.href = ['integration', 'LNRD'].includes(stash) ? '/dataadmin/#/index' : (stash === 'GZW' ? '/data-platform/#/index' : '/#/index')
194
+ }
195
+ };
196
+ const getNewMenuList = (menuGet) => {
197
+ let newMenuList = _.cloneDeep(menuListInit(stash));
198
+ if (menuGet) {
199
+ const pathList = menuGet.map((item) => item.path);
200
+ // 过滤掉没有权限的子菜单(PS:如果模块下面子菜单都没有,则不显示该模块)
201
+ for (let index = newMenuList.length - 1; index >= 0; index--) {
202
+ const menuItem = newMenuList[index];
203
+ for (
204
+ let index_ch = menuItem.children.length - 1;
205
+ index_ch >= 0;
206
+ index_ch--
207
+ ) {
208
+ const child = menuItem.children[index_ch];
209
+ if (!pathList.includes(child.path)) {
210
+ newMenuList[index].children.splice(index_ch, 1);
211
+ }
212
+ }
213
+ if (menuItem.children.length === 0 && menuItem.name !== '首页') {
214
+ newMenuList.splice(index, 1);
215
+ }
216
+ }
217
+ }
218
+ return newMenuList;
219
+ };
220
+ const menu = menuList.map((item, index) => {
221
+ return (
222
+ <div
223
+ key={item.name}
224
+ className="cardLine"
225
+ style={{
226
+ height:
227
+ item.children.length > 6
228
+ ? '140px'
229
+ : item.children.length > 3
230
+ ? '90px'
231
+ : '',
232
+ }}
233
+ >
234
+ <div
235
+ className="leftMenu"
236
+ style={{
237
+ height:
238
+ item.children.length > 6
239
+ ? '140px'
240
+ : item.children.length > 3
241
+ ? '96px'
242
+ : '70px',
243
+ lineHeight:
244
+ item.children.length > 6
245
+ ? '140px'
246
+ : item.children.length > 3
247
+ ? '45px'
248
+ : '70px',
249
+ }}
250
+ >
251
+ <img src={item.url} className={stash !== 'LNRD'? 'middle' : 'middle_LNRD'} />
252
+ <span
253
+ className={cn(stash !== 'LNRD'? 'middle' : 'middle_LNRD', 'textPad')}
254
+ // className=`${{stash !== 'LNRD'? 'middle' : 'middle_LNRD'}} textPad`
255
+ onClick={() => {
256
+ toHomePage(index);
257
+ }}
258
+ >
259
+ {item.name}
260
+ </span>
261
+ </div>
262
+ <div
263
+ className="rightMenu"
264
+ style={{
265
+ height:
266
+ item.children.length > 6
267
+ ? '140px'
268
+ : item.children.length > 3
269
+ ? '96px'
270
+ : '70px',
271
+ lineHeight:
272
+ item.children.length > 6
273
+ ? '45px'
274
+ : item.children.length > 3
275
+ ? '45px'
276
+ : '70px',
277
+ borderBottom:
278
+ index === menuList.length - 1 ? '0px' : '1px solid #E9E9E9',
279
+ }}
280
+ >
281
+ {index === 0 && canOperatExchange ? (
282
+ <div key={'政务共享交换平台'}>
283
+ <img
284
+ src={require('../../assets/exchange_slogo.svg')}
285
+ className="middle exchangeIcon"
286
+ />
287
+ <span
288
+ className="middle exchangeCss"
289
+ onClick={() => {
290
+ toModulePage('政务共享交换平台');
291
+ }}
292
+ >
293
+ 政务共享交换平台
294
+ </span>
295
+ </div>
296
+ ) : (
297
+ item.children.map((child, idx) => {
298
+ return (
299
+ <span key={child.childName}>
300
+ <img src={child.url}
301
+ className ={cn(stash !== 'LNRD'? 'middle': 'middle_LNRD', 'iconPad')}
302
+ // className="middle iconPad"
303
+ />
304
+ <span
305
+ className ={cn(stash !== 'LNRD'? 'childMenu' : 'childMenu_LNRD', stash !== 'LNRD'? 'middle' : 'middle_LNRD','textPad')}
306
+ // className="childMenu textPad middle"
307
+ onClick={() => {
308
+ toModulePage(child.childName);
309
+ }}
310
+ >
311
+ {child.childName}
312
+ </span>
313
+ </span>
314
+ );
315
+ })
316
+ )}
317
+ </div>
318
+ </div>
319
+ );
320
+ });
321
+
322
+ return (
323
+ <div>
324
+ <div className="menuPopupAndTitle">
325
+ <div
326
+ className={cn(stash !== 'LNRD'? 'menuIcon_size':'menuIcon_size_LNRD', 'menuIcon')}
327
+ onMouseOver={() => setshowMenuList(true)}
328
+ style={{
329
+ // backgroundImage: `url(${menuIconSrc})`,
330
+ backgroundRepeat: 'no-repeat',
331
+ backgroundSize: '50%',
332
+ backgroundPosition: 'center',
333
+ backgroundColor: stash !== 'LNRD'? '#4091F7':'#EA1A1A'
334
+ }}
335
+ >
336
+ <img src={menuIconSrc} className={cn(stash !== 'LNRD'? null:'menuIcon_img')}></img>
337
+ </div>
338
+ <div className={cn(stash !== 'LNRD'? 'menu_title_content_size':'menu_title_content_size_LNRD', 'menu_title_content')}
339
+
340
+ >
341
+ <img
342
+ className="menu_title_content_img"
343
+ src={getLogoAndTitle().logoSrc}
344
+ alt="logo"
345
+ />
346
+ <span
347
+ className={cn(stash !== 'LNRD'? 'menu_title_color':'menu_title_color_LNRD', 'menu_title')}
348
+ // className="menu_title"
349
+ >{getLogoAndTitle().title}</span>
350
+ </div>
351
+ </div>
352
+ <div
353
+ className={cn(stash !== 'LNRD'? 'menu_list_content_top':'menu_list_content_top_LNRD', 'menu_list_content')}
354
+ // className="menu_list_content"
355
+ style={{ display: showMenuList ? 'block' : 'none' }}
356
+ onMouseOver={() => setshowMenuList(true)}
357
+ onMouseOut={() => setshowMenuList(false)}
358
+ >
359
+ {menu}
360
+ </div>
361
+ </div>
362
+ );
363
+ };
364
+ export default ModuleMenu;
@@ -118,6 +118,7 @@
118
118
  .menuIcon_size_LNRD{
119
119
  width: 75px;
120
120
  height: 75px;
121
+ line-height: 75px;
121
122
  }
122
123
 
123
124
 
@@ -2,4 +2,4 @@ import ModuleMenu from './ModuleMenu';
2
2
  import ModuleUser from './ModuleUser';
3
3
  import Footer from './Footer';
4
4
  export { ModuleMenu, ModuleUser, Footer };
5
- // export default ModuleUser;
5
+ // export default ModuleMenu;