bri-components 1.3.21 → 1.3.22
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
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
filter: undefined,
|
|
125
125
|
sortBy: undefined,
|
|
126
126
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
127
|
-
column = this
|
|
127
|
+
column = this.$transformFieldProperty(column, row, this.parentObj);
|
|
128
128
|
column = this.resetCol(column, row);
|
|
129
129
|
const unitCanEdit = this.getUnitCanEdit(column, row);
|
|
130
130
|
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
];
|
|
183
183
|
},
|
|
184
184
|
renderHeaderCell: ({ column }, h) => {
|
|
185
|
-
column = this
|
|
185
|
+
column = this.$transformFieldProperty(column, undefined, this.parentObj);
|
|
186
186
|
|
|
187
187
|
return this.$getHeadRender(h, column, {
|
|
188
188
|
showRequired: this.showRequired,
|
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
// isShare: this.isShare,
|
|
303
303
|
_heightAuto: this.heightAuto
|
|
304
304
|
};
|
|
305
|
+
},
|
|
306
|
+
getUnitCanEdit (col, row) {
|
|
307
|
+
return this.getRowCanEdit(row) &&
|
|
308
|
+
this.getColCanEdit(col, row) &&
|
|
309
|
+
this.$isAdvRelyShow(col, row, this.parentObj, true);
|
|
305
310
|
}
|
|
306
311
|
}
|
|
307
312
|
};
|
|
@@ -115,11 +115,7 @@ export default {
|
|
|
115
115
|
},
|
|
116
116
|
|
|
117
117
|
filterColumns () {
|
|
118
|
-
return this.columns.filter(
|
|
119
|
-
col._isRelyByParent
|
|
120
|
-
? this.$isAdvRelyShow(col, this.parentObj, true, true, this.listData)
|
|
121
|
-
: !["hide"].includes(col._displayType)
|
|
122
|
-
);
|
|
118
|
+
return this.columns.filter(column => this.$isAdvRelyShow(column, undefined, this.parentObj, true));
|
|
123
119
|
},
|
|
124
120
|
selfRowDefault () {
|
|
125
121
|
return this.$filterObj(this.filterColumns, this.rowDefault);
|
|
@@ -142,9 +138,9 @@ export default {
|
|
|
142
138
|
this.showRuleMessage = true;
|
|
143
139
|
|
|
144
140
|
return this.listData.every(row =>
|
|
145
|
-
this.filterColumns.every(
|
|
146
|
-
|
|
147
|
-
return this.getRuleResult(
|
|
141
|
+
this.filterColumns.every(column => {
|
|
142
|
+
column = this.$transformFieldProperty(column, row, this.parentObj);
|
|
143
|
+
return this.getRuleResult(column, row).bool;
|
|
148
144
|
})
|
|
149
145
|
);
|
|
150
146
|
},
|
|
@@ -176,20 +172,12 @@ export default {
|
|
|
176
172
|
},
|
|
177
173
|
|
|
178
174
|
/* --------------- 工具方法 ------------- */
|
|
179
|
-
transformCol (col, row) {
|
|
180
|
-
return this.$transformFieldProperty(col, col._isRuleByParent ? this.parentObj : row);
|
|
181
|
-
},
|
|
182
|
-
getUnitCanEdit (col, row) {
|
|
183
|
-
return this.getRowCanEdit(row) && this.getColCanEdit(col, row);
|
|
184
|
-
},
|
|
185
175
|
getRowCanEdit (row) {
|
|
186
176
|
return this.canEdit && // 是否是编辑状态
|
|
187
|
-
// (!this.disabledOldDataRow || !!this.createRowMap[row._id]) && // 是否让老数据行置灰
|
|
188
177
|
(!this.disabledOldDataRow || !!row.__isCreate__); // 是否让老数据行置灰
|
|
189
178
|
},
|
|
190
179
|
getColCanEdit (col, row) {
|
|
191
|
-
return (!col.dependRowCanEdit || row.canEdit !== false)
|
|
192
|
-
(col._isRelyByParent ? true : this.$isAdvRelyShow(col, row, true)); // 在老数据行里某些列不可编辑; // 在老数据行里某些列不可编辑
|
|
180
|
+
return (!col.dependRowCanEdit || row.canEdit !== false);// 在老数据行里某些列不可编辑
|
|
193
181
|
},
|
|
194
182
|
isShowCompare (col, row, oldRow = {}) {
|
|
195
183
|
return this.useCampare && ["number"].includes(col._type) &&
|