module-menu 0.3.24 → 0.3.26
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/.editorconfig +16 -16
- package/.prettierignore +8 -8
- package/.prettierrc +11 -11
- package/.umirc.js +11 -11
- package/README.md +15 -15
- package/config/config.js +43 -43
- package/package.json +46 -46
- package/src/assets/admin_logo.svg +48 -48
- package/src/assets/admin_logo_LNRD.svg +39 -39
- package/src/assets/admin_slogo.svg +48 -48
- package/src/assets/admin_slogo_LNRD.svg +48 -48
- package/src/assets/alert_logo.svg +26 -26
- package/src/assets/alert_logo_LNRD.svg +22 -22
- package/src/assets/alert_slogo.svg +26 -26
- package/src/assets/alert_slogo_LNRD.svg +26 -26
- package/src/assets/childIcon.svg +10 -10
- package/src/assets/dataManager_logo.svg +42 -42
- package/src/assets/dataManager_logo_LNRD.svg +38 -38
- package/src/assets/dataanalytic_logo.svg +44 -44
- package/src/assets/dataanalytic_logo_LNRD.svg +40 -40
- package/src/assets/dataanalytic_slogo.svg +47 -47
- package/src/assets/dataanalytic_slogo_LNRD.svg +47 -47
- package/src/assets/dataasset_logo.svg +52 -52
- package/src/assets/dataasset_logo_LNRD.svg +48 -48
- package/src/assets/dataasset_slogo.svg +52 -52
- package/src/assets/dataasset_slogo_LNRD.svg +52 -52
- package/src/assets/datacollection_logo.svg +70 -70
- package/src/assets/datacollection_logo_LNRD.svg +66 -66
- package/src/assets/datacollection_slogo.svg +70 -70
- package/src/assets/datacollection_slogo_LNRD.svg +70 -70
- package/src/assets/datadev_logo.svg +26 -26
- package/src/assets/datadev_logo_LNRD.svg +22 -22
- package/src/assets/datadev_slogo.svg +26 -26
- package/src/assets/datadev_slogo_LNRD.svg +26 -26
- package/src/assets/datalabel_logo.svg +26 -26
- package/src/assets/datalabel_slogo.svg +26 -26
- package/src/assets/datalabel_slogo_LNRD.svg +26 -26
- package/src/assets/datamanager_slogo.svg +42 -42
- package/src/assets/datamanager_slogo_LNRD.svg +42 -42
- package/src/assets/datasecurity_slogo_LNRD.svg +31 -31
- package/src/assets/dataservice_logo.svg +209 -209
- package/src/assets/dataservice_logo_LNRD.svg +205 -205
- package/src/assets/dataservice_slogo.svg +209 -209
- package/src/assets/dataservice_slogo_LNRD.svg +209 -209
- package/src/assets/datasharing_logo.svg +28 -28
- package/src/assets/datasharing_logo_LNRD.svg +24 -24
- package/src/assets/datasharing_slogo.svg +28 -28
- package/src/assets/datasharing_slogo_LNRD.svg +28 -28
- package/src/assets/exchange_slogo.svg +9 -9
- package/src/assets/gongxuduijie_slogo_LNRD.svg +29 -29
- package/src/assets/home.svg +12 -12
- package/src/assets/home_LNRD.svg +12 -12
- package/src/assets/ic_gonggongmokuai_m.svg +5 -5
- package/src/assets/ic_gonggongmokuai_m_LNRD.svg +5 -5
- package/src/assets/ic_pingjia_LNRD.svg +41 -41
- package/src/assets/ic_shujuhuiju_m.svg +5 -5
- package/src/assets/ic_shujuhuiju_m_LNRD.svg +5 -5
- package/src/assets/ic_shujukaifa_m.svg +15 -15
- package/src/assets/ic_shujukaifa_m_LNRD.svg +15 -15
- package/src/assets/ic_shujukaifang_m.svg +5 -5
- package/src/assets/ic_shujukaifang_m_LNRD.svg +5 -5
- package/src/assets/ic_shujuyingyong_m.svg +5 -5
- package/src/assets/ic_shujuyingyong_m_LNRD.svg +5 -5
- package/src/assets/ic_shujuzhili_m.svg +5 -5
- package/src/assets/ic_shujuzhili_m_LNRD.svg +5 -5
- package/src/assets/jilianguanl_slogo_LNRD.svg +29 -29
- package/src/assets/metadata_logo.svg +25 -25
- package/src/assets/metadata_logo_LNRD.svg +25 -25
- package/src/assets/metadata_slogo.svg +25 -25
- package/src/assets/metadata_slogo_LNRD.svg +25 -25
- package/src/assets/module.svg +12 -12
- package/src/assets/muluguanli_slogo_LNRD.svg +33 -33
- package/src/assets/operate_logo.svg +63 -63
- package/src/assets/operate_logo_LNRD.svg +51 -51
- package/src/assets/operate_slogo.svg +63 -63
- package/src/assets/operate_slogo_LNRD.svg +63 -63
- package/src/assets/personalCenter.svg +15 -15
- package/src/assets/quality_logo.svg +26 -26
- package/src/assets/quality_logo_LNRD.svg +22 -22
- package/src/assets/quality_slogo.svg +26 -26
- package/src/assets/quality_slogo_LNRD.svg +26 -26
- package/src/assets/systemManage.svg +15 -15
- package/src/assets/wordorder_logo.svg +57 -57
- package/src/assets/workorder_slogo.svg +54 -54
- package/src/assets/workorder_slogo_LNRD.svg +54 -54
- package/src/pages/Footer/index.jsx +13 -13
- package/src/pages/ModuleMenu/index.jsx +0 -2
- package/src/pages/ModuleMenu/index.less +197 -197
- package/src/pages/ModuleMenu/service.js +21 -21
- package/src/pages/ModuleUser/HeaderDropdown.jsx +10 -10
- package/src/pages/ModuleUser/constData.jsx +8 -8
- package/src/pages/ModuleUser/index.jsx +289 -285
- package/src/pages/ModuleUser/index.less +101 -101
- package/src/pages/index.jsx +6 -6
- package/src/pages/util/axios.js +172 -172
- package/src/pages/util/config.js +6 -6
- package/src/pages/util/constant.js +4 -4
- package/src/pages/util/permessionUtils.js +36 -36
- package/src/pages/util/userInfo.js +75 -75
- package/tsconfig.json +37 -37
- package/typings.d.ts +10 -10
- package/src/.umi/.cache/babel-loader/01d3b8f19a7cb7a24e081bcb17c4b35d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/01fbe20b6972b1555526cb3bd9b67947.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/056f7a2adc2da7c07c31d3044ad6e3fe.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/06cb08f260c32d5cffe5ce68a075eb15.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/06d5e724f8278331f140130bff6402f3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/081482489c6416dd68cd6d8da5f7f459.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/1041fa17135380255bb2632a9e875ffa.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/13f49038ee5f436316f0c08c70c83158.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/14274649ff1ddbecf9f8de65e853b08c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/15a6a8f5d034e901034704b8d336f56b.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/16cf47189a61f0be0946ab17368b6c94.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/18cc2014d8a8a2a18b00bb114316b0d1.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/1cccc75dc867d4a2badfb1be7a95931b.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/20788430f2635fb1ea1641b5c0ef95c7.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/24100535af02240934ed036a871650b6.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/2586227bfeea22baf73c761da106bbad.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/26c81729cef2c7262d88e3be4f3fc6d4.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/27a365e20e27a1bee567eb6b2cb471eb.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/2d21c5808624440c2ed3fd647f0b2824.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/2f9a43c9c302e6cdf2e04627dae65181.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/319254d0036c8c6445da4f9a5653ddde.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/3321c8dc6cb924ca9e428e4efc8cdb66.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/3397961a446908493cfc9b6810876a8a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/353ee6ddd09296a8ff4c427e1c74a45f.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/3623c0a8db52a6fb37b96b20129f200e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/37642aa0a3e22616f7729227d6eda9b3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/37f9ab3efa12ea4ea45492e72f2df055.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/388e6928faeeebed9eae723902b356f9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/3f6ee9b681b4ff9a4e8bbc7259fcc117.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/4147f8b6d577d9a6d45099d0da568c40.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/42932fa4ac8d74f7c75dc28697a3e492.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/42ebccaa69b919daaf3fc8094f37989d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/43dc3ebb66d9b9158303d236c130d864.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/4ace58f826a2c29fb83247b7de8604fb.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/4dafd29e208080424e5c1a04e9ce3a13.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/52da63b57d1843c95847478f88501132.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/52dd6b5124a0ac0e40baa50178f0cb83.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/533990abc9b3c1b019949957763531f3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/56cdf767518eb7b4baf11f770be48dbb.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5782bff522bb4f9e3f711bf56bf2b102.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/58ffe08aa395489b7623ebc6df9bb62f.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5b99cdd9287ec67f461ed56485da594d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5c3025abaab799d47abed993105ea12c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5d0a9c8e4ffae57f4179109d4d97c885.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/5ec5bd059f96c3bf5ed64424a7b02353.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/61148b89386e98f7d8754744afc0bdf3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/61856a63ccea05a876dfa096af88db15.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/62498bf0360d882f5ae30274a8c8b54a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/64416a0f9fd8fd58042980e50f00d99b.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/654178d4d007f054854fa1dbc2665b48.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/659bcecaa55999721adab893d2d8d282.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/65ccf16a3fc8b8b4c876531dd70fa225.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/65ce745771baca65e3a368baddd64725.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/6c35a06afdfe891836a3006be378960e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/700250b78b88b3deac42c55f7b2997b9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/72fa8feb1da2c7ef71e598525a206b07.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/751940f5ef5063645c5f026a425f8f56.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/752bbc2862742ed739f89f09c93e91f6.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/76c38bd5876776df9151439c6ba42d51.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/78e276ee4c048ab7f5f55839f8eb0dd6.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/7a2b8214625438cf461e1061838f4e07.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/82aeff4c934d1116474881699cc3ae08.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/84cae83a4d3e35b3326f181339888d4e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/85608f9ad2e428c8a60393122c662052.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/885a75f986d85c303bddab1c8456ca9d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/8a6ab79e531c336eaa35e45db026a57e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/8f2fd1128ba1cc53e1d1e1d0f1f6ad17.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/906080909b94f2b22b0fde1c441ebae0.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9141bef81f9de09a74756d783cbf2ae9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/96b8e8231d418fcbd578a114ce3dfee4.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9b8f5052532c9b18c256a09e1076c7f8.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9c37ec28a0de52034f28972819c193ce.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a0a8b394f8f8d79055845bab0e3a22a4.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a17dd9015baf2b0ec9d5960b98575e6e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a2bc9cd9d196779991e7e56e797e4728.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a4688fcb9ffa1ae3d0b0d18736a3f10d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/a6878ed4053a158705d15f1be2aa59b1.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/ac3c9838ef38ff2835f7bcc78a4b99ae.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/b2ce8f72296518fdda56bedf05513fe9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/b66bd4365d6699aeecbef932c373b4f0.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/b950e73c0701a31cd5f21cd8eb9bf4ce.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/bc14e7524836e3c0550961e51eaca61d.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/c0ffef8bbf24d92bb20dc085c2b1a2de.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/c14694e83c1c345936f2dac6c199df86.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/c76e4da5dc74f848376688fa75866c8a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/c7af21b497660a290bad343e08450d47.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d0fbf7935ab0bbcc055f8d086f75117f.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d151c1ef5b414d7dd2f9de4a48a17ce7.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d41d8f215954fd4fb0c32e5d5ba18532.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d62a143ddf7cbf9708f7f553156c48a4.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d68a6178f1ffbe73fca1a81d497eae37.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/d6a3d45d34784f8694a00c31c40eb0cf.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/debba22f6f72875195f860883964791c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e3c343a606d1bfa41f697a32d5b9eaf3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e3c7be2f2f98bad9437bd9f39ca549e3.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e4650c9a0ae2e5fbbf3332ecbdfdfa7a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e50dc201e2f638e33efb4af3f7bf9326.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e62eb88827f04985ca12c91942098d0e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e6c5903fcb8dfc50ceacaae7a22846b5.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e79e167b087b597edd168cd59c949eff.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/e8506722a64e4c0ed14d618a84c541d4.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/eb9ffa9c9e0b933aff255ca3f0b823fb.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/ef87e61ea0f770946295dd29977c594e.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/f05bd34425580a53cb74aeb760a840bb.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/f130266d111c90e0545d2a16b1bc5f16.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/f737a39d2ecd8d316ec850fcfcde7e27.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/f93eb1fae12bda2e73dee6da60bdeb05.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/fcdb714fefa45c98fe57ccf33d90108b.json.gz +0 -0
- package/src/.umi/core/devScripts.ts +0 -53
- package/src/.umi/core/history.ts +0 -21
- package/src/.umi/core/plugin.ts +0 -8
- package/src/.umi/core/pluginConfig.d.ts +0 -304
- package/src/.umi/core/pluginRegister.ts +0 -15
- package/src/.umi/core/polyfill.ts +0 -4
- package/src/.umi/core/routes.ts +0 -24
- package/src/.umi/core/umiExports.ts +0 -7
- package/src/.umi/plugin-helmet/exports.ts +0 -3
- package/src/.umi/plugin-initial-state/Provider.tsx +0 -37
- package/src/.umi/plugin-initial-state/exports.ts +0 -7
- package/src/.umi/plugin-initial-state/models/initialState.ts +0 -2
- package/src/.umi/plugin-initial-state/runtime.tsx +0 -13
- package/src/.umi/plugin-model/Provider.tsx +0 -39
- package/src/.umi/plugin-model/helpers/constant.tsx +0 -4
- package/src/.umi/plugin-model/helpers/dispatcher.tsx +0 -19
- package/src/.umi/plugin-model/helpers/executor.tsx +0 -83
- package/src/.umi/plugin-model/runtime.tsx +0 -12
- package/src/.umi/plugin-model/useModel.tsx +0 -71
- package/src/.umi/plugin-request/request.ts +0 -278
- package/src/.umi/umi.ts +0 -58
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
// tokenInSessionStor不存在为一体化,存在为轻量级
|
|
2
|
-
const tokenInSessionStor = window.sessionStorage.getItem('bigdata-access_token');
|
|
3
|
-
/**
|
|
4
|
-
* 获取认证相关的localStorage/SessionStorage
|
|
5
|
-
*/
|
|
6
|
-
function getStore(params) {
|
|
7
|
-
if(tokenInSessionStor){
|
|
8
|
-
let { name } = params;
|
|
9
|
-
const { debug } = params;
|
|
10
|
-
const keyName = 'bigdata-';
|
|
11
|
-
name = keyName + name;
|
|
12
|
-
let obj = {};
|
|
13
|
-
let content;
|
|
14
|
-
obj = window.sessionStorage.getItem(name);
|
|
15
|
-
if (!obj || Object.keys(obj).length === 0) obj = window.localStorage.getItem(name);
|
|
16
|
-
if (!obj || Object.keys(obj).length === 0) return '';
|
|
17
|
-
try {
|
|
18
|
-
obj = JSON.parse(obj);
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return '';
|
|
21
|
-
}
|
|
22
|
-
if (debug) {
|
|
23
|
-
return '';
|
|
24
|
-
}
|
|
25
|
-
if (obj.dataType === 'string') {
|
|
26
|
-
content = obj.content;
|
|
27
|
-
} else if (obj.dataType === 'number') {
|
|
28
|
-
content = Number(obj.content);
|
|
29
|
-
} else if (obj.dataType === 'boolean') {
|
|
30
|
-
// eslint-disable-next-line no-eval
|
|
31
|
-
content = eval(obj.content);
|
|
32
|
-
} else if (obj.dataType === 'object') {
|
|
33
|
-
content = obj.content;
|
|
34
|
-
}
|
|
35
|
-
return content;
|
|
36
|
-
}else{
|
|
37
|
-
let { name } = params;
|
|
38
|
-
let storageStr = '';
|
|
39
|
-
if (name === 'access_token') {
|
|
40
|
-
storageStr = localStorage.getItem('ACCESS_TOKEN');
|
|
41
|
-
} else if (name === 'tenantId') {
|
|
42
|
-
// 暂定当前租户 curTenantId
|
|
43
|
-
storageStr = localStorage.getItem('curTenantId');
|
|
44
|
-
} else if (name === 'tenantName') {
|
|
45
|
-
// 暂定当前租户 curTenantId
|
|
46
|
-
storageStr = localStorage.getItem('curTenantName');
|
|
47
|
-
}else if (name === 'userName') {
|
|
48
|
-
// 获取当前登录用户名称
|
|
49
|
-
storageStr = localStorage.getItem('userName');
|
|
50
|
-
} else if (name === 'userId') {
|
|
51
|
-
// 获取当前登录用户Id
|
|
52
|
-
storageStr = localStorage.getItem('userId');
|
|
53
|
-
}
|
|
54
|
-
return storageStr;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
export default getStore;
|
|
59
|
-
|
|
60
|
-
export const getUserName = () => {
|
|
61
|
-
if(tokenInSessionStor){
|
|
62
|
-
const userInfo = getStore({ name: 'userInfo' });
|
|
63
|
-
if (userInfo && Object.keys(userInfo).length > 0 && userInfo.username) {
|
|
64
|
-
return userInfo.username;
|
|
65
|
-
}
|
|
66
|
-
return '';
|
|
67
|
-
}else{
|
|
68
|
-
const name = getStore({ name: 'userName' });
|
|
69
|
-
if (!name) {
|
|
70
|
-
return '';
|
|
71
|
-
}
|
|
72
|
-
return name;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
};
|
|
1
|
+
// tokenInSessionStor不存在为一体化,存在为轻量级
|
|
2
|
+
const tokenInSessionStor = window.sessionStorage.getItem('bigdata-access_token');
|
|
3
|
+
/**
|
|
4
|
+
* 获取认证相关的localStorage/SessionStorage
|
|
5
|
+
*/
|
|
6
|
+
function getStore(params) {
|
|
7
|
+
if(tokenInSessionStor){
|
|
8
|
+
let { name } = params;
|
|
9
|
+
const { debug } = params;
|
|
10
|
+
const keyName = 'bigdata-';
|
|
11
|
+
name = keyName + name;
|
|
12
|
+
let obj = {};
|
|
13
|
+
let content;
|
|
14
|
+
obj = window.sessionStorage.getItem(name);
|
|
15
|
+
if (!obj || Object.keys(obj).length === 0) obj = window.localStorage.getItem(name);
|
|
16
|
+
if (!obj || Object.keys(obj).length === 0) return '';
|
|
17
|
+
try {
|
|
18
|
+
obj = JSON.parse(obj);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
if (debug) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
if (obj.dataType === 'string') {
|
|
26
|
+
content = obj.content;
|
|
27
|
+
} else if (obj.dataType === 'number') {
|
|
28
|
+
content = Number(obj.content);
|
|
29
|
+
} else if (obj.dataType === 'boolean') {
|
|
30
|
+
// eslint-disable-next-line no-eval
|
|
31
|
+
content = eval(obj.content);
|
|
32
|
+
} else if (obj.dataType === 'object') {
|
|
33
|
+
content = obj.content;
|
|
34
|
+
}
|
|
35
|
+
return content;
|
|
36
|
+
}else{
|
|
37
|
+
let { name } = params;
|
|
38
|
+
let storageStr = '';
|
|
39
|
+
if (name === 'access_token') {
|
|
40
|
+
storageStr = localStorage.getItem('ACCESS_TOKEN');
|
|
41
|
+
} else if (name === 'tenantId') {
|
|
42
|
+
// 暂定当前租户 curTenantId
|
|
43
|
+
storageStr = localStorage.getItem('curTenantId');
|
|
44
|
+
} else if (name === 'tenantName') {
|
|
45
|
+
// 暂定当前租户 curTenantId
|
|
46
|
+
storageStr = localStorage.getItem('curTenantName');
|
|
47
|
+
}else if (name === 'userName') {
|
|
48
|
+
// 获取当前登录用户名称
|
|
49
|
+
storageStr = localStorage.getItem('userName');
|
|
50
|
+
} else if (name === 'userId') {
|
|
51
|
+
// 获取当前登录用户Id
|
|
52
|
+
storageStr = localStorage.getItem('userId');
|
|
53
|
+
}
|
|
54
|
+
return storageStr;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
export default getStore;
|
|
59
|
+
|
|
60
|
+
export const getUserName = () => {
|
|
61
|
+
if(tokenInSessionStor){
|
|
62
|
+
const userInfo = getStore({ name: 'userInfo' });
|
|
63
|
+
if (userInfo && Object.keys(userInfo).length > 0 && userInfo.username) {
|
|
64
|
+
return userInfo.username;
|
|
65
|
+
}
|
|
66
|
+
return '';
|
|
67
|
+
}else{
|
|
68
|
+
const name = getStore({ name: 'userName' });
|
|
69
|
+
if (!name) {
|
|
70
|
+
return '';
|
|
71
|
+
}
|
|
72
|
+
return name;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"resolveJsonModule": true,
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"jsx": "preserve",
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"baseUrl": "./",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"paths": {
|
|
14
|
-
"@/*": ["src/*"],
|
|
15
|
-
"@@/*": ["src/.umi/*"]
|
|
16
|
-
},
|
|
17
|
-
"allowSyntheticDefaultImports": true
|
|
18
|
-
},
|
|
19
|
-
"include": [
|
|
20
|
-
"mock/**/*",
|
|
21
|
-
"src/**/*",
|
|
22
|
-
"config/**/*",
|
|
23
|
-
".umirc.js",
|
|
24
|
-
"typings.d.ts"
|
|
25
|
-
],
|
|
26
|
-
"exclude": [
|
|
27
|
-
"node_modules",
|
|
28
|
-
"lib",
|
|
29
|
-
"es",
|
|
30
|
-
"dist",
|
|
31
|
-
"typings",
|
|
32
|
-
"**/__test__",
|
|
33
|
-
"test",
|
|
34
|
-
"docs",
|
|
35
|
-
"tests"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"resolveJsonModule": true,
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"baseUrl": "./",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["src/*"],
|
|
15
|
+
"@@/*": ["src/.umi/*"]
|
|
16
|
+
},
|
|
17
|
+
"allowSyntheticDefaultImports": true
|
|
18
|
+
},
|
|
19
|
+
"include": [
|
|
20
|
+
"mock/**/*",
|
|
21
|
+
"src/**/*",
|
|
22
|
+
"config/**/*",
|
|
23
|
+
".umirc.js",
|
|
24
|
+
"typings.d.ts"
|
|
25
|
+
],
|
|
26
|
+
"exclude": [
|
|
27
|
+
"node_modules",
|
|
28
|
+
"lib",
|
|
29
|
+
"es",
|
|
30
|
+
"dist",
|
|
31
|
+
"typings",
|
|
32
|
+
"**/__test__",
|
|
33
|
+
"test",
|
|
34
|
+
"docs",
|
|
35
|
+
"tests"
|
|
36
|
+
]
|
|
37
|
+
}
|
package/typings.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare module '*.css';
|
|
2
|
-
declare module '*.less';
|
|
3
|
-
declare module '*.png';
|
|
4
|
-
declare module '*.svg' {
|
|
5
|
-
export function ReactComponent(
|
|
6
|
-
props: React.SVGProps<SVGSVGElement>,
|
|
7
|
-
): React.ReactElement;
|
|
8
|
-
const url: string;
|
|
9
|
-
export default url;
|
|
10
|
-
}
|
|
1
|
+
declare module '*.css';
|
|
2
|
+
declare module '*.less';
|
|
3
|
+
declare module '*.png';
|
|
4
|
+
declare module '*.svg' {
|
|
5
|
+
export function ReactComponent(
|
|
6
|
+
props: React.SVGProps<SVGSVGElement>,
|
|
7
|
+
): React.ReactElement;
|
|
8
|
+
const url: string;
|
|
9
|
+
export default url;
|
|
10
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
|
|
3
|
-
if (window.g_initWebpackHotDevClient) {
|
|
4
|
-
function tryApplyUpdates(onHotUpdateSuccess?: Function) {
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
if (!module.hot) {
|
|
7
|
-
window.location.reload();
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function isUpdateAvailable() {
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
return window.g_getMostRecentCompilationHash() !== __webpack_hash__;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// TODO: is update available?
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
if (!isUpdateAvailable() || module.hot.status() !== 'idle') {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function handleApplyUpdates(err: Error | null, updatedModules: any) {
|
|
23
|
-
if (err || !updatedModules || window.g_getHadRuntimeError()) {
|
|
24
|
-
window.location.reload();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
onHotUpdateSuccess?.();
|
|
29
|
-
|
|
30
|
-
if (isUpdateAvailable()) {
|
|
31
|
-
// While we were updating, there was a new update! Do it again.
|
|
32
|
-
tryApplyUpdates();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
module.hot.check(true).then(
|
|
38
|
-
function (updatedModules: any) {
|
|
39
|
-
handleApplyUpdates(null, updatedModules);
|
|
40
|
-
},
|
|
41
|
-
function (err: Error) {
|
|
42
|
-
handleApplyUpdates(err, null);
|
|
43
|
-
},
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
window.g_initWebpackHotDevClient({
|
|
48
|
-
tryApplyUpdates,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const __mfsu = 1;
|
|
53
|
-
|
package/src/.umi/core/history.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { createBrowserHistory, History } from 'D:/myWorks/zhongYi/2023-CHBN-数据治理平台/module-menu/node_modules/umi/node_modules/@umijs/runtime';
|
|
3
|
-
|
|
4
|
-
let options = {
|
|
5
|
-
"basename": "/"
|
|
6
|
-
};
|
|
7
|
-
if ((<any>window).routerBase) {
|
|
8
|
-
options.basename = (<any>window).routerBase;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// remove initial history because of ssr
|
|
12
|
-
let history: History = process.env.__IS_SERVER ? null : createBrowserHistory(options);
|
|
13
|
-
export const createHistory = (hotReload = false) => {
|
|
14
|
-
if (!hotReload) {
|
|
15
|
-
history = createBrowserHistory(options);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return history;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { history };
|
package/src/.umi/core/plugin.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Plugin } from 'D:/myWorks/zhongYi/2023-CHBN-数据治理平台/module-menu/node_modules/umi/node_modules/@umijs/runtime';
|
|
3
|
-
|
|
4
|
-
const plugin = new Plugin({
|
|
5
|
-
validKeys: ['modifyClientRenderOpts','patchRoutes','rootContainer','render','onRouteChange','__mfsu','getInitialState','initialStateConfig','request',],
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export { plugin };
|