bri-components 1.3.18 → 1.3.19

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.18",
3
+ "version": "1.3.19",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -70,7 +70,7 @@ const pathMap = {
70
70
  selectDepartments: "./senior/selectDepartments.vue",
71
71
  BriLabels: "./senior/BriLabels.vue",
72
72
  DshPackage: "./senior/DshPackage.vue",
73
- flatTable: "./senior/flatTable.vue",
73
+ flatTable: "./senior/flatTable/flatTable.vue",
74
74
  cascaderTable: "./senior/cascaderTable"
75
75
  },
76
76
  special: {
@@ -88,9 +88,9 @@
88
88
  </template>
89
89
 
90
90
  <script>
91
- import controlMixin from "../mixins/controlMixin.js";
92
- import DshBtnModal from "../../small/DshBtnModal.vue";
93
- import BriFlatTable from "../../list/BriFlatTable.vue";
91
+ import controlMixin from "../../mixins/controlMixin.js";
92
+ import DshBtnModal from "../../../small/DshBtnModal.vue";
93
+ import BriFlatTable from "../../../list/BriFlatTable.vue";
94
94
  import flatTableImportModal from "./flatTableImportModal.vue";
95
95
 
96
96
  export default {
@@ -181,11 +181,11 @@
181
181
  return !!this.oldListData.length;
182
182
  },
183
183
  filterColumns () {
184
- return this.columns.filter(column => {
185
- return column._isRelyParent
186
- ? this.$isFormItemShow(column, this.parentObj, true)
187
- : !["hide"].includes(column._displayType);
188
- });
184
+ return this.columns.filter(column =>
185
+ column._isRelyByParent
186
+ ? this.$isAdvRelyShow(column, this.parentObj, true, true, this.listData)
187
+ : !["hide"].includes(column._displayType)
188
+ );
189
189
  },
190
190
  showColumns () {
191
191
  const operationList = this.$getOperationList(["delete"]);
@@ -226,7 +226,7 @@
226
226
  filter: undefined,
227
227
  sortBy: undefined,
228
228
  renderBodyCell: ({ row, column, rowIndex }, h) => {
229
- column = this.$transformFieldProperty(column, row);
229
+ column = this.$transformFieldProperty(column, column._isRuleByParent ? this.parentObj : row);
230
230
 
231
231
  return [
232
232
  this.isShowCompare(column, row, this.oldListData[rowIndex])
@@ -371,7 +371,7 @@
371
371
 
372
372
  return this.listData.every(row =>
373
373
  this.filterColumns.every(column => {
374
- column = this.$transformFieldProperty(column, row);
374
+ column = this.$transformFieldProperty(column, column._isRuleByParent ? this.parentObj : row);
375
375
  return this.getRuleResult(column, row).bool;
376
376
  })
377
377
  );
@@ -432,7 +432,7 @@
432
432
  ...(resetMap[col._type] || {}),
433
433
  isShare: this.isShare,
434
434
  _heightAuto: this.heightAuto
435
- // canEdit: this.$isAdvRelyShow(col, row, true)
435
+ // canEdit: col._isRelyByParent ? true : this.$isAdvRelyShow(col, row, true)
436
436
  };
437
437
  },
438
438
  getUnitCanEdit (col, row) {
@@ -440,7 +440,7 @@
440
440
  // (!this.disabledOldDataRow || !!this.createRowMap[row._id]) && // 是否让老数据行置灰
441
441
  (!this.disabledOldDataRow || !!row.__isCreate__) && // 是否让老数据行置灰
442
442
  (!col.dependRowCanEdit || row.canEdit !== false) &&
443
- this.$isAdvRelyShow(col, row, true); // 在老数据行里某些列不可编辑; // 在老数据行里某些列不可编辑
443
+ (col._isRelyByParent ? true : this.$isAdvRelyShow(col, row, true)); // 在老数据行里某些列不可编辑; // 在老数据行里某些列不可编辑
444
444
  },
445
445
  isShowCompare (col, row, oldRow = {}) {
446
446
  return this.useCampare && ["number"].includes(col._type) &&