@lambo-design/shared 1.0.0-beta.83 → 1.0.0-beta.84
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/config/themes/default/default.less +1 -2
- package/config/themes/default/var.less +1 -1
- package/config/themes/eap/eap.less +550 -536
- package/config/themes/eap/var.less +50 -11
- package/config/themes/theme-default.js +1 -1
- package/config/themes/theme-eap.js +24 -14
- package/package.json +23 -23
- package/utils/dict/built-in-dict.js +20 -20
- package/utils/dict/index.js +75 -75
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@primary-color
|
|
1
|
+
@primary-color :#306BE3;
|
|
2
2
|
@primary-color-tint-20 : tint(@primary-color,20%);
|
|
3
3
|
@primary-color-tint-90 : tint(@primary-color,90%);
|
|
4
4
|
@primary-color-tint-80 : tint(@primary-color,80%);
|
|
@@ -107,19 +107,29 @@
|
|
|
107
107
|
@table-td-stripe-bg : #f2fafe;
|
|
108
108
|
@table-td-hover-bg : #eaf4fe;
|
|
109
109
|
@table-td-highlight-bg : #b5def3;
|
|
110
|
-
@menu-dark-title : #
|
|
111
|
-
@menu-dark-active-bg :
|
|
110
|
+
@menu-dark-title : #306BE3;
|
|
111
|
+
@menu-dark-active-bg : rgb(0, 44, 107);
|
|
112
112
|
@menu-dark-subsidiary-color : rgba(255,255,255,.7);
|
|
113
113
|
@menu-dark-group-title-color : rgba(255,255,255,.36);
|
|
114
|
+
@menu-dark-item-selected-bg: rgb(2, 35, 76);
|
|
115
|
+
@menu-dark-bg: @menu-dark-active-bg ; // 侧边栏背景色
|
|
116
|
+
@menu-dark-item-active-bg: @menu-dark-bg; // 激活的一级菜单背景色
|
|
117
|
+
@menu-dark-submenu-bg: #0E356E; // 二级菜单背景色
|
|
118
|
+
@menu-dark-item-selected-bg: @menu-dark-bg; // 最内部的菜单背景色
|
|
114
119
|
@date-picker-cell-hover-bg : #e1f0fe;
|
|
120
|
+
// 使用LESS的颜色函数调整颜色值
|
|
121
|
+
@selected-menu-item-bg: rgb(61, 123, 246); // 选中的一级菜单颜色
|
|
122
|
+
@selected-submenu-bg: rgb(14, 53, 110); // 二级菜单颜色
|
|
123
|
+
@selected-innermost-bg: rgb(2, 35, 76); // 最内部的颜色
|
|
124
|
+
@menu-item-hover-bg: darken(@menu-dark-bg, 5%); // 鼠标悬停时稍暗一些的颜色
|
|
115
125
|
|
|
116
126
|
// Shadow
|
|
117
|
-
@shadow-color :
|
|
127
|
+
@shadow-color : rgb(2, 35, 76);
|
|
118
128
|
@shadow-base : @shadow-down;
|
|
119
|
-
@shadow-card : 0 1px 1px 0
|
|
129
|
+
@shadow-card : 0 1px 1px 0 rgb(14, 53, 110);
|
|
120
130
|
@shadow-up : 0 -1px 6px @shadow-color;
|
|
121
131
|
@shadow-down : 0 1px 6px @shadow-color;
|
|
122
|
-
@shadow-left : -1px 0 6px
|
|
132
|
+
@shadow-left : -1px 0 6px rgb(2, 35, 76);
|
|
123
133
|
@shadow-right : 1px 0 6px @shadow-color;
|
|
124
134
|
|
|
125
135
|
// Button
|
|
@@ -189,12 +199,13 @@
|
|
|
189
199
|
@grid-columns : 24;
|
|
190
200
|
@grid-gutter-width : 0;
|
|
191
201
|
@layout-body-background : #f5f7f9;
|
|
192
|
-
@layout-header-background :
|
|
202
|
+
@layout-header-background : @primary-color;
|
|
203
|
+
@layout-header-selected-background: @primary-color; // 选中的顶部菜单背景颜色稍亮
|
|
193
204
|
@layout-header-height : 64px;
|
|
194
205
|
@layout-header-padding : 0 50px;
|
|
195
206
|
@layout-footer-padding : 24px 50px;
|
|
196
207
|
@layout-footer-background : @layout-body-background;
|
|
197
|
-
@layout-sider-background :
|
|
208
|
+
@layout-sider-background : #002C6B;
|
|
198
209
|
@layout-sider-background-tint-10 : tint(@layout-sider-background, 10%);
|
|
199
210
|
@layout-trigger-height : 48px;
|
|
200
211
|
@layout-trigger-color : #fff;
|
|
@@ -474,7 +485,7 @@ vxe-table
|
|
|
474
485
|
@vxe-table-checkbox-range-border-color : #006af1;
|
|
475
486
|
@vxe-table-checkbox-range-background-color : rgba(50, 128, 252, 0.2);
|
|
476
487
|
|
|
477
|
-
@vxe-table-fixed-left-scrolling-box-shadow : 8px 0px 10px -5px
|
|
488
|
+
@vxe-table-fixed-left-scrolling-box-shadow : 8px 0px 10px -5px rgb(14, 53, 110);
|
|
478
489
|
@vxe-table-fixed-right-scrolling-box-shadow : -8px 0px 10px -5px rgba(0, 0, 0, 0.12);
|
|
479
490
|
|
|
480
491
|
/*filter*/
|
|
@@ -621,8 +632,36 @@ vxe-table
|
|
|
621
632
|
@vxe-switch-font-color : #fff;
|
|
622
633
|
@vxe-switch-icon-background-color : #fff;
|
|
623
634
|
@vxe-switch-open-background-color : @vxe-primary-color;
|
|
624
|
-
@vxe-switch-close-background-color :
|
|
625
|
-
@vxe-switch-disabled-background-color :
|
|
635
|
+
@vxe-switch-close-background-color : rgb(14, 53, 110);
|
|
636
|
+
@vxe-switch-disabled-background-color : rgb(14, 53, 120);
|
|
626
637
|
|
|
627
638
|
/*pulldown*/
|
|
628
639
|
@vxe-pulldown-panel-background-color : #fff;
|
|
640
|
+
// 顶部菜单样式
|
|
641
|
+
.layout-header {
|
|
642
|
+
background-color: @layout-header-background;
|
|
643
|
+
.menu-item-selected {
|
|
644
|
+
background-color: @layout-header-selected-background;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// 更新侧边栏菜单样式
|
|
649
|
+
// 侧边菜单样式
|
|
650
|
+
.menu-dark {
|
|
651
|
+
background: @menu-dark-bg; // 侧边栏背景色
|
|
652
|
+
|
|
653
|
+
.ivu-dropdown-item {
|
|
654
|
+
background-color: rgb(2, 35, 76); // 设置所有下拉菜单项的背景色
|
|
655
|
+
|
|
656
|
+
&.active, &.open {
|
|
657
|
+
background-color: @menu-dark-item-selected-bg;
|
|
658
|
+
|
|
659
|
+
// 子菜单项的样式
|
|
660
|
+
.ivu-dropdown-item {
|
|
661
|
+
background-color: @menu-dark-item-selected-bg;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
}
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
--table-td-hover-bg: #ebf7ff;
|
|
91
91
|
--table-td-highlight-bg: #ebf7ff;
|
|
92
92
|
--menu-dark-title: #333333;
|
|
93
|
-
--menu-dark-active-bg:
|
|
93
|
+
--menu-dark-active-bg:fade(#000, 85%);
|
|
94
94
|
--menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
|
|
95
95
|
--menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
|
|
96
96
|
--date-picker-cell-hover-bg: #e1f0fe;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
key: "eap",
|
|
3
3
|
title: "深邃蓝",
|
|
4
|
-
primaryColor: "#
|
|
4
|
+
primaryColor: "#306BE3",
|
|
5
5
|
vars: `
|
|
6
|
-
--primary-color:
|
|
6
|
+
--primary-color: #306BE3;
|
|
7
7
|
--primary-color-tint-20: #33a7ff;
|
|
8
8
|
--primary-color-tint-90: #e6f4ff;
|
|
9
9
|
--primary-color-tint-80: #cce9ff;
|
|
@@ -89,18 +89,26 @@ export default {
|
|
|
89
89
|
--table-td-stripe-bg: #f2fafe;
|
|
90
90
|
--table-td-hover-bg: #eaf4fe;
|
|
91
91
|
--table-td-highlight-bg: #b5def3;
|
|
92
|
-
--menu-dark-title: #
|
|
93
|
-
--menu-dark-active-bg: #
|
|
92
|
+
--menu-dark-title: #306BE3;
|
|
93
|
+
--menu-dark-item-active-bg: #02234C; /* 激活的一级菜单项 */
|
|
94
|
+
--menu-dark-submenu-bg: #0E356E; /* 二级菜单项 */
|
|
95
|
+
--menu-dark-item-selected-bg: rgb(2, 35, 76); /* 选中的内部菜单项 */
|
|
96
|
+
--menu-dark-bg:rgb(0, 44, 107);
|
|
97
|
+
--menu-dark-active-bg: rgb(0, 44, 107);
|
|
94
98
|
--menu-dark-subsidiary-color: rgba(255, 255, 255, 0.7);
|
|
95
99
|
--menu-dark-group-title-color: rgba(255, 255, 255, 0.36);
|
|
100
|
+
--selected-menu-item-bg: rgb(61, 123, 246);
|
|
101
|
+
--selected-submenu-bg: rgb(14, 53, 110);
|
|
102
|
+
--selected-innermost-bg: rgb(2, 35, 76);
|
|
103
|
+
--menu-item-hover-bg: darken(@menu-dark-bg, 5%);
|
|
96
104
|
--date-picker-cell-hover-bg: #e1f0fe;
|
|
97
|
-
--shadow-color:
|
|
98
|
-
--shadow-base: 0 1px 6px
|
|
99
|
-
--shadow-card: 0 1px 1px 0
|
|
100
|
-
--shadow-up: 0 -1px 6px
|
|
101
|
-
--shadow-down: 0 1px 6px
|
|
102
|
-
--shadow-left: -1px 0 6px
|
|
103
|
-
--shadow-right: 1px 0 6px
|
|
105
|
+
--shadow-color: rgb(2, 35, 76);
|
|
106
|
+
--shadow-base: 0 1px 6px rgb(2, 35, 76);
|
|
107
|
+
--shadow-card: 0 1px 1px 0 rgb(14, 53, 110);
|
|
108
|
+
--shadow-up: 0 -1px 6px rgb(2, 35, 76);
|
|
109
|
+
--shadow-down: 0 1px 6px rgb(2, 35, 76);
|
|
110
|
+
--shadow-left: -1px 0 6px rgb(2, 35, 76);
|
|
111
|
+
--shadow-right: 1px 0 6px rgb(2, 35, 76);
|
|
104
112
|
--btn-height-base: 26px;
|
|
105
113
|
--btn-height-large: 32px;
|
|
106
114
|
--btn-height-small: 20px;
|
|
@@ -155,12 +163,13 @@ export default {
|
|
|
155
163
|
--grid-columns: 24;
|
|
156
164
|
--grid-gutter-width: 0;
|
|
157
165
|
--layout-body-background: #f5f7f9;
|
|
158
|
-
--layout-header-background: #
|
|
166
|
+
--layout-header-background: #306BE3;
|
|
159
167
|
--layout-header-height: 64px;
|
|
168
|
+
--layout-header-selected-background: #306BE3;
|
|
160
169
|
--layout-header-padding: 0 50px;
|
|
161
170
|
--layout-footer-padding: 24px 50px;
|
|
162
171
|
--layout-footer-background: #f5f7f9;
|
|
163
|
-
--layout-sider-background: #
|
|
172
|
+
--layout-sider-background: #002C6B;
|
|
164
173
|
--layout-sider-background-tint-10: #474747;
|
|
165
174
|
--layout-trigger-height: 48px;
|
|
166
175
|
--layout-trigger-color: #fff;
|
|
@@ -374,7 +383,7 @@ export default {
|
|
|
374
383
|
--vxe-table-checkbox-range-border-width: 1px;
|
|
375
384
|
--vxe-table-checkbox-range-border-color: #006af1;
|
|
376
385
|
--vxe-table-checkbox-range-background-color: rgba(50, 128, 252, 0.2);
|
|
377
|
-
--vxe-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px
|
|
386
|
+
--vxe-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px rgb(14, 53, 110);
|
|
378
387
|
--vxe-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px rgba(0, 0, 0, 0.12);
|
|
379
388
|
/*filter*/
|
|
380
389
|
--vxe-table-filter-panel-background-color: #fff;
|
|
@@ -512,4 +521,5 @@ export default {
|
|
|
512
521
|
margin:0;
|
|
513
522
|
}
|
|
514
523
|
`
|
|
524
|
+
|
|
515
525
|
};
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lambo-design/shared",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"axios
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"xlsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lambo-design/shared",
|
|
3
|
+
"version": "1.0.0-beta.84",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"author": "lambo",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"axios": "^0.24.0",
|
|
15
|
+
"axios-cache-plugin": "^0.1.0",
|
|
16
|
+
"classnames": "^2.3.1",
|
|
17
|
+
"css-vars-ponyfill": "^2.4.8",
|
|
18
|
+
"moment": "2.29.4",
|
|
19
|
+
"qs": "^6.11.0",
|
|
20
|
+
"xlsx": "http://cicd.lambo.top/package/cdn/xlsx-0.19.1.tgz",
|
|
21
|
+
"xlsx-style": "^0.8.13"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export const builtInDictKeys = [
|
|
2
|
-
'SEX_ENUM',
|
|
3
|
-
'WHETHER_ENUM'
|
|
4
|
-
]
|
|
5
|
-
|
|
6
|
-
export const builtInDictMap = {
|
|
7
|
-
'SEX_ENUM' : { '0': '女', '1': '男' },
|
|
8
|
-
'WHETHER_ENUM' : { '0': '否', '1': '是' }
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const builtInDictList = {
|
|
12
|
-
'SEX_ENUM' : [
|
|
13
|
-
{ K: '0', V: '女' },
|
|
14
|
-
{ K: '1', V: '男' },
|
|
15
|
-
],
|
|
16
|
-
'WHETHER_ENUM' : [
|
|
17
|
-
{ K: '0', V: '否' },
|
|
18
|
-
{ K: '1', V: '是' },
|
|
19
|
-
]
|
|
20
|
-
}
|
|
1
|
+
export const builtInDictKeys = [
|
|
2
|
+
'SEX_ENUM',
|
|
3
|
+
'WHETHER_ENUM'
|
|
4
|
+
]
|
|
5
|
+
|
|
6
|
+
export const builtInDictMap = {
|
|
7
|
+
'SEX_ENUM' : { '0': '女', '1': '男' },
|
|
8
|
+
'WHETHER_ENUM' : { '0': '否', '1': '是' }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const builtInDictList = {
|
|
12
|
+
'SEX_ENUM' : [
|
|
13
|
+
{ K: '0', V: '女' },
|
|
14
|
+
{ K: '1', V: '男' },
|
|
15
|
+
],
|
|
16
|
+
'WHETHER_ENUM' : [
|
|
17
|
+
{ K: '0', V: '否' },
|
|
18
|
+
{ K: '1', V: '是' },
|
|
19
|
+
]
|
|
20
|
+
}
|
package/utils/dict/index.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import config from '../../config/config'
|
|
2
|
-
import ajax from '../ajax'
|
|
3
|
-
import { builtInDictKeys, builtInDictMap, builtInDictList} from './built-in-dict'
|
|
4
|
-
import { setSessionStorage, getSessionStorage} from "../platform";
|
|
5
|
-
|
|
6
|
-
export async function getAllDict(dictIdArray) {
|
|
7
|
-
if (dictIdArray.length > 0) {
|
|
8
|
-
try {
|
|
9
|
-
const { data } = await ajax.get(`${config.upmsServerContext}/manage/acDict/getDictsForMulti`, { params: { dictIds : dictIdArray.join(",") } })
|
|
10
|
-
let result = {}
|
|
11
|
-
if (data.code == 1) {
|
|
12
|
-
let dictList = data.data;
|
|
13
|
-
for (let key in dictList) {
|
|
14
|
-
let dicts = dictList[key]
|
|
15
|
-
result[key] = {};
|
|
16
|
-
if (dicts.length > 0) {
|
|
17
|
-
result[key]['enumList'] = dicts
|
|
18
|
-
setSessionStorage(key + '_LIST', dicts)
|
|
19
|
-
let dictMap = {}
|
|
20
|
-
for(let dict of dicts) {
|
|
21
|
-
dictMap[dict.K] = dict.V;
|
|
22
|
-
}
|
|
23
|
-
result[key]['enumData'] = dictMap
|
|
24
|
-
setSessionStorage(key + '_MAP', dictMap)
|
|
25
|
-
} else if (builtInDictKeys.includes(key)) {
|
|
26
|
-
let dicts = builtInDictList[key]
|
|
27
|
-
result[key]['enumList'] = dicts
|
|
28
|
-
setSessionStorage(key + '_LIST', dicts)
|
|
29
|
-
let dictMap = {}
|
|
30
|
-
for(let dict of dicts) {
|
|
31
|
-
dictMap[dict.K] = dict.V;
|
|
32
|
-
}
|
|
33
|
-
result[key]['enumData'] = dictMap
|
|
34
|
-
setSessionStorage(key + '_MAP', dictMap)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return result
|
|
39
|
-
} catch (error) {
|
|
40
|
-
console.error(`getDictsForMulti error dictId=${dictIdArray}`, error)
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export async function getDictList(dictId) {
|
|
46
|
-
if (builtInDictKeys.includes(dictId)) {
|
|
47
|
-
return builtInDictList[dictId]
|
|
48
|
-
}
|
|
49
|
-
const dictValue = getSessionStorage(dictId + '_LIST')
|
|
50
|
-
if (!!dictValue) {
|
|
51
|
-
return dictValue
|
|
52
|
-
}
|
|
53
|
-
let data = await getAllDict([dictId]);
|
|
54
|
-
return data[dictId];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export async function getDictMap(dictId) {
|
|
58
|
-
if (builtInDictKeys.includes(dictId)) {
|
|
59
|
-
return builtInDictMap[dictId]
|
|
60
|
-
}
|
|
61
|
-
const dictValue = getSessionStorage(dictId + '_MAP')
|
|
62
|
-
if (!!dictValue) {
|
|
63
|
-
return dictValue
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
try {
|
|
67
|
-
const { data } = await ajax.get(`${config.upmsServerContext}/manage/acDict/getDictsMap`, { params: { dictId : dictId } })
|
|
68
|
-
if (data.code == 1) {
|
|
69
|
-
setSessionStorage(dictId + '_MAP', data.data)
|
|
70
|
-
}
|
|
71
|
-
return data.data
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error(`getDictsMap error dictId=${dictId}`, error)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
import config from '../../config/config'
|
|
2
|
+
import ajax from '../ajax'
|
|
3
|
+
import { builtInDictKeys, builtInDictMap, builtInDictList} from './built-in-dict'
|
|
4
|
+
import { setSessionStorage, getSessionStorage} from "../platform";
|
|
5
|
+
|
|
6
|
+
export async function getAllDict(dictIdArray) {
|
|
7
|
+
if (dictIdArray.length > 0) {
|
|
8
|
+
try {
|
|
9
|
+
const { data } = await ajax.get(`${config.upmsServerContext}/manage/acDict/getDictsForMulti`, { params: { dictIds : dictIdArray.join(",") } })
|
|
10
|
+
let result = {}
|
|
11
|
+
if (data.code == 1) {
|
|
12
|
+
let dictList = data.data;
|
|
13
|
+
for (let key in dictList) {
|
|
14
|
+
let dicts = dictList[key]
|
|
15
|
+
result[key] = {};
|
|
16
|
+
if (dicts.length > 0) {
|
|
17
|
+
result[key]['enumList'] = dicts
|
|
18
|
+
setSessionStorage(key + '_LIST', dicts)
|
|
19
|
+
let dictMap = {}
|
|
20
|
+
for(let dict of dicts) {
|
|
21
|
+
dictMap[dict.K] = dict.V;
|
|
22
|
+
}
|
|
23
|
+
result[key]['enumData'] = dictMap
|
|
24
|
+
setSessionStorage(key + '_MAP', dictMap)
|
|
25
|
+
} else if (builtInDictKeys.includes(key)) {
|
|
26
|
+
let dicts = builtInDictList[key]
|
|
27
|
+
result[key]['enumList'] = dicts
|
|
28
|
+
setSessionStorage(key + '_LIST', dicts)
|
|
29
|
+
let dictMap = {}
|
|
30
|
+
for(let dict of dicts) {
|
|
31
|
+
dictMap[dict.K] = dict.V;
|
|
32
|
+
}
|
|
33
|
+
result[key]['enumData'] = dictMap
|
|
34
|
+
setSessionStorage(key + '_MAP', dictMap)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return result
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(`getDictsForMulti error dictId=${dictIdArray}`, error)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function getDictList(dictId) {
|
|
46
|
+
if (builtInDictKeys.includes(dictId)) {
|
|
47
|
+
return builtInDictList[dictId]
|
|
48
|
+
}
|
|
49
|
+
const dictValue = getSessionStorage(dictId + '_LIST')
|
|
50
|
+
if (!!dictValue) {
|
|
51
|
+
return dictValue
|
|
52
|
+
}
|
|
53
|
+
let data = await getAllDict([dictId]);
|
|
54
|
+
return data[dictId];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function getDictMap(dictId) {
|
|
58
|
+
if (builtInDictKeys.includes(dictId)) {
|
|
59
|
+
return builtInDictMap[dictId]
|
|
60
|
+
}
|
|
61
|
+
const dictValue = getSessionStorage(dictId + '_MAP')
|
|
62
|
+
if (!!dictValue) {
|
|
63
|
+
return dictValue
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
const { data } = await ajax.get(`${config.upmsServerContext}/manage/acDict/getDictsMap`, { params: { dictId : dictId } })
|
|
68
|
+
if (data.code == 1) {
|
|
69
|
+
setSessionStorage(dictId + '_MAP', data.data)
|
|
70
|
+
}
|
|
71
|
+
return data.data
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error(`getDictsMap error dictId=${dictId}`, error)
|
|
74
|
+
}
|
|
75
|
+
}
|