module-menu 0.3.0 → 0.3.1

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.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "城市大数据平台公共头部及尾部",
5
5
  "main": "src/pages/index.jsx",
6
6
  "scripts": {
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -349,3 +349,35 @@ export const sysNameMap = (stash = '') => [
349
349
  logoSrc: stash !=='LNRD'? require('../../assets/alert_logo.svg'): require('../../assets/alert_logo_LNRD.svg'),
350
350
  },
351
351
  ];
352
+
353
+ export const menuList_HBJK = [{
354
+ name: '数据资源中心',
355
+ url: require('../../assets/sjzyzx.png'),
356
+ children: [
357
+ {
358
+ childName: '公共卫生监测人口库',
359
+ path: '/datamanage',
360
+ url:require('../../assets/ggws.png'),
361
+ },
362
+ {
363
+ childName: '电子传染病档案库',
364
+ path: '/datamanage',
365
+ url:require('../../assets/dzcrb.png'),
366
+ },
367
+ {
368
+ childName: '应急资源库',
369
+ path: '/datamanage',
370
+ url:require('../../assets/yjzyk.png'),
371
+ },
372
+ {
373
+ childName: '传染病防控知识库',
374
+ path: '/datamanage',
375
+ url:require('../../assets/crbd.png'),
376
+ },
377
+ {
378
+ childName: '主题库',
379
+ path: '/datamanage',
380
+ url:require('../../assets/ztk.png'),
381
+ },
382
+ ]
383
+ }]
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, useRef, useMemo } from 'react';
2
2
  import { Popconfirm, message, Popover } from 'antd';
3
- import { menuList as menuListInit, menuIconSrc, sysNameMap } from './constData';
3
+ import { menuList as menuListInit, menuIconSrc, sysNameMap, menuList_HBJK} from './constData';
4
4
  import HeaderDropdown from '../ModuleUser/HeaderDropdown';
5
5
  import { getInfoByName, getUrlByInfo } from './service.js'
6
6
  import Axios from '../util/axios';
@@ -247,6 +247,9 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
247
247
  newMenuList.splice(index, 1);
248
248
  }
249
249
  }
250
+ }
251
+ if (stash === 'HBJK') {
252
+ newMenuList = newMenuList.concat(menuList_HBJK);
250
253
  }
251
254
  return newMenuList;
252
255
  };
@@ -363,7 +366,7 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
363
366
  backgroundRepeat: 'no-repeat',
364
367
  backgroundSize: '50%',
365
368
  backgroundPosition: 'center',
366
- backgroundColor: stash === 'LNRD'? '#EA1A1A': stash === 'HBJK'? '#1890ff' : '#4091F7'
369
+ backgroundColor: stash === 'LNRD'? '#EA1A1A': stash === 'HBJK'? '#1373FF' : '#4091F7'
367
370
 
368
371
  }}
369
372
  >
@@ -12,6 +12,7 @@ import Axios from '../util/axios';
12
12
  import getStore, { getUserName } from '../util/userInfo';
13
13
  import './index.less';
14
14
  import cn from 'classnames'
15
+ import userLogo1 from '../../assets/userLogo1.png';
15
16
 
16
17
  // stash存在则为一体化,否则为轻量级
17
18
  const ModuleUser = ({ stash = '' }) => {
@@ -226,7 +227,11 @@ const ModuleUser = ({ stash = '' }) => {
226
227
  {getUserName() ? (
227
228
  <HeaderDropdown overlay={menu}>
228
229
  <span style={{ display: 'inline-block', marginLeft: '12px' }}>
229
- <Avatar size="small" icon={<UserOutlined />} />
230
+ {stash === 'HBJK' ? (
231
+ <Avatar size="small" src={userLogo1} />
232
+ ) : (
233
+ <Avatar size="small" icon={<UserOutlined />} />
234
+ )}
230
235
  <span
231
236
  style={{
232
237
  marginLeft: '10px',