bri-components 1.2.81 → 1.2.83

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.2.81",
3
+ "version": "1.2.83",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -30,7 +30,12 @@
30
30
  :formList="canSearchFormList"
31
31
  :dynamicFieldsMap="dynamicFieldsMap"
32
32
  @change="change(conditionItem, arguments)"
33
- ></dsh-adv-search>
33
+ >
34
+ <slot
35
+ slot-scope="{ conditionItem }"
36
+ :conditionItem="conditionItem"
37
+ ></slot>
38
+ </dsh-adv-search>
34
39
 
35
40
  <!-- 删除 -->
36
41
  <dsh-icons
@@ -51,44 +56,46 @@
51
56
  height="80"
52
57
  @change="change(conditionItem, arguments)"
53
58
  >
54
- <template v-if="!conditionItem.__isDelete__">
55
- <!-- 子表的筛选,出现是有条件的,递归 -->
56
- <template v-if="['subSearch', 'subTableSearch'].includes(conditionItem.fieldOperator)">
57
- <dsh-adv-search
58
- v-if="conditionItem.finished === true"
59
- :isInner="true"
60
- :mode="mode"
61
- :value="conditionItem.fieldSearch"
62
- :formList="conditionItem.subFormList"
63
- :dynamicFieldsMap="dynamicFieldsMap"
59
+ <slot :conditionItem="conditionItem">
60
+ <template v-if="!conditionItem.__isDelete__">
61
+ <!-- 子表的筛选,出现是有条件的,递归 -->
62
+ <template v-if="['subSearch', 'subTableSearch'].includes(conditionItem.fieldOperator)">
63
+ <dsh-adv-search
64
+ v-if="conditionItem.finished === true"
65
+ :isInner="true"
66
+ :mode="mode"
67
+ :value="conditionItem.fieldSearch"
68
+ :formList="conditionItem.subFormList"
69
+ :dynamicFieldsMap="dynamicFieldsMap"
70
+ @change="change(conditionItem, arguments)"
71
+ ></dsh-adv-search>
72
+
73
+ <div
74
+ v-else
75
+ class="DshAdvSearch-conditions-item-loading"
76
+ >加载中……</div>
77
+ </template>
78
+
79
+ <!-- 动态筛选字段,出现是有条件的 -->
80
+ <dsh-checkbox
81
+ v-else-if="conditionItem.parameterType === 'dynamicText'"
82
+ class="DshAdvSearch-conditions-item-control"
83
+ :value="conditionItem"
84
+ :propsObj="{
85
+ _name: `${conditionItem.formItem._name}的动态参数`,
86
+ _key: 'fieldParams',
87
+ _data: conditionItem.dynamicList
88
+ }"
64
89
  @change="change(conditionItem, arguments)"
65
- ></dsh-adv-search>
90
+ ></dsh-checkbox>
66
91
 
92
+ <!-- 为空和不为空时 啥不显示 -->
67
93
  <div
68
- v-else
69
- class="DshAdvSearch-conditions-item-loading"
70
- >加载中……</div>
94
+ v-else-if="['isnull', 'notnull', 'nosize', 'size', 'nolist', 'list'].includes(conditionItem.fieldOperator)"
95
+ class="DshAdvSearch-conditions-item-blank"
96
+ >请选择右上角条件</div>
71
97
  </template>
72
-
73
- <!-- 动态筛选字段,出现是有条件的 -->
74
- <dsh-checkbox
75
- v-else-if="conditionItem.parameterType === 'dynamicText'"
76
- class="DshAdvSearch-conditions-item-control"
77
- :value="conditionItem"
78
- :propsObj="{
79
- _name: `${conditionItem.formItem._name}的动态参数`,
80
- _key: 'fieldParams',
81
- _data: conditionItem.dynamicList
82
- }"
83
- @change="change(conditionItem, arguments)"
84
- ></dsh-checkbox>
85
-
86
- <!-- 为空和不为空时 啥不显示 -->
87
- <div
88
- v-else-if="['isnull', 'notnull', 'nosize', 'size', 'nolist', 'list'].includes(conditionItem.fieldOperator)"
89
- class="DshAdvSearch-conditions-item-blank"
90
- >请选择右上角条件</div>
91
- </template>
98
+ </slot>
92
99
 
93
100
  <!-- 右上角 -->
94
101
  <div
@@ -509,6 +516,15 @@
509
516
  .DshFormUnit-label-right {
510
517
  flex: 2;
511
518
  }
519
+
520
+ // 左右显示时
521
+ .DshFormUnit-line {
522
+ padding-left: 0px;
523
+
524
+ .DshFormUnit-label-right {
525
+ flex: none;
526
+ }
527
+ }
512
528
  }
513
529
  }
514
530
  }
@@ -21,11 +21,7 @@ export default {
21
21
  },
22
22
  data () {
23
23
  return {
24
- fieldMap: this.$modFieldMap,
25
- conditionFields: [
26
- "_id", "logic", "conditions", "textSearch", "nativeSearch",
27
- "fieldKey", "fieldType", "fieldValue", "fieldParams", "fieldOperator", "fieldSearch", "parameterType"
28
- ]
24
+ fieldMap: this.$modFieldMap
29
25
  };
30
26
  },
31
27
  computed: {
@@ -181,8 +177,14 @@ export default {
181
177
 
182
178
  // 剔除conditions项里不要的属性
183
179
  transformConditions (list = []) {
180
+ const conditionFields = [
181
+ "_id", "logic", "conditions", "textSearch", "nativeSearch",
182
+ "fieldKey", "fieldType", "fieldValue", "fieldParams", "fieldOperator", "fieldSearch", "parameterType",
183
+ "chainFieldKey"
184
+ ];
185
+
184
186
  return list.map(item =>
185
- this.conditionFields.reduce((obj, key) =>
187
+ conditionFields.reduce((obj, key) =>
186
188
  Object.assign(obj, {
187
189
  [key]: item[key]
188
190
  ? (
@@ -5,7 +5,7 @@
5
5
  v-if="isLoading"
6
6
  class="DshCard-loading"
7
7
  ></bri-loading>
8
- <template>
8
+ <template v-else>
9
9
  <!-- 有数据 -->
10
10
  <CheckboxGroup
11
11
  v-if="data.length"
@@ -5,7 +5,7 @@
5
5
  v-if="isLoading"
6
6
  class="DshPanel-loading"
7
7
  ></bri-loading>
8
- <template>
8
+ <template v-else>
9
9
  <!-- 有数据 -->
10
10
  <template v-if="data.length">
11
11
  <div