bri-components 1.3.85 → 1.3.87

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.85",
3
+ "version": "1.3.87",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -143,6 +143,7 @@
143
143
  return {
144
144
  _fileType: "file",
145
145
  _showMode: this.isHeightAuto ? "old" : "inline", // 宽度为100%、且不在级联表格或内部表格里的 显示老版
146
+
146
147
  _multiple: true,
147
148
  _useType: "drag",
148
149
  _maxSize: 1024 * 1024,
@@ -169,7 +169,6 @@
169
169
  computed: {
170
170
  selfPropsObj () {
171
171
  return {
172
- _showMode: "default", // 值为"default", "custom", "simple"
173
172
  _transfer: true,
174
173
  _transferClassName: "",
175
174
 
@@ -14,12 +14,12 @@ export default {
14
14
  basePropsObj () {
15
15
  const _joinSymbol = this.propsObj._joinSymbol || "/";
16
16
  return {
17
+ _regionType: "default", // "default", "benji", "userIndustry"
18
+ _showMode: "default", // "default", "custom", "simple"
19
+
17
20
  _saveKey: "_key",
18
21
  _valueKey: "code",
19
22
  _nameKey: "name",
20
-
21
- _regionType: "default", // "default", "benji", "userIndustry"
22
- _showMode: "default", // "default", "custom", "simple"
23
23
  colorMap: resourceData.colorMap,
24
24
  _useColor: false,
25
25
  _filterable: true, // 是否支持搜索
@@ -39,6 +39,13 @@ export default {
39
39
  _joinSymbol: _joinSymbol // 级联拼接符
40
40
  };
41
41
  },
42
+ regionType () {
43
+ return this.selfPropsObj._regionType;
44
+ },
45
+ showMode () {
46
+ return this.selfPropsObj._showMode;
47
+ },
48
+
42
49
  saveKey () {
43
50
  return this.selfPropsObj._saveKey;
44
51
  },
@@ -48,13 +55,6 @@ export default {
48
55
  nameKey () {
49
56
  return this.selfPropsObj._nameKey;
50
57
  },
51
-
52
- regionType () {
53
- return this.selfPropsObj._regionType;
54
- },
55
- showMode () {
56
- return this.selfPropsObj._showMode;
57
- },
58
58
  colorMap () {
59
59
  return this.selfPropsObj.colorMap;
60
60
  },
@@ -28,7 +28,7 @@ export default {
28
28
  inTableType: {
29
29
  type: String,
30
30
  validator (val) {
31
- return ["flatTable", "cascaderTable", "treeTable"].includes(val);
31
+ return ["flatTable", "treeTable", "cascaderTable"].includes(val);
32
32
  }
33
33
  },
34
34
  allListRows: {
@@ -15,9 +15,10 @@ export default {
15
15
  computed: {
16
16
  basePropsObj () {
17
17
  return {
18
+ _optionKind: "dropdown", // "flat"、"dropdown"
19
+
18
20
  _saveKey: "_key",
19
21
  _nameKey: "name",
20
- _optionKind: "dropdown", // "flat"、"dropdown"
21
22
  colorMap: resourceData.colorMap,
22
23
  _useColor: false,
23
24
  _filterable: true, // 是否支持搜索
@@ -30,15 +31,16 @@ export default {
30
31
  ...this.commonDealPropsObj
31
32
  };
32
33
  },
34
+ showMode () {
35
+ return this.selfPropsObj._optionKind;
36
+ },
37
+
33
38
  saveKey () {
34
39
  return this.selfPropsObj._saveKey;
35
40
  },
36
41
  nameKey () {
37
42
  return this.selfPropsObj._nameKey;
38
43
  },
39
- showMode () {
40
- return this.selfPropsObj._optionKind;
41
- },
42
44
  colorMap () {
43
45
  return this.selfPropsObj.colorMap;
44
46
  },
@@ -78,8 +78,8 @@ export default {
78
78
  return this.$isEmptyData(this.curVal)
79
79
  ? this.emptyShowVal
80
80
  : this.curVal === true
81
- ? this._openText
82
- : this._closeText;
81
+ ? this.openText
82
+ : this.closeText;
83
83
  }
84
84
  },
85
85
  created () { },
@@ -17,8 +17,9 @@
17
17
  <!-- 配置端 设置默认值用-->
18
18
  <dsh-btn-modal v-if="controlKey === '_default'">
19
19
  <template>
20
- <dsh-tree-table
21
- v-if="showMode === 'treeTable'"
20
+ <!-- 老版级联表格 -->
21
+ <dsh-cascader-table
22
+ v-if="subType === 'old'"
22
23
  :canEdit="finalCanEdit"
23
24
  :data="curVal.tree"
24
25
  :rowDefault="curVal.rowDefault"
@@ -26,10 +27,18 @@
26
27
  :propsObj="defaultPropsObj"
27
28
  :allFormList="allFormList"
28
29
  :parentObj="value"
30
+ :tableDataObj="curVal"
31
+ :treeColumns="treeForm"
29
32
  @change="change"
30
- ></dsh-tree-table>
33
+ ></dsh-cascader-table>
31
34
 
32
- <dsh-cascader-table
35
+ <!-- 横向层级表格 -->
36
+ <div v-if="subType === 'cross'">
37
+ 横向层级表格还未开发……
38
+ </div>
39
+
40
+ <!-- 层级表格 -->
41
+ <dsh-tree-table
33
42
  v-else
34
43
  :canEdit="finalCanEdit"
35
44
  :data="curVal.tree"
@@ -38,18 +47,16 @@
38
47
  :propsObj="defaultPropsObj"
39
48
  :allFormList="allFormList"
40
49
  :parentObj="value"
41
- :tableDataObj="curVal"
42
- :treeColumns="treeForm"
43
50
  @change="change"
44
- ></dsh-cascader-table>
51
+ ></dsh-tree-table>
45
52
  </template>
46
53
  </dsh-btn-modal>
47
54
 
48
55
  <!-- 正常使用 -->
49
56
  <template v-else>
50
- <!-- 层级表 -->
51
- <dsh-tree-table
52
- v-if="showMode === 'treeTable'"
57
+ <!-- 老版级联表格 -->
58
+ <dsh-cascader-table
59
+ v-if="subType === 'old'"
53
60
  ref="table"
54
61
  :canEdit="finalCanEdit"
55
62
  :data="curVal.tree"
@@ -58,11 +65,18 @@
58
65
  :propsObj="selfPropsObj"
59
66
  :allFormList="allFormList"
60
67
  :parentObj="value"
68
+ :tableDataObj="curVal"
69
+ :treeColumns="treeForm"
61
70
  @change="change"
62
- ></dsh-tree-table>
71
+ ></dsh-cascader-table>
63
72
 
64
- <!-- 级联表 -->
65
- <dsh-cascader-table
73
+ <!-- 横向层级表格 -->
74
+ <div v-if="subType === 'cross'">
75
+ 横向层级表格还未开发……
76
+ </div>
77
+
78
+ <!-- 层级表格 -->
79
+ <dsh-tree-table
66
80
  v-else
67
81
  ref="table"
68
82
  :canEdit="finalCanEdit"
@@ -72,10 +86,8 @@
72
86
  :propsObj="selfPropsObj"
73
87
  :allFormList="allFormList"
74
88
  :parentObj="value"
75
- :tableDataObj="curVal"
76
- :treeColumns="treeForm"
77
89
  @change="change"
78
- ></dsh-cascader-table>
90
+ ></dsh-tree-table>
79
91
  </template>
80
92
  </template>
81
93
  </div>
@@ -104,7 +116,7 @@
104
116
  computed: {
105
117
  selfPropsObj () {
106
118
  return {
107
- _showMode: "default", // "default", "treeTable"
119
+ _subType: "default", // "default", "cross", "old"
108
120
  _subForm: [],
109
121
  _treeForm: [],
110
122
  _searchList: [], // 作为搜索的字段
@@ -124,8 +136,8 @@
124
136
  }
125
137
  };
126
138
  },
127
- showMode () {
128
- return this.selfPropsObj._showMode;
139
+ subType () {
140
+ return this.selfPropsObj._subType;
129
141
  },
130
142
  subForm () {
131
143
  return this.selfPropsObj._subForm;
@@ -185,9 +197,9 @@
185
197
  this.curVal
186
198
  ? this.$getTreeFlatArr(this.curVal.tree, (row) =>
187
199
  (
188
- this.showMode === "treeTable"
189
- ? true
190
- : row.isLeaf === true
200
+ this.subType === "old"
201
+ ? row.isLeaf === true
202
+ : true
191
203
  ) && (
192
204
  this.isSearching
193
205
  ? this.$isAdvRelyAccord(this.finalTableAdvSearch, row)
@@ -139,7 +139,7 @@
139
139
  inTableType: {
140
140
  type: String,
141
141
  validator (val) {
142
- return ["flatTable", "cascaderTable", "treeTable"].includes(val);
142
+ return ["flatTable", "treeTable", "cascaderTable"].includes(val);
143
143
  }
144
144
  },
145
145
  allListRows: {
@@ -172,7 +172,6 @@ export default {
172
172
  if (curFormItem) {
173
173
  const fieldType = curFormItem._type;
174
174
  fieldKey = curFormItem._key;
175
- const cascaderTableMode = curFormItem._showMode;
176
175
  const fieldData = this.fieldMap[fieldType];
177
176
 
178
177
  const dynamicTypes = this.useChainField
@@ -191,9 +190,9 @@ export default {
191
190
  ["_id"].includes(fieldKey)
192
191
  ? []
193
192
  : ["cascaderTable"].includes(fieldType)
194
- ? cascaderTableMode === "treeTable"
195
- ? fieldData.operators.filter(operator => !["cascaderTableSearch"].includes(operator._key))
196
- : fieldData.operators.filter(operator => !["treeTableSearch"].includes(operator._key))
193
+ ? curFormItem._subType === "old"
194
+ ? fieldData.operators.filter(operator => !["treeTableSearch"].includes(operator._key))
195
+ : fieldData.operators.filter(operator => !["cascaderTableSearch"].includes(operator._key))
197
196
  // 单条关联类型 -配置端:无动态字段的地方过滤掉“是”和“不是”筛选条件,有动态字段的地方用的全部条件;用户端:用的全部条件,
198
197
  : ["reference"].includes(fieldType)
199
198
  ? this.mode === "set" && !dynamicList.length
@@ -202,6 +202,9 @@ export default {
202
202
  commonPropsObj () {
203
203
  return {
204
204
  // isShare: false, // 是否是分享页在用
205
+ _subType: "default", // "default", "cross", "old"
206
+ _showMode: "default", // "default", "form"
207
+
205
208
  _showRequired: true, // 表头显示校验符号*
206
209
  _showDescription: true, // 表头显示提示
207
210
  _headHeightAuto: false, // 表头高度自适应
@@ -240,17 +243,21 @@ export default {
240
243
  ...this.commonPropsObj
241
244
  };
242
245
  },
246
+ // isShare () {
247
+ // return this.selfPropsObj.isShare;
248
+ // },
249
+ subType () {
250
+ return this.selfPropsObj._subType;
251
+ },
243
252
  showMode () {
244
253
  return this.selfPropsObj._showMode;
245
254
  },
246
255
  inTableType () {
247
- return this.controlType === "cascaderTable" && ["treeTable"].includes(this.showMode)
248
- ? this.showMode
256
+ return this.controlType === "cascaderTable" && !["old"].includes(this.subType)
257
+ ? "treeTable"
249
258
  : this.controlType;
250
259
  },
251
- // isShare () {
252
- // return this.selfPropsObj.isShare;
253
- // },
260
+
254
261
  contentHeight () {
255
262
  return this.selfPropsObj._contentHeight;
256
263
  },
@@ -30,7 +30,7 @@ export default {
30
30
  inTableType: {
31
31
  type: String,
32
32
  validator (val) {
33
- return ["flatTable", "cascaderTable", "treeTable"].includes(val);
33
+ return ["flatTable", "treeTable", "cascaderTable"].includes(val);
34
34
  }
35
35
  },
36
36
  allListRows: {