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
package/lib/upload.js CHANGED
@@ -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
  }
package/lib/utils/util.js CHANGED
@@ -449,7 +449,7 @@ var esEncode = function esEncode(value) {
449
449
  **/
450
450
  var esDecode = function esDecode(value) {
451
451
  var kleng = publicKey.length;
452
- var result;
452
+ var result = void 0;
453
453
  var cat1 = void 0;
454
454
  var cat2 = void 0;
455
455
  var cat3 = void 0;
@@ -554,11 +554,13 @@ var exportXls = function exportXls(_ref6) {
554
554
  _ref6$data = _ref6.data,
555
555
  data = _ref6$data === undefined ? [] : _ref6$data,
556
556
  name = _ref6.name,
557
- numbers = _ref6.numbers;
557
+ numbers = _ref6.numbers,
558
+ option = _ref6.option;
558
559
 
559
560
  var tbody = '';
560
561
  var aligns = [];
561
562
  var fields = [];
563
+ var keys = {};
562
564
  var others = {};
563
565
  var alink = document.createElement('a');
564
566
  for (var i = 0; i < thead.length; i++) {
@@ -568,12 +570,15 @@ var exportXls = function exportXls(_ref6) {
568
570
  }
569
571
  var tr = thead[i];
570
572
  var col = 0;
571
- for (var _x = 0; _x < tr.length; _x++) {
572
- var td = tr[_x];
573
+ for (var x = 0; x < tr.length; x++) {
574
+ var td = tr[x];
573
575
  if (td.property) {
574
- if (col === _x) {
576
+ if (col === x) {
575
577
  fields.push(td.property);
576
578
  aligns.push(td.align);
579
+ if (td.labelKey && td.valueKey) {
580
+ keys[td.property] = { labelKey: td.labelKey, valueKey: td.valueKey, multiple: !!(td.valueToString || td['value-to-string']) };
581
+ }
577
582
  } else {
578
583
  others[String(col)] = [td.property, td.align];
579
584
  }
@@ -591,12 +596,72 @@ var exportXls = function exportXls(_ref6) {
591
596
  fields.splice(_i2, 0, others[_i2][0]);
592
597
  aligns.splice(_i2, 0, others[_i2][1]);
593
598
  }
594
- for (var _i3 = 0; _i3 < data.length; _i3++) {
599
+
600
+ var _loop = function _loop(_i3) {
595
601
  tbody += '<tr>';
596
- for (var x in fields) {
597
- tbody += '<td align="' + aligns[x] + '">' + data[_i3][fields[x]] + '</td>';
602
+
603
+ var _loop2 = function _loop2(_x) {
604
+ var field = '';
605
+ var valueKey = keys[fields[_x]] && keys[fields[_x]].valueKey ? keys[fields[_x]].valueKey : 'value';
606
+ var labelKey = keys[fields[_x]] && keys[fields[_x]].labelKey ? keys[fields[_x]].labelKey : 'name';
607
+ if (option[fields[_x]]) {
608
+ if (Array.isArray(data[_i3][fields[_x]])) {
609
+ field = [];
610
+ data[_i3][fields[_x]].forEach(function (ele) {
611
+ option[fields[_x]].forEach(function (item) {
612
+ // eslint-disable-next-line eqeqeq
613
+ if (item[valueKey] == ele) {
614
+ field.push(item[labelKey]);
615
+ return;
616
+ }
617
+ });
618
+ });
619
+ field = field.join(' ');
620
+ } else if (typeof data[_i3][fields[_x]] === 'string' && keys[fields[_x]] && keys[fields[_x]].multiple) {
621
+ field = [];
622
+ data[_i3][fields[_x]].split(',').forEach(function (ele) {
623
+ option[fields[_x]].forEach(function (item) {
624
+ // eslint-disable-next-line eqeqeq
625
+ if (item[valueKey] == ele) {
626
+ field.push(item[labelKey]);
627
+ return;
628
+ }
629
+ });
630
+ });
631
+ field = field.join(' ');
632
+ } else {
633
+ option[fields[_x]].forEach(function (item) {
634
+ // eslint-disable-next-line eqeqeq
635
+ if (item[valueKey] == data[_i3][fields[_x]]) {
636
+ field = item[labelKey];
637
+ return;
638
+ }
639
+ });
640
+ }
641
+ } else if (_typeof(data[_i3][fields[_x]]) === 'object' && keys[fields[_x]]) {
642
+ if (Array.isArray(data[_i3][fields[_x]])) {
643
+ data[_i3][fields[_x]].forEach(function (item) {
644
+ field = [];
645
+ field.push({}.toString.call(item) === '[object Object]' ? item[labelKey] : item);
646
+ });
647
+ field = field.join(' ');
648
+ } else {
649
+ field = data[_i3][fields[_x]][labelKey];
650
+ }
651
+ } else {
652
+ field = data[_i3][fields[_x]];
653
+ }
654
+ tbody += '<td align="' + aligns[_x] + '">' + field + '</td>';
655
+ };
656
+
657
+ for (var _x in fields) {
658
+ _loop2(_x);
598
659
  }
599
660
  tbody += '</tr>';
661
+ };
662
+
663
+ for (var _i3 = 0; _i3 < data.length; _i3++) {
664
+ _loop(_i3);
600
665
  }
601
666
  if (!name) {
602
667
  name = 'table_' + new Date().getTime();
@@ -1317,8 +1382,21 @@ var isLogged = function isLogged(_ref8) {
1317
1382
  next();
1318
1383
  } else {
1319
1384
  var token = getStorage('token') || getStorage('Authorization');
1320
- if (Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1385
+ if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1321
1386
  var url = win.top.location.href;
1387
+ if (to.query.openType) {
1388
+ switch (to.query.openType) {
1389
+ case 'self':
1390
+ url = win.location.href;
1391
+ break;
1392
+ case 'blank':
1393
+ url = win.location.href;
1394
+ break;
1395
+ case 'parent':
1396
+ url = win.parent.location.href;
1397
+ break;
1398
+ }
1399
+ }
1322
1400
  ajax({
1323
1401
  method: 'post',
1324
1402
  url: _api.authCenter,
@@ -1345,10 +1423,27 @@ var isLogged = function isLogged(_ref8) {
1345
1423
  break;
1346
1424
  case 3:
1347
1425
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1348
- if (open) {
1349
- win.open(href);
1426
+ if (to.query.openType) {
1427
+ switch (to.query.openType) {
1428
+ case 'self':
1429
+ win.location.href = href;
1430
+ break;
1431
+ case 'blank':
1432
+ win.open(href);
1433
+ break;
1434
+ case 'top':
1435
+ win.top.location.href = href;
1436
+ break;
1437
+ case 'parent':
1438
+ win.parent.location.href = href;
1439
+ break;
1440
+ }
1350
1441
  } else {
1351
- win.top.location.href = href;
1442
+ if (open) {
1443
+ win.open(href);
1444
+ } else {
1445
+ win.top.location.href = href;
1446
+ }
1352
1447
  }
1353
1448
  break;
1354
1449
  }
@@ -1360,9 +1455,9 @@ var isLogged = function isLogged(_ref8) {
1360
1455
  }
1361
1456
  }
1362
1457
  }).catch(function (e) {});
1363
- } else if (token || to.path === '/' || to.path === '/login' || to.path === '/404' || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1) {
1364
- if (redirect && to.name && (to.name === 'login' || to.name === 'main')) {
1365
- window.location.replace(urlJoinParams({ url: './' + to.name + '.html', param: to.query }));
1458
+ } 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') {
1459
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
1460
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1366
1461
  } else {
1367
1462
  next();
1368
1463
  }
package/lib/wujie.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 = 60);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 61);
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("json-bigint");
2601
2696
 
2602
2697
  /***/ }),
2603
2698
 
2604
- /***/ 60:
2699
+ /***/ 61:
2605
2700
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2606
2701
 
2607
2702
  "use strict";