bri-components 1.3.55 → 1.3.57

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.55",
3
+ "version": "1.3.57",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "ali-oss": "^6.13.1",
34
34
  "axios": "^0.23.0",
35
- "bri-datas": "^1.1.57",
35
+ "bri-datas": "^1.1.65",
36
36
  "jshint": "^2.12.0",
37
37
  "jsonlint": "^1.6.3",
38
38
  "minio": "7.1.0",
@@ -201,20 +201,16 @@ export default {
201
201
 
202
202
  const fieldOperator = ["_id"].includes(fieldKey)
203
203
  ? "eq"
204
- : initContion.fieldOperator
205
- ? initContion.fieldOperator
206
- : ["reference"].includes(fieldType) && this.isSimpleSearch
207
- ? "eq"
208
- : (operators[0] || {})._key;
204
+ : ["reference"].includes(fieldType) && this.isSimpleSearch
205
+ ? "eq"
206
+ : (operators[0] || {})._key;
209
207
  const fieldOperatorName = (operators.find(operatorItem => operatorItem._key === fieldOperator) || { name: `${fieldOperator}不存在` }).name;
210
208
 
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
- );
209
+ const parameterType = (
210
+ (initContion.fieldParams || []).length ||
211
+ initContion.chainFieldKey ||
212
+ (!!dynamicList.length && operators.some(operator => ["subSearch", "subTableSearch", "cascaderTableSearch", "treeTableSearch"].includes(operator._key)))
213
+ ) ? "dynamicText" : "fixedText";
218
214
  const parameterTypeName = (this.parameterPropsObj._data.find(parameterTypeItem => parameterTypeItem._key === parameterType) || { name: `${parameterType}不存在` }).name;
219
215
 
220
216
  return {
@@ -222,16 +218,16 @@ export default {
222
218
  logic: "field",
223
219
  fieldKey: fieldKey,
224
220
  fieldType: fieldType,
225
- fieldValue: [],
226
221
  fieldOperator: fieldOperator,
222
+ fieldValue: [],
227
223
  fieldSearch: {
228
224
  logic: "and",
229
225
  conditions: []
230
226
  },
227
+ parameterType: parameterType,
231
228
  fieldParams: [],
232
229
  chainFieldKey: "",
233
230
  ...initContion,
234
- parameterType: parameterType,
235
231
 
236
232
  // 下面的是前端所用
237
233
  dynamicList: dynamicList,
@@ -1,7 +1,21 @@
1
1
  <template>
2
2
  <div class="DshTreeTable">
3
3
  <div class="DshTreeTable-top">
4
- <div class="DshTreeTable-top-total">{{ rowsNumStr }}</div>
4
+ <div class="DshTreeTable-top-status">
5
+ <span class="summary">{{ rowsNumStr }};</span>
6
+
7
+ <div
8
+ v-if="searchFormList.length"
9
+ class="logic"
10
+ >
11
+ <div class="logic-title">{{ selfLogicPropsObj._name }}:</div>
12
+ <dsh-select
13
+ class="logic-option"
14
+ :value="dftAdvSearch"
15
+ :propsObj="selfLogicPropsObj"
16
+ ></dsh-select>
17
+ </div>
18
+ </div>
5
19
 
6
20
  <dsh-buttons
7
21
  class="DshTreeTable-top-btns"
@@ -50,6 +64,24 @@
50
64
  v-if="isEnlargeFlag"
51
65
  class="DshTreeTable-fullscreen-inner"
52
66
  >
67
+ <div class="DshTreeTable-top">
68
+ <div class="DshTreeTable-top-status">
69
+ <span class="summary">{{ rowsNumStr }};</span>
70
+
71
+ <div
72
+ v-if="searchFormList.length"
73
+ class="logic"
74
+ >
75
+ <div class="logic-title">{{ selfLogicPropsObj._name }}:</div>
76
+ <dsh-select
77
+ class="logic-option"
78
+ :value="dftAdvSearch"
79
+ :propsObj="selfLogicPropsObj"
80
+ ></dsh-select>
81
+ </div>
82
+ </div>
83
+ </div>
84
+
53
85
  <!-- 搜索条件 -->
54
86
  <template v-if="searchFormList.length">
55
87
  <dsh-default-search
@@ -118,7 +150,7 @@
118
150
 
119
151
  allTreeData () {
120
152
  console.log("allTreeData");
121
- return this.getCalcuedTree(this.data, this.filterColumns);
153
+ return this.getCalcuedTree(this.data, this.columns);
122
154
  },
123
155
  allListData () {
124
156
  return this.$getTreeFlatArr(this.allTreeData);
@@ -225,9 +257,6 @@
225
257
  }
226
258
  };
227
259
  },
228
- filterColumns () {
229
- return this.columns;
230
- },
231
260
  showColumns () {
232
261
  return [
233
262
  ...(this.useSelection === true ? [this.selectionColumn] : []),
@@ -554,8 +583,30 @@
554
583
  justify-content: space-between;
555
584
  align-items: center;
556
585
 
557
- &-total {
558
- font-weight: 500;
586
+ &-status {
587
+ display: flex;
588
+ flex-direction: row;
589
+ align-items: center;
590
+
591
+ .summary {
592
+ font-weight: 500;
593
+ }
594
+
595
+ .logic {
596
+ display: flex;
597
+ flex-direction: row;
598
+ align-items: center;
599
+ margin-left: 16px;
600
+
601
+ &-title {
602
+
603
+ }
604
+
605
+ &-option {
606
+ margin-left: 8px;
607
+ margin-top: -4px;
608
+ }
609
+ }
559
610
  }
560
611
 
561
612
  &-btns {
@@ -1,5 +1,5 @@
1
1
  import DshListUnit from "../../unit/DshListUnit.vue";
2
- import quoteListModal from "./quoteListModal.vue";
2
+ import quoteListModal from "../common/quoteListModal.vue";
3
3
 
4
4
  export default {
5
5
  mixins: [],
@@ -63,6 +63,16 @@ export default {
63
63
  logic: "and",
64
64
  conditions: []
65
65
  },
66
+ selfLogicPropsObj: {
67
+ _name: "逻辑",
68
+ _key: "logic",
69
+ _optionKind: "flat",
70
+ _clearable: false,
71
+ _data: [
72
+ { _key: "and", name: "且" },
73
+ { _key: "or", name: "或" }
74
+ ]
75
+ },
66
76
 
67
77
  dshRenderName: undefined,
68
78
  showQuoteModal: false,
@@ -183,7 +193,7 @@ export default {
183
193
  _tableAdvSearch: {
184
194
  logic: "and",
185
195
  conditions: []
186
- }, // 筛选默认值
196
+ }, // 筛选默认值(cascaderTable和flatTable组件里默认值情使用时,以及modSetForm里,会重置_tableAdvSearch)
187
197
  ...this.propsObj,
188
198
 
189
199
  _contentHeight: this.propsObj._contentHeight || 500 // 表格最大高度
@@ -293,7 +303,7 @@ export default {
293
303
  return this.parentObj._id;
294
304
  },
295
305
  selfRowDefault () {
296
- return this.filterColumns.reduce((obj, column) => {
306
+ return this.columns.reduce((obj, column) => {
297
307
  const defaultVal = this.rowDefault[column._key];
298
308
  const initDftVal = this.initDftValMap[column._type];
299
309
 
@@ -490,9 +500,12 @@ export default {
490
500
  },
491
501
  methods: {
492
502
  baseInit () {
493
- this.dftAdvSearch.conditions = this.tableAdvSearch.conditions.filter(conditionItem =>
494
- this.searchListFields.includes(conditionItem.fieldKey)
495
- );
503
+ this.dftAdvSearch = {
504
+ logic: this.tableAdvSearch.logic || "and",
505
+ conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
506
+ this.searchListFields.includes(conditionItem.fieldKey)
507
+ )
508
+ };
496
509
  },
497
510
  // 重置
498
511
  reset () {
package/src/index.js CHANGED
@@ -38,6 +38,7 @@ import BriAvatar from "./components/other/BriAvatar.vue";
38
38
  import BriLoading from "./components/other/BriLoading.vue";
39
39
  import BriIframe from "./components/other/BriIframe.vue";
40
40
  import BriSvg from "./components/other/BriSvg.vue";
41
+ import DshColorPanel from "./components/other/DshColorPanel.vue";
41
42
 
42
43
  // small
43
44
  import DshRender from "./components/small/render.js";
@@ -91,7 +92,6 @@ import DshMenuNav from "./components/other/DshMenuNav.vue";
91
92
  import BriCode from "./components/other/BriCode.vue";
92
93
  import BriCollapseTree from "./components/other/BriCollapseTree.vue";
93
94
  import BriGantt from "./components/other/BriGantt.vue";
94
- import DshColorPanel from "./components/other/DshColorPanel.vue";
95
95
 
96
96
  // small
97
97
  import DshBtnModal from "./components/small/DshBtnModal.vue";
@@ -128,6 +128,7 @@ const map = {
128
128
  BriLoading,
129
129
  BriIframe,
130
130
  BriSvg,
131
+ DshColorPanel,
131
132
 
132
133
  // small
133
134
  BriButton,
@@ -208,6 +209,7 @@ export {
208
209
  BriLoading,
209
210
  BriIframe,
210
211
  BriSvg,
212
+ DshColorPanel,
211
213
 
212
214
  // small
213
215
  BriButton,
@@ -258,7 +260,6 @@ export {
258
260
  BriCode,
259
261
  BriCollapseTree,
260
262
  BriGantt,
261
- DshColorPanel,
262
263
 
263
264
  // small
264
265
  DshBtnModal