bri-components 1.3.53 → 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
|
@@ -172,7 +172,9 @@ export default {
|
|
|
172
172
|
const cascaderTableMode = curFormItem._showMode;
|
|
173
173
|
const fieldData = this.fieldMap[fieldType];
|
|
174
174
|
|
|
175
|
-
const dynamicTypes = this.useChainField
|
|
175
|
+
const dynamicTypes = this.useChainField
|
|
176
|
+
? [...new Set([...(fieldData.categoryTypes || []), fieldType])]
|
|
177
|
+
: [fieldType];
|
|
176
178
|
let dynamicList = dynamicTypes.reduce((list, type) => list.concat(this.dynamicFieldsMap[type] || []), []);
|
|
177
179
|
dynamicList = this.useChainField
|
|
178
180
|
? ["select", "checkbox", "cascader", "cascaders"].includes(fieldType)
|
|
@@ -182,27 +184,28 @@ export default {
|
|
|
182
184
|
: dynamicList
|
|
183
185
|
: dynamicList;
|
|
184
186
|
|
|
185
|
-
const operators =
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
?
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
+
) || [];
|
|
196
201
|
|
|
197
202
|
const fieldOperator = ["_id"].includes(fieldKey)
|
|
198
203
|
? "eq"
|
|
199
|
-
:
|
|
200
|
-
initContion.fieldOperator
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
)
|
|
205
|
-
);
|
|
204
|
+
: initContion.fieldOperator
|
|
205
|
+
? initContion.fieldOperator
|
|
206
|
+
: ["reference"].includes(fieldType) && this.isSimpleSearch
|
|
207
|
+
? "eq"
|
|
208
|
+
: (operators[0] || {})._key;
|
|
206
209
|
const fieldOperatorName = (operators.find(operatorItem => operatorItem._key === fieldOperator) || { name: `${fieldOperator}不存在` }).name;
|
|
207
210
|
|
|
208
211
|
const parameterType = initContion.parameterType || (
|
|
@@ -339,7 +342,7 @@ export default {
|
|
|
339
342
|
},
|
|
340
343
|
// 剔除conditions项里不要的属性
|
|
341
344
|
transformConditions (list = []) {
|
|
342
|
-
const loop = (list) => {
|
|
345
|
+
const loop = (list = []) => {
|
|
343
346
|
const conditionFields = [
|
|
344
347
|
"_id", "logic", "conditions", "textSearch", "nativeSearch",
|
|
345
348
|
"fieldKey", "fieldType", "fieldValue", "fieldOperator", "fieldSearch",
|
|
@@ -347,22 +350,19 @@ export default {
|
|
|
347
350
|
];
|
|
348
351
|
|
|
349
352
|
return list.map(item =>
|
|
350
|
-
conditionFields.reduce((obj, key) =>
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
: item[key]
|
|
364
|
-
}), {})
|
|
365
|
-
);
|
|
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
|
+
})), {});
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
return loop(list);
|
|
@@ -166,7 +166,15 @@
|
|
|
166
166
|
v-else
|
|
167
167
|
class="table-nodata"
|
|
168
168
|
>
|
|
169
|
-
<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
|
|
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>
|