bri-components 1.3.49 → 1.3.51
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
|
@@ -291,8 +291,8 @@
|
|
|
291
291
|
this.change();
|
|
292
292
|
},
|
|
293
293
|
getOptions (index) {
|
|
294
|
-
const
|
|
295
|
-
const
|
|
294
|
+
const compareDateStr = this[`val${index === 0 ? 1 : 0}`];
|
|
295
|
+
const compareOperator = index === 0 ? "ltAet" : "gtAet";
|
|
296
296
|
|
|
297
297
|
return {
|
|
298
298
|
shortcuts: this.useShortcuts
|
|
@@ -304,16 +304,12 @@
|
|
|
304
304
|
}))
|
|
305
305
|
: [],
|
|
306
306
|
disabledDate: (date) => {
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
const curDateStr = this.$transformDate(date, "/", this.subType);
|
|
308
|
+
|
|
309
|
+
return compareDateStr
|
|
310
|
+
? this.isDynDateKey(compareDateStr)
|
|
309
311
|
? true
|
|
310
|
-
: !this.$isComparedAccord(
|
|
311
|
-
...this.selfPropsObj,
|
|
312
|
-
_type: "date"
|
|
313
|
-
}, {
|
|
314
|
-
...this.selfPropsObj,
|
|
315
|
-
_type: "date"
|
|
316
|
-
}, date, val, config).bool
|
|
312
|
+
: !this.$isComparedAccord(curDateStr, compareDateStr, compareOperator, "date", this.subType, this.subType).bool
|
|
317
313
|
: false;
|
|
318
314
|
}
|
|
319
315
|
};
|
|
@@ -27,12 +27,12 @@ export default {
|
|
|
27
27
|
this.data.forEach(item => {
|
|
28
28
|
!item._id && this.$set(item, "_id", this.$ObjectID().str);
|
|
29
29
|
|
|
30
|
-
if (
|
|
30
|
+
if (this.initFlag) {
|
|
31
31
|
item.__old__ = true; // 标记老数据(initFlag不用在data中声明)
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
this.initFlag =
|
|
35
|
+
this.initFlag = false;
|
|
36
36
|
return this.data;
|
|
37
37
|
},
|
|
38
38
|
footerData () {
|
|
@@ -362,7 +362,7 @@ export default {
|
|
|
362
362
|
filter: undefined,
|
|
363
363
|
sortBy: undefined,
|
|
364
364
|
renderBodyCell: ({ column, row, rowIndex }, h) => {
|
|
365
|
-
column = this.$
|
|
365
|
+
column = this.$transformDynamicProperty(column, row, this.parentObj);
|
|
366
366
|
column = this.resetCol(column, row);
|
|
367
367
|
const unitCanEdit = this.getUnitCanEdit(column, row);
|
|
368
368
|
|
|
@@ -425,7 +425,7 @@ export default {
|
|
|
425
425
|
];
|
|
426
426
|
},
|
|
427
427
|
renderHeaderCell: ({ column }, h) => {
|
|
428
|
-
column = this.$
|
|
428
|
+
column = this.$transformDynamicProperty(column, undefined, this.parentObj);
|
|
429
429
|
|
|
430
430
|
return this.$getHeadRender(h, column, {
|
|
431
431
|
showRequired: this.showRequired,
|
|
@@ -686,7 +686,7 @@ export default {
|
|
|
686
686
|
},
|
|
687
687
|
// 单元格校验结果
|
|
688
688
|
getColRuleResult (col, row, rowIndex) {
|
|
689
|
-
col = this.$
|
|
689
|
+
col = this.$transformDynamicProperty(col, row, this.parentObj);
|
|
690
690
|
|
|
691
691
|
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || this.showRuleMessage) {
|
|
692
692
|
return this.$getFieldRuleResult(col, row);
|
|
@@ -699,8 +699,8 @@ export default {
|
|
|
699
699
|
// 行按钮是否可编辑(删除按钮可编辑 不代表行内容是可编辑的)
|
|
700
700
|
getRowBtnCanEdit (row) {
|
|
701
701
|
return this.canEdit && // 是编辑状态
|
|
702
|
-
(this.disabledOldDataRow ?
|
|
703
|
-
|
|
702
|
+
(this.disabledOldDataRow ? row.__old__ !== true : true) && // 老数据行不置灰/置灰时是新增数据
|
|
703
|
+
row.__readonly__ !== true; // 不能为只读数据
|
|
704
704
|
},
|
|
705
705
|
// 行内容是否可编辑
|
|
706
706
|
getRowCanEdit (row) {
|
|
@@ -727,11 +727,11 @@ export default {
|
|
|
727
727
|
)
|
|
728
728
|
: true
|
|
729
729
|
) &&
|
|
730
|
-
(col._oldReadonly ?
|
|
731
|
-
(row.__isQuote__ ? this.quoteDataCanEdit : true) && // 引用过来的数据是否可编辑
|
|
730
|
+
(col._oldReadonly ? row.__old__ !== true : true) && // 老数据行里某些列不可编辑
|
|
731
|
+
(row.__isQuote__ ? this.quoteDataCanEdit === true : true) && // 引用过来的数据是否可编辑
|
|
732
732
|
col._enterType !== "calculate" && // 计算的不可编辑
|
|
733
733
|
col._readonly !== true && // 不能为只读
|
|
734
|
-
col.canEdit;
|
|
734
|
+
col.canEdit !== false; // 字段本身编辑权限 考虑为undefined时候
|
|
735
735
|
},
|
|
736
736
|
// 单元格最终编辑状态
|
|
737
737
|
getUnitCanEdit (col, row) {
|