bri-components 1.2.3 → 1.2.4

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.
Files changed (28) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/2.bri-components.min.js +1 -1
  4. package/lib/3.bri-components.min.js +1 -1
  5. package/lib/4.bri-components.min.js +1 -1
  6. package/lib/5.bri-components.min.js +1 -1
  7. package/lib/6.bri-components.min.js +1 -1
  8. package/lib/7.bri-components.min.js +1 -1
  9. package/lib/8.bri-components.min.js +1 -1
  10. package/lib/9.bri-components.min.js +1 -1
  11. package/lib/bri-components.min.js +6 -6
  12. package/package.json +1 -1
  13. package/src/components/controls/base/BriUpload/uploadMixin.js +16 -4
  14. package/src/components/controls/base/DshCascader/DshCascader.vue +2 -1
  15. package/src/components/controls/base/DshCheckbox.vue +5 -5
  16. package/src/components/controls/base/DshCoordinates.vue +4 -4
  17. package/src/components/controls/senior/BriLabels.vue +2 -1
  18. package/src/components/controls/senior/selectDepartments.vue +2 -1
  19. package/src/components/controls/senior/selectUsers/selectUsers.vue +17 -31
  20. package/src/components/list/BriTreeItem.vue +2 -2
  21. package/src/components/list/DshBox/DshPanel.vue +6 -6
  22. package/src/components/small/DshTags.vue +2 -4
  23. package/src/styles/common/control.less +5 -3
  24. package/src/styles/components/controls/base/DshCascader/DshCascader.less +1 -1
  25. package/src/styles/components/controls/senior/BriLabels.less +1 -1
  26. package/src/styles/components/controls/senior/selectDepartments.less +1 -1
  27. package/src/styles/components/controls/senior/selectUsers/selectUsers.less +1 -1
  28. package/src/styles/components/list/DshBox/DshPanel.less +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -64,7 +64,6 @@ export default {
64
64
  callback: res => {
65
65
  this.inputType = "file";
66
66
  if (res.ossType === "ali-oss") {
67
- console.log(this.computedOssType, res);
68
67
  // 上传到阿里云res
69
68
  this[this.computedOssType](file, res, callback);
70
69
  } else if (res.ossType === "local") {
@@ -260,7 +259,6 @@ export default {
260
259
  binaryMultipartUpload (file, res, callback) {
261
260
  let type = "jpg";
262
261
  let remoteName = `${this.randomTimeStampFn()}.${type}`;
263
- console.log("调binaryMultipartUpload");
264
262
  // 上传成功的回调参数
265
263
  let callbackBody = {
266
264
  name: remoteName,
@@ -278,8 +276,22 @@ export default {
278
276
  callbackBodyType: "application/json",
279
277
  callbackBody: this.transferCallBody(callbackBody)
280
278
  };
281
- console.log("调binaryMultipartUpload22");
282
- new this.$aliOss(res.ossConfig).multipartUpload(remoteName, file, {
279
+
280
+ let newOss = {
281
+ ...res.ossConfig,
282
+ refreshSTSToken: async () => {
283
+ // 向您搭建的STS服务获取临时访问凭证。
284
+ return {
285
+ accessKeyId: res.ossConfig.accessKeyId, // 自己账户的accessKeyId或临时秘钥
286
+ accessKeySecret: res.ossConfig.accessKeySecret, // 自己账户的accessKeySecret或临时秘钥
287
+ stsToken: res.ossConfig.stsToken // 从STS服务获取的安全令牌(SecurityToken)。
288
+ };
289
+ },
290
+ // 刷新临时访问凭证的时间间隔,单位为毫秒。
291
+ refreshSTSTokenInterval: 3600 * 1000
292
+ };
293
+
294
+ new this.$aliOss(newOss).multipartUpload(remoteName, file, {
283
295
  progress: (percentage) => {
284
296
  this.inProgress(Number((percentage * 100).toFixed(0)));
285
297
  this.handleProgress && this.handleProgress(percentage, file);
@@ -35,7 +35,8 @@
35
35
  class="overflow"
36
36
  :list="curValNameList"
37
37
  :propsObj="{
38
- disabled: !finalCanEdit
38
+ disabled: !finalCanEdit,
39
+ closable: true
39
40
  }"
40
41
  @delete="deleteItem"
41
42
  ></dsh-tags>
@@ -8,11 +8,11 @@
8
8
  <template v-if="showType === 'flat'">
9
9
  <CheckboxGroup
10
10
  :class="{
11
- 'DshCheckbox-group': true,
12
- 'DshCheckbox-group-color': useColor,
13
- 'DshCheckbox-group-disabled': !canEdit,
14
- 'DshCheckbox-group-scroll': selfPropsObj._span < 24 && !selfPropsObj._br,
15
- }"
11
+ 'DshCheckbox-group': true,
12
+ 'DshCheckbox-group-color': useColor,
13
+ 'DshCheckbox-group-disabled': !canEdit,
14
+ 'DshCheckbox-group-scroll': selfPropsObj._span < 24 && !selfPropsObj._br,
15
+ }"
16
16
  v-model="curValList"
17
17
  >
18
18
  <!-- 有选项 -->
@@ -21,7 +21,7 @@
21
21
  v-if="finalCanEdit && selfPropsObj._clearable"
22
22
  class="icon-close"
23
23
  type="ios-close-circle"
24
- @click.stop="clickDelete"
24
+ @click.stop="clickClear"
25
25
  />
26
26
  </div>
27
27
  </bri-tooltip>
@@ -81,7 +81,7 @@
81
81
  :value="curVal.name"
82
82
  :readonly="true"
83
83
  :clearable="true"
84
- @on-clear="clickClear"
84
+ @on-clear="clickModalClear"
85
85
  @click.native="clickMapFitView"
86
86
  />
87
87
  </Col>
@@ -238,7 +238,7 @@
238
238
  this.curVal = this.cloneValue;
239
239
  },
240
240
  // 点击删除
241
- clickDelete () {
241
+ clickClear () {
242
242
  this.curVal = {
243
243
  name: "",
244
244
  lnglat: []
@@ -246,7 +246,7 @@
246
246
  this.$emit("change", []);
247
247
  },
248
248
  // 清除已选内容
249
- clickClear () {
249
+ clickModalClear () {
250
250
  this.curVal = {
251
251
  name: "",
252
252
  lnglat: []
@@ -27,7 +27,8 @@
27
27
  class="overflow"
28
28
  :list="curValList"
29
29
  :propsObj="{
30
- disabled: !finalCanEdit
30
+ disabled: !finalCanEdit,
31
+ closable: true
31
32
  }"
32
33
  :autoEllipsis="true"
33
34
  @delete="clickDeleteItem"
@@ -23,7 +23,8 @@
23
23
  class="text"
24
24
  :list="curValList"
25
25
  :propsObj="{
26
- disabled: !finalCanEdit
26
+ disabled: !finalCanEdit,
27
+ closable: true
27
28
  }"
28
29
  @delete="clickDeleteItem"
29
30
  ></dsh-tags>
@@ -23,7 +23,8 @@
23
23
  class="text"
24
24
  :list="curValList"
25
25
  :propsObj="{
26
- disabled: !finalCanEdit
26
+ disabled: !finalCanEdit,
27
+ closable: true
27
28
  }"
28
29
  @delete="clickDeleteItem"
29
30
  ></dsh-tags>
@@ -192,7 +193,7 @@
192
193
  <!-- footer -->
193
194
  <div class="selectUsers-modal-wrap-footer">
194
195
  <dsh-buttons
195
- :list="$getOperationList(['cancel', 'confirm'])"
196
+ :list="$getOperationList(['canCancel', 'canConfirm'])"
196
197
  @click="$dispatchEvent($event)"
197
198
  ></dsh-buttons>
198
199
  </div>
@@ -260,16 +261,16 @@
260
261
  },
261
262
 
262
263
  operationMap: {
263
- cancel: {
264
+ canCancel: {
264
265
  name: "取消",
265
- type: "clickCancel",
266
+ type: "canCancel",
266
267
  btnType: "cancel",
267
268
  event: "clickCancel"
268
269
  },
269
- confirm: {
270
+ canConfirm: {
270
271
  name: "完成",
272
+ type: "canConfirm",
271
273
  btnType: "primary",
272
- type: "clickConfirm",
273
274
  event: "clickConfirm"
274
275
  }
275
276
  }
@@ -296,19 +297,10 @@
296
297
  return this.multiple ? "ios-people" : "ios-person";
297
298
  },
298
299
 
299
- // 审签单定制需求使用字段
300
- transmit_type () {
301
- return this.selfPropsObj.transmit_type;
302
- },
303
- current_step_sp_user_key () {
304
- return this.selfPropsObj.current_step_sp_user_key;
305
- },
306
- stepKey () {
307
- return this.selfPropsObj.stepKey;
308
- },
309
-
310
300
  curCheckAll () {
311
- return this.userList.every(userItem => this.newValList.find(newItem => newItem._key === userItem._key));
301
+ return this.userList.length && this.userList.every(userItem =>
302
+ this.newValList.some(newItem => newItem._key === userItem._key)
303
+ );
312
304
  },
313
305
  showVal () {
314
306
  return this.$isEmptyData(this.curValList)
@@ -331,13 +323,13 @@
331
323
  };
332
324
  this.curDepartment = {};
333
325
  this.pagePropsObj.page = 1;
334
- this.getUserList();
335
- this.getDepartmentList();
326
+ this.getUserListData();
327
+ this.getDepartmentListData();
336
328
  },
337
329
 
338
330
  search () {
339
331
  this.pagePropsObj.page = 1;
340
- this.getUserList();
332
+ this.getUserListData();
341
333
  },
342
334
  // 选择部门
343
335
  changeDepartment (departmentItem) {
@@ -348,7 +340,7 @@
348
340
  this.userList = this.hightUsers;
349
341
  this.total = 1;
350
342
  } else {
351
- this.getUserList();
343
+ this.getUserListData();
352
344
  }
353
345
  },
354
346
  clickInput () {
@@ -374,7 +366,7 @@
374
366
  } else {
375
367
  this.newValList = [
376
368
  ...this.newValList,
377
- this.userList.filter(userItem =>
369
+ ...this.userList.filter(userItem =>
378
370
  !this.newValList.some(newItem => newItem._key === userItem._key)
379
371
  )
380
372
  ];
@@ -403,7 +395,7 @@
403
395
  },
404
396
 
405
397
  /* ----------- 接口方法 ------------- */
406
- getUserList () {
398
+ getUserListData () {
407
399
  this.loading = true;
408
400
  this.userList = [];
409
401
  let searchName = this.searchData.name;
@@ -423,9 +415,6 @@
423
415
  params: {
424
416
  search: search,
425
417
  department: this.curDepartment._key,
426
- transmit_type: this.transmit_type,
427
- current_step_sp_user_key: this.current_step_sp_user_key,
428
- stepKey: this.stepKey,
429
418
  pagination: {
430
419
  page: this.pagePropsObj.page,
431
420
  pagesize: this.pagePropsObj.pagesize
@@ -438,16 +427,13 @@
438
427
  }
439
428
  });
440
429
  },
441
- getDepartmentList () {
430
+ getDepartmentListData () {
442
431
  this.$https({
443
432
  url: {
444
433
  module: "company",
445
434
  name: "compDepartCascaderAll"
446
435
  },
447
436
  params: {
448
- transmit_type: this.transmit_type,
449
- current_step_sp_user_key: this.current_step_sp_user_key,
450
- stepKey: this.stepKey,
451
437
  searchString: this.propsObj.searchString
452
438
  },
453
439
  callback: data => {
@@ -47,14 +47,14 @@
47
47
  v-if="showChildren"
48
48
  class="BriTreeItem-children"
49
49
  >
50
- <yc-tree-item
50
+ <bri-tree-item
51
51
  v-for="item in value.children"
52
52
  :key="item._key"
53
53
  :value="item"
54
54
  :changeOnSelect="changeOnSelect"
55
55
  :multiple="multiple"
56
56
  @on-change="onChange"
57
- ></yc-tree-item>
57
+ ></bri-tree-item>
58
58
  </div>
59
59
  </transition>
60
60
  </div>
@@ -67,12 +67,12 @@
67
67
  v-for="(dataItem, dataIndex) in groupItem.list"
68
68
  :key="dataItem._id"
69
69
  :id="dataItem._id"
70
- class="item"
70
+ class="row-item"
71
71
  @click="clickRow(dataItem, dataIndex)"
72
72
  >
73
73
  <!-- 下拉操作 -->
74
74
  <dsh-dropdown
75
- class="item-dropdown"
75
+ class="row-item-dropdown"
76
76
  :dropdownObj="dropdownObj"
77
77
  :list="operationList"
78
78
  @click="$dshEmit($event, dataItem, dataIndex)"
@@ -80,11 +80,11 @@
80
80
  ></dsh-dropdown>
81
81
 
82
82
  <!-- 标题 -->
83
- <div class="item-title dsh-ellipsis">{{ dataItem[titleField] }}</div>
83
+ <div class="row-item-title dsh-ellipsis">{{ dataItem[titleField] }}</div>
84
84
 
85
85
  <!-- 显示字段 -->
86
86
  <div
87
- class="item-cols unit"
87
+ class="row-item-cols unit"
88
88
  v-for="colItem in selfColumns"
89
89
  :key="colItem._key"
90
90
  >
@@ -103,11 +103,11 @@
103
103
  <!-- 右 val -->
104
104
  <div class="unit-value dsh-ellipsis">
105
105
  <dsh-td-render
106
- v-if="colItem.render"
106
+ v-if="colItem.renderBodyCell"
107
107
  :row="dataItem"
108
108
  :column="colItem"
109
109
  :index="0"
110
- :render="colItem.render"
110
+ :render="colItem.renderBodyCell"
111
111
  ></dsh-td-render>
112
112
 
113
113
  <div
@@ -102,11 +102,10 @@
102
102
  maxTagCount: undefined,
103
103
 
104
104
  getItemDisabled (item) {
105
- return this.propsObj.disabled || item._disabled || item.disabled;
105
+ return !!(this.propsObj.disabled || item._disabled || item.disabled);
106
106
  },
107
107
  getItemClosable (item) {
108
- return !this.getItemDisabled(item) &&
109
- (this.propsObj.closable == undefined ? true : this.propsObj.closable);
108
+ return this.getItemDisabled(item) === false && this.propsObj.closable;
110
109
  }
111
110
  };
112
111
  },
@@ -179,7 +178,6 @@
179
178
  },
180
179
  watch: {
181
180
  list: function () {
182
- console.log("ss");
183
181
  this.callEliipsis();
184
182
  }
185
183
  },
@@ -17,6 +17,7 @@
17
17
  color: @textColor;
18
18
 
19
19
  .ivu-icon {
20
+ padding: 5px;
20
21
  color: @placeholderColor;
21
22
  }
22
23
  }
@@ -28,6 +29,7 @@
28
29
  color: @textColor;
29
30
 
30
31
  .ivu-icon {
32
+ padding: 5px;
31
33
  color: @placeholder-disabled-color;
32
34
  }
33
35
 
@@ -51,6 +53,7 @@
51
53
  background-color: transparent;
52
54
 
53
55
  .ivu-icon {
56
+ padding: 5px;
54
57
  color: @placeholderColor;
55
58
  }
56
59
  }
@@ -59,6 +62,7 @@
59
62
  background-color: transparent;
60
63
 
61
64
  .ivu-icon {
65
+ padding: 5px;
62
66
  color: @placeholderColor;
63
67
  }
64
68
  }
@@ -90,11 +94,9 @@
90
94
 
91
95
  .icon {
92
96
  &-default {
93
- padding: 5px;
94
- }
95
97
 
98
+ }
96
99
  &-close {
97
- padding: 5px;
98
100
  display: none;
99
101
  }
100
102
  }
@@ -25,7 +25,7 @@
25
25
  // 查看
26
26
  &-show {
27
27
  &-multiple {
28
- #bri-control-wrap();
28
+
29
29
  }
30
30
 
31
31
  &-single {
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  &-show {
9
- #bri-control-wrap();
9
+
10
10
  }
11
11
 
12
12
  &-dropdown {
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  &-show {
9
- #bri-control-wrap();
9
+
10
10
  }
11
11
 
12
12
  // 传到子组件里的class!!!
@@ -5,7 +5,7 @@
5
5
  #bri-control-wrap();
6
6
  }
7
7
  &-show {
8
- #bri-control-wrap();
8
+
9
9
  }
10
10
 
11
11
  // 弹框部分
@@ -51,8 +51,8 @@
51
51
  padding: 10px;
52
52
  overflow: auto;
53
53
 
54
- .item {
55
- height: 60px;
54
+ .row-item {
55
+ min-height: 60px;
56
56
  padding: 10px 17px;
57
57
  margin-bottom: 10px;
58
58
  border: 1px solid rgba(102, 110, 126, 0.1);