eoss-ui 0.5.81-beta → 0.5.81-beta10

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 (109) hide show
  1. package/lib/button-group.js +50 -50
  2. package/lib/button.js +50 -50
  3. package/lib/checkbox-group.js +50 -50
  4. package/lib/data-table-form.js +50 -50
  5. package/lib/data-table.js +195 -174
  6. package/lib/date-picker.js +50 -50
  7. package/lib/dialog.js +50 -50
  8. package/lib/eoss-ui.common.js +2592 -1440
  9. package/lib/flow-group.js +50 -50
  10. package/lib/flow-list.js +53 -53
  11. package/lib/flow.js +71 -71
  12. package/lib/form.js +90 -52
  13. package/lib/handle-user.js +67 -54
  14. package/lib/handler.js +59 -53
  15. package/lib/icon.js +78 -58
  16. package/lib/index.js +1 -1
  17. package/lib/input-number.js +50 -50
  18. package/lib/input.js +50 -50
  19. package/lib/login.js +59 -56
  20. package/lib/main.js +2214 -1212
  21. package/lib/nav.js +50 -50
  22. package/lib/notify.js +55 -55
  23. package/lib/page.js +50 -50
  24. package/lib/player.js +50 -50
  25. package/lib/qr-code.js +50 -50
  26. package/lib/radio-group.js +50 -50
  27. package/lib/retrial-auth.js +51 -51
  28. package/lib/select-ganged.js +50 -50
  29. package/lib/select.js +51 -51
  30. package/lib/selector-panel.js +115 -67
  31. package/lib/selector.js +58 -54
  32. package/lib/sizer.js +50 -50
  33. package/lib/steps.js +50 -50
  34. package/lib/switch.js +50 -50
  35. package/lib/table-form.js +50 -50
  36. package/lib/tabs.js +50 -50
  37. package/lib/theme-chalk/base.css +1 -1
  38. package/lib/theme-chalk/button-group.css +1 -1
  39. package/lib/theme-chalk/data-table.css +1 -1
  40. package/lib/theme-chalk/form.css +1 -1
  41. package/lib/theme-chalk/handler.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/theme-chalk/main.css +1 -1
  44. package/lib/theme-chalk/menu.css +1 -1
  45. package/lib/theme-chalk/nav.css +1 -1
  46. package/lib/theme-chalk/selector-panel.css +1 -1
  47. package/lib/theme-chalk/simplicity.css +1 -1
  48. package/lib/theme-chalk/sizer.css +1 -1
  49. package/lib/theme-chalk/tree.css +1 -1
  50. package/lib/theme-chalk/upload.css +1 -1
  51. package/lib/tips.js +50 -50
  52. package/lib/tree-group.js +50 -50
  53. package/lib/tree.js +50 -50
  54. package/lib/upload.js +63 -63
  55. package/lib/wujie.js +50 -50
  56. package/lib/wxlogin.js +50 -50
  57. package/package.json +2 -2
  58. package/packages/data-table/src/main.vue +53 -28
  59. package/packages/form/src/main.vue +38 -8
  60. package/packages/handle-user/src/main.vue +10 -3
  61. package/packages/handler/src/main.vue +2 -0
  62. package/packages/icon/src/main.vue +23 -6
  63. package/packages/login/src/main.vue +11 -4
  64. package/packages/main/src/default/index.vue +32 -109
  65. package/packages/main/src/main.vue +17 -16
  66. package/packages/main/src/simplicity/apps.vue +201 -133
  67. package/packages/main/src/simplicity/avatar.vue +16 -6
  68. package/packages/main/src/simplicity/handler.vue +77 -37
  69. package/packages/main/src/simplicity/index.vue +485 -199
  70. package/packages/main/src/simplicity/menu-list.vue +75 -22
  71. package/packages/main/src/simplicity/message.vue +35 -25
  72. package/packages/main/src/simplicity/notice.vue +72 -39
  73. package/packages/main/src/simplicity/router-page.vue +53 -0
  74. package/packages/main/src/simplicity/settings.vue +1 -1
  75. package/packages/main/src/simplicity/sub-menu.vue +163 -55
  76. package/packages/main/src/simplicity/user.vue +10 -5
  77. package/packages/main/src/simplicity/userinfo.vue +1 -0
  78. package/packages/select/src/main.vue +4 -1
  79. package/packages/selector/src/main.vue +6 -2
  80. package/packages/selector-panel/src/main.vue +22 -8
  81. package/packages/selector-panel/src/selection.vue +6 -0
  82. package/packages/theme-chalk/lib/base.css +1 -1
  83. package/packages/theme-chalk/lib/button-group.css +1 -1
  84. package/packages/theme-chalk/lib/data-table.css +1 -1
  85. package/packages/theme-chalk/lib/form.css +1 -1
  86. package/packages/theme-chalk/lib/handler.css +1 -1
  87. package/packages/theme-chalk/lib/index.css +1 -1
  88. package/packages/theme-chalk/lib/main.css +1 -1
  89. package/packages/theme-chalk/lib/menu.css +1 -1
  90. package/packages/theme-chalk/lib/nav.css +1 -1
  91. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  92. package/packages/theme-chalk/lib/simplicity.css +1 -1
  93. package/packages/theme-chalk/lib/sizer.css +1 -1
  94. package/packages/theme-chalk/lib/tree.css +1 -1
  95. package/packages/theme-chalk/lib/upload.css +1 -1
  96. package/packages/theme-chalk/src/base.scss +5 -0
  97. package/packages/theme-chalk/src/button-group.scss +3 -3
  98. package/packages/theme-chalk/src/common/var.scss +6 -0
  99. package/packages/theme-chalk/src/data-table.scss +9 -12
  100. package/packages/theme-chalk/src/form.scss +2 -4
  101. package/packages/theme-chalk/src/handler.scss +5 -1
  102. package/packages/theme-chalk/src/login.scss +2 -2
  103. package/packages/theme-chalk/src/main.scss +2 -2
  104. package/packages/theme-chalk/src/nav.scss +3 -2
  105. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  106. package/packages/theme-chalk/src/simplicity.scss +364 -61
  107. package/packages/theme-chalk/src/tree.scss +4 -2
  108. package/packages/upload/src/main.vue +3 -1
  109. package/src/index.js +1 -1
@@ -8,7 +8,7 @@
8
8
  <img
9
9
  class="es-main-logo"
10
10
  :src="logoUrl"
11
- v-if="layout !== 'topside' && logoUrl && showDefault"
11
+ v-if="layout !== 'topside' && logoUrl"
12
12
  />
13
13
  <div class="es-main-top-nav">
14
14
  <es-menu
@@ -31,7 +31,7 @@
31
31
  ></es-menu>
32
32
  </div>
33
33
  <es-handler
34
- v-if="showDefault"
34
+ :job-scrollbar="jobScrollbar"
35
35
  :userModel="userModel"
36
36
  :hide="hide"
37
37
  :subSystem="subsystem"
@@ -50,7 +50,7 @@
50
50
  @click="handleClick"
51
51
  ></es-handler>
52
52
  </div>
53
- <div class="es-main-box" v-if="reset">
53
+ <div class="es-main-default-box" v-if="reset">
54
54
  <div class="es-main-left" v-if="layout !== 'topnav' && showSide">
55
55
  <div
56
56
  class="es-main-side"
@@ -67,7 +67,7 @@
67
67
  ></es-handle-user>
68
68
  </div>
69
69
  <es-nav
70
- v-if="showMenu && showDefault"
70
+ v-if="showMenu"
71
71
  :hide-sub-menu="hideSubMenu"
72
72
  :is-top="layout == 'topside'"
73
73
  :overlap="layout == 'side'"
@@ -214,8 +214,7 @@ import {
214
214
  mainConfig,
215
215
  updateUserCustomInfo,
216
216
  getComplexApplications,
217
- getComplexApplicationsNew,
218
- mainDetail
217
+ getComplexApplicationsNew
219
218
  } from 'eoss-ui/src/config/api.js';
220
219
  import store from 'eoss-ui/src/utils/store';
221
220
  import util from 'eoss-ui/src/utils/util';
@@ -223,7 +222,7 @@ const isIE = navigator.userAgent.indexOf('MSIE') != -1;
223
222
  const log = util.getParams('console');
224
223
  const appCode = util.getParams('appCode') || util.getParams('appcode');
225
224
  export default {
226
- name: 'EsMainDefault',
225
+ name: 'MainDefault',
227
226
  inheritAttrs: false,
228
227
  provide() {
229
228
  return {
@@ -237,6 +236,7 @@ export default {
237
236
  notice
238
237
  },
239
238
  props: {
239
+ jobScrollbar: Boolean,
240
240
  maxHeight: String,
241
241
  //菜单导航地址
242
242
  menuUrl: String,
@@ -459,7 +459,8 @@ export default {
459
459
  },
460
460
  //隐藏操作按键
461
461
  hide() {
462
- let mainConfig = JSON.parse(util.getStorage('mainConfig'));
462
+ let mainConfig = util.getStorage('mainConfig');
463
+ mainConfig = mainConfig ? JSON.parse(mainConfig) : mainConfig;
463
464
  let topRightToolHide = '';
464
465
  if (
465
466
  mainConfig &&
@@ -569,7 +570,6 @@ export default {
569
570
  data() {
570
571
  return {
571
572
  layout: this.scene.toLowerCase(),
572
- showDefault: false,
573
573
  themeJSON: {
574
574
  logo: { comp: '', data: {} },
575
575
  topNav: { comp: '', data: {} },
@@ -668,7 +668,12 @@ export default {
668
668
  this.isHeader = params.header;
669
669
  let sysLogoIco = sessionStorage.getItem('sysLogoIco');
670
670
  sysLogoIco && util.setFavicon(sysLogoIco);
671
- this.getConfig(params);
671
+
672
+ let mainConfig = util.getStorage('mainConfig');
673
+ if (mainConfig) {
674
+ const results = JSON.parse(mainConfig);
675
+ this.init(results);
676
+ }
672
677
  },
673
678
  mounted() {
674
679
  util.win.reLogin = this.handleReLogin;
@@ -694,56 +699,6 @@ export default {
694
699
  this.setMenu(res);
695
700
  }
696
701
  },
697
- //获取主题模板JSON
698
- getMainDetail(id) {
699
- let params = {
700
- url: mainDetail,
701
- params: { id }
702
- };
703
- util
704
- .ajax(params)
705
- .then((res) => {
706
- let _that = this;
707
- if (!res.results) {
708
- _that.showDefault = true;
709
- }
710
- if (res.rCode == 0) {
711
- if (res.results && JSON.parse(res.results.layout)) {
712
- // 初始化布局器
713
- _that.themeJSON = JSON.parse(res.results.layout);
714
- let count = 0;
715
- for (let key in _that.themeJSON) {
716
- if (_that.themeJSON[key].comp) {
717
- count++;
718
- }
719
- }
720
- if (count == 0) {
721
- _that.showDefault = true;
722
- }
723
- let theme = JSON.parse(res.results.theme);
724
-
725
- util.updateTheme(theme.primaryColor);
726
- _that.handleColorToPage(theme.globalThalk);
727
- }
728
- } else {
729
- _that.$message.error('主题加载发生错误');
730
- throw res.msg || '系统错误,请联系管理员!';
731
- }
732
- if (_that.showDefault && _that.data === undefined) {
733
- _that.getMenu();
734
- } else if (_that.showDefault) {
735
- if (_that.data && _that.data.length) {
736
- _that.menus = JSON.parse(JSON.stringify(_that.data));
737
- _that.setMenu(_that.data);
738
- }
739
- }
740
- })
741
- .catch((err) => {
742
- if (err.message && err.message !== 'canceled') {
743
- this.$message.error(err.message);
744
- }
745
- });
746
- },
747
702
  // 将chalk写入到页面中
748
703
  handleColorToPage(globalThalk) {
749
704
  const thalk = document.getElementById('chalk-style');
@@ -858,22 +813,19 @@ export default {
858
813
  handleSet() {
859
814
  this.showSet = !this.showSet;
860
815
  },
861
- setConfig(results, flag) {
816
+ setConfig(results) {
862
817
  if (this.socket) {
863
818
  this.initWebSocket();
864
819
  }
865
- if (flag) {
866
- sessionStorage.setItem('mainConfig', JSON.stringify(results));
867
- util.setStorage({
868
- type: this.storage,
869
- key: {
870
- userId: results.userModel.userId,
871
- userName: results.userModel.username,
872
- useCaseCodes:
873
- results.resourceCodes || results.userModel.resourceCodes
874
- }
875
- });
876
- }
820
+ sessionStorage.setItem('mainConfig', JSON.stringify(results));
821
+ util.setStorage({
822
+ type: this.storage,
823
+ key: {
824
+ userId: results.userModel.userId,
825
+ userName: results.userModel.username,
826
+ useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
827
+ }
828
+ });
877
829
  for (let i in results) {
878
830
  if (i === 'mainLogoUrl' && results[i]) {
879
831
  this.mainLogo = results[i];
@@ -966,44 +918,15 @@ export default {
966
918
  store.set(i, results[i]);
967
919
  }
968
920
  this.userModel = results.userModel;
969
- let mainFrameLayout = results.mainFrameLayout;
970
- if (results.userStyle.layout && this.isCustomMain) {
971
- this.getMainDetail(results.userStyle.layout);
972
- } else if (this.isCustomMain) {
973
- this.getMainDetail(mainFrameLayout);
974
- } else {
975
- this.showDefault = true;
976
- }
977
921
  },
978
- //获取用户配置及信息
979
- getConfig(query) {
980
- const token =
981
- util.getStorage('token') || util.getStorage('Authorization');
982
- if (
983
- !token &&
984
- Object.prototype.hasOwnProperty.call(query, 'serverId') &&
985
- Object.prototype.hasOwnProperty.call(query, 'authType')
986
- ) {
987
- return false;
988
- }
989
- if (util.getStorage('mainConfig')) {
990
- const results = JSON.parse(util.getStorage('mainConfig'));
991
- this.setConfig(results);
992
- if (this.remote) {
993
- this.getMenu();
994
- } else {
995
- this.renderMenu();
996
- }
997
- return true;
922
+ //初始用户配置及信息
923
+ init(results) {
924
+ this.setConfig(results);
925
+ if (this.remote) {
926
+ this.getMenu();
927
+ } else {
928
+ this.renderMenu();
998
929
  }
999
- util.getMainConfig((res) => {
1000
- this.setConfig(res, 1);
1001
- if (this.remote) {
1002
- this.getMenu();
1003
- } else {
1004
- this.renderMenu();
1005
- }
1006
- });
1007
930
  },
1008
931
  reGetConfig() {
1009
932
  util
@@ -1,22 +1,23 @@
1
1
  <template>
2
2
  <div class="es-main-box">
3
- <es-main-simplicity
3
+ <simplicity
4
4
  ref="main"
5
5
  v-if="type == 'simplicity'"
6
+ :appCode="appCode"
6
7
  v-bind="$attrs"
7
8
  v-on="$listeners"
8
- ></es-main-simplicity>
9
- <es-main-default
9
+ ></simplicity>
10
+ <main-default
10
11
  v-else
11
12
  v-bind="$attrs"
12
13
  ref="main"
13
14
  v-on="$listeners"
14
- ></es-main-default>
15
+ ></main-default>
15
16
  </div>
16
17
  </template>
17
18
  <script>
18
- import EsMainSimplicity from './simplicity/index.vue';
19
- import EsMainDefault from './default/index.vue';
19
+ import Simplicity from './simplicity/index.vue';
20
+ import MainDefault from './default/index.vue';
20
21
  import util from 'eoss-ui/src/utils/util';
21
22
  export default {
22
23
  name: 'EsMain',
@@ -27,24 +28,24 @@ export default {
27
28
  };
28
29
  },
29
30
  components: {
30
- EsMainSimplicity,
31
- EsMainDefault
31
+ Simplicity,
32
+ MainDefault
32
33
  },
33
34
  props: {
34
- type: String,
35
- remote: {
36
- type: Boolean,
37
- default: true
38
- }
35
+ type: String
39
36
  },
40
37
  computed: {},
41
38
  watch: {},
42
39
  data() {
43
- return {};
40
+ return {
41
+ appCode: '',
42
+ params: {}
43
+ };
44
44
  },
45
45
  created() {
46
- let params = util.getParams() || {};
47
- this.getConfig(params);
46
+ this.params = util.getParams() || {};
47
+ this.appCode = this.params.appCode;
48
+ this.getConfig(this.params);
48
49
  },
49
50
  mounted() {},
50
51
  methods: {