eoss-ui 0.3.97 → 0.4.14

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 (102) hide show
  1. package/lib/button-group.js +98 -15
  2. package/lib/button.js +100 -17
  3. package/lib/ca-login.js +326 -0
  4. package/lib/card.js +2 -2
  5. package/lib/cascader.js +2 -2
  6. package/lib/checkbox-group.js +104 -18
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +104 -21
  9. package/lib/data-table.js +228 -35
  10. package/lib/date-picker.js +100 -17
  11. package/lib/dialog.js +101 -17
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +480 -122
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +100 -17
  16. package/lib/flow-list.js +98 -15
  17. package/lib/flow.js +98 -15
  18. package/lib/form.js +112 -26
  19. package/lib/handle-user.js +100 -17
  20. package/lib/handler.js +100 -17
  21. package/lib/index.js +1 -1
  22. package/lib/input-number.js +100 -17
  23. package/lib/input.js +100 -17
  24. package/lib/label.js +2 -2
  25. package/lib/login.js +126 -27
  26. package/lib/main.js +98 -15
  27. package/lib/mainComp.js +98 -15
  28. package/lib/menu.js +2 -2
  29. package/lib/nav.js +100 -17
  30. package/lib/notify.js +2 -2
  31. package/lib/page.js +100 -17
  32. package/lib/pagination.js +2 -2
  33. package/lib/player.js +100 -17
  34. package/lib/qr-code.js +107 -24
  35. package/lib/radio-group.js +106 -20
  36. package/lib/select-ganged.js +104 -18
  37. package/lib/select.js +114 -25
  38. package/lib/selector-panel.js +109 -23
  39. package/lib/selector.js +106 -20
  40. package/lib/sizer.js +100 -17
  41. package/lib/steps.js +100 -17
  42. package/lib/switch.js +100 -17
  43. package/lib/table-form.js +107 -24
  44. package/lib/tabs-panel.js +2 -2
  45. package/lib/tabs.js +100 -17
  46. package/lib/theme-chalk/base.css +1 -1
  47. package/lib/theme-chalk/ca-login.css +1 -0
  48. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  49. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  50. package/lib/theme-chalk/icon.css +1 -1
  51. package/lib/theme-chalk/index.css +1 -1
  52. package/lib/theme-chalk/main.css +1 -1
  53. package/lib/theme-chalk/menu.css +1 -1
  54. package/lib/theme-chalk/sizer.css +1 -1
  55. package/lib/theme-chalk/upload.css +1 -1
  56. package/lib/tips.js +110 -22
  57. package/lib/toolbar.js +2 -2
  58. package/lib/tree-group.js +100 -17
  59. package/lib/tree.js +100 -17
  60. package/lib/upload.js +98 -15
  61. package/lib/utils/util.js +98 -15
  62. package/lib/wujie.js +100 -17
  63. package/lib/wxlogin.js +100 -17
  64. package/package.json +2 -2
  65. package/packages/ca-login/index.js +5 -0
  66. package/packages/ca-login/src/main.vue +62 -0
  67. package/packages/checkbox-group/index.js +3 -3
  68. package/packages/checkbox-group/src/main.vue +4 -1
  69. package/packages/data-table/src/column.vue +110 -28
  70. package/packages/data-table/src/main.vue +2 -1
  71. package/packages/data-table-form/src/table.vue +1 -1
  72. package/packages/form/src/main.vue +17 -7
  73. package/packages/login/src/main.vue +40 -13
  74. package/packages/radio-group/index.js +3 -3
  75. package/packages/radio-group/src/main.vue +4 -1
  76. package/packages/select/src/main.vue +7 -1
  77. package/packages/select-ganged/src/main.vue +4 -1
  78. package/packages/selector/src/main.vue +4 -1
  79. package/packages/selector-panel/src/selection.vue +4 -1
  80. package/packages/theme-chalk/lib/base.css +1 -1
  81. package/packages/theme-chalk/lib/ca-login.css +1 -0
  82. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  83. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  84. package/packages/theme-chalk/lib/icon.css +1 -1
  85. package/packages/theme-chalk/lib/index.css +1 -1
  86. package/packages/theme-chalk/lib/main.css +1 -1
  87. package/packages/theme-chalk/lib/menu.css +1 -1
  88. package/packages/theme-chalk/lib/sizer.css +1 -1
  89. package/packages/theme-chalk/lib/upload.css +1 -1
  90. package/packages/theme-chalk/src/ca-login.scss +4 -0
  91. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  92. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  93. package/packages/theme-chalk/src/icon.scss +8 -0
  94. package/packages/theme-chalk/src/index.scss +1 -0
  95. package/packages/tips/src/main.vue +5 -2
  96. package/src/index.js +4 -1
  97. package/src/utils/util.js +108 -36
  98. package/lib/theme-chalk/radio.css +0 -1
  99. package/packages/radio/index.js +0 -5
  100. package/packages/radio/src/main.vue +0 -259
  101. package/packages/theme-chalk/lib/radio.css +0 -1
  102. package/packages/theme-chalk/src/radio.scss +0 -3
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 66);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 67);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -534,7 +534,7 @@ var esEncode = function esEncode(value) {
534
534
  **/
535
535
  var esDecode = function esDecode(value) {
536
536
  var kleng = publicKey.length;
537
- var result;
537
+ var result = void 0;
538
538
  var cat1 = void 0;
539
539
  var cat2 = void 0;
540
540
  var cat3 = void 0;
@@ -639,11 +639,13 @@ var exportXls = function exportXls(_ref6) {
639
639
  _ref6$data = _ref6.data,
640
640
  data = _ref6$data === undefined ? [] : _ref6$data,
641
641
  name = _ref6.name,
642
- numbers = _ref6.numbers;
642
+ numbers = _ref6.numbers,
643
+ option = _ref6.option;
643
644
 
644
645
  var tbody = '';
645
646
  var aligns = [];
646
647
  var fields = [];
648
+ var keys = {};
647
649
  var others = {};
648
650
  var alink = document.createElement('a');
649
651
  for (var i = 0; i < thead.length; i++) {
@@ -653,12 +655,15 @@ var exportXls = function exportXls(_ref6) {
653
655
  }
654
656
  var tr = thead[i];
655
657
  var col = 0;
656
- for (var _x = 0; _x < tr.length; _x++) {
657
- var td = tr[_x];
658
+ for (var x = 0; x < tr.length; x++) {
659
+ var td = tr[x];
658
660
  if (td.property) {
659
- if (col === _x) {
661
+ if (col === x) {
660
662
  fields.push(td.property);
661
663
  aligns.push(td.align);
664
+ if (td.labelKey && td.valueKey) {
665
+ keys[td.property] = { labelKey: td.labelKey, valueKey: td.valueKey, multiple: !!(td.valueToString || td['value-to-string']) };
666
+ }
662
667
  } else {
663
668
  others[String(col)] = [td.property, td.align];
664
669
  }
@@ -676,12 +681,72 @@ var exportXls = function exportXls(_ref6) {
676
681
  fields.splice(_i2, 0, others[_i2][0]);
677
682
  aligns.splice(_i2, 0, others[_i2][1]);
678
683
  }
679
- for (var _i3 = 0; _i3 < data.length; _i3++) {
684
+
685
+ var _loop = function _loop(_i3) {
680
686
  tbody += '<tr>';
681
- for (var x in fields) {
682
- tbody += '<td align="' + aligns[x] + '">' + data[_i3][fields[x]] + '</td>';
687
+
688
+ var _loop2 = function _loop2(_x) {
689
+ var field = '';
690
+ var valueKey = keys[fields[_x]] && keys[fields[_x]].valueKey ? keys[fields[_x]].valueKey : 'value';
691
+ var labelKey = keys[fields[_x]] && keys[fields[_x]].labelKey ? keys[fields[_x]].labelKey : 'name';
692
+ if (option[fields[_x]]) {
693
+ if (Array.isArray(data[_i3][fields[_x]])) {
694
+ field = [];
695
+ data[_i3][fields[_x]].forEach(function (ele) {
696
+ option[fields[_x]].forEach(function (item) {
697
+ // eslint-disable-next-line eqeqeq
698
+ if (item[valueKey] == ele) {
699
+ field.push(item[labelKey]);
700
+ return;
701
+ }
702
+ });
703
+ });
704
+ field = field.join(' ');
705
+ } else if (typeof data[_i3][fields[_x]] === 'string' && keys[fields[_x]] && keys[fields[_x]].multiple) {
706
+ field = [];
707
+ data[_i3][fields[_x]].split(',').forEach(function (ele) {
708
+ option[fields[_x]].forEach(function (item) {
709
+ // eslint-disable-next-line eqeqeq
710
+ if (item[valueKey] == ele) {
711
+ field.push(item[labelKey]);
712
+ return;
713
+ }
714
+ });
715
+ });
716
+ field = field.join(' ');
717
+ } else {
718
+ option[fields[_x]].forEach(function (item) {
719
+ // eslint-disable-next-line eqeqeq
720
+ if (item[valueKey] == data[_i3][fields[_x]]) {
721
+ field = item[labelKey];
722
+ return;
723
+ }
724
+ });
725
+ }
726
+ } else if (_typeof(data[_i3][fields[_x]]) === 'object' && keys[fields[_x]]) {
727
+ if (Array.isArray(data[_i3][fields[_x]])) {
728
+ data[_i3][fields[_x]].forEach(function (item) {
729
+ field = [];
730
+ field.push({}.toString.call(item) === '[object Object]' ? item[labelKey] : item);
731
+ });
732
+ field = field.join(' ');
733
+ } else {
734
+ field = data[_i3][fields[_x]][labelKey];
735
+ }
736
+ } else {
737
+ field = data[_i3][fields[_x]];
738
+ }
739
+ tbody += '<td align="' + aligns[_x] + '">' + field + '</td>';
740
+ };
741
+
742
+ for (var _x in fields) {
743
+ _loop2(_x);
683
744
  }
684
745
  tbody += '</tr>';
746
+ };
747
+
748
+ for (var _i3 = 0; _i3 < data.length; _i3++) {
749
+ _loop(_i3);
685
750
  }
686
751
  if (!name) {
687
752
  name = 'table_' + new Date().getTime();
@@ -1383,7 +1448,8 @@ var isLogged = function isLogged(_ref8) {
1383
1448
  var to = _ref8.to,
1384
1449
  from = _ref8.from,
1385
1450
  next = _ref8.next,
1386
- exclude = _ref8.exclude,
1451
+ _ref8$exclude = _ref8.exclude,
1452
+ exclude = _ref8$exclude === undefined ? [] : _ref8$exclude,
1387
1453
  open = _ref8.open,
1388
1454
  cookie = _ref8.cookie,
1389
1455
  loginPage = _ref8.loginPage,
@@ -1429,10 +1495,27 @@ var isLogged = function isLogged(_ref8) {
1429
1495
  break;
1430
1496
  case 3:
1431
1497
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
- if (open) {
1433
- win.open(href);
1498
+ if (to.query.openType) {
1499
+ switch (to.query.openType) {
1500
+ case 'self':
1501
+ win.location.href = href;
1502
+ break;
1503
+ case 'blank':
1504
+ win.open(href);
1505
+ break;
1506
+ case 'top':
1507
+ win.top.location.href = href;
1508
+ break;
1509
+ case 'parent':
1510
+ win.parent.location.href = href;
1511
+ break;
1512
+ }
1434
1513
  } else {
1435
- win.top.location.href = href;
1514
+ if (open) {
1515
+ win.open(href);
1516
+ } else {
1517
+ win.top.location.href = href;
1518
+ }
1436
1519
  }
1437
1520
  break;
1438
1521
  }
@@ -1444,9 +1527,9 @@ var isLogged = function isLogged(_ref8) {
1444
1527
  }
1445
1528
  }
1446
1529
  }).catch(function (e) {});
1447
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1448
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1449
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1530
+ } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
1531
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1532
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1450
1533
  } else {
1451
1534
  next();
1452
1535
  }
@@ -2600,7 +2683,7 @@ module.exports = require("json-bigint");
2600
2683
 
2601
2684
  /***/ }),
2602
2685
 
2603
- /***/ 66:
2686
+ /***/ 67:
2604
2687
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2605
2688
 
2606
2689
  "use strict";
package/lib/input.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 65);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 66);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -534,7 +534,7 @@ var esEncode = function esEncode(value) {
534
534
  **/
535
535
  var esDecode = function esDecode(value) {
536
536
  var kleng = publicKey.length;
537
- var result;
537
+ var result = void 0;
538
538
  var cat1 = void 0;
539
539
  var cat2 = void 0;
540
540
  var cat3 = void 0;
@@ -639,11 +639,13 @@ var exportXls = function exportXls(_ref6) {
639
639
  _ref6$data = _ref6.data,
640
640
  data = _ref6$data === undefined ? [] : _ref6$data,
641
641
  name = _ref6.name,
642
- numbers = _ref6.numbers;
642
+ numbers = _ref6.numbers,
643
+ option = _ref6.option;
643
644
 
644
645
  var tbody = '';
645
646
  var aligns = [];
646
647
  var fields = [];
648
+ var keys = {};
647
649
  var others = {};
648
650
  var alink = document.createElement('a');
649
651
  for (var i = 0; i < thead.length; i++) {
@@ -653,12 +655,15 @@ var exportXls = function exportXls(_ref6) {
653
655
  }
654
656
  var tr = thead[i];
655
657
  var col = 0;
656
- for (var _x = 0; _x < tr.length; _x++) {
657
- var td = tr[_x];
658
+ for (var x = 0; x < tr.length; x++) {
659
+ var td = tr[x];
658
660
  if (td.property) {
659
- if (col === _x) {
661
+ if (col === x) {
660
662
  fields.push(td.property);
661
663
  aligns.push(td.align);
664
+ if (td.labelKey && td.valueKey) {
665
+ keys[td.property] = { labelKey: td.labelKey, valueKey: td.valueKey, multiple: !!(td.valueToString || td['value-to-string']) };
666
+ }
662
667
  } else {
663
668
  others[String(col)] = [td.property, td.align];
664
669
  }
@@ -676,12 +681,72 @@ var exportXls = function exportXls(_ref6) {
676
681
  fields.splice(_i2, 0, others[_i2][0]);
677
682
  aligns.splice(_i2, 0, others[_i2][1]);
678
683
  }
679
- for (var _i3 = 0; _i3 < data.length; _i3++) {
684
+
685
+ var _loop = function _loop(_i3) {
680
686
  tbody += '<tr>';
681
- for (var x in fields) {
682
- tbody += '<td align="' + aligns[x] + '">' + data[_i3][fields[x]] + '</td>';
687
+
688
+ var _loop2 = function _loop2(_x) {
689
+ var field = '';
690
+ var valueKey = keys[fields[_x]] && keys[fields[_x]].valueKey ? keys[fields[_x]].valueKey : 'value';
691
+ var labelKey = keys[fields[_x]] && keys[fields[_x]].labelKey ? keys[fields[_x]].labelKey : 'name';
692
+ if (option[fields[_x]]) {
693
+ if (Array.isArray(data[_i3][fields[_x]])) {
694
+ field = [];
695
+ data[_i3][fields[_x]].forEach(function (ele) {
696
+ option[fields[_x]].forEach(function (item) {
697
+ // eslint-disable-next-line eqeqeq
698
+ if (item[valueKey] == ele) {
699
+ field.push(item[labelKey]);
700
+ return;
701
+ }
702
+ });
703
+ });
704
+ field = field.join(' ');
705
+ } else if (typeof data[_i3][fields[_x]] === 'string' && keys[fields[_x]] && keys[fields[_x]].multiple) {
706
+ field = [];
707
+ data[_i3][fields[_x]].split(',').forEach(function (ele) {
708
+ option[fields[_x]].forEach(function (item) {
709
+ // eslint-disable-next-line eqeqeq
710
+ if (item[valueKey] == ele) {
711
+ field.push(item[labelKey]);
712
+ return;
713
+ }
714
+ });
715
+ });
716
+ field = field.join(' ');
717
+ } else {
718
+ option[fields[_x]].forEach(function (item) {
719
+ // eslint-disable-next-line eqeqeq
720
+ if (item[valueKey] == data[_i3][fields[_x]]) {
721
+ field = item[labelKey];
722
+ return;
723
+ }
724
+ });
725
+ }
726
+ } else if (_typeof(data[_i3][fields[_x]]) === 'object' && keys[fields[_x]]) {
727
+ if (Array.isArray(data[_i3][fields[_x]])) {
728
+ data[_i3][fields[_x]].forEach(function (item) {
729
+ field = [];
730
+ field.push({}.toString.call(item) === '[object Object]' ? item[labelKey] : item);
731
+ });
732
+ field = field.join(' ');
733
+ } else {
734
+ field = data[_i3][fields[_x]][labelKey];
735
+ }
736
+ } else {
737
+ field = data[_i3][fields[_x]];
738
+ }
739
+ tbody += '<td align="' + aligns[_x] + '">' + field + '</td>';
740
+ };
741
+
742
+ for (var _x in fields) {
743
+ _loop2(_x);
683
744
  }
684
745
  tbody += '</tr>';
746
+ };
747
+
748
+ for (var _i3 = 0; _i3 < data.length; _i3++) {
749
+ _loop(_i3);
685
750
  }
686
751
  if (!name) {
687
752
  name = 'table_' + new Date().getTime();
@@ -1383,7 +1448,8 @@ var isLogged = function isLogged(_ref8) {
1383
1448
  var to = _ref8.to,
1384
1449
  from = _ref8.from,
1385
1450
  next = _ref8.next,
1386
- exclude = _ref8.exclude,
1451
+ _ref8$exclude = _ref8.exclude,
1452
+ exclude = _ref8$exclude === undefined ? [] : _ref8$exclude,
1387
1453
  open = _ref8.open,
1388
1454
  cookie = _ref8.cookie,
1389
1455
  loginPage = _ref8.loginPage,
@@ -1429,10 +1495,27 @@ var isLogged = function isLogged(_ref8) {
1429
1495
  break;
1430
1496
  case 3:
1431
1497
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
- if (open) {
1433
- win.open(href);
1498
+ if (to.query.openType) {
1499
+ switch (to.query.openType) {
1500
+ case 'self':
1501
+ win.location.href = href;
1502
+ break;
1503
+ case 'blank':
1504
+ win.open(href);
1505
+ break;
1506
+ case 'top':
1507
+ win.top.location.href = href;
1508
+ break;
1509
+ case 'parent':
1510
+ win.parent.location.href = href;
1511
+ break;
1512
+ }
1434
1513
  } else {
1435
- win.top.location.href = href;
1514
+ if (open) {
1515
+ win.open(href);
1516
+ } else {
1517
+ win.top.location.href = href;
1518
+ }
1436
1519
  }
1437
1520
  break;
1438
1521
  }
@@ -1444,9 +1527,9 @@ var isLogged = function isLogged(_ref8) {
1444
1527
  }
1445
1528
  }
1446
1529
  }).catch(function (e) {});
1447
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1448
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1449
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1530
+ } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
1531
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1532
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1450
1533
  } else {
1451
1534
  next();
1452
1535
  }
@@ -2625,7 +2708,7 @@ module.exports = require("json-bigint");
2625
2708
 
2626
2709
  /***/ }),
2627
2710
 
2628
- /***/ 65:
2711
+ /***/ 66:
2629
2712
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2630
2713
 
2631
2714
  "use strict";
package/lib/label.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 67);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 68);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 67:
195
+ /***/ 68:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
package/lib/login.js CHANGED
@@ -533,7 +533,7 @@ var esEncode = function esEncode(value) {
533
533
  **/
534
534
  var esDecode = function esDecode(value) {
535
535
  var kleng = publicKey.length;
536
- var result;
536
+ var result = void 0;
537
537
  var cat1 = void 0;
538
538
  var cat2 = void 0;
539
539
  var cat3 = void 0;
@@ -638,11 +638,13 @@ var exportXls = function exportXls(_ref6) {
638
638
  _ref6$data = _ref6.data,
639
639
  data = _ref6$data === undefined ? [] : _ref6$data,
640
640
  name = _ref6.name,
641
- numbers = _ref6.numbers;
641
+ numbers = _ref6.numbers,
642
+ option = _ref6.option;
642
643
 
643
644
  var tbody = '';
644
645
  var aligns = [];
645
646
  var fields = [];
647
+ var keys = {};
646
648
  var others = {};
647
649
  var alink = document.createElement('a');
648
650
  for (var i = 0; i < thead.length; i++) {
@@ -652,12 +654,15 @@ var exportXls = function exportXls(_ref6) {
652
654
  }
653
655
  var tr = thead[i];
654
656
  var col = 0;
655
- for (var _x = 0; _x < tr.length; _x++) {
656
- var td = tr[_x];
657
+ for (var x = 0; x < tr.length; x++) {
658
+ var td = tr[x];
657
659
  if (td.property) {
658
- if (col === _x) {
660
+ if (col === x) {
659
661
  fields.push(td.property);
660
662
  aligns.push(td.align);
663
+ if (td.labelKey && td.valueKey) {
664
+ keys[td.property] = { labelKey: td.labelKey, valueKey: td.valueKey, multiple: !!(td.valueToString || td['value-to-string']) };
665
+ }
661
666
  } else {
662
667
  others[String(col)] = [td.property, td.align];
663
668
  }
@@ -675,12 +680,72 @@ var exportXls = function exportXls(_ref6) {
675
680
  fields.splice(_i2, 0, others[_i2][0]);
676
681
  aligns.splice(_i2, 0, others[_i2][1]);
677
682
  }
678
- for (var _i3 = 0; _i3 < data.length; _i3++) {
683
+
684
+ var _loop = function _loop(_i3) {
679
685
  tbody += '<tr>';
680
- for (var x in fields) {
681
- tbody += '<td align="' + aligns[x] + '">' + data[_i3][fields[x]] + '</td>';
686
+
687
+ var _loop2 = function _loop2(_x) {
688
+ var field = '';
689
+ var valueKey = keys[fields[_x]] && keys[fields[_x]].valueKey ? keys[fields[_x]].valueKey : 'value';
690
+ var labelKey = keys[fields[_x]] && keys[fields[_x]].labelKey ? keys[fields[_x]].labelKey : 'name';
691
+ if (option[fields[_x]]) {
692
+ if (Array.isArray(data[_i3][fields[_x]])) {
693
+ field = [];
694
+ data[_i3][fields[_x]].forEach(function (ele) {
695
+ option[fields[_x]].forEach(function (item) {
696
+ // eslint-disable-next-line eqeqeq
697
+ if (item[valueKey] == ele) {
698
+ field.push(item[labelKey]);
699
+ return;
700
+ }
701
+ });
702
+ });
703
+ field = field.join(' ');
704
+ } else if (typeof data[_i3][fields[_x]] === 'string' && keys[fields[_x]] && keys[fields[_x]].multiple) {
705
+ field = [];
706
+ data[_i3][fields[_x]].split(',').forEach(function (ele) {
707
+ option[fields[_x]].forEach(function (item) {
708
+ // eslint-disable-next-line eqeqeq
709
+ if (item[valueKey] == ele) {
710
+ field.push(item[labelKey]);
711
+ return;
712
+ }
713
+ });
714
+ });
715
+ field = field.join(' ');
716
+ } else {
717
+ option[fields[_x]].forEach(function (item) {
718
+ // eslint-disable-next-line eqeqeq
719
+ if (item[valueKey] == data[_i3][fields[_x]]) {
720
+ field = item[labelKey];
721
+ return;
722
+ }
723
+ });
724
+ }
725
+ } else if (_typeof(data[_i3][fields[_x]]) === 'object' && keys[fields[_x]]) {
726
+ if (Array.isArray(data[_i3][fields[_x]])) {
727
+ data[_i3][fields[_x]].forEach(function (item) {
728
+ field = [];
729
+ field.push({}.toString.call(item) === '[object Object]' ? item[labelKey] : item);
730
+ });
731
+ field = field.join(' ');
732
+ } else {
733
+ field = data[_i3][fields[_x]][labelKey];
734
+ }
735
+ } else {
736
+ field = data[_i3][fields[_x]];
737
+ }
738
+ tbody += '<td align="' + aligns[_x] + '">' + field + '</td>';
739
+ };
740
+
741
+ for (var _x in fields) {
742
+ _loop2(_x);
682
743
  }
683
744
  tbody += '</tr>';
745
+ };
746
+
747
+ for (var _i3 = 0; _i3 < data.length; _i3++) {
748
+ _loop(_i3);
684
749
  }
685
750
  if (!name) {
686
751
  name = 'table_' + new Date().getTime();
@@ -1382,7 +1447,8 @@ var isLogged = function isLogged(_ref8) {
1382
1447
  var to = _ref8.to,
1383
1448
  from = _ref8.from,
1384
1449
  next = _ref8.next,
1385
- exclude = _ref8.exclude,
1450
+ _ref8$exclude = _ref8.exclude,
1451
+ exclude = _ref8$exclude === undefined ? [] : _ref8$exclude,
1386
1452
  open = _ref8.open,
1387
1453
  cookie = _ref8.cookie,
1388
1454
  loginPage = _ref8.loginPage,
@@ -1428,10 +1494,27 @@ var isLogged = function isLogged(_ref8) {
1428
1494
  break;
1429
1495
  case 3:
1430
1496
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1431
- if (open) {
1432
- win.open(href);
1497
+ if (to.query.openType) {
1498
+ switch (to.query.openType) {
1499
+ case 'self':
1500
+ win.location.href = href;
1501
+ break;
1502
+ case 'blank':
1503
+ win.open(href);
1504
+ break;
1505
+ case 'top':
1506
+ win.top.location.href = href;
1507
+ break;
1508
+ case 'parent':
1509
+ win.parent.location.href = href;
1510
+ break;
1511
+ }
1433
1512
  } else {
1434
- win.top.location.href = href;
1513
+ if (open) {
1514
+ win.open(href);
1515
+ } else {
1516
+ win.top.location.href = href;
1517
+ }
1435
1518
  }
1436
1519
  break;
1437
1520
  }
@@ -1443,9 +1526,9 @@ var isLogged = function isLogged(_ref8) {
1443
1526
  }
1444
1527
  }
1445
1528
  }).catch(function (e) {});
1446
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1447
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1448
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1529
+ } else if (token || to.path === '/' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
1530
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1531
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1449
1532
  } else {
1450
1533
  next();
1451
1534
  }
@@ -2677,7 +2760,7 @@ var bankCard = { pattern: new RegExp('^([1-9]{1})(\\d{14}|\\d{18})$'), message:
2677
2760
  // ESM COMPAT FLAG
2678
2761
  __webpack_require__.r(__webpack_exports__);
2679
2762
 
2680
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=74d5fe51&
2763
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=88b0610e&
2681
2764
  var render = function () {
2682
2765
  var _vm = this
2683
2766
  var _h = _vm.$createElement
@@ -3474,7 +3557,7 @@ var staticRenderFns = []
3474
3557
  render._withStripped = true
3475
3558
 
3476
3559
 
3477
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=74d5fe51&
3560
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=88b0610e&
3478
3561
 
3479
3562
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=669156c6&
3480
3563
  var resetPasswordvue_type_template_id_669156c6_render = function () {
@@ -4375,7 +4458,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4375
4458
  if (this.redirect_uri) {
4376
4459
  return this.redirect_uri;
4377
4460
  } else {
4378
- return util["a" /* default */].win.top.location.href || window.href;
4461
+ return window.location.href || window.href;
4379
4462
  }
4380
4463
  },
4381
4464
  loginBackgroundUrl: function loginBackgroundUrl() {
@@ -4409,6 +4492,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4409
4492
  var types = this.loginType.split(',');
4410
4493
  return types.length > 2 ? {
4411
4494
  '0': { type: '0', icon: 'es-icon-shuru', name: '账号登录' },
4495
+ '1': { type: '1', icon: 'es-icon-usb-key', name: '证书登录' },
4412
4496
  '3': { type: '3', icon: 'es-icon-saoma', name: '扫码登录' },
4413
4497
  '6': { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
4414
4498
  '7': { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
@@ -4416,6 +4500,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4416
4500
  '11': { type: '11', icon: 'es-icon-youxiang', name: '邮箱登录' }
4417
4501
  } : {
4418
4502
  '0': { type: '0', icon: 'es-icon-jianpan', name: '账号登录' },
4503
+ '1': { type: '1', icon: 'es-icon-ca', name: '证书登录' },
4419
4504
  '3': { type: '3', icon: 'es-icon-qrcode', name: '扫码登录' },
4420
4505
  '6': { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
4421
4506
  '7': { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
@@ -4848,13 +4933,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4848
4933
  handleUserLogin: function handleUserLogin(data) {
4849
4934
  var _this6 = this;
4850
4935
 
4936
+ var extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
4851
4937
  util["a" /* default */].ajax({
4852
4938
  method: 'post',
4853
4939
  url: this.active == '0' ? this.actionUrl : this.doCodeLogin,
4854
- data: data
4940
+ data: extUserBindHandleId ? mainvue_type_script_lang_js_extends({}, data, { extUserBindHandleId: extUserBindHandleId }) : data
4855
4941
  }).then(function (res) {
4856
4942
  _this6.submit = false;
4857
4943
  if (res.rCode == 0) {
4944
+ sessionStorage.removeItem('extUserBindHandleId');
4858
4945
  _this6.handleRemember();
4859
4946
  var results = res.results;
4860
4947
  _this6.handleResults(results);
@@ -4947,12 +5034,12 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4947
5034
  duration: 1500,
4948
5035
  onClose: function onClose() {
4949
5036
  if (_this9.toUrl) {
4950
- util["a" /* default */].win.location.href = _this9.toUrl;
5037
+ window.location.href = _this9.toUrl;
4951
5038
  } else if (results.doorIndex && _this9.doorIndex) {
4952
- util["a" /* default */].win.location.href = results.doorIndex;
5039
+ window.location.href = results.doorIndex;
4953
5040
  } else {
4954
- if (util["a" /* default */].win.top.location.href.indexOf('login.html') > -1) {
4955
- util["a" /* default */].win.top.location.href = './main.html';
5041
+ if (window.location.href.indexOf('login.html') > -1) {
5042
+ window.location.href = './main.html';
4956
5043
  } else {
4957
5044
  _this9.$router.push({ name: 'main' });
4958
5045
  }
@@ -4975,18 +5062,30 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
4975
5062
  }).catch(function (e) {});
4976
5063
  break;
4977
5064
  case 3:
4978
- var url = results.doorIndex && this.doorIndex ? results.doorIndex : util["a" /* default */].win.top.location.href.indexOf('main.html') > -1 ? './login.html' : util["a" /* default */].win.location.hash ? util["a" /* default */].win.location.href.replace('login', 'main') : util["a" /* default */].win.location.href;
5065
+ var url = results.doorIndex && this.doorIndex ? results.doorIndex : window.location.href.indexOf('main.html') > -1 ? './login.html' : window.location.hash ? window.location.href.replace('login', 'main') : window.location.href;
4979
5066
  var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
4980
- util["a" /* default */].win.top.location.href = href;
4981
- // util.win.location.href =
5067
+ window.location.href = href;
5068
+ // window.location.href =
4982
5069
  // results.authorizeUrl.indexOf('?') > -1
4983
5070
  // ? results.authorizeUrl + '&token=' + results.token
4984
5071
  // : results.authorizeUrl + '?token=' + results.token;
4985
5072
  break;
5073
+ case 4:
5074
+ this.$alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
5075
+ confirmButtonText: '确定',
5076
+ type: 'error'
5077
+ }).then(function () {
5078
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
5079
+ window.location.href = util["a" /* default */].delUrlParam({ key: 'code' });
5080
+ if (window.location.hash) {
5081
+ location.reload();
5082
+ }
5083
+ }).catch(function (e) {});
5084
+ break;
4986
5085
  default:
4987
5086
  if (type !== 3) {
4988
5087
  this.$message({
4989
- message: results.msg || res.msg,
5088
+ message: results.msg,
4990
5089
  type: 'error',
4991
5090
  duration: 1500,
4992
5091
  onClose: function onClose() {