bri-components 1.3.52 → 1.3.54

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.52",
3
+ "version": "1.3.54",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -135,7 +135,7 @@
135
135
  bool: true
136
136
  };
137
137
  if (this.isInTable && this.writeSort === "upToDown" && this.value.level !== 1) {
138
- const parentRow = this.parentListData.find(row =>
138
+ const parentRow = this.allListRows.find(row =>
139
139
  row.level === this.value.level - 1 && row.children.some(childNode => childNode._id === this.value._id)
140
140
  ) || {};
141
141
  const parentDateStr = parentRow[this.controlKey];
@@ -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/flatTable.vue",
73
+ flatTable: "./senior/flatTable.vue",
74
74
  cascaderTable: "./senior/cascaderTable"
75
75
  },
76
76
  special: {
@@ -25,13 +25,13 @@ export default {
25
25
  },
26
26
 
27
27
  /* 内部表,层级表内的字段用到的 */
28
- rowIndex: Number,
29
- parentListData: {
28
+ allListRows: {
30
29
  type: Array,
31
30
  default () {
32
31
  return [];
33
32
  }
34
33
  },
34
+ rowIndex: Number,
35
35
  parentFormList: {
36
36
  type: Array,
37
37
  default () {
@@ -15,7 +15,7 @@
15
15
 
16
16
  <template v-else>
17
17
  <!-- 配置端 设置默认值用-->
18
- <dsh-btn-modal v-if="propsObj._key === '_default'">
18
+ <dsh-btn-modal v-if="selfPropsObj._key === '_default'">
19
19
  <template>
20
20
  <dsh-tree-table
21
21
  v-if="showMode === 'treeTable'"
@@ -23,8 +23,8 @@
23
23
  :data="curVal.tree"
24
24
  :rowDefault="curVal.rowDefault"
25
25
  :columns="subForm"
26
- :propsObj="propsObj"
27
- :parentFormList="allFormList"
26
+ :propsObj="defaultPropsObj"
27
+ :allFormList="allFormList"
28
28
  :parentObj="value"
29
29
  @change="change"
30
30
  ></dsh-tree-table>
@@ -35,9 +35,8 @@
35
35
  :rowDefault="curVal.rowDefault"
36
36
  :columns="subForm"
37
37
  :data="curVal"
38
- :treeColumns="treeForm"
39
- :propsObj="propsObj"
40
- :parentFormList="allFormList"
38
+ :propsObj="defaultPropsObj"
39
+ :allFormList="allFormList"
41
40
  :parentObj="value"
42
41
  @change="change"
43
42
  ></dsh-cascader-table>
@@ -54,8 +53,8 @@
54
53
  :data="curVal.tree"
55
54
  :rowDefault="curVal.rowDefault"
56
55
  :columns="subForm"
57
- :propsObj="propsObj"
58
- :parentFormList="allFormList"
56
+ :propsObj="selfPropsObj"
57
+ :allFormList="allFormList"
59
58
  :parentObj="value"
60
59
  @change="change"
61
60
  ></dsh-tree-table>
@@ -69,8 +68,8 @@
69
68
  :columns="subForm"
70
69
  :data="curVal"
71
70
  :treeColumns="treeForm"
72
- :propsObj="propsObj"
73
- :parentFormList="allFormList"
71
+ :propsObj="selfPropsObj"
72
+ :allFormList="allFormList"
74
73
  :parentObj="value"
75
74
  @change="change"
76
75
  ></dsh-cascader-table>
@@ -108,17 +107,26 @@
108
107
  ...this.propsObj
109
108
  };
110
109
  },
110
+ defaultPropsObj () {
111
+ return {
112
+ ...this.selfPropsObj,
113
+ _tableAdvSearch: {
114
+ logic: "and",
115
+ conditions: []
116
+ }
117
+ };
118
+ },
111
119
  showMode () {
112
- return this.propsObj._showMode;
120
+ return this.selfPropsObj._showMode;
113
121
  },
114
122
  subForm () {
115
- return this.propsObj._subForm;
123
+ return this.selfPropsObj._subForm;
116
124
  },
117
125
  // 用户态的每条数据的表头配置,都是存的自己的,不用通用配置_treeForm的
118
126
  treeForm () {
119
127
  return this.curVal && this.curVal._treeForm
120
128
  ? this.curVal._treeForm
121
- : this.propsObj._treeForm;
129
+ : this.selfPropsObj._treeForm;
122
130
  },
123
131
 
124
132
  showVal () {
@@ -23,7 +23,7 @@
23
23
  :rowDefault="curVal.rowDefault"
24
24
  :columns="subForm"
25
25
  :propsObj="propsObj"
26
- :parentFormList="allFormList"
26
+ :allFormList="allFormList"
27
27
  :parentObj="value"
28
28
  @change="change"
29
29
  ></dsh-flat-table>
@@ -39,7 +39,7 @@
39
39
  :rowDefault="curVal.rowDefault"
40
40
  :columns="subForm"
41
41
  :propsObj="propsObj"
42
- :parentFormList="allFormList"
42
+ :allFormList="allFormList"
43
43
  :parentObj="value"
44
44
  @change="change"
45
45
  ></dsh-flat-table>
@@ -48,9 +48,9 @@
48
48
  </template>
49
49
 
50
50
  <script>
51
- import controlMixin from "../../mixins/controlMixin.js";
52
- import DshFlatTable from "../../../list/DshFlatTable.vue";
53
- import DshBtnModal from "../../../small/DshBtnModal.vue";
51
+ import controlMixin from "../mixins/controlMixin.js";
52
+ import DshFlatTable from "../../list/DshFlatTable.vue";
53
+ import DshBtnModal from "../../small/DshBtnModal.vue";
54
54
 
55
55
  export default {
56
56
  name: "flatTable",
@@ -65,14 +65,15 @@
65
65
  >
66
66
  <template v-if="!conditionItem.__isDelete__">
67
67
  <slot :conditionItem="conditionItem">
68
- <!-- 为空和不为空时 啥不显示 -->
68
+ <!-- 为空和不为空时 啥内容也不显示 -->
69
69
  <div
70
70
  v-if="['isnull', 'notnull', 'nosize', 'size', 'nolist', 'list'].includes(conditionItem.fieldOperator)"
71
71
  class="DshAdvSearch-conditions-item-blank"
72
72
  >请选择右上角条件</div>
73
73
 
74
- <!-- 子表的筛选,出现是有条件的,递归 -->
75
- <template v-else-if="['subSearch', 'subTableSearch'].includes(conditionItem.fieldOperator)">
74
+ <!-- 子表的筛选,递归 -->
75
+ <template v-else-if="['subSearch', 'subTableSearch', 'cascaderTableSearch', 'treeTableSearch'].includes(conditionItem.fieldOperator)">
76
+ <!-- 出现是有条件的 -->
76
77
  <dsh-adv-search
77
78
  v-if="conditionItem.finished === true"
78
79
  style="padding: 0px 0px 0px 8px;"
@@ -94,7 +95,7 @@
94
95
  >加载中……</div>
95
96
  </template>
96
97
 
97
- <!-- 其它条件 -->
98
+ <!-- 其他 -->
98
99
  <template v-else>
99
100
  <!-- 动态文本 -匹配的动态字段 -->
100
101
  <template v-if="conditionItem.parameterType === 'dynamicText'">
@@ -134,11 +135,15 @@
134
135
  slot="extra"
135
136
  class="DshAdvSearch-conditions-item-extra"
136
137
  >
137
- <!-- 动态or固定 参数类型 -->
138
+ <!-- 动态类型 or 固定类型 -->
138
139
  <dsh-dropdown
139
- v-if="conditionItem.dynamicList.length"
140
+ v-if="
141
+ conditionItem.dynamicList.length &&
142
+ !['isnull', 'notnull', 'nosize', 'size', 'nolist', 'list'].includes(conditionItem.fieldOperator) &&
143
+ !['subSearch', 'subTableSearch', 'cascaderTableSearch', 'treeTableSearch'].includes(conditionItem.fieldOperator)
144
+ "
140
145
  class="extra-dynamic"
141
- :list="['set'].includes(mode) && ['reference', 'flatTable'].includes(conditionItem.fieldType) ? [] : parameterPropsObj._data"
146
+ :list="getParameterData(conditionItem)"
142
147
  @click="$dispatchEvent(operationMap.selectParameterType, conditionItem, conditionIndex, advSearchObj.conditions, $event)"
143
148
  >
144
149
  <span class="extra-operator-wrap">
@@ -146,7 +151,7 @@
146
151
  {{ conditionItem.parameterTypeName }}
147
152
  </span>
148
153
  <Icon
149
- v-if="!(['set'].includes(mode) && ['reference', 'flatTable'].includes(conditionItem.fieldType))"
154
+ v-if="getParameterData(conditionItem).length"
150
155
  class="extra-operator-icon"
151
156
  type="ios-arrow-down"
152
157
  />
@@ -27,8 +27,8 @@
27
27
  :formData="formData"
28
28
  :formItem="formItem"
29
29
  :allFormList="allFormList"
30
+ :allListRows="allListRows"
30
31
  :rowIndex="rowIndex"
31
- :parentListData="parentListData"
32
32
  :parentFormList="parentFormList"
33
33
  :parentObj="parentObj"
34
34
  :changedFields="changedFields"
@@ -134,13 +134,14 @@
134
134
  }
135
135
  },
136
136
 
137
- rowIndex: Number,
138
- parentListData: {
137
+ /* 内部表,层级表内的字段用到的 */
138
+ allListRows: {
139
139
  type: Array,
140
140
  default () {
141
141
  return [];
142
142
  }
143
143
  },
144
+ rowIndex: Number,
144
145
  parentFormList: {
145
146
  type: Array,
146
147
  default () {
@@ -97,6 +97,13 @@ export default {
97
97
 
98
98
  this.change(operationItem.type, conditionItem);
99
99
  },
100
+ // 获取动态文本或固定文本类型 选项列表
101
+ getParameterData (conditionItem) {
102
+ // 配置端 且 含有子集的
103
+ return !!conditionItem.dynamicList.length && conditionItem.operators.some(operator => ["subSearch", "subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(operator._key))
104
+ ? []
105
+ : this.parameterPropsObj._data;
106
+ },
100
107
  // 选择某控件的动态文本或固定文本类型
101
108
  changeParameterType (operationItem, conditionItem, conditionIndex, list, optionItem) {
102
109
  conditionItem.parameterType = optionItem._key;
@@ -121,7 +128,7 @@ export default {
121
128
  logic: "and",
122
129
  conditions: []
123
130
  };
124
- } else if (["subSearch", "subTableSearch"].includes(conditionItem.fieldOperator)) {
131
+ } else if (["subSearch", "subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(conditionItem.fieldOperator)) {
125
132
  conditionItem.fieldParams = [];
126
133
  conditionItem.chainFieldKey = "";
127
134
  conditionItem.fieldValue = [];
@@ -161,9 +168,13 @@ export default {
161
168
 
162
169
  if (curFormItem) {
163
170
  const fieldType = curFormItem._type;
171
+ fieldKey = curFormItem._key;
172
+ const cascaderTableMode = curFormItem._showMode;
164
173
  const fieldData = this.fieldMap[fieldType];
165
174
 
166
- const dynamicTypes = this.useChainField ? [...new Set([...(fieldData.categoryTypes || []), fieldType])] : [fieldType];
175
+ const dynamicTypes = this.useChainField
176
+ ? [...new Set([...(fieldData.categoryTypes || []), fieldType])]
177
+ : [fieldType];
167
178
  let dynamicList = dynamicTypes.reduce((list, type) => list.concat(this.dynamicFieldsMap[type] || []), []);
168
179
  dynamicList = this.useChainField
169
180
  ? ["select", "checkbox", "cascader", "cascaders"].includes(fieldType)
@@ -172,32 +183,44 @@ export default {
172
183
  ? dynamicList.filter(dynamicItem => dynamicItem._ref === curFormItem._ref)
173
184
  : dynamicList
174
185
  : dynamicList;
175
- const parameterType = initContion.parameterType || (
176
- (initContion.fieldParams || []).length || initContion.chainFieldKey || (!!dynamicList.length && ["reference", "flatTable"].includes(fieldType))
177
- ? "dynamicText"
178
- : "fixedText"
179
- );
180
- const parameterTypeName = (this.parameterPropsObj._data.find(parameterTypeItem => parameterTypeItem._key === parameterType) || { name: `${parameterType}不存在` }).name;
181
186
 
182
- const operators = ["_id"].includes(curFormItem._key)
183
- ? []
184
- : (fieldData[!dynamicList.length && ["set"].includes(this.mode) ? "operatorsSet" : "operators"] ||
185
- fieldData.operators || []);
186
- const fieldOperator = ["_id"].includes(curFormItem._key)
187
+ const operators = (
188
+ ["_id"].includes(fieldKey)
189
+ ? []
190
+ : ["cascaderTable"].includes(fieldType)
191
+ ? cascaderTableMode === "treeTable"
192
+ ? fieldData.operators.filter(operator => !["cascaderTableSearch"].includes(operator._key))
193
+ : fieldData.operators.filter(operator => !["treeTableSearch"].includes(operator._key))
194
+ // 单条关联类型 -配置端:无动态字段的地方过滤掉“是”和“不是”筛选条件,有动态字段的地方用的全部条件;用户端:用的全部条件,
195
+ : ["reference"].includes(fieldType)
196
+ ? this.mode === "set" && !dynamicList.length
197
+ ? fieldData.operators.filter(operator => !["eq", "ne"].includes(operator._key))
198
+ : fieldData.operators
199
+ : fieldData.operators
200
+ ) || [];
201
+
202
+ const fieldOperator = ["_id"].includes(fieldKey)
187
203
  ? "eq"
188
- : (
189
- initContion.fieldOperator || (
190
- ["reference"].includes(fieldType) && this.isSimpleSearch
191
- ? "eq"
192
- : (operators[0] || {})._key
193
- )
194
- );
204
+ : initContion.fieldOperator
205
+ ? initContion.fieldOperator
206
+ : ["reference"].includes(fieldType) && this.isSimpleSearch
207
+ ? "eq"
208
+ : (operators[0] || {})._key;
195
209
  const fieldOperatorName = (operators.find(operatorItem => operatorItem._key === fieldOperator) || { name: `${fieldOperator}不存在` }).name;
196
210
 
211
+ const parameterType = initContion.parameterType || (
212
+ (
213
+ (initContion.fieldParams || []).length ||
214
+ initContion.chainFieldKey ||
215
+ (!!dynamicList.length && operators.some(operator => ["subSearch", "subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(operator._key)))
216
+ ) ? "dynamicText" : "fixedText"
217
+ );
218
+ const parameterTypeName = (this.parameterPropsObj._data.find(parameterTypeItem => parameterTypeItem._key === parameterType) || { name: `${parameterType}不存在` }).name;
219
+
197
220
  return {
198
221
  _id: this.$ObjectID().str,
199
222
  logic: "field",
200
- fieldKey: curFormItem._key,
223
+ fieldKey: fieldKey,
201
224
  fieldType: fieldType,
202
225
  fieldValue: [],
203
226
  fieldOperator: fieldOperator,
@@ -296,7 +319,7 @@ export default {
296
319
  ) || { form: [] }).form;
297
320
  });
298
321
  }
299
- } else if (conditionItem.fieldOperator === "subTableSearch") {
322
+ } else if (["subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(conditionItem.fieldOperator)) {
300
323
  conditionItem.finished = true;
301
324
  conditionItem.subFormList = conditionItem.formItem._subForm;
302
325
  }
@@ -319,7 +342,7 @@ export default {
319
342
  },
320
343
  // 剔除conditions项里不要的属性
321
344
  transformConditions (list = []) {
322
- const loop = (list) => {
345
+ const loop = (list = []) => {
323
346
  const conditionFields = [
324
347
  "_id", "logic", "conditions", "textSearch", "nativeSearch",
325
348
  "fieldKey", "fieldType", "fieldValue", "fieldOperator", "fieldSearch",
@@ -327,22 +350,19 @@ export default {
327
350
  ];
328
351
 
329
352
  return list.map(item =>
330
- conditionFields.reduce((obj, key) =>
331
- Object.assign(obj, {
332
- [key]: item[key]
333
- ? (
334
- key === "fieldSearch"
335
- ? {
336
- ...item[key],
337
- conditions: loop(item[key].conditions)
338
- }
339
- : key === "conditions"
340
- ? loop(item[key])
341
- : item[key]
342
- )
343
- : item[key]
344
- }), {})
345
- );
353
+ conditionFields.reduce((obj, key) => ({
354
+ ...obj,
355
+ [key]: item[key]
356
+ ? key === "fieldSearch"
357
+ ? {
358
+ ...item[key],
359
+ conditions: loop(item[key].conditions)
360
+ }
361
+ : key === "conditions"
362
+ ? loop(item[key])
363
+ : item[key]
364
+ : item[key]
365
+ })), {});
346
366
  };
347
367
 
348
368
  return loop(list);
@@ -166,7 +166,15 @@
166
166
  v-else
167
167
  class="table-nodata"
168
168
  >
169
- <td :colspan="showColumns.length">暂无数据…</td>
169
+ <td
170
+ :style="{
171
+ width: `${boxWidth}px`,
172
+ minWidth: `${boxWidth}px`,
173
+ maxWidth: `${boxWidth}px`,
174
+ }"
175
+ :rowspan="1"
176
+ :colspan="showColumns.length"
177
+ >暂无数据…</td>
170
178
  </tr>
171
179
  </tbody>
172
180
  </table>
@@ -338,7 +346,15 @@
338
346
  v-else
339
347
  class="table-nodata"
340
348
  >
341
- <td :colspan="showColumns.length">暂无数据…</td>
349
+ <td
350
+ :style="{
351
+ width: `${boxWidth}px`,
352
+ minWidth: `${boxWidth}px`,
353
+ maxWidth: `${boxWidth}px`,
354
+ }"
355
+ :rowspan="1"
356
+ :colspan="showColumns.length"
357
+ >暂无数据…</td>
342
358
  </tr>
343
359
  </tbody>
344
360
  </table>
@@ -472,6 +488,22 @@
472
488
  allTreeData () {
473
489
  return this.getCalcuedTree();
474
490
  },
491
+ showAllTreeData () {
492
+ const loop = (list = []) => {
493
+ return list.filter(row => {
494
+ if (row.children && row.children.length) {
495
+ row.children = loop(row.children);
496
+ return !!row.children.length;
497
+ } else {
498
+ return this.$isAdvRelyAccord(this.finalTableAdvSearch, row);
499
+ }
500
+ });
501
+ };
502
+
503
+ return this.isSearching
504
+ ? loop(this.allTreeData)
505
+ : this.allTreeData;
506
+ },
475
507
  allListData () {
476
508
  return this.$getTreeFlatArr(this.data.tree, node => !(node.children && node.children.length));
477
509
  },
@@ -736,7 +768,7 @@
736
768
  return this.data.tree;
737
769
  },
738
770
  // 转化渲染使用的columns数组
739
- transformRowColumnsArr (nodes = this.allTreeData, treeForm = this.treeColumns) {
771
+ transformRowColumnsArr (nodes = this.showAllTreeData, treeForm = this.treeColumns) {
740
772
  let loop = (nodes, rowColumnsArr) => {
741
773
  return nodes.reduce((rowColumnsArr, node, nodeIndex) => {
742
774
  if (nodeIndex !== 0 || rowColumnsArr.length === 0) {
@@ -753,7 +785,7 @@
753
785
  return loop(nodes, []);
754
786
  },
755
787
  // 转化表格数据
756
- transformRows (nodes = this.allTreeData, treeForm = this.treeColumns) {
788
+ transformRows (nodes = this.showAllTreeData, treeForm = this.treeColumns) {
757
789
  const loop = (nodes, rows) => {
758
790
  return nodes.reduce((rows, node, nodeIndex) => {
759
791
  // 创建行,并把节点数据(对象类型)注入到行对象内
@@ -15,7 +15,7 @@
15
15
  <dsh-default-search
16
16
  v-if="searchFormList.length && !isEnlarge"
17
17
  :formList="searchFormList"
18
- :initValue="dftConditions"
18
+ :initValue="dftAdvSearch.conditions"
19
19
  :labelWidth="searchLabelWidth"
20
20
  @change="searchCb"
21
21
  ></dsh-default-search>
@@ -54,7 +54,7 @@
54
54
  <template v-if="searchFormList.length">
55
55
  <dsh-default-search
56
56
  :formList="searchFormList"
57
- :initValue="dftConditions"
57
+ :initValue="dftAdvSearch.conditions"
58
58
  :labelWidth="searchLabelWidth"
59
59
  @change="searchCb"
60
60
  ></dsh-default-search>
@@ -339,13 +339,16 @@
339
339
  selfReset () {
340
340
  this.isExpandAction = false;
341
341
  this.searchMode = "flat";
342
- this.dftConditions = [];
342
+ this.dftAdvSearch = {
343
+ logic: "and",
344
+ conditions: []
345
+ };
343
346
  },
344
347
 
345
348
  // 筛选回调
346
349
  searchCb (conditions) {
347
350
  this.isExpandAction = false;
348
- this.dftConditions = conditions;
351
+ this.dftAdvSearch.conditions = conditions;
349
352
  },
350
353
  // 展开/隐藏节点
351
354
  toggleExpand (row, bool = true) {
@@ -401,7 +404,7 @@
401
404
 
402
405
  /* ------ 工具方法 ------- */
403
406
  // 加工树形数据
404
- getCalcuedTree (treeData = [], columns) {
407
+ getCalcuedTree (treeData = [], columns = []) {
405
408
  const loop = (list = [], parentRow) =>
406
409
  list.forEach((row) => {
407
410
  // 递归到叶子节点前 从上往下要处理的
@@ -36,13 +36,13 @@ export default {
36
36
  return {};
37
37
  }
38
38
  },
39
-
40
- parentFormList: {
39
+ allFormList: {
41
40
  type: Array,
42
41
  default () {
43
42
  return [];
44
43
  }
45
44
  },
45
+
46
46
  parentObj: {
47
47
  type: Object,
48
48
  default () {
@@ -59,8 +59,10 @@ export default {
59
59
  showRuleMessage: false, // 进行全体校验
60
60
  ruleRecordMap: {}, // 单元格是否发生校验的记录映射
61
61
 
62
- dftLogic: "and",
63
- dftConditions: [],
62
+ dftAdvSearch: {
63
+ logic: "and",
64
+ conditions: []
65
+ },
64
66
 
65
67
  dshRenderName: undefined,
66
68
  showQuoteModal: false,
@@ -239,7 +241,7 @@ export default {
239
241
  return this.selfPropsObj._quoteListFields;
240
242
  },
241
243
  quoteAdvSearch () {
242
- return this.$transformAdvSearch(this.selfPropsObj._quoteAdvSearch, this.parentFormList, this.parentObj);
244
+ return this.$transformAdvSearch(this.selfPropsObj._quoteAdvSearch, this.allFormList, this.parentObj);
243
245
  },
244
246
 
245
247
  searchList () {
@@ -255,24 +257,24 @@ export default {
255
257
  return this.selfPropsObj._searchLabelWidth;
256
258
  },
257
259
  tableAdvSearch () {
258
- return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.parentFormList, this.parentObj);
260
+ return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.parentObj);
259
261
  },
260
262
  // 配置的默认筛选值里 隐藏的看不到的筛选条件
261
- hideConditions () {
262
- return this.tableAdvSearch.conditions.filter(conditionItem =>
263
- !this.searchListFields.includes(conditionItem.fieldKey)
264
- );
263
+ hideAdvSearch () {
264
+ return {
265
+ logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
266
+ conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
267
+ !this.searchListFields.includes(conditionItem.fieldKey)
268
+ )
269
+ };
265
270
  },
266
271
  // 过滤行数据的 最终的筛选条件
267
272
  finalTableAdvSearch () {
268
273
  return {
269
- logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
274
+ logic: "and",
270
275
  conditions: [
271
- ...this.hideConditions,
272
- {
273
- logic: this.dftLogic,
274
- conditions: this.dftConditions
275
- }
276
+ this.hideAdvSearch,
277
+ this.dftAdvSearch
276
278
  ]
277
279
  };
278
280
  },
@@ -388,10 +390,10 @@ export default {
388
390
  canEdit: unitCanEdit,
389
391
  formData: row,
390
392
  formItem: column,
391
- rowIndex: rowIndex,
392
393
  allFormList: this.columns,
393
- parentListData: this.allListData,
394
- parentFormList: this.parentFormList,
394
+ allListRows: this.allListData,
395
+ rowIndex: rowIndex,
396
+ parentFormList: this.allFormList,
395
397
  parentObj: this.parentObj
396
398
  },
397
399
  on: {
@@ -406,10 +408,10 @@ export default {
406
408
  canEdit: unitCanEdit,
407
409
  formData: row,
408
410
  formItem: column,
409
- rowIndex: rowIndex,
410
411
  allFormList: this.columns,
411
- parentListData: this.allListData,
412
- parentFormList: this.parentFormList,
412
+ allListRows: this.allListData,
413
+ rowIndex: rowIndex,
414
+ parentFormList: this.allFormList,
413
415
  parentObj: this.parentObj
414
416
  },
415
417
  on: {
@@ -488,7 +490,7 @@ export default {
488
490
  },
489
491
  methods: {
490
492
  baseInit () {
491
- this.dftConditions = this.tableAdvSearch.conditions.filter(conditionItem =>
493
+ this.dftAdvSearch.conditions = this.tableAdvSearch.conditions.filter(conditionItem =>
492
494
  this.searchListFields.includes(conditionItem.fieldKey)
493
495
  );
494
496
  },
@@ -508,7 +510,7 @@ export default {
508
510
  // 筛选回调
509
511
  searchCb (conditions) {
510
512
  this.isExpandAction = false;
511
- this.dftConditions = conditions;
513
+ this.dftAdvSearch.conditions = conditions;
512
514
  },
513
515
  // 表单控件失去焦点
514
516
  controlBlur (operationItem, col, row, rowIndex, params) {
@@ -77,8 +77,8 @@
77
77
  :value="formData"
78
78
  :propsObj="formItem"
79
79
  :allFormList="allFormList"
80
+ :allListRows="allListRows"
80
81
  :rowIndex="rowIndex"
81
- :parentListData="parentListData"
82
82
  :parentFormList="parentFormList"
83
83
  :parentObj="parentObj"
84
84
  @change="change"
@@ -24,8 +24,8 @@
24
24
  inTable: true
25
25
  }"
26
26
  :allFormList="allFormList"
27
+ :allListRows="allListRows"
27
28
  :rowIndex="rowIndex"
28
- :parentListData="parentListData"
29
29
  :parentFormList="parentFormList"
30
30
  :parentObj="parentObj"
31
31
  @blur="blur"
@@ -26,8 +26,9 @@ export default {
26
26
  }
27
27
  },
28
28
 
29
+ /* 内部表,层级表内的字段用到的 */
29
30
  rowIndex: Number,
30
- parentListData: {
31
+ allListRows: {
31
32
  type: Array,
32
33
  default () {
33
34
  return [];