bl-common-vue3 3.8.35 → 3.8.38
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/index.js +28 -0
- package/package.json +5 -4
- package/src/common/styles/base.less +37 -0
- package/src/common/styles/common.less +283 -0
- package/src/common/utils/constant.js +75 -0
- package/src/common/utils/shared.js +29 -0
- package/src/common/utils/util.js +572 -0
- package/src/common/utils/xlsx.js +47 -0
- package/src/components/ApprovalDetail/index.vue +1793 -0
- package/src/components/ApprovalDetail/modules/ApprovalAddComment.vue +914 -0
- package/src/components/ApprovalDetail/modules/ApprovalAddSignModal.vue +278 -0
- package/src/components/ApprovalDetail/modules/ApprovalChooseUser.vue +154 -0
- package/src/components/ApprovalDetail/modules/ApprovalCommentList.vue +366 -0
- package/src/components/ApprovalDetail/modules/ApprovalHandleApproval.vue +335 -0
- package/src/components/ApprovalDetail/modules/ApprovalMentionUser.vue +204 -0
- package/src/components/ApprovalDetail/modules/ApprovalOpinionInfo.vue +890 -0
- package/src/components/ApprovalDetail/modules/ApprovalSendBack.vue +189 -0
- package/src/components/ApprovalDetail/modules/ApprovalTransferReview.vue +142 -0
- package/src/components/AttachmentInfo/index.vue +799 -0
- package/src/components/AttachmentInfo/modules/AddAttachments.vue +231 -0
- package/src/components/AttachmentInfo/modules/MultipleAddAttachments.vue +300 -0
- package/src/components/BLIcon/index.js +20 -0
- package/src/components/BlChat/createChatBtn.vue +87 -0
- package/src/components/BlMobileAnnexUpload/index.vue +397 -0
- package/src/components/BlPhoneInput/index.vue +312 -0
- package/src/components/BlTextTranslationBtn/index.vue +83 -0
- package/src/components/BlTextTranslationModal/index.vue +211 -0
- package/src/components/BlTinymceEditor/index.vue +364 -0
- package/src/components/CheckedHousingResources/index.vue +738 -0
- package/src/components/CheckedPropertyResources/index.vue +464 -0
- package/src/components/ChooseBuildings/index.vue +418 -0
- package/src/components/ChooseHousingModal/index.vue +379 -0
- package/src/components/ChooseHousingResources/index.vue +2558 -0
- package/src/components/ChooseOrgMember/index.vue +901 -0
- package/src/components/ChoosePropertyResources/index.vue +1142 -0
- package/src/components/ColorPicker/directives/clickoutside.js +73 -0
- package/src/components/ColorPicker/index.vue +603 -0
- package/src/components/ColumnSetting/index.vue +343 -0
- package/src/components/CustomColumns/index.vue +205 -0
- package/src/components/CustomImport/components/ImportResult.vue +143 -0
- package/src/components/CustomImport/index.vue +292 -0
- package/src/components/CustomTable/components/UrlSelect/index.vue +194 -0
- package/src/components/CustomTable/components/UrlTreeSelect/index.vue +215 -0
- package/src/components/CustomTable/index.vue +3638 -0
- package/src/components/DatePicker/DatePicker/index.vue +80 -0
- package/src/components/DatePicker/MonthPicker/index.vue +73 -0
- package/src/components/DatePicker/RangePicker/index.vue +80 -0
- package/src/components/DatePicker/TimePicker/index.vue +73 -0
- package/src/components/DatePicker/TimeRangePicker/index.vue +73 -0
- package/src/components/DatePicker/utils.js +106 -0
- package/src/components/DepartmentPositionForm/index.vue +148 -0
- package/src/components/DepartmentPositionModal/index.vue +602 -0
- package/src/components/DictionarySetting/components/AddDictionary.vue +354 -0
- package/src/components/DictionarySetting/index.vue +387 -0
- package/src/components/ExportComponents/index.vue +207 -0
- package/src/components/ExtraFieldsItem/index.vue +538 -0
- package/src/components/ExtraManage/components/ExtraManageEdit.vue +647 -0
- package/src/components/ExtraManage/index.vue +307 -0
- package/src/components/IDCardReader/index.vue +326 -0
- package/src/components/ImportFile/index.vue +227 -0
- package/src/components/LinkLibrary/AddMini.vue +226 -0
- package/src/components/LinkLibrary/MiniList.vue +355 -0
- package/src/components/LinkLibrary/TextTip/index.vue +54 -0
- package/src/components/LinkLibrary/index.vue +904 -0
- package/src/components/PaySetting/index.vue +437 -0
- package/src/components/PhotoUpload/Photograph.vue +76 -0
- package/src/components/PhotoUpload/index.vue +261 -0
- package/src/components/PreviewImg/index.vue +127 -0
- package/src/components/PublicExtensionField/components/ExtraManageEdit.vue +609 -0
- package/src/components/PublicExtensionField/index.vue +278 -0
- package/src/components/QrcodeModal/index.vue +227 -0
- package/src/components/ReportLang/index.vue +212 -0
- package/src/components/SelectColor/index.vue +153 -0
- package/src/components/SelectProperty/index.vue +747 -0
- package/src/components/TenantComponent/index.vue +373 -0
- package/src/components/TextTip/index.vue +74 -0
- package/src/components/UserDetail/index.vue +566 -0
- package/src/components/ViewEnergyList/index.vue +338 -0
- package/src/components/ViewPropertyList/index.vue +286 -0
- package/src/components/VillageTree/index.vue +1086 -0
- package/src/components/components.js +52 -0
- package/src/locale/commonLocale/en.js +67 -0
- package/src/locale/commonLocale/ja-JP.js +67 -0
- package/src/locale/commonLocale/zh-CN.js +67 -0
- package/src/locale/commonLocale/zh-HK.js +67 -0
- package/src/locale/commonLocale/zh-TW.js +67 -0
- package/src/locale/index.js +150 -0
- package/src/locale/lang/en.js +12 -0
- package/src/locale/lang/ja-JP.js +12 -0
- package/src/locale/lang/zh-CN.js +12 -0
- package/src/locale/lang/zh-HK.js +12 -0
- package/src/locale/lang/zh-TW.js +12 -0
- package/src/locale/local/cht.json +517 -0
- package/src/locale/local/en.json +517 -0
- package/src/locale/local/jp.json +517 -0
- package/src/locale/local/zh-HK.json +416 -0
- package/src/locale/local/zh.json +517 -0
- package/.history/package_20230222150904.json +0 -54
- package/.history/package_20230227191203.json +0 -54
- package/.history/package_20230227193052.json +0 -54
- package/.history/package_20230308102851.json +0 -54
- package/lib/demo.html +0 -8
- package/lib/vue3common.common.js +0 -46479
- package/lib/vue3common.umd.js +0 -46489
- package/lib/vue3common.umd.min.js +0 -22
package/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件库入口
|
|
3
|
+
* 按需导入:import { ChooseOrgMember } from 'bl-common-vue3'
|
|
4
|
+
* 全量注册:import BlCommon from 'bl-common-vue3'; app.use(BlCommon)
|
|
5
|
+
*/
|
|
6
|
+
import * as components from "./src/components/components.js";
|
|
7
|
+
|
|
8
|
+
export * from "./src/components/components.js";
|
|
9
|
+
import utils from "./src/common/utils/util.js";
|
|
10
|
+
import { commonLocale, commonAllLocale } from "./src/locale/index";
|
|
11
|
+
|
|
12
|
+
export const install = function (app) {
|
|
13
|
+
Object.keys(components).map((key) => {
|
|
14
|
+
const component = components[key];
|
|
15
|
+
if (component.install) {
|
|
16
|
+
app.use(component);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return app;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
install,
|
|
24
|
+
components,
|
|
25
|
+
utils,
|
|
26
|
+
commonLocale,
|
|
27
|
+
commonAllLocale,
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bl-common-vue3",
|
|
3
|
-
"version": "3.8.
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "3.8.38",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"module": "index.js",
|
|
5
6
|
"description": "bailing vue3 common components lib",
|
|
6
7
|
"private": false,
|
|
8
|
+
"sideEffects": ["**/*.css", "**/*.less", "**/*.vue"],
|
|
7
9
|
"scripts": {
|
|
8
10
|
"lib": "vue-cli-service build --target lib --name vue3common --dest lib index.js",
|
|
9
11
|
"serve": "vue-cli-service serve",
|
|
@@ -14,8 +16,7 @@
|
|
|
14
16
|
"exports": {
|
|
15
17
|
".": "./lib/vue3common.common.js",
|
|
16
18
|
"./package.json": "./package.json",
|
|
17
|
-
"./lib/*": "./lib/*"
|
|
18
|
-
"./BlTinymceEditor": "./src/components/BlTinymceEditor/index.vue"
|
|
19
|
+
"./lib/*": "./lib/*"
|
|
19
20
|
},
|
|
20
21
|
"peerDependencies": {
|
|
21
22
|
"ant-design-vue": "^3.2.20",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @Description: 全局可使用的less变量声明
|
|
3
|
+
*/
|
|
4
|
+
// 主题样式
|
|
5
|
+
@primary-color: #2681f3; // 全局主色
|
|
6
|
+
@primary-color-bg: #f0f9ff; // 全局主色
|
|
7
|
+
@link-color: #2681f3; // 链接色
|
|
8
|
+
@success-color: #52c41a; // 成功色
|
|
9
|
+
@warning-color: #faad14; // 警告色
|
|
10
|
+
@error-color: #f5222d; // 错误色
|
|
11
|
+
@heading-color: rgba(0, 0, 0, 0.85); // 标题色
|
|
12
|
+
@text-color: rgba(0, 0, 0, 0.65); // 主文本色
|
|
13
|
+
@text-color-secondary: rgba(0, 0, 0, 0.45); // 次文本色
|
|
14
|
+
@disabled-color: rgba(0, 0, 0, 0.25); // 失效色
|
|
15
|
+
@border-color-base: #d9d9d9; // 边框色
|
|
16
|
+
@box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.15); // 浮层阴影
|
|
17
|
+
@font-size-base: 14px; // 主字号
|
|
18
|
+
@font-size-desc: 12px; // 描述字号
|
|
19
|
+
@font-size-subhead: 16px; // 副标题字号
|
|
20
|
+
@font-size-head: 18px; // 标题字号
|
|
21
|
+
@font-size-headline: 20px; // 页面主标题字号
|
|
22
|
+
@font-weight-normal: 400; // 常规体
|
|
23
|
+
@font-weight-middle: 800; // 中黑体
|
|
24
|
+
@font-weight-bold: 900; // 粗体
|
|
25
|
+
@border-radius-base: 4px; // 组件/浮层圆角
|
|
26
|
+
@border-radius-cardsmall: 8px; // 8px圆角
|
|
27
|
+
@border-radius-cardmiddle: 10px; // 10px圆角
|
|
28
|
+
@border-radius-cardlarge: 12px; // 12px圆角
|
|
29
|
+
|
|
30
|
+
@top-header-height: 50px; //顶部菜单高度
|
|
31
|
+
@default-white-text-color: rgba(255, 255, 255, 0.8); //白色文字默认颜色
|
|
32
|
+
|
|
33
|
+
// 常用样式变量
|
|
34
|
+
|
|
35
|
+
.primary-color-text {
|
|
36
|
+
color: @primary-color;
|
|
37
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @Description: 全局共用less样式集合
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// 文字不能选中
|
|
6
|
+
.unselect {
|
|
7
|
+
-webkit-user-select: none;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 主色文字型button
|
|
12
|
+
.text-btn {
|
|
13
|
+
color: @primary-color;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
height: 30px;
|
|
16
|
+
line-height: 30px;
|
|
17
|
+
padding-right: 15px;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
&:extend(.unselect);
|
|
20
|
+
}
|
|
21
|
+
// 主红色文字型button
|
|
22
|
+
.text-danger-btn {
|
|
23
|
+
&:extend(.text-btn);
|
|
24
|
+
color: @error-color;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 文字不折行
|
|
28
|
+
.nowrap {
|
|
29
|
+
width: 100%;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// drawer 底部按钮
|
|
36
|
+
.drawer-footer {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
border-top: 1px solid #e9e9e9;
|
|
42
|
+
background-color: #fff;
|
|
43
|
+
text-align: right;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
padding: 10px 16px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// flex
|
|
49
|
+
.flex {
|
|
50
|
+
display: flex;
|
|
51
|
+
}
|
|
52
|
+
.flex-column {
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
}
|
|
55
|
+
.justify-center {
|
|
56
|
+
justify-content: center;
|
|
57
|
+
}
|
|
58
|
+
.justify-between {
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
}
|
|
61
|
+
.justify-around {
|
|
62
|
+
justify-content: space-around;
|
|
63
|
+
}
|
|
64
|
+
.flex-end {
|
|
65
|
+
justify-content: flex-end;
|
|
66
|
+
}
|
|
67
|
+
.flex-start {
|
|
68
|
+
justify-content: flex-start;
|
|
69
|
+
}
|
|
70
|
+
.align-center {
|
|
71
|
+
align-items: center;
|
|
72
|
+
}
|
|
73
|
+
.align-end {
|
|
74
|
+
align-items: flex-end;
|
|
75
|
+
}
|
|
76
|
+
.align-start {
|
|
77
|
+
align-items: flex-start;
|
|
78
|
+
}
|
|
79
|
+
.self-start {
|
|
80
|
+
align-self: flex-start;
|
|
81
|
+
}
|
|
82
|
+
.flex-wrap {
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
}
|
|
85
|
+
.flex-1 {
|
|
86
|
+
flex: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.size-40 {
|
|
90
|
+
width: 40px;
|
|
91
|
+
height: 40px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.w-100p {
|
|
95
|
+
width: 100%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// margin
|
|
99
|
+
.mt-10 {
|
|
100
|
+
margin-top: 10px;
|
|
101
|
+
}
|
|
102
|
+
.ml-10 {
|
|
103
|
+
margin-left: 10px;
|
|
104
|
+
}
|
|
105
|
+
.mr-10 {
|
|
106
|
+
margin-right: 10px;
|
|
107
|
+
}
|
|
108
|
+
.mt-20 {
|
|
109
|
+
margin-top: 20px;
|
|
110
|
+
}
|
|
111
|
+
.mt-40 {
|
|
112
|
+
margin-top: 40px;
|
|
113
|
+
}
|
|
114
|
+
.ml-2 {
|
|
115
|
+
margin-left: 2px;
|
|
116
|
+
}
|
|
117
|
+
.mr-2 {
|
|
118
|
+
margin-right: 2px;
|
|
119
|
+
}
|
|
120
|
+
.mlr-2 {
|
|
121
|
+
&:extend(.ml-2);
|
|
122
|
+
&:extend(.mr-2);
|
|
123
|
+
}
|
|
124
|
+
.mt-5 {
|
|
125
|
+
margin-top: 5px;
|
|
126
|
+
}
|
|
127
|
+
.ml-5 {
|
|
128
|
+
margin-left: 5px;
|
|
129
|
+
}
|
|
130
|
+
.mr-5 {
|
|
131
|
+
margin-right: 5px;
|
|
132
|
+
}
|
|
133
|
+
.mt-5 {
|
|
134
|
+
margin-top: 5px;
|
|
135
|
+
}
|
|
136
|
+
.mb-5 {
|
|
137
|
+
margin-bottom: 5px;
|
|
138
|
+
}
|
|
139
|
+
.mlr-5 {
|
|
140
|
+
&:extend(.ml-5);
|
|
141
|
+
&:extend(.mr-5);
|
|
142
|
+
}
|
|
143
|
+
.ml-20 {
|
|
144
|
+
margin-left: 20px;
|
|
145
|
+
}
|
|
146
|
+
.mr-20 {
|
|
147
|
+
margin-right: 20px;
|
|
148
|
+
}
|
|
149
|
+
.mt-50 {
|
|
150
|
+
margin-top: 50px;
|
|
151
|
+
}
|
|
152
|
+
.p-10 {
|
|
153
|
+
padding: 10px;
|
|
154
|
+
}
|
|
155
|
+
.plr-10 {
|
|
156
|
+
padding-left: 10px;
|
|
157
|
+
padding-right: 10px;
|
|
158
|
+
}
|
|
159
|
+
.plr-20 {
|
|
160
|
+
padding-left: 20px;
|
|
161
|
+
padding-right: 20px;
|
|
162
|
+
}
|
|
163
|
+
.margin-10 {
|
|
164
|
+
margin: 10px;
|
|
165
|
+
}
|
|
166
|
+
.margin-20 {
|
|
167
|
+
margin: 20px;
|
|
168
|
+
}
|
|
169
|
+
.mb-20 {
|
|
170
|
+
margin-bottom: 20px;
|
|
171
|
+
}
|
|
172
|
+
.bg-white {
|
|
173
|
+
background-color: #fff;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.size-100p {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 100%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.fw-bold {
|
|
182
|
+
font-weight: bold;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.text-center {
|
|
186
|
+
text-align: center;
|
|
187
|
+
}
|
|
188
|
+
.text-right {
|
|
189
|
+
text-align: right;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.text-title {
|
|
193
|
+
height: 40px;
|
|
194
|
+
width: 100%;
|
|
195
|
+
font-size: 14px;
|
|
196
|
+
font-weight: bold;
|
|
197
|
+
color: rgba(0, 0, 0, 0.8);
|
|
198
|
+
position: relative;
|
|
199
|
+
padding: 20px 10px;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
&::before {
|
|
203
|
+
position: absolute;
|
|
204
|
+
content: "";
|
|
205
|
+
left: 0;
|
|
206
|
+
top: 12px;
|
|
207
|
+
bottom: 12px;
|
|
208
|
+
width: 4px;
|
|
209
|
+
background-color: @primary-color;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.required {
|
|
214
|
+
color: #f5222d;
|
|
215
|
+
margin: 0 4px;
|
|
216
|
+
}
|
|
217
|
+
.num-input-suffix {
|
|
218
|
+
line-height: 32px;
|
|
219
|
+
margin-left: 10px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.no-data {
|
|
223
|
+
width: 100%;
|
|
224
|
+
height: 80px;
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
color: #999;
|
|
230
|
+
font-size: 12px;
|
|
231
|
+
-webkit-user-select: none;
|
|
232
|
+
user-select: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.spin {
|
|
236
|
+
width: 100%;
|
|
237
|
+
height: 100px;
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
align-items: center;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.link {
|
|
245
|
+
color: @primary-color;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.text-wrap {
|
|
250
|
+
white-space: pre-wrap;
|
|
251
|
+
word-break: break-all;
|
|
252
|
+
word-wrap: break-word;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.text-gray {
|
|
256
|
+
color: rgba(0, 0, 0, 0.4);
|
|
257
|
+
}
|
|
258
|
+
.between {
|
|
259
|
+
justify-content: space-between;
|
|
260
|
+
}
|
|
261
|
+
.align-middle {
|
|
262
|
+
align-items: center;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.no-wrap {
|
|
266
|
+
white-space: nowrap;
|
|
267
|
+
word-break: break-all;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
text-overflow: ellipsis;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* 隐藏滚动条 */
|
|
273
|
+
.hide-scroller-bar::-webkit-scrollbar {
|
|
274
|
+
display: none;
|
|
275
|
+
/* Chrome Safari */
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.hide-scroller-bar {
|
|
279
|
+
scrollbar-width: none;
|
|
280
|
+
/* firefox */
|
|
281
|
+
-ms-overflow-style: none;
|
|
282
|
+
/* IE 10+ */
|
|
283
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// 表格字典样式
|
|
2
|
+
const DICT_COLORS = [
|
|
3
|
+
{
|
|
4
|
+
label: 'utils.constant.921180-0',
|
|
5
|
+
value: 'default',
|
|
6
|
+
color: '',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
label: 'utils.constant.921180-1',
|
|
10
|
+
value: 'primary',
|
|
11
|
+
color: '#409EFF',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'utils.constant.921180-2',
|
|
15
|
+
value: 'success',
|
|
16
|
+
color: '#67C23A',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'utils.constant.921180-3',
|
|
20
|
+
value: 'info',
|
|
21
|
+
color: '#5bc0de',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: 'utils.constant.921180-4',
|
|
25
|
+
value: 'warning',
|
|
26
|
+
color: '#E6A23C',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'utils.constant.921180-5',
|
|
30
|
+
value: 'danger',
|
|
31
|
+
color: '#F56c6c',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const ROOM_TYPE_ICONS = {
|
|
37
|
+
bunk: {
|
|
38
|
+
buildIcon: 'tree-louyu',
|
|
39
|
+
layerIcon: 'tree-louceng',
|
|
40
|
+
roomIcon: 'z_bed_normal',
|
|
41
|
+
},
|
|
42
|
+
coldStorage: {
|
|
43
|
+
buildIcon: 'tree-louyu',
|
|
44
|
+
layerIcon: 'tree-louceng',
|
|
45
|
+
roomIcon: 'cangwei',
|
|
46
|
+
},
|
|
47
|
+
station: {
|
|
48
|
+
buildIcon: 'tree-louyu',
|
|
49
|
+
layerIcon: 'tree-louceng',
|
|
50
|
+
roomIcon: 'gongwei',
|
|
51
|
+
},
|
|
52
|
+
booth: {
|
|
53
|
+
buildIcon: 'a-16jz_tanwei_booth',
|
|
54
|
+
layerIcon: 'tree-louceng',
|
|
55
|
+
roomIcon: 'tanweiguanli',
|
|
56
|
+
},
|
|
57
|
+
area: {
|
|
58
|
+
buildIcon: 'area',
|
|
59
|
+
layerIcon: 'tree-louceng',
|
|
60
|
+
roomIcon: 'changdi',
|
|
61
|
+
},
|
|
62
|
+
car: {
|
|
63
|
+
buildIcon: 'tingchechang1',
|
|
64
|
+
layerIcon: 'tree-louceng',
|
|
65
|
+
roomIcon: 'chewei',
|
|
66
|
+
},
|
|
67
|
+
default: {
|
|
68
|
+
buildIcon: 'tree-louyu',
|
|
69
|
+
layerIcon: 'tree-louceng',
|
|
70
|
+
roomIcon: 'tree-fangjian',
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
export {DICT_COLORS, ROOM_TYPE_ICONS}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const shareds = {
|
|
4
|
+
blCommonKey: "BL_COMMON_LOCAL", // 公共localstorge存储
|
|
5
|
+
getCommonLocal: (key) => {
|
|
6
|
+
let localData = localStorage.getItem(shareds.blCommonKey);
|
|
7
|
+
if (localData) {
|
|
8
|
+
localData = JSON.parse(localData);
|
|
9
|
+
}
|
|
10
|
+
return key && localData ? localData[key] : null;
|
|
11
|
+
},
|
|
12
|
+
/**
|
|
13
|
+
数值相加或减少计算精度的问题
|
|
14
|
+
*/
|
|
15
|
+
countSum: (arr) => {
|
|
16
|
+
if (!arr.length) return 0;
|
|
17
|
+
arr = arr.map((v) => {
|
|
18
|
+
if (v && !Number.isNaN(Number(v))) return Math.round(v * 100);
|
|
19
|
+
return 0;
|
|
20
|
+
});
|
|
21
|
+
const result = arr.reduce((prev, curr) => {
|
|
22
|
+
return prev + curr;
|
|
23
|
+
}, 0);
|
|
24
|
+
return result / 100;
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export default shareds;
|