bri-components 1.3.52 → 1.3.53
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 +1 -1
- package/src/components/controls/base/DshDate/DshDate.vue +1 -1
- package/src/components/controls/controlMap.js +1 -1
- package/src/components/controls/mixins/controlMixin.js +2 -2
- package/src/components/controls/senior/cascaderTable.vue +21 -13
- package/src/components/controls/senior/{flatTable/flatTable.vue → flatTable.vue} +5 -5
- package/src/components/form/DshAdvSearch.vue +13 -8
- package/src/components/form/DshForm.vue +4 -3
- package/src/components/form/searchMixin.js +33 -13
- package/src/components/list/DshCascaderTable.vue +18 -2
- package/src/components/list/DshTreeTable.vue +8 -5
- package/src/components/list/mixins/tableBaseMixin.js +26 -24
- package/src/components/unit/DshFormUnit.vue +1 -1
- package/src/components/unit/DshListUnit.vue +1 -1
- package/src/components/unit/unitMixin.js +2 -1
package/package.json
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
-
|
|
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="
|
|
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="
|
|
27
|
-
:
|
|
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
|
-
:
|
|
39
|
-
:
|
|
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="
|
|
58
|
-
:
|
|
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="
|
|
73
|
-
:
|
|
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.
|
|
120
|
+
return this.selfPropsObj._showMode;
|
|
113
121
|
},
|
|
114
122
|
subForm () {
|
|
115
|
-
return this.
|
|
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.
|
|
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
|
-
:
|
|
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
|
-
:
|
|
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 "
|
|
52
|
-
import DshFlatTable from "
|
|
53
|
-
import DshBtnModal from "
|
|
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
|
-
<!--
|
|
138
|
+
<!-- 动态类型 or 固定类型 -->
|
|
138
139
|
<dsh-dropdown
|
|
139
|
-
v-if="
|
|
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="
|
|
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="
|
|
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
|
-
|
|
138
|
-
|
|
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,6 +168,8 @@ 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
175
|
const dynamicTypes = this.useChainField ? [...new Set([...(fieldData.categoryTypes || []), fieldType])] : [fieldType];
|
|
@@ -172,18 +181,20 @@ export default {
|
|
|
172
181
|
? dynamicList.filter(dynamicItem => dynamicItem._ref === curFormItem._ref)
|
|
173
182
|
: dynamicList
|
|
174
183
|
: 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
184
|
|
|
182
|
-
const operators = ["_id"].includes(
|
|
185
|
+
const operators = ["_id"].includes(fieldKey)
|
|
183
186
|
? []
|
|
184
|
-
:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
: ["cascaderTable"].includes(fieldType)
|
|
188
|
+
? cascaderTableMode === "treeTable"
|
|
189
|
+
? fieldData.operators.filter(operator => !["cascaderTableSearch"].includes(operator._key))
|
|
190
|
+
: fieldData.operators.filter(operator => !["treeTableSearch"].includes(operator._key))
|
|
191
|
+
: (
|
|
192
|
+
fieldData[!dynamicList.length ? "operatorsSet" : "operators"] ||
|
|
193
|
+
fieldData.operators ||
|
|
194
|
+
[]
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
const fieldOperator = ["_id"].includes(fieldKey)
|
|
187
198
|
? "eq"
|
|
188
199
|
: (
|
|
189
200
|
initContion.fieldOperator || (
|
|
@@ -194,10 +205,19 @@ export default {
|
|
|
194
205
|
);
|
|
195
206
|
const fieldOperatorName = (operators.find(operatorItem => operatorItem._key === fieldOperator) || { name: `${fieldOperator}不存在` }).name;
|
|
196
207
|
|
|
208
|
+
const parameterType = initContion.parameterType || (
|
|
209
|
+
(
|
|
210
|
+
(initContion.fieldParams || []).length ||
|
|
211
|
+
initContion.chainFieldKey ||
|
|
212
|
+
(!!dynamicList.length && operators.some(operator => ["subSearch", "subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(operator._key)))
|
|
213
|
+
) ? "dynamicText" : "fixedText"
|
|
214
|
+
);
|
|
215
|
+
const parameterTypeName = (this.parameterPropsObj._data.find(parameterTypeItem => parameterTypeItem._key === parameterType) || { name: `${parameterType}不存在` }).name;
|
|
216
|
+
|
|
197
217
|
return {
|
|
198
218
|
_id: this.$ObjectID().str,
|
|
199
219
|
logic: "field",
|
|
200
|
-
fieldKey:
|
|
220
|
+
fieldKey: fieldKey,
|
|
201
221
|
fieldType: fieldType,
|
|
202
222
|
fieldValue: [],
|
|
203
223
|
fieldOperator: fieldOperator,
|
|
@@ -296,7 +316,7 @@ export default {
|
|
|
296
316
|
) || { form: [] }).form;
|
|
297
317
|
});
|
|
298
318
|
}
|
|
299
|
-
} else if (
|
|
319
|
+
} else if (["subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(conditionItem.fieldOperator)) {
|
|
300
320
|
conditionItem.finished = true;
|
|
301
321
|
conditionItem.subFormList = conditionItem.formItem._subForm;
|
|
302
322
|
}
|
|
@@ -472,6 +472,22 @@
|
|
|
472
472
|
allTreeData () {
|
|
473
473
|
return this.getCalcuedTree();
|
|
474
474
|
},
|
|
475
|
+
showAllTreeData () {
|
|
476
|
+
const loop = (list = []) => {
|
|
477
|
+
return list.filter(row => {
|
|
478
|
+
if (row.children && row.children.length) {
|
|
479
|
+
row.children = loop(row.children);
|
|
480
|
+
return !!row.children.length;
|
|
481
|
+
} else {
|
|
482
|
+
return this.$isAdvRelyAccord(this.finalTableAdvSearch, row);
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
return this.isSearching
|
|
488
|
+
? loop(this.allTreeData)
|
|
489
|
+
: this.allTreeData;
|
|
490
|
+
},
|
|
475
491
|
allListData () {
|
|
476
492
|
return this.$getTreeFlatArr(this.data.tree, node => !(node.children && node.children.length));
|
|
477
493
|
},
|
|
@@ -736,7 +752,7 @@
|
|
|
736
752
|
return this.data.tree;
|
|
737
753
|
},
|
|
738
754
|
// 转化渲染使用的columns数组
|
|
739
|
-
transformRowColumnsArr (nodes = this.
|
|
755
|
+
transformRowColumnsArr (nodes = this.showAllTreeData, treeForm = this.treeColumns) {
|
|
740
756
|
let loop = (nodes, rowColumnsArr) => {
|
|
741
757
|
return nodes.reduce((rowColumnsArr, node, nodeIndex) => {
|
|
742
758
|
if (nodeIndex !== 0 || rowColumnsArr.length === 0) {
|
|
@@ -753,7 +769,7 @@
|
|
|
753
769
|
return loop(nodes, []);
|
|
754
770
|
},
|
|
755
771
|
// 转化表格数据
|
|
756
|
-
transformRows (nodes = this.
|
|
772
|
+
transformRows (nodes = this.showAllTreeData, treeForm = this.treeColumns) {
|
|
757
773
|
const loop = (nodes, rows) => {
|
|
758
774
|
return nodes.reduce((rows, node, nodeIndex) => {
|
|
759
775
|
// 创建行,并把节点数据(对象类型)注入到行对象内
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<dsh-default-search
|
|
16
16
|
v-if="searchFormList.length && !isEnlarge"
|
|
17
17
|
:formList="searchFormList"
|
|
18
|
-
:initValue="
|
|
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="
|
|
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.
|
|
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.
|
|
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
|
-
|
|
63
|
-
|
|
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.
|
|
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.
|
|
260
|
+
return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.parentObj);
|
|
259
261
|
},
|
|
260
262
|
// 配置的默认筛选值里 隐藏的看不到的筛选条件
|
|
261
|
-
|
|
262
|
-
return
|
|
263
|
-
|
|
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:
|
|
274
|
+
logic: "and",
|
|
270
275
|
conditions: [
|
|
271
|
-
|
|
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
|
-
|
|
394
|
-
|
|
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
|
-
|
|
412
|
-
|
|
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.
|
|
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.
|
|
513
|
+
this.dftAdvSearch.conditions = conditions;
|
|
512
514
|
},
|
|
513
515
|
// 表单控件失去焦点
|
|
514
516
|
controlBlur (operationItem, col, row, rowIndex, params) {
|