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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.3.53",
3
+ "version": "1.3.54",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -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 ? [...new Set([...(fieldData.categoryTypes || []), fieldType])] : [fieldType];
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 = ["_id"].includes(fieldKey)
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
- );
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
- ["reference"].includes(fieldType) && this.isSimpleSearch
202
- ? "eq"
203
- : (operators[0] || {})._key
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
- Object.assign(obj, {
352
- [key]: item[key]
353
- ? (
354
- key === "fieldSearch"
355
- ? {
356
- ...item[key],
357
- conditions: loop(item[key].conditions)
358
- }
359
- : key === "conditions"
360
- ? loop(item[key])
361
- : item[key]
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 :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>