bri-components 1.3.22 → 1.3.23
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
|
@@ -167,10 +167,10 @@
|
|
|
167
167
|
></dsh-list-unit>
|
|
168
168
|
|
|
169
169
|
<span
|
|
170
|
-
v-if="!
|
|
170
|
+
v-if="!getColRuleResult(col, row[col.nodeKey], rowIndex).bool"
|
|
171
171
|
class="bri-table-td-tip"
|
|
172
172
|
>
|
|
173
|
-
{{
|
|
173
|
+
{{ getColRuleResult(col, row[col.nodeKey], rowIndex).message }}
|
|
174
174
|
</span>
|
|
175
175
|
</td>
|
|
176
176
|
</template>
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
|
|
448
448
|
const subColumns = this.columns.filter(col => col.colType === "data");
|
|
449
449
|
return this.rows.every((row, rowIndex) =>
|
|
450
|
-
subColumns.every(col => this.
|
|
450
|
+
subColumns.every(col => this.getColRuleResult(col, row[col.nodeKey], rowIndex, true).bool)
|
|
451
451
|
);
|
|
452
452
|
},
|
|
453
453
|
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
this.$set(this.ruleRecordMap, `${row._id}dsh${col._key}`, { showRuleMessage: true });
|
|
573
573
|
},
|
|
574
574
|
// 是否显示 单元格校验提示文字
|
|
575
|
-
|
|
575
|
+
getColRuleResult (col, row, rowIndex, showRuleMessage = this.showRuleMessage) {
|
|
576
576
|
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || showRuleMessage) {
|
|
577
577
|
return this.$getFieldRuleResult({
|
|
578
578
|
...col,
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
return {
|
|
61
61
|
maxHeight: this.contentHeight,
|
|
62
62
|
cellStyleOption: {
|
|
63
|
-
bodyCellClass: ({rowIndex}) => {
|
|
63
|
+
bodyCellClass: ({row, column, rowIndex}) => {
|
|
64
64
|
return `bri-table-td ${this.canEdit ? "bri-table-td-edit" : "bri-table-td-show"}`;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -174,10 +174,10 @@
|
|
|
174
174
|
}
|
|
175
175
|
}),
|
|
176
176
|
|
|
177
|
-
!this.
|
|
177
|
+
!this.getColRuleResult(column, row).bool
|
|
178
178
|
? h("span", {
|
|
179
179
|
class: "bri-table-td-tip"
|
|
180
|
-
}, this.
|
|
180
|
+
}, this.getColRuleResult(column, row).message)
|
|
181
181
|
: undefined
|
|
182
182
|
];
|
|
183
183
|
},
|
|
@@ -115,7 +115,7 @@ export default {
|
|
|
115
115
|
},
|
|
116
116
|
|
|
117
117
|
filterColumns () {
|
|
118
|
-
return this.columns.filter(
|
|
118
|
+
return this.columns.filter(col => this.$isAdvRelyShow(col, this.listData, this.parentObj, true));
|
|
119
119
|
},
|
|
120
120
|
selfRowDefault () {
|
|
121
121
|
return this.$filterObj(this.filterColumns, this.rowDefault);
|
|
@@ -137,15 +137,15 @@ export default {
|
|
|
137
137
|
validate () {
|
|
138
138
|
this.showRuleMessage = true;
|
|
139
139
|
|
|
140
|
-
return this.listData.every(row =>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
140
|
+
return this.listData.every(row => this.getRowRuleResult(row));
|
|
141
|
+
},
|
|
142
|
+
// 整行校验结果
|
|
143
|
+
getRowRuleResult (row) {
|
|
144
|
+
return this.filterColumns.every(column => this.getColRuleResult(column, row).bool);
|
|
145
|
+
},
|
|
146
|
+
// 单元格校验结果
|
|
147
|
+
getColRuleResult (col, row) {
|
|
148
|
+
col = this.$transformFieldProperty(col, row, this.parentObj);
|
|
149
149
|
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || this.showRuleMessage) {
|
|
150
150
|
return this.$getFieldRuleResult(col, row);
|
|
151
151
|
} else {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
.dsh-title {
|
|
2
|
-
padding: 10px;
|
|
3
|
-
text-align: center;
|
|
4
|
-
font-size: 16px;
|
|
5
|
-
font-weight: 600;
|
|
6
|
-
color: @textColor;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
#dsh-nodata {
|
|
10
2
|
width: 100%;
|
|
11
3
|
margin: auto;
|
|
@@ -34,6 +26,16 @@
|
|
|
34
26
|
color: @placeholderColor;
|
|
35
27
|
}
|
|
36
28
|
|
|
29
|
+
.dsh-title {
|
|
30
|
+
padding: 10px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
color: @textColor;
|
|
35
|
+
}
|
|
36
|
+
.dsh-hide {
|
|
37
|
+
display: none;;
|
|
38
|
+
}
|
|
37
39
|
.dsh-subtip {
|
|
38
40
|
width: 100%;
|
|
39
41
|
text-align: center;
|