eoss-ui 0.6.31 → 0.6.33

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 (67) hide show
  1. package/lib/button-group.js +11 -17
  2. package/lib/button.js +154 -159
  3. package/lib/calendar.js +2 -2
  4. package/lib/card.js +2 -2
  5. package/lib/cascader.js +2 -2
  6. package/lib/checkbox-group.js +14 -20
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +14 -20
  9. package/lib/data-table.js +31 -33
  10. package/lib/date-picker.js +11 -16
  11. package/lib/dialog.js +17 -23
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +116 -119
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +11 -16
  16. package/lib/flow-list.js +13 -18
  17. package/lib/flow.js +17 -23
  18. package/lib/form.js +17 -23
  19. package/lib/handle-user.js +19 -20
  20. package/lib/handler.js +11 -16
  21. package/lib/icon.js +11 -16
  22. package/lib/icons.js +4 -4
  23. package/lib/index.js +1 -1
  24. package/lib/input-number.js +11 -16
  25. package/lib/input.js +14 -19
  26. package/lib/label.js +2 -2
  27. package/lib/layout.js +4 -4
  28. package/lib/login.js +21 -27
  29. package/lib/main.js +57 -59
  30. package/lib/menu.js +4 -4
  31. package/lib/nav.js +12 -17
  32. package/lib/notify.js +2 -2
  33. package/lib/page.js +11 -16
  34. package/lib/pagination.js +11 -16
  35. package/lib/player.js +18 -23
  36. package/lib/qr-code.js +13 -18
  37. package/lib/radio-group.js +14 -19
  38. package/lib/retrial-auth.js +11 -16
  39. package/lib/select-ganged.js +12 -17
  40. package/lib/select.js +14 -19
  41. package/lib/selector-panel.js +15 -21
  42. package/lib/selector.js +13 -18
  43. package/lib/sizer.js +20 -25
  44. package/lib/steps.js +12 -17
  45. package/lib/switch.js +11 -16
  46. package/lib/table-form.js +13 -18
  47. package/lib/tabs-panel.js +2 -2
  48. package/lib/tabs.js +11 -16
  49. package/lib/tips.js +12 -17
  50. package/lib/toolbar.js +2 -2
  51. package/lib/tree-group.js +17 -33
  52. package/lib/tree.js +19 -22
  53. package/lib/upload.js +28 -34
  54. package/lib/utils/util.js +2 -14
  55. package/lib/wujie.js +11 -16
  56. package/lib/wxlogin.js +11 -16
  57. package/package.json +3 -2
  58. package/packages/.DS_Store +0 -0
  59. package/packages/data-table/src/main.vue +11 -7
  60. package/packages/handle-user/src/main.vue +4 -0
  61. package/packages/main/.DS_Store +0 -0
  62. package/packages/main/src/simplicity/index.vue +17 -15
  63. package/packages/tree/src/main.vue +5 -3
  64. package/packages/tree-group/src/main.vue +2 -8
  65. package/packages/upload/src/main.vue +17 -8
  66. package/src/index.js +1 -1
  67. package/src/utils/util.js +2 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.6.31",
3
+ "version": "0.6.33",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -58,6 +58,7 @@
58
58
  "interactjs": "^1.10.26",
59
59
  "js-base64": "^3.7.5",
60
60
  "json-bigint": "^1.0.0",
61
+ "lodash": "^4.17.21",
61
62
  "net": "^1.0.2",
62
63
  "qrcode": "1.5.3",
63
64
  "qs": "^6.11.2",
@@ -97,7 +98,7 @@
97
98
  "cp-cli": "^1.0.2",
98
99
  "cross-env": "^3.1.3",
99
100
  "css-loader": "^2.1.0",
100
- "eoss-element": "^0.3.30",
101
+ "eoss-element": "^0.3.31",
101
102
  "es6-promise": "^4.0.5",
102
103
  "eslint": "4.18.2",
103
104
  "eslint-config-elemefe": "0.1.1",
Binary file
@@ -795,11 +795,13 @@ export default {
795
795
  },
796
796
  thead: {
797
797
  deep: true,
798
- handler(val) {
799
- this.getOptions(val);
800
- this.chekOpenTotalArea();
801
- if (Array.isArray(val) && val.length && this.datas.length == 0) {
802
- this.getTableData();
798
+ handler(val, old) {
799
+ if (!util.isObjectEqual(val, old)) {
800
+ this.getOptions(val);
801
+ this.chekOpenTotalArea();
802
+ if (Array.isArray(val) && val.length && this.datas.length == 0) {
803
+ this.getTableData();
804
+ }
803
805
  }
804
806
  }
805
807
  },
@@ -810,8 +812,10 @@ export default {
810
812
  }
811
813
  },
812
814
  param: {
813
- handler(val) {
814
- this.getTableData();
815
+ handler(val, old) {
816
+ if (!util.isObjectEqual(val, old)) {
817
+ this.getTableData();
818
+ }
815
819
  }
816
820
  },
817
821
  page: {
@@ -75,6 +75,10 @@ export default {
75
75
  this.job = val.identityList.filter((item) => {
76
76
  return item.id === val.identityId;
77
77
  })[0];
78
+ if (!this.job) {
79
+ console.error('identityId与identityList中的任何id不匹配!');
80
+ this.job = {};
81
+ }
78
82
  }
79
83
  }
80
84
  }
Binary file
@@ -1521,21 +1521,23 @@ export default {
1521
1521
  this.tabs.push(tab);
1522
1522
  this.activeName = res.id;
1523
1523
  } else {
1524
- let tab = this.tabs[i];
1525
- if (tab.method === 'iframe') {
1526
- this.activeName = res.id;
1527
- this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
1528
- } else {
1529
- if (tab.method === 'wujie' && tab.appCode) {
1530
- window.document
1531
- .querySelector(`iframe[name=${tab.appCode}]`)
1532
- .contentWindow.location.reload(true);
1533
- }
1534
- if (tab.method === 'router') {
1535
- this.$set(this.tabs[i], 'keys', util.uuid());
1536
- }
1537
- this.activeName = res.id;
1538
- }
1524
+ this.tabs = events[0](this.tabs, i, this);
1525
+ // let tab = this.tabs[i];
1526
+ // if (tab.method === 'iframe') {
1527
+ // this.activeName = res.id;
1528
+ // this.$set(this.tabs[i], 'url', util.handlerUrl(tab.url));
1529
+ // } else {
1530
+ // if (tab.method === 'wujie' && tab.appCode) {
1531
+ // window.document
1532
+ // .querySelector(`iframe[name=${tab.appCode}]`)
1533
+ // .contentWindow.location.reload(true);
1534
+ // }
1535
+ // if (tab.method === 'router') {
1536
+ // this.$set(this.tabs[i], 'keys', util.uuid());
1537
+ // }
1538
+ // this.activeName = res.id;
1539
+ // }
1540
+ this.activeName = res.id;
1539
1541
  }
1540
1542
  },
1541
1543
 
@@ -374,8 +374,10 @@ export default {
374
374
  },
375
375
  where: {
376
376
  deep: true,
377
- handler() {
378
- this.getTreeData();
377
+ handler(val, old) {
378
+ if (!util.isObjectEqual(val, old)) {
379
+ this.getTreeData();
380
+ }
379
381
  }
380
382
  }
381
383
  },
@@ -562,7 +564,7 @@ export default {
562
564
  this.$message({
563
565
  showClose: true,
564
566
  message: '已达最大选择个数',
565
- type: 'waring'
567
+ type: 'warning'
566
568
  });
567
569
  }
568
570
  }
@@ -117,13 +117,7 @@
117
117
  v-else-if="table"
118
118
  size="mini"
119
119
  :mode="mode"
120
- v-bind="
121
- handleExclAttribute({
122
- data: { close: true, ...table },
123
- attrs: ['param']
124
- })
125
- "
126
- :param="params"
120
+ v-bind="{ close: true, ...table, param: params }"
127
121
  :ref="table.ref ? table.ref : 'esDataTable'"
128
122
  v-on="{ ...$listeners, ...table.events }"
129
123
  >
@@ -296,7 +290,7 @@ export default {
296
290
  handler(val) {
297
291
  if (val !== undefined && this.tabs && this.tabs.length) {
298
292
  if (typeof val === 'string') {
299
- for (let i = 0; i < this.tabs.lengt; i++) {
293
+ for (let i = 0; i < this.tabs.length; i++) {
300
294
  if (val === this.tabs[i].name) {
301
295
  this.active = String(i);
302
296
  }
@@ -568,14 +568,15 @@ export default {
568
568
  return { success: true, error: true };
569
569
  },
570
570
  profile() {
571
- const previewAdjunct = this.dochubConfig
572
- ? this.dochubConfig.downloadDocumentUrl
573
- : this.previewAdjunct;
571
+ const previewAdjunct =
572
+ this.dochubConfig.downloadDocumentUrl || this.previewAdjunct;
574
573
  if (this.image) {
575
574
  if (typeof this.image === 'string') {
576
575
  return this.image;
577
576
  }
578
- return `${this.host}${previewAdjunct}?documentId=${this.image.adjunctId}&adjunctId=${this.image.adjunctId}`;
577
+ return `${this.host}${previewAdjunct}?documentId=${
578
+ this.image.adjunctId
579
+ }&adjunctId=${this.image.adjunctId}&_tt=${new Date().getTime()}`;
579
580
  }
580
581
  if (this.value) {
581
582
  if (typeof this.value === 'string') {
@@ -590,19 +591,25 @@ export default {
590
591
  });
591
592
  return val;
592
593
  } else if (this.value.indexOf('/') === -1) {
593
- return `${this.host}${previewAdjunct}?documentId=${this.value}&adjunctId=${this.value}`;
594
+ return `${this.host}${previewAdjunct}?documentId=${
595
+ this.value
596
+ }&adjunctId=${this.value}&_tt=${new Date().getTime()}`;
594
597
  }
595
598
  return this.value;
596
599
  } else if (Array.isArray(this.value)) {
597
600
  let adjunctId = this.value[0].response
598
601
  ? this.value[0].response.adjunctId
599
602
  : this.value[0].adjunctId;
600
- return `${this.host}${previewAdjunct}?documentId=${adjunctId}&adjunctId=${adjunctId}`;
603
+ return `${
604
+ this.host
605
+ }${previewAdjunct}?documentId=${adjunctId}&adjunctId=${adjunctId}&_tt=${new Date().getTime()}`;
601
606
  } else {
602
607
  let adjunctId = this.value.response
603
608
  ? this.value.response.adjunctId
604
609
  : this.value.adjunctId;
605
- return `${this.host}${previewAdjunct}?documentId=${adjunctId}&adjunctId=${adjunctId}`;
610
+ return `${
611
+ this.host
612
+ }${previewAdjunct}?documentId=${adjunctId}&adjunctId=${adjunctId}&_tt=${new Date().getTime()}`;
606
613
  }
607
614
  }
608
615
  if (this.photo && typeof this.photo === 'string') {
@@ -617,7 +624,9 @@ export default {
617
624
  });
618
625
  return val;
619
626
  } else if (this.photo.indexOf('/') === -1) {
620
- return `${this.host}${previewAdjunct}?documentId=${this.photo}&adjunctId=${this.photo}`;
627
+ return `${this.host}${previewAdjunct}?documentId=${
628
+ this.photo
629
+ }&adjunctId=${this.photo}&_tt=${new Date().getTime()}`;
621
630
  }
622
631
  }
623
632
  return this.photo;
package/src/index.js CHANGED
@@ -121,7 +121,7 @@ if (typeof window !== 'undefined' && window.Vue) {
121
121
  }
122
122
 
123
123
  export default {
124
- version: '0.6.31',
124
+ version: '0.6.33',
125
125
  install,
126
126
  Button,
127
127
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  /* eslint-disable indent */
9
9
  const sm2 = require('sm-crypto').sm2;
10
+ const lodash = require('lodash');
10
11
  import { authCenter, mainConfig, logout } from '../config/api';
11
12
  import axios from 'axios';
12
13
  import qs from 'qs';
@@ -2438,24 +2439,7 @@ const isObject = function (obj) {
2438
2439
  * @param {Object} [_obj] - 对象
2439
2440
  **/
2440
2441
  const isObjectEqual = function (obj, _obj) {
2441
- if (
2442
- (obj === undefined && _obj) ||
2443
- (obj && _obj === undefined) ||
2444
- (obj === undefined && _obj === undefined)
2445
- ) {
2446
- return false;
2447
- }
2448
- var aProps = Object.getOwnPropertyNames(obj);
2449
- var bProps = Object.getOwnPropertyNames(_obj);
2450
- if (aProps.length !== bProps.length) {
2451
- return false;
2452
- }
2453
- for (let i in obj) {
2454
- if (obj[i] !== _obj[i]) {
2455
- return false;
2456
- }
2457
- }
2458
- return true;
2442
+ return lodash.isEqual(obj, _obj);
2459
2443
  };
2460
2444
 
2461
2445
  /**