bri-components 1.2.101 → 1.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 +1 -1
- package/src/components/controls/base/BriUpload/BriUpload.vue +2 -2
- package/src/components/controls/senior/cascaderTable.vue +5 -1
- package/src/components/form/DshForm.vue +6 -2
- package/src/components/list/BriFlatTable.vue +12 -6
- package/src/components/list/DshCascaderTable.vue +33 -26
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
customIcon: 'bico-Cascadetable'
|
|
10
10
|
}]"></dsh-icons>
|
|
11
11
|
<span class="cascaderTable-unit-text">
|
|
12
|
-
{{
|
|
12
|
+
{{ showVal }}
|
|
13
13
|
</span>
|
|
14
14
|
</span>
|
|
15
15
|
|
|
@@ -131,6 +131,10 @@
|
|
|
131
131
|
showSlotClose: false,
|
|
132
132
|
closable: true
|
|
133
133
|
};
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
showVal () {
|
|
137
|
+
return `${this.curVal ? this.$getTreeLeafTotal(this.curVal.tree) : 0} 行`;
|
|
134
138
|
}
|
|
135
139
|
},
|
|
136
140
|
created () {},
|
|
@@ -170,8 +170,11 @@
|
|
|
170
170
|
"users", "departments", "labels", "flatTable", "reference", "referenceBy"
|
|
171
171
|
],
|
|
172
172
|
ignoreProperties: [
|
|
173
|
-
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
173
|
+
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable", "",
|
|
174
174
|
"_disabledBtns", "_disabledOldDataRow"
|
|
175
|
+
],
|
|
176
|
+
subIgnoreProperties: [
|
|
177
|
+
"_regStr", "_regMessage"
|
|
175
178
|
]
|
|
176
179
|
};
|
|
177
180
|
},
|
|
@@ -304,7 +307,8 @@
|
|
|
304
307
|
_displayType: "show",
|
|
305
308
|
canEdit: true
|
|
306
309
|
}).forEach(arr => {
|
|
307
|
-
!this.ignoreProperties.includes(arr[0]) && this
|
|
310
|
+
!this.ignoreProperties.includes(arr[0]) && (formData.__parentKey__ ? !this.subIgnoreProperties.includes(arr[0]) : true) &&
|
|
311
|
+
this.$set(formItem, arr[0], arr[1]);
|
|
308
312
|
});
|
|
309
313
|
}
|
|
310
314
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<div class="BriFlatTable">
|
|
3
3
|
<bri-table
|
|
4
4
|
class="BriFlatTable-main"
|
|
5
|
-
:propsObj="tablePropsObj"
|
|
6
5
|
:columns="showColumns"
|
|
7
6
|
:data="listData"
|
|
8
7
|
:footer-data="footerData"
|
|
8
|
+
:propsObj="tablePropsObj"
|
|
9
9
|
@changeSelect="changeSelect"
|
|
10
10
|
@selectAll="changeSelect"
|
|
11
11
|
></bri-table>
|
|
@@ -81,11 +81,6 @@
|
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
83
|
computed: {
|
|
84
|
-
tablePropsObj () {
|
|
85
|
-
return {
|
|
86
|
-
maxHeight: this.contentHeight
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
84
|
listData () {
|
|
90
85
|
this.data.forEach(item => {
|
|
91
86
|
!item._id && this.$set(item, "_id", this.$ObjectID().str);
|
|
@@ -108,6 +103,11 @@
|
|
|
108
103
|
return this.oldData;
|
|
109
104
|
},
|
|
110
105
|
|
|
106
|
+
tablePropsObj () {
|
|
107
|
+
return {
|
|
108
|
+
maxHeight: this.contentHeight
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
111
|
selfPropsObj () {
|
|
112
112
|
return {
|
|
113
113
|
isShare: false, // 是否是分享页在用
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
_disabledBtns: false, // 禁用增删按钮
|
|
120
120
|
_disabledCreateBtn: false, // 置灰新增按钮,目前只内部使用,comp_web数据表配置页那块
|
|
121
121
|
_disabledOldDataRow: false, // 置灰老数据行包含删除
|
|
122
|
+
_heightAuto: false, // 单元格内容高度自适应
|
|
122
123
|
|
|
123
124
|
...this.propsObj
|
|
124
125
|
};
|
|
@@ -147,6 +148,10 @@
|
|
|
147
148
|
disabledOldDataRow () {
|
|
148
149
|
return this.selfPropsObj._disabledOldDataRow;
|
|
149
150
|
},
|
|
151
|
+
heightAuto () {
|
|
152
|
+
return this.selfPropsObj._heightAuto;
|
|
153
|
+
},
|
|
154
|
+
|
|
150
155
|
useCampare () {
|
|
151
156
|
return !!this.oldListData.length;
|
|
152
157
|
},
|
|
@@ -414,6 +419,7 @@
|
|
|
414
419
|
return {
|
|
415
420
|
...col,
|
|
416
421
|
...(resetMap[col._type] || {}),
|
|
422
|
+
_heightAuto: this.heightAuto,
|
|
417
423
|
isShare: this.isShare
|
|
418
424
|
};
|
|
419
425
|
},
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
:formData="row[col.nodeKey]"
|
|
153
153
|
:formItem="{
|
|
154
154
|
...col,
|
|
155
|
-
_heightAuto:
|
|
155
|
+
_heightAuto: heightAuto
|
|
156
156
|
}"
|
|
157
157
|
@blur="controlBlur(null, col, row[col.nodeKey], arguments)"
|
|
158
158
|
@change="$dispatchEvent(operationMap.changeVal, col, row[col.nodeKey], arguments)"
|
|
@@ -338,29 +338,35 @@
|
|
|
338
338
|
};
|
|
339
339
|
},
|
|
340
340
|
computed: {
|
|
341
|
+
treeData () {
|
|
342
|
+
return this.transforBriTreeData();
|
|
343
|
+
},
|
|
344
|
+
rows () {
|
|
345
|
+
return this.transformRows();
|
|
346
|
+
},
|
|
347
|
+
// 供表格渲染行使用的columns的数组集合, 每一行columns不一样,组成二重数组
|
|
348
|
+
rowColumnsArr () {
|
|
349
|
+
return this.transformRowColumnsArr();
|
|
350
|
+
},
|
|
351
|
+
|
|
341
352
|
selfPropsObj () {
|
|
342
353
|
return {
|
|
343
354
|
_disabledBtns: false, // 禁用增删按钮
|
|
355
|
+
_heightAuto: false, // 单元格内容高度自适应
|
|
356
|
+
|
|
344
357
|
...this.propsObj
|
|
345
358
|
};
|
|
346
359
|
},
|
|
347
360
|
disabledBtns () {
|
|
348
361
|
return this.selfPropsObj._disabledBtns;
|
|
349
362
|
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return this.transforBriTreeData();
|
|
363
|
+
heightAuto () {
|
|
364
|
+
return this.selfPropsObj._heightAuto;
|
|
353
365
|
},
|
|
366
|
+
|
|
354
367
|
columns () {
|
|
355
368
|
return this.transformColumns(this.treeColumns);
|
|
356
369
|
},
|
|
357
|
-
rows () {
|
|
358
|
-
return this.transformRows();
|
|
359
|
-
},
|
|
360
|
-
// 供表格渲染行使用的columns的数组集合, 每一行columns不一样,组成二重数组
|
|
361
|
-
rowColumnsArr () {
|
|
362
|
-
return this.transformRowColumnsArr();
|
|
363
|
-
},
|
|
364
370
|
|
|
365
371
|
operationMap () {
|
|
366
372
|
return this.canEdit
|
|
@@ -540,20 +546,21 @@
|
|
|
540
546
|
// 是否显示 单元格校验提示文字
|
|
541
547
|
getRuleResult (col, row, rowIndex, showRuleMessage = this.showRuleMessage) {
|
|
542
548
|
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || showRuleMessage) {
|
|
543
|
-
|
|
544
|
-
col
|
|
545
|
-
|
|
546
|
-
.
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
.
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
549
|
+
return this.$getFieldRuleResult({
|
|
550
|
+
...col,
|
|
551
|
+
_regStr: col._regStr && [";", ";"].some(symbol => col._regStr.includes(symbol))
|
|
552
|
+
? col._regStr
|
|
553
|
+
.replace(/\n/g, "")
|
|
554
|
+
.split(";")
|
|
555
|
+
.reduce((arr, item) => arr.concat(item.split(";")), [])[rowIndex]
|
|
556
|
+
: col._regStr,
|
|
557
|
+
_regMessage: col._regMessage && [";", ";"].some(symbol => col._regMessage.includes(symbol))
|
|
558
|
+
? col._regMessage
|
|
559
|
+
.replace(/\n/g, "")
|
|
560
|
+
.split(";")
|
|
561
|
+
.reduce((arr, item) => arr.concat(item.split(";")), [])[rowIndex]
|
|
562
|
+
: col._regMessage
|
|
563
|
+
}, row);
|
|
557
564
|
} else {
|
|
558
565
|
return {
|
|
559
566
|
bool: true
|
|
@@ -890,7 +897,7 @@
|
|
|
890
897
|
width: 100%;
|
|
891
898
|
flex: 1;
|
|
892
899
|
min-height: 0px;
|
|
893
|
-
margin-top:
|
|
900
|
+
margin-top: 47px;
|
|
894
901
|
overflow: auto;
|
|
895
902
|
|
|
896
903
|
&-inner {}
|