bri-components 1.3.4 → 1.3.6
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": "bri-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ali-oss": "^6.13.1",
|
|
34
34
|
"axios": "^0.23.0",
|
|
35
|
-
"bri-datas": "^1.
|
|
35
|
+
"bri-datas": "^1.1.27",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -248,41 +248,30 @@
|
|
|
248
248
|
.BriUpload {
|
|
249
249
|
width: 100%;
|
|
250
250
|
height: 100%;
|
|
251
|
-
position: relative;
|
|
252
|
-
overflow: hidden;
|
|
253
251
|
border: 1px solid @borderColor;
|
|
254
252
|
border-radius: @borderRadius;
|
|
255
253
|
background-color: @white;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
position: relative;
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
&-
|
|
259
|
-
|
|
257
|
+
&-old,
|
|
258
|
+
&-new,
|
|
259
|
+
&-inline {
|
|
260
260
|
display: flex;
|
|
261
261
|
|
|
262
262
|
&-wrapper {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
border-radius: 0px;
|
|
267
|
-
border: none;
|
|
263
|
+
border: none!important;
|
|
264
|
+
border-radius: 0px !important;
|
|
265
|
+
|
|
268
266
|
&:hover {
|
|
269
|
-
border: none
|
|
267
|
+
border: none;
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
270
|
|
|
273
271
|
&-add {
|
|
274
272
|
.dsh-flex-col-center-center();
|
|
275
|
-
width: 120px;
|
|
276
|
-
height: 120px;
|
|
277
|
-
position: relative;
|
|
278
|
-
border: 1px @borderColor dashed;
|
|
279
|
-
color: @themeColor;
|
|
280
|
-
border-radius: @borderRadius;
|
|
281
273
|
cursor: pointer;
|
|
282
|
-
|
|
283
|
-
border-color: @themeColor;
|
|
284
|
-
background-color: @theme-focus;
|
|
285
|
-
}
|
|
274
|
+
position: relative;
|
|
286
275
|
}
|
|
287
276
|
|
|
288
277
|
&-circle {
|
|
@@ -292,11 +281,38 @@
|
|
|
292
281
|
bottom: 0;
|
|
293
282
|
right: 0;
|
|
294
283
|
margin: auto;
|
|
295
|
-
width: 50px !important;
|
|
296
|
-
height: 50px !important;
|
|
297
284
|
border-radius: 50%;
|
|
298
|
-
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&-old {
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
|
|
291
|
+
&-wrapper {
|
|
292
|
+
min-width: 120px;
|
|
293
|
+
height: 100%;
|
|
294
|
+
margin: 16px 0px 16px 16px;
|
|
295
|
+
}
|
|
299
296
|
|
|
297
|
+
&-add {
|
|
298
|
+
width: 120px;
|
|
299
|
+
height: 120px;
|
|
300
|
+
border: 1px @borderColor dashed;
|
|
301
|
+
border-radius: @borderRadius;
|
|
302
|
+
color: @themeColor;
|
|
303
|
+
|
|
304
|
+
&:hover {
|
|
305
|
+
border-color: @themeColor;
|
|
306
|
+
background-color: @theme-focus;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
&-circle {
|
|
311
|
+
width: 50px!important;
|
|
312
|
+
height: 50px!important;
|
|
313
|
+
background-color: @inputBg-readonly;
|
|
314
|
+
color: @themeColor;
|
|
315
|
+
|
|
300
316
|
i {
|
|
301
317
|
color: @scuess-color;
|
|
302
318
|
font-size: 40px;
|
|
@@ -306,27 +322,20 @@
|
|
|
306
322
|
|
|
307
323
|
&-new,
|
|
308
324
|
&-inline {
|
|
309
|
-
display: flex;
|
|
310
|
-
|
|
311
325
|
&-wrapper {
|
|
312
326
|
min-width: 30px;
|
|
313
|
-
background-color: @border-readonly;
|
|
314
327
|
height: 30px;
|
|
315
328
|
line-height: 30px;
|
|
316
|
-
|
|
317
|
-
border-radius: 0px !important;
|
|
318
|
-
&:hover {
|
|
319
|
-
border: none
|
|
320
|
-
}
|
|
329
|
+
background-color: @border-readonly;
|
|
321
330
|
}
|
|
322
331
|
|
|
323
332
|
&-add {
|
|
324
|
-
.dsh-flex-row-center-center();
|
|
325
333
|
height: 30px;
|
|
326
|
-
background-color: @btn-hover;
|
|
327
|
-
color: @textColor;
|
|
328
334
|
border: none;
|
|
329
335
|
border-radius: 0px;
|
|
336
|
+
background-color: @btn-hover;
|
|
337
|
+
color: @textColor;
|
|
338
|
+
|
|
330
339
|
&:hover {
|
|
331
340
|
color: @themeColor;
|
|
332
341
|
background-color: @theme-focus;
|
|
@@ -334,15 +343,10 @@
|
|
|
334
343
|
}
|
|
335
344
|
|
|
336
345
|
&-circle {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
left: 50%;
|
|
340
|
-
width: 24px !important;
|
|
341
|
-
height: 24px !important;
|
|
342
|
-
margin-top: -12px;
|
|
343
|
-
margin-left: -12px;
|
|
346
|
+
width: 24px!important;
|
|
347
|
+
height: 24px!important;
|
|
344
348
|
background-color: #f4f5fa;
|
|
345
|
-
|
|
349
|
+
|
|
346
350
|
i {
|
|
347
351
|
color: @scuess-color;
|
|
348
352
|
font-size: 24px;
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
? userIndustryData
|
|
74
74
|
: this.selfPropsObj._data;
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
cascaderAllData () {
|
|
77
77
|
const loop = (arr = [], level, parentKeys = [], filterVals = [], isMobile = false) => {
|
|
78
78
|
if (filterVals.length) {
|
|
79
79
|
arr = arr.filter(item =>
|
|
@@ -115,6 +115,26 @@ export default {
|
|
|
115
115
|
|
|
116
116
|
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals, this.isMobile);
|
|
117
117
|
},
|
|
118
|
+
cascaderData () {
|
|
119
|
+
const loop = (arr = []) => {
|
|
120
|
+
return arr
|
|
121
|
+
? arr.reduce((arr, item) => {
|
|
122
|
+
if (item.rm !== 1) {
|
|
123
|
+
if (item.children && item.children.length) {
|
|
124
|
+
item.children = loop(item.children);
|
|
125
|
+
} else {
|
|
126
|
+
item.children = this.isMobile ? undefined : [];
|
|
127
|
+
}
|
|
128
|
+
arr.push(item);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return arr;
|
|
132
|
+
}, [])
|
|
133
|
+
: [];
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return loop(this.cascaderAllData);
|
|
137
|
+
},
|
|
118
138
|
|
|
119
139
|
curValObj () {
|
|
120
140
|
return this.getItemObj(this.curValList);
|
|
@@ -180,7 +200,7 @@ export default {
|
|
|
180
200
|
|
|
181
201
|
/* --------- 工具类 -------- */
|
|
182
202
|
getItemObj (val) {
|
|
183
|
-
const objArr = this.$getTreeLinealDatas(val, this.
|
|
203
|
+
const objArr = this.$getTreeLinealDatas(val, this.cascaderAllData, undefined, this.saveKey);
|
|
184
204
|
|
|
185
205
|
return !this.$isEmptyData(val)
|
|
186
206
|
? objArr.length
|
|
@@ -215,7 +235,7 @@ export default {
|
|
|
215
235
|
},
|
|
216
236
|
// 转化出级联全名
|
|
217
237
|
transformFullName (val) {
|
|
218
|
-
return this.renderFormat(this.$getTreeLinealDatas(val, this.
|
|
238
|
+
return this.renderFormat(this.$getTreeLinealDatas(val, this.cascaderAllData, this.nameKey, this.saveKey));
|
|
219
239
|
}
|
|
220
240
|
}
|
|
221
241
|
};
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
this.showRuleMessage = true;
|
|
363
363
|
|
|
364
364
|
return this.listData.every(dataItem =>
|
|
365
|
-
this.filterColumns.every(col => this.getRuleResult(col, dataItem
|
|
365
|
+
this.filterColumns.every(col => this.getRuleResult(col, dataItem).bool)
|
|
366
366
|
);
|
|
367
367
|
},
|
|
368
368
|
// 点击 -添加行
|
|
@@ -435,8 +435,8 @@
|
|
|
435
435
|
row[col._key] !== oldRow[col._key];
|
|
436
436
|
},
|
|
437
437
|
// 是否显示 单元格校验提示文字
|
|
438
|
-
getRuleResult (col, row
|
|
439
|
-
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || showRuleMessage) {
|
|
438
|
+
getRuleResult (col, row) {
|
|
439
|
+
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || this.showRuleMessage) {
|
|
440
440
|
return this.$getFieldRuleResult(col, row);
|
|
441
441
|
} else {
|
|
442
442
|
return {
|
package/src/utils/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* -------------------- 表格 -------------- */
|
|
2
2
|
// 转化表单字段属性 to 表格参数, 是否需要过滤tag
|
|
3
3
|
const transformToColumns = function (form, {
|
|
4
|
-
|
|
4
|
+
headFilter = false
|
|
5
5
|
} = {}) {
|
|
6
6
|
return form
|
|
7
7
|
.map(col => {
|
|
@@ -14,7 +14,7 @@ const transformToColumns = function (form, {
|
|
|
14
14
|
align: col._align || typeData.align,
|
|
15
15
|
fixed: col._fixed,
|
|
16
16
|
width: col._width || typeData.width,
|
|
17
|
-
sortBy:
|
|
17
|
+
sortBy: headFilter ? col._sortBy || typeData.sortBy : undefined,
|
|
18
18
|
renderHeaderCell: ({ row, column }, h) => {
|
|
19
19
|
return h("div", {
|
|
20
20
|
class: { "bri-table-ellipsis": column.sortBy != undefined || column.filter || column.filterCustom },
|
|
@@ -57,9 +57,9 @@ const transformToColumns = function (form, {
|
|
|
57
57
|
: {}
|
|
58
58
|
),
|
|
59
59
|
...(
|
|
60
|
-
["select", "checkbox"].includes(col._type)
|
|
60
|
+
["select", "checkbox"].includes(col._type) && col._hideHeadFilter !== true
|
|
61
61
|
? {
|
|
62
|
-
filter:
|
|
62
|
+
filter: headFilter ? {
|
|
63
63
|
isMultiple: true,
|
|
64
64
|
maxHeight: 250,
|
|
65
65
|
filterList: (
|
|
@@ -70,12 +70,12 @@ const transformToColumns = function (form, {
|
|
|
70
70
|
: col._selectFilterVals.includes(item._key)
|
|
71
71
|
)
|
|
72
72
|
: col._data
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
).map(item => ({
|
|
74
|
+
...item,
|
|
75
|
+
value: item._key,
|
|
76
|
+
label: item.name,
|
|
77
|
+
selected: false
|
|
78
|
+
})),
|
|
79
79
|
filterConfirm: (filterList) => {
|
|
80
80
|
let conditionItem = {
|
|
81
81
|
logic: "field",
|