eoss-ui 0.4.10 → 0.4.15

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 +110 -15
  2. package/lib/button.js +112 -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 +110 -15
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +110 -15
  9. package/lib/data-table.js +148 -35
  10. package/lib/date-picker.js +112 -17
  11. package/lib/dialog.js +113 -17
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +289 -53
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +112 -17
  16. package/lib/flow-list.js +110 -15
  17. package/lib/flow.js +110 -15
  18. package/lib/form.js +124 -26
  19. package/lib/handle-user.js +112 -17
  20. package/lib/handler.js +112 -17
  21. package/lib/index.js +1 -1
  22. package/lib/input-number.js +112 -17
  23. package/lib/input.js +112 -17
  24. package/lib/label.js +2 -2
  25. package/lib/login.js +110 -15
  26. package/lib/main.js +110 -15
  27. package/lib/mainComp.js +110 -15
  28. package/lib/menu.js +2 -2
  29. package/lib/nav.js +112 -17
  30. package/lib/notify.js +2 -2
  31. package/lib/page.js +112 -17
  32. package/lib/pagination.js +2 -2
  33. package/lib/player.js +112 -17
  34. package/lib/qr-code.js +119 -24
  35. package/lib/radio-group.js +112 -17
  36. package/lib/select-ganged.js +112 -17
  37. package/lib/select.js +119 -24
  38. package/lib/selector-panel.js +110 -15
  39. package/lib/selector.js +112 -17
  40. package/lib/sizer.js +112 -17
  41. package/lib/steps.js +112 -17
  42. package/lib/switch.js +112 -17
  43. package/lib/table-form.js +119 -24
  44. package/lib/tabs-panel.js +2 -2
  45. package/lib/tabs.js +112 -17
  46. package/lib/theme-chalk/ca-login.css +1 -0
  47. package/lib/theme-chalk/index.css +1 -1
  48. package/lib/tips.js +112 -17
  49. package/lib/toolbar.js +2 -2
  50. package/lib/tree-group.js +112 -17
  51. package/lib/tree.js +112 -17
  52. package/lib/upload.js +110 -15
  53. package/lib/utils/util.js +110 -15
  54. package/lib/wujie.js +112 -17
  55. package/lib/wxlogin.js +112 -17
  56. package/package.json +4 -4
  57. package/packages/ca-login/index.js +5 -0
  58. package/packages/ca-login/src/main.vue +62 -0
  59. package/packages/data-table/src/column.vue +20 -7
  60. package/packages/data-table/src/main.vue +2 -1
  61. package/packages/form/src/main.vue +17 -7
  62. package/packages/theme-chalk/lib/ca-login.css +1 -0
  63. package/packages/theme-chalk/lib/index.css +1 -1
  64. package/packages/theme-chalk/src/ca-login.scss +4 -0
  65. package/packages/theme-chalk/src/index.scss +1 -0
  66. package/src/index.js +4 -1
  67. package/src/utils/util.js +122 -37
@@ -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();
@@ -1401,8 +1466,21 @@ var isLogged = function isLogged(_ref8) {
1401
1466
  next();
1402
1467
  } else {
1403
1468
  var token = getStorage('token') || getStorage('Authorization');
1404
- if (Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1469
+ if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1405
1470
  var url = win.top.location.href;
1471
+ if (to.query.openType) {
1472
+ switch (to.query.openType) {
1473
+ case 'self':
1474
+ url = win.location.href;
1475
+ break;
1476
+ case 'blank':
1477
+ url = win.location.href;
1478
+ break;
1479
+ case 'parent':
1480
+ url = win.parent.location.href;
1481
+ break;
1482
+ }
1483
+ }
1406
1484
  ajax({
1407
1485
  method: 'post',
1408
1486
  url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
@@ -1429,10 +1507,27 @@ var isLogged = function isLogged(_ref8) {
1429
1507
  break;
1430
1508
  case 3:
1431
1509
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
- if (open) {
1433
- win.open(href);
1510
+ if (to.query.openType) {
1511
+ switch (to.query.openType) {
1512
+ case 'self':
1513
+ win.location.href = href;
1514
+ break;
1515
+ case 'blank':
1516
+ win.open(href);
1517
+ break;
1518
+ case 'top':
1519
+ win.top.location.href = href;
1520
+ break;
1521
+ case 'parent':
1522
+ win.parent.location.href = href;
1523
+ break;
1524
+ }
1434
1525
  } else {
1435
- win.top.location.href = href;
1526
+ if (open) {
1527
+ win.open(href);
1528
+ } else {
1529
+ win.top.location.href = href;
1530
+ }
1436
1531
  }
1437
1532
  break;
1438
1533
  }
@@ -1444,9 +1539,9 @@ var isLogged = function isLogged(_ref8) {
1444
1539
  }
1445
1540
  }
1446
1541
  }).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 }));
1542
+ } 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') {
1543
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1544
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1450
1545
  } else {
1451
1546
  next();
1452
1547
  }
package/lib/selector.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 = 51);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 52);
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();
@@ -1402,8 +1467,21 @@ var isLogged = function isLogged(_ref8) {
1402
1467
  next();
1403
1468
  } else {
1404
1469
  var token = getStorage('token') || getStorage('Authorization');
1405
- if (Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1470
+ if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1406
1471
  var url = win.top.location.href;
1472
+ if (to.query.openType) {
1473
+ switch (to.query.openType) {
1474
+ case 'self':
1475
+ url = win.location.href;
1476
+ break;
1477
+ case 'blank':
1478
+ url = win.location.href;
1479
+ break;
1480
+ case 'parent':
1481
+ url = win.parent.location.href;
1482
+ break;
1483
+ }
1484
+ }
1407
1485
  ajax({
1408
1486
  method: 'post',
1409
1487
  url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
@@ -1430,10 +1508,27 @@ var isLogged = function isLogged(_ref8) {
1430
1508
  break;
1431
1509
  case 3:
1432
1510
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1433
- if (open) {
1434
- win.open(href);
1511
+ if (to.query.openType) {
1512
+ switch (to.query.openType) {
1513
+ case 'self':
1514
+ win.location.href = href;
1515
+ break;
1516
+ case 'blank':
1517
+ win.open(href);
1518
+ break;
1519
+ case 'top':
1520
+ win.top.location.href = href;
1521
+ break;
1522
+ case 'parent':
1523
+ win.parent.location.href = href;
1524
+ break;
1525
+ }
1435
1526
  } else {
1436
- win.top.location.href = href;
1527
+ if (open) {
1528
+ win.open(href);
1529
+ } else {
1530
+ win.top.location.href = href;
1531
+ }
1437
1532
  }
1438
1533
  break;
1439
1534
  }
@@ -1445,9 +1540,9 @@ var isLogged = function isLogged(_ref8) {
1445
1540
  }
1446
1541
  }
1447
1542
  }).catch(function (e) {});
1448
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1449
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1450
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1543
+ } 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') {
1544
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1545
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1451
1546
  } else {
1452
1547
  next();
1453
1548
  }
@@ -2601,7 +2696,7 @@ module.exports = require("eoss-element");
2601
2696
 
2602
2697
  /***/ }),
2603
2698
 
2604
- /***/ 51:
2699
+ /***/ 52:
2605
2700
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2606
2701
 
2607
2702
  "use strict";
package/lib/sizer.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 = 52);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 53);
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();
@@ -1402,8 +1467,21 @@ var isLogged = function isLogged(_ref8) {
1402
1467
  next();
1403
1468
  } else {
1404
1469
  var token = getStorage('token') || getStorage('Authorization');
1405
- if (Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1470
+ if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1406
1471
  var url = win.top.location.href;
1472
+ if (to.query.openType) {
1473
+ switch (to.query.openType) {
1474
+ case 'self':
1475
+ url = win.location.href;
1476
+ break;
1477
+ case 'blank':
1478
+ url = win.location.href;
1479
+ break;
1480
+ case 'parent':
1481
+ url = win.parent.location.href;
1482
+ break;
1483
+ }
1484
+ }
1407
1485
  ajax({
1408
1486
  method: 'post',
1409
1487
  url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
@@ -1430,10 +1508,27 @@ var isLogged = function isLogged(_ref8) {
1430
1508
  break;
1431
1509
  case 3:
1432
1510
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1433
- if (open) {
1434
- win.open(href);
1511
+ if (to.query.openType) {
1512
+ switch (to.query.openType) {
1513
+ case 'self':
1514
+ win.location.href = href;
1515
+ break;
1516
+ case 'blank':
1517
+ win.open(href);
1518
+ break;
1519
+ case 'top':
1520
+ win.top.location.href = href;
1521
+ break;
1522
+ case 'parent':
1523
+ win.parent.location.href = href;
1524
+ break;
1525
+ }
1435
1526
  } else {
1436
- win.top.location.href = href;
1527
+ if (open) {
1528
+ win.open(href);
1529
+ } else {
1530
+ win.top.location.href = href;
1531
+ }
1437
1532
  }
1438
1533
  break;
1439
1534
  }
@@ -1445,9 +1540,9 @@ var isLogged = function isLogged(_ref8) {
1445
1540
  }
1446
1541
  }
1447
1542
  }).catch(function (e) {});
1448
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1449
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1450
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1543
+ } 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') {
1544
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1545
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1451
1546
  } else {
1452
1547
  next();
1453
1548
  }
@@ -2594,7 +2689,7 @@ module.exports = require("eoss-element");
2594
2689
 
2595
2690
  /***/ }),
2596
2691
 
2597
- /***/ 52:
2692
+ /***/ 53:
2598
2693
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2599
2694
 
2600
2695
  "use strict";