eoss-ui 0.5.98 → 0.5.99

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 (74) hide show
  1. package/lib/button-group.js +2 -2
  2. package/lib/button.js +2 -2
  3. package/lib/calendar.js +2 -2
  4. package/lib/card.js +2 -2
  5. package/lib/cascader.js +2 -2
  6. package/lib/checkbox-group.js +3 -2
  7. package/lib/clients.js +2 -2
  8. package/lib/data-table-form.js +3 -2
  9. package/lib/data-table.js +3 -2
  10. package/lib/date-picker.js +2 -2
  11. package/lib/dialog.js +6 -5
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +614 -716
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +2 -2
  16. package/lib/flow-list.js +2 -2
  17. package/lib/flow.js +3 -2
  18. package/lib/form.js +3 -2
  19. package/lib/handle-user.js +2 -2
  20. package/lib/handler.js +11 -15
  21. package/lib/icon.js +2 -2
  22. package/lib/icons.js +2 -2
  23. package/lib/index.js +1 -1
  24. package/lib/input-number.js +2 -2
  25. package/lib/input.js +2 -2
  26. package/lib/label.js +2 -2
  27. package/lib/layout.js +2 -2
  28. package/lib/login.js +6 -4
  29. package/lib/main.js +633 -732
  30. package/lib/menu.js +2 -2
  31. package/lib/nav.js +2 -2
  32. package/lib/notify.js +2 -2
  33. package/lib/page.js +2 -2
  34. package/lib/pagination.js +2 -2
  35. package/lib/player.js +4 -4
  36. package/lib/qr-code.js +4 -4
  37. package/lib/radio-group.js +2 -2
  38. package/lib/retrial-auth.js +9 -9
  39. package/lib/select-ganged.js +9 -9
  40. package/lib/select.js +2 -2
  41. package/lib/selector-panel.js +3 -2
  42. package/lib/selector.js +2 -2
  43. package/lib/sizer.js +2 -2
  44. package/lib/steps.js +2 -2
  45. package/lib/switch.js +2 -2
  46. package/lib/table-form.js +2 -2
  47. package/lib/tabs-panel.js +2 -2
  48. package/lib/tabs.js +2 -2
  49. package/lib/theme-chalk/index.css +1 -1
  50. package/lib/theme-chalk/main.css +1 -1
  51. package/lib/theme-chalk/simplicity.css +1 -1
  52. package/lib/tips.js +2 -2
  53. package/lib/toolbar.js +2 -2
  54. package/lib/tree-group.js +2 -2
  55. package/lib/tree.js +2 -2
  56. package/lib/upload.js +3 -2
  57. package/lib/wujie.js +145 -145
  58. package/lib/wxlogin.js +2 -2
  59. package/package.json +1 -1
  60. package/packages/dialog/src/main.vue +1 -1
  61. package/packages/handler/src/main.vue +0 -5
  62. package/packages/login/src/main.vue +1 -0
  63. package/packages/main/src/default/index.vue +27 -21
  64. package/packages/main/src/main.vue +13 -7
  65. package/packages/main/src/{default → public}/settings.vue +51 -19
  66. package/packages/main/src/simplicity/handler.vue +0 -11
  67. package/packages/main/src/simplicity/index.vue +122 -111
  68. package/packages/theme-chalk/lib/index.css +1 -1
  69. package/packages/theme-chalk/lib/main.css +1 -1
  70. package/packages/theme-chalk/lib/simplicity.css +1 -1
  71. package/packages/theme-chalk/src/main.scss +16 -0
  72. package/packages/theme-chalk/src/simplicity.scss +37 -0
  73. package/src/index.js +1 -1
  74. package/packages/main/src/simplicity/settings.vue +0 -119
@@ -44,9 +44,12 @@
44
44
  >
45
45
  <div
46
46
  class="es-setting-navs es-setting-top-nav"
47
- @click.stop="handleLayout('topnav')"
47
+ @click.stop="handleLayout('default', 'topnav')"
48
48
  >
49
- <i class="es-icon-gou" v-show="activeName == 'topnav'"></i>
49
+ <i
50
+ class="es-icon-gou"
51
+ v-show="layoutType == 'default' && activeName == 'topnav'"
52
+ ></i>
50
53
  </div>
51
54
  </el-tooltip>
52
55
  <el-tooltip
@@ -57,10 +60,13 @@
57
60
  >
58
61
  <div
59
62
  class="es-setting-navs es-setting-side-nav"
60
- @click.stop="handleLayout('default')"
63
+ @click.stop="handleLayout('default', 'default')"
61
64
  >
62
65
  <div class="es-setting-side-sub-nav"></div>
63
- <i class="es-icon-gou" v-show="activeName == 'default'"></i>
66
+ <i
67
+ class="es-icon-gou"
68
+ v-show="layoutType == 'default' && activeName == 'default'"
69
+ ></i>
64
70
  </div>
65
71
  </el-tooltip>
66
72
  <el-tooltip
@@ -71,9 +77,12 @@
71
77
  >
72
78
  <div
73
79
  class="es-setting-navs es-setting-subsystem-nav"
74
- @click.stop="handleLayout('subsystem')"
80
+ @click.stop="handleLayout('default', 'subsystem')"
75
81
  >
76
- <i class="es-icon-gou" v-show="activeName == 'subsystem'"></i>
82
+ <i
83
+ class="es-icon-gou"
84
+ v-show="layoutType == 'default' && activeName == 'subsystem'"
85
+ ></i>
77
86
  </div>
78
87
  </el-tooltip>
79
88
  <el-tooltip
@@ -84,9 +93,12 @@
84
93
  >
85
94
  <div
86
95
  class="es-setting-navs es-setting-top-side-nav"
87
- @click.stop="handleLayout('topside')"
96
+ @click.stop="handleLayout('default', 'topside')"
88
97
  >
89
- <i class="es-icon-gou" v-show="activeName == 'topside'"></i>
98
+ <i
99
+ class="es-icon-gou"
100
+ v-show="layoutType == 'default' && activeName == 'topside'"
101
+ ></i>
90
102
  </div>
91
103
  </el-tooltip>
92
104
  <el-tooltip
@@ -97,9 +109,29 @@
97
109
  >
98
110
  <div
99
111
  class="es-setting-navs es-setting-side-navs"
100
- @click.stop="handleLayout('side')"
112
+ @click.stop="handleLayout('default', 'side')"
101
113
  >
102
- <i class="es-icon-gou" v-show="activeName == 'side'"></i>
114
+ <i
115
+ class="es-icon-gou"
116
+ v-show="layoutType == 'default' && activeName == 'side'"
117
+ ></i>
118
+ </div>
119
+ </el-tooltip>
120
+ <el-tooltip
121
+ class="es-setting-navs-item"
122
+ effect="dark"
123
+ content="(新)应用菜单布局"
124
+ placement="bottom"
125
+ >
126
+ <div
127
+ class="es-setting-navs es-setting-app-nav"
128
+ @click.stop="handleLayout('simplicity')"
129
+ >
130
+ <div class="es-setting-side-sub-nav"></div>
131
+ <i
132
+ class="es-icon-gou"
133
+ v-show="layoutType == 'simplicity' && activeName == 'simplicity'"
134
+ ></i>
103
135
  </div>
104
136
  </el-tooltip>
105
137
  </div>
@@ -108,6 +140,7 @@
108
140
  </template>
109
141
  <script>
110
142
  import util from 'eoss-ui/src/utils/util';
143
+ import { string } from 'slate';
111
144
  export default {
112
145
  name: 'message',
113
146
  props: {
@@ -123,10 +156,8 @@ export default {
123
156
  return ['#a60006', '#409eff'];
124
157
  }
125
158
  },
126
- layout: {
127
- type: String,
128
- default: 'default'
129
- }
159
+ active: String,
160
+ layoutType: String
130
161
  },
131
162
  computed: {
132
163
  show: {
@@ -163,7 +194,8 @@ export default {
163
194
  data() {
164
195
  return {
165
196
  color: '',
166
- activeName: this.layout
197
+ layoutName: this.layoutType,
198
+ activeName: this.active
167
199
  };
168
200
  },
169
201
  mounted() {},
@@ -179,11 +211,11 @@ export default {
179
211
  //this.setTheme(res);
180
212
  },
181
213
  //选择菜单布局
182
- handleLayout(res) {
214
+ handleLayout(res, active) {
183
215
  let old = this.activeName;
184
- this.activeName = res;
185
- this.$emit('update:layout', res);
186
- this.$emit('layout', res, old);
216
+ this.layoutName = res;
217
+ this.activeName = active;
218
+ this.$emit('layout', res, active, old);
187
219
  }
188
220
  }
189
221
  };
@@ -79,16 +79,6 @@ export default {
79
79
  };
80
80
  }
81
81
  },
82
- old: {
83
- type: Object,
84
- default() {
85
- return {
86
- type: 'old',
87
- icon: 'es-icon-shiyongjiuban',
88
- title: '使用旧版'
89
- };
90
- }
91
- },
92
82
  notice: {
93
83
  type: Object,
94
84
  default() {
@@ -152,7 +142,6 @@ export default {
152
142
  this.search,
153
143
  this.index,
154
144
  this.home,
155
- this.old,
156
145
  this.notice,
157
146
  this.quit,
158
147
  this.set
@@ -276,10 +276,13 @@
276
276
  <!-- 设置 -->
277
277
  <settings
278
278
  v-bind="$attrs"
279
+ layout-type="simplicity"
280
+ active="simplicity"
279
281
  :theme="themeColor"
280
282
  :predefine="themes"
281
283
  :visible.sync="showSet"
282
284
  @change="handleChange"
285
+ @layout="handleLayout"
283
286
  ></settings>
284
287
  <!-- 设置 end-->
285
288
 
@@ -325,7 +328,7 @@ import apps from './apps.vue';
325
328
  import user from './user.vue';
326
329
  import message from './message.vue';
327
330
  import notice from './notice.vue';
328
- import settings from './settings.vue';
331
+ import settings from '../public/settings.vue';
329
332
  import routerPage from './router-page.vue';
330
333
  import online from '../public/online.vue';
331
334
  import search from '../public/search.vue';
@@ -812,7 +815,7 @@ export default {
812
815
  util.setStorage('loginPage', results[i]);
813
816
  }
814
817
  if (i === 'sysLogoIco' && results[i]) {
815
- sessionStorage.setItem('sysLogoIco', results[i]);
818
+ localStorage.setItem('sysLogoIco', results[i]);
816
819
  util.setFavicon(results[i]);
817
820
  }
818
821
  if (i === 'userStyle' && results[i]) {
@@ -937,114 +940,21 @@ export default {
937
940
  * @date 2024年9月7日
938
941
  **/
939
942
  getMenus(loading) {
943
+ const menuData = store.get('nav');
944
+ if (menuData && menuData.length) {
945
+ loading.close();
946
+ this.renderMenus(menuData);
947
+ return;
948
+ }
940
949
  util
941
950
  .ajax({ url: this._menuUrl })
942
951
  .then((res) => {
943
952
  loading.close();
944
953
  if (res.rCode === 0) {
945
954
  if (res.results && res.results.length) {
946
- this.menus = res.results;
947
- this.setTips(this.menus);
948
- store.set('nav', this.menus);
949
- if (this.indexUrl) {
950
- let obj = this.getMenu(this.menus, this.indexUrl);
951
- obj = obj
952
- ? obj
953
- : {
954
- url: this.indexUrl,
955
- text: '工作台',
956
- id: '0',
957
- appCode: 'indexUrl'
958
- };
959
- this.homePage = this.setIframeType(obj);
960
- if (!this.appCode) {
961
- this.tabs = [this.homePage];
962
- this.activeName = this.homePage.id;
963
- }
964
- }
965
- if (this.appCode) {
966
- let code = this.sysCode || this.appCode;
967
- let app = this.userApps.filter((item) => {
968
- return item.code === code;
969
- })[0];
970
- if (app) {
971
- this.active = app.id;
972
- if (app.url) {
973
- let obj = this.getMenu(this.menus, app.url);
974
- if (obj) {
975
- let tab = this.setIframeType(obj);
976
- this.tabs = [tab];
977
- this.activeName = tab.id;
978
- } else {
979
- this.tabs = [app];
980
- }
981
- }
982
- }
983
- if (this.sysCode) {
984
- let subMenus = this.getMenu(
985
- this.menus,
986
- this.sysCode,
987
- 'appCode'
988
- );
989
- if (subMenus) {
990
- let obj = this.getMenu(this.menus, this.appCode, 'appCode');
991
- if (obj) {
992
- if (!obj.url) {
993
- obj = this.getFirst(obj);
994
- }
995
- this.subActive = obj.id;
996
- let tab = this.setIframeType(obj);
997
- this.tabs = [tab];
998
- this.activeName = tab.id;
999
- } else {
1000
- this.subActive = '';
1001
- }
1002
- this.subMenus = subMenus;
1003
- this.showMenu = true;
1004
- } else {
1005
- this.subMenus = null;
1006
- this.showMenu = false;
1007
- }
1008
- } else {
1009
- let subMenus = this.getMenu(
1010
- this.menus,
1011
- this.appCode,
1012
- 'appCode'
1013
- );
1014
- if (subMenus) {
1015
- if (this.tabs.length == 0) {
1016
- let obj = this.getFirst(subMenus);
1017
- if (obj) {
1018
- this.subActive = obj.id;
1019
- let tab = this.setIframeType(obj);
1020
- this.tabs = [tab];
1021
- this.activeName = tab.id;
1022
- } else {
1023
- this.subActive = '';
1024
- }
1025
- }
1026
- this.subMenus = subMenus;
1027
- this.showMenu = true;
1028
- } else {
1029
- this.subMenus = null;
1030
- this.showMenu = false;
1031
- }
1032
- }
1033
- } else if (
1034
- this.initApps &&
1035
- this.initApps.length &&
1036
- !this.indexUrl
1037
- ) {
1038
- let obj = this.getMenu(
1039
- this.menus,
1040
- this.initApps[this.initApps.length - 1]
1041
- );
1042
- if (obj) {
1043
- let tab = this.setIframeType(obj);
1044
- this.tabs.push(tab);
1045
- this.activeName = tab.id;
1046
- }
1047
- }
955
+ //this.$emit('update:menuData', res.results);
956
+ store.set('nav', JSON.parse(JSON.stringify(res.results)));
957
+ this.renderMenus(JSON.parse(JSON.stringify(res.results)));
1048
958
  } else {
1049
959
  this.$message.error('未分配菜单权限,请联系管理员!');
1050
960
  }
@@ -1060,6 +970,103 @@ export default {
1060
970
  }
1061
971
  });
1062
972
  },
973
+ /**
974
+ * @desc:处理菜单列表
975
+ * @author huangbo
976
+ * @date 2024年9月7日
977
+ **/
978
+ renderMenus(res) {
979
+ this.menus = res;
980
+ this.setTips(this.menus);
981
+ store.set('nav', this.menus);
982
+ if (this.indexUrl) {
983
+ let obj = this.getMenu(this.menus, this.indexUrl);
984
+ obj = obj
985
+ ? obj
986
+ : {
987
+ url: this.indexUrl,
988
+ text: '工作台',
989
+ id: '0',
990
+ appCode: 'indexUrl'
991
+ };
992
+ this.homePage = this.setIframeType(obj);
993
+ if (!this.appCode) {
994
+ this.tabs = [this.homePage];
995
+ this.activeName = this.homePage.id;
996
+ }
997
+ }
998
+ if (this.appCode) {
999
+ let code = this.sysCode || this.appCode;
1000
+ let app = this.userApps.filter((item) => {
1001
+ return item.code === code;
1002
+ })[0];
1003
+ if (app) {
1004
+ this.active = app.id;
1005
+ if (app.url) {
1006
+ let obj = this.getMenu(this.menus, app.url);
1007
+ if (obj) {
1008
+ let tab = this.setIframeType(obj);
1009
+ this.tabs = [tab];
1010
+ this.activeName = tab.id;
1011
+ } else {
1012
+ this.tabs = [app];
1013
+ }
1014
+ }
1015
+ }
1016
+ if (this.sysCode) {
1017
+ let subMenus = this.getMenu(this.menus, this.sysCode, 'appCode');
1018
+ if (subMenus) {
1019
+ let obj = this.getMenu(this.menus, this.appCode, 'appCode');
1020
+ if (obj) {
1021
+ if (!obj.url) {
1022
+ obj = this.getFirst(obj);
1023
+ }
1024
+ this.subActive = obj.id;
1025
+ let tab = this.setIframeType(obj);
1026
+ this.tabs = [tab];
1027
+ this.activeName = tab.id;
1028
+ } else {
1029
+ this.subActive = '';
1030
+ }
1031
+ this.subMenus = subMenus;
1032
+ this.showMenu = true;
1033
+ } else {
1034
+ this.subMenus = null;
1035
+ this.showMenu = false;
1036
+ }
1037
+ } else {
1038
+ let subMenus = this.getMenu(this.menus, this.appCode, 'appCode');
1039
+ if (subMenus) {
1040
+ if (this.tabs.length == 0) {
1041
+ let obj = this.getFirst(subMenus);
1042
+ if (obj) {
1043
+ this.subActive = obj.id;
1044
+ let tab = this.setIframeType(obj);
1045
+ this.tabs = [tab];
1046
+ this.activeName = tab.id;
1047
+ } else {
1048
+ this.subActive = '';
1049
+ }
1050
+ }
1051
+ this.subMenus = subMenus;
1052
+ this.showMenu = true;
1053
+ } else {
1054
+ this.subMenus = null;
1055
+ this.showMenu = false;
1056
+ }
1057
+ }
1058
+ } else if (this.initApps && this.initApps.length && !this.indexUrl) {
1059
+ let obj = this.getMenu(
1060
+ this.menus,
1061
+ this.initApps[this.initApps.length - 1]
1062
+ );
1063
+ if (obj) {
1064
+ let tab = this.setIframeType(obj);
1065
+ this.tabs.push(tab);
1066
+ this.activeName = tab.id;
1067
+ }
1068
+ }
1069
+ },
1063
1070
  /**
1064
1071
  * @desc:设置页面加载类型
1065
1072
  * @author huangbo
@@ -1660,13 +1667,6 @@ export default {
1660
1667
  case 'index':
1661
1668
  util.win.open(this.doorIndex, '_self');
1662
1669
  break;
1663
- case 'old':
1664
- if (typeof this.showOld === 'string') {
1665
- window.location.href = this.showOld;
1666
- } else {
1667
- this.$emit('chang-layout', 'default');
1668
- }
1669
- break;
1670
1670
  case 'set':
1671
1671
  this.showSet = !this.showSet;
1672
1672
  this.showMsg = false;
@@ -1804,6 +1804,17 @@ export default {
1804
1804
  break;
1805
1805
  }
1806
1806
  },
1807
+ /**
1808
+ * @desc:菜单布局样式切换
1809
+ * @author huangbo
1810
+ * @date 2024年9月7日
1811
+ **/
1812
+ handleLayout(res, active) {
1813
+ if (active) {
1814
+ localStorage.setItem('layout', active);
1815
+ }
1816
+ this.$emit('chang-layout', res, active);
1817
+ },
1807
1818
  /**
1808
1819
  * @desc:消息修改总数
1809
1820
  * @author huangbo