eoss-ui 0.4.10 → 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 (67) hide show
  1. package/lib/button-group.js +96 -14
  2. package/lib/button.js +98 -16
  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 +96 -14
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +96 -14
  9. package/lib/data-table.js +134 -34
  10. package/lib/date-picker.js +98 -16
  11. package/lib/dialog.js +99 -16
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +275 -52
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +98 -16
  16. package/lib/flow-list.js +96 -14
  17. package/lib/flow.js +96 -14
  18. package/lib/form.js +110 -25
  19. package/lib/handle-user.js +98 -16
  20. package/lib/handler.js +98 -16
  21. package/lib/index.js +1 -1
  22. package/lib/input-number.js +98 -16
  23. package/lib/input.js +98 -16
  24. package/lib/label.js +2 -2
  25. package/lib/login.js +96 -14
  26. package/lib/main.js +96 -14
  27. package/lib/mainComp.js +96 -14
  28. package/lib/menu.js +2 -2
  29. package/lib/nav.js +98 -16
  30. package/lib/notify.js +2 -2
  31. package/lib/page.js +98 -16
  32. package/lib/pagination.js +2 -2
  33. package/lib/player.js +98 -16
  34. package/lib/qr-code.js +105 -23
  35. package/lib/radio-group.js +98 -16
  36. package/lib/select-ganged.js +98 -16
  37. package/lib/select.js +105 -23
  38. package/lib/selector-panel.js +96 -14
  39. package/lib/selector.js +98 -16
  40. package/lib/sizer.js +98 -16
  41. package/lib/steps.js +98 -16
  42. package/lib/switch.js +98 -16
  43. package/lib/table-form.js +105 -23
  44. package/lib/tabs-panel.js +2 -2
  45. package/lib/tabs.js +98 -16
  46. package/lib/theme-chalk/ca-login.css +1 -0
  47. package/lib/theme-chalk/index.css +1 -1
  48. package/lib/tips.js +98 -16
  49. package/lib/toolbar.js +2 -2
  50. package/lib/tree-group.js +98 -16
  51. package/lib/tree.js +98 -16
  52. package/lib/upload.js +96 -14
  53. package/lib/utils/util.js +96 -14
  54. package/lib/wujie.js +98 -16
  55. package/lib/wxlogin.js +98 -16
  56. package/package.json +2 -2
  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 +107 -35
package/lib/cascader.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 = 63);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 64);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 63:
195
+ /***/ 64:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
@@ -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();
@@ -1430,10 +1495,27 @@ var isLogged = function isLogged(_ref8) {
1430
1495
  break;
1431
1496
  case 3:
1432
1497
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1433
- if (open) {
1434
- 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
+ }
1435
1513
  } else {
1436
- win.top.location.href = href;
1514
+ if (open) {
1515
+ win.open(href);
1516
+ } else {
1517
+ win.top.location.href = href;
1518
+ }
1437
1519
  }
1438
1520
  break;
1439
1521
  }
@@ -1445,9 +1527,9 @@ var isLogged = function isLogged(_ref8) {
1445
1527
  }
1446
1528
  }
1447
1529
  }).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 }));
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 }));
1451
1533
  } else {
1452
1534
  next();
1453
1535
  }
package/lib/clients.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 = 36);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 37);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -192,7 +192,7 @@ function normalizeComponent(
192
192
 
193
193
  /***/ }),
194
194
 
195
- /***/ 36:
195
+ /***/ 37:
196
196
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
197
 
198
198
  "use strict";
@@ -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();
@@ -1429,10 +1494,27 @@ var isLogged = function isLogged(_ref8) {
1429
1494
  break;
1430
1495
  case 3:
1431
1496
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
- if (open) {
1433
- 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
+ }
1434
1512
  } else {
1435
- win.top.location.href = href;
1513
+ if (open) {
1514
+ win.open(href);
1515
+ } else {
1516
+ win.top.location.href = href;
1517
+ }
1436
1518
  }
1437
1519
  break;
1438
1520
  }
@@ -1444,9 +1526,9 @@ var isLogged = function isLogged(_ref8) {
1444
1526
  }
1445
1527
  }
1446
1528
  }).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 }));
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 }));
1450
1532
  } else {
1451
1533
  next();
1452
1534
  }
package/lib/data-table.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();
@@ -1429,10 +1494,27 @@ var isLogged = function isLogged(_ref8) {
1429
1494
  break;
1430
1495
  case 3:
1431
1496
  var href = res.results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(url));
1432
- if (open) {
1433
- 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
+ }
1434
1512
  } else {
1435
- win.top.location.href = href;
1513
+ if (open) {
1514
+ win.open(href);
1515
+ } else {
1516
+ win.top.location.href = href;
1517
+ }
1436
1518
  }
1437
1519
  break;
1438
1520
  }
@@ -1444,9 +1526,9 @@ var isLogged = function isLogged(_ref8) {
1444
1526
  }
1445
1527
  }
1446
1528
  }).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 }));
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 }));
1450
1532
  } else {
1451
1533
  next();
1452
1534
  }
@@ -2646,8 +2728,8 @@ module.exports = require("vue");
2646
2728
  // ESM COMPAT FLAG
2647
2729
  __webpack_require__.r(__webpack_exports__);
2648
2730
 
2649
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=97c4c582&
2650
- var mainvue_type_template_id_97c4c582_render = function () {
2731
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=154b78e2&
2732
+ var mainvue_type_template_id_154b78e2_render = function () {
2651
2733
  var _vm = this
2652
2734
  var _h = _vm.$createElement
2653
2735
  var _c = _vm._self._c || _h
@@ -2980,10 +3062,10 @@ var mainvue_type_template_id_97c4c582_render = function () {
2980
3062
  )
2981
3063
  }
2982
3064
  var staticRenderFns = []
2983
- mainvue_type_template_id_97c4c582_render._withStripped = true
3065
+ mainvue_type_template_id_154b78e2_render._withStripped = true
2984
3066
 
2985
3067
 
2986
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=97c4c582&
3068
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=154b78e2&
2987
3069
 
2988
3070
  // EXTERNAL MODULE: ./src/config/api.js
2989
3071
  var api = __webpack_require__(1);
@@ -3036,8 +3118,8 @@ childrenvue_type_template_id_796433ee_render._withStripped = true
3036
3118
 
3037
3119
  // CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=796433ee&
3038
3120
 
3039
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=177bef1c&
3040
- var columnvue_type_template_id_177bef1c_render = function () {
3121
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=1f31fcc6&
3122
+ var columnvue_type_template_id_1f31fcc6_render = function () {
3041
3123
  var _vm = this
3042
3124
  var _h = _vm.$createElement
3043
3125
  var _c = _vm._self._c || _h
@@ -3054,6 +3136,8 @@ var columnvue_type_template_id_177bef1c_render = function () {
3054
3136
  attrs: {
3055
3137
  "filter-icon": _vm.filterIcon,
3056
3138
  label: _vm.item.title || _vm.item.label,
3139
+ "label-key": _vm.item.labelKey,
3140
+ "value-key": _vm.item.valueKey,
3057
3141
  prop: _vm.item.field || _vm.item.prop,
3058
3142
  fixed: _vm.item.fixed,
3059
3143
  sortable: _vm.item.sortable || _vm.item.sort,
@@ -3929,6 +4013,8 @@ var columnvue_type_template_id_177bef1c_render = function () {
3929
4013
  attrs: {
3930
4014
  "filter-icon": _vm.filterIcon,
3931
4015
  label: _vm.item.title || _vm.item.label,
4016
+ "label-key": _vm.item.labelKey,
4017
+ "value-key": _vm.item.valueKey,
3932
4018
  prop: _vm.item.field || _vm.item.prop,
3933
4019
  fixed: _vm.item.fixed,
3934
4020
  sortable: _vm.item.sortable || _vm.item.sort,
@@ -3993,11 +4079,11 @@ var columnvue_type_template_id_177bef1c_render = function () {
3993
4079
  2
3994
4080
  )
3995
4081
  }
3996
- var columnvue_type_template_id_177bef1c_staticRenderFns = []
3997
- columnvue_type_template_id_177bef1c_render._withStripped = true
4082
+ var columnvue_type_template_id_1f31fcc6_staticRenderFns = []
4083
+ columnvue_type_template_id_1f31fcc6_render._withStripped = true
3998
4084
 
3999
4085
 
4000
- // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=177bef1c&
4086
+ // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=1f31fcc6&
4001
4087
 
4002
4088
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
4003
4089
  var regenerator_ = __webpack_require__(9);
@@ -4561,6 +4647,10 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
4561
4647
  //
4562
4648
  //
4563
4649
  //
4650
+ //
4651
+ //
4652
+ //
4653
+ //
4564
4654
 
4565
4655
 
4566
4656
 
@@ -4761,8 +4851,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
4761
4851
  var data = col.data ? col.data : col.optionData ? rows[col.optionData] : this.optionDatas[field];
4762
4852
  if (util["a" /* default */].isObject(rows[field])) {
4763
4853
  return rows[field][col.labelKey] || rows[field]['name'] || rows[field]['label'] || rows[field]['shortName'];
4764
- }
4765
- if (Array.isArray(rows[field])) {
4854
+ } else if (Array.isArray(rows[field])) {
4766
4855
  var vals = rows[field].map(function (item) {
4767
4856
  if (util["a" /* default */].isObject(item)) {
4768
4857
  return item[col.labelKey] || item['name'] || item['label'] || item['shortName'];
@@ -4774,12 +4863,22 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
4774
4863
  }
4775
4864
  });
4776
4865
  return vals.join(col.symbol ? col.symbol : '-');
4866
+ } else {
4867
+ if (col.valueToString || col['value-to-string']) {
4868
+ var _vals = rows[field].split(',').map(function (item) {
4869
+ if (data && data.length && util["a" /* default */].isObject(data[0])) {
4870
+ return _this2.getLabel(data, item, col);
4871
+ }
4872
+ return item;
4873
+ });
4874
+ return _vals.join(col.symbol ? col.symbol : '-');
4875
+ } else {
4876
+ if (data && data.length && util["a" /* default */].isObject(data[0])) {
4877
+ return this.getLabel(data, rows[field], col);
4878
+ }
4879
+ return rows[field];
4880
+ }
4777
4881
  }
4778
-
4779
- if (data && data.length && util["a" /* default */].isObject(data[0])) {
4780
- return this.getLabel(data, rows[field], col);
4781
- }
4782
- return rows[field];
4783
4882
  },
4784
4883
  getLabel: function getLabel(obj, val, col) {
4785
4884
  for (var i = 0; i < obj.length; i++) {
@@ -4886,8 +4985,8 @@ var componentNormalizer = __webpack_require__(2);
4886
4985
 
4887
4986
  var component = Object(componentNormalizer["a" /* default */])(
4888
4987
  src_columnvue_type_script_lang_js_,
4889
- columnvue_type_template_id_177bef1c_render,
4890
- columnvue_type_template_id_177bef1c_staticRenderFns,
4988
+ columnvue_type_template_id_1f31fcc6_render,
4989
+ columnvue_type_template_id_1f31fcc6_staticRenderFns,
4891
4990
  false,
4892
4991
  null,
4893
4992
  null,
@@ -6217,7 +6316,8 @@ var mainvue_type_script_lang_js_components;
6217
6316
  util["a" /* default */].exportXls({
6218
6317
  thead: thead,
6219
6318
  data: this.datas,
6220
- name: this.fileName
6319
+ name: this.fileName,
6320
+ option: this.optionDatas
6221
6321
  });
6222
6322
  }
6223
6323
  this.$emit('btnClick', res, this.datas, thead, rows);
@@ -6385,7 +6485,7 @@ var mainvue_type_script_lang_js_components;
6385
6485
 
6386
6486
  var main_component = Object(componentNormalizer["a" /* default */])(
6387
6487
  src_mainvue_type_script_lang_js_,
6388
- mainvue_type_template_id_97c4c582_render,
6488
+ mainvue_type_template_id_154b78e2_render,
6389
6489
  staticRenderFns,
6390
6490
  false,
6391
6491
  null,