eoss-ui 0.5.81-beta4 → 0.5.81-beta6

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 (36) hide show
  1. package/lib/eoss-ui.common.js +1610 -1104
  2. package/lib/index.js +1 -1
  3. package/lib/main.js +1571 -1122
  4. package/lib/selector-panel.js +64 -11
  5. package/lib/selector.js +8 -4
  6. package/lib/theme-chalk/index.css +1 -1
  7. package/lib/theme-chalk/main.css +1 -1
  8. package/lib/theme-chalk/selector-panel.css +1 -1
  9. package/lib/theme-chalk/simplicity.css +1 -1
  10. package/lib/theme-chalk/tree.css +1 -1
  11. package/package.json +1 -1
  12. package/packages/main/src/default/index.vue +1 -1
  13. package/packages/main/src/main.vue +13 -12
  14. package/packages/main/src/simplicity/apps.vue +176 -145
  15. package/packages/main/src/simplicity/index.vue +160 -238
  16. package/packages/main/src/simplicity/menu-list.vue +117 -32
  17. package/packages/main/src/simplicity/message.vue +35 -25
  18. package/packages/main/src/simplicity/notice.vue +72 -39
  19. package/packages/main/src/simplicity/router-page.vue +53 -0
  20. package/packages/main/src/simplicity/settings.vue +1 -1
  21. package/packages/main/src/simplicity/sub-menu.vue +69 -69
  22. package/packages/main/src/simplicity/user.vue +4 -4
  23. package/packages/main/src/simplicity/userinfo.vue +1 -0
  24. package/packages/selector/src/main.vue +6 -2
  25. package/packages/selector-panel/src/main.vue +21 -2
  26. package/packages/selector-panel/src/selection.vue +6 -0
  27. package/packages/theme-chalk/lib/index.css +1 -1
  28. package/packages/theme-chalk/lib/main.css +1 -1
  29. package/packages/theme-chalk/lib/selector-panel.css +1 -1
  30. package/packages/theme-chalk/lib/simplicity.css +1 -1
  31. package/packages/theme-chalk/lib/tree.css +1 -1
  32. package/packages/theme-chalk/src/common/var.scss +2 -0
  33. package/packages/theme-chalk/src/selector-panel.scss +2 -1
  34. package/packages/theme-chalk/src/simplicity.scss +191 -5
  35. package/packages/theme-chalk/src/tree.scss +4 -2
  36. package/src/index.js +1 -1
@@ -74,46 +74,32 @@
74
74
  </div>
75
75
  <div class="es-simplicity-main">
76
76
  <!-- 菜单 -->
77
- <el-drawer
78
- class="es-simplicity-subMenus"
79
- direction="ltr"
80
- modal-class="es-simplicity-apps-modal"
81
- :size="width + 'px'"
82
- :modal-append-to-body="false"
83
- :with-header="false"
77
+ <sub-menu
78
+ ref="subMenus"
84
79
  :visible.sync="showMenu"
85
- >
86
- <sub-menu
87
- ref="subMenus"
88
- :color="menuColor"
89
- :backgroundColor="menuBackgroundColor"
90
- :menu-icon="menuIcon"
91
- v-bind="subMenus"
92
- @command="handlerClickMenu"
93
- ></sub-menu>
94
- </el-drawer>
80
+ :fold.sync="fold"
81
+ :size="menuWidth"
82
+ :title="title"
83
+ :color="menuColor"
84
+ :backgroundColor="menuBackgroundColor"
85
+ :menu-icon="menuIcon"
86
+ :active="subActive"
87
+ v-bind="subMenus"
88
+ @command="handlerClickMenu"
89
+ ></sub-menu>
95
90
  <!-- 菜单 end -->
96
91
 
97
92
  <!-- 应用 -->
98
- <el-drawer
99
- class="es-simplicity-apps"
100
- direction="ltr"
101
- modal-class="es-simplicity-apps-modal"
102
- size="90%"
103
- :modal-append-to-body="false"
104
- :with-header="false"
93
+ <apps
105
94
  :visible.sync="showApps"
106
- >
107
- <apps
108
- :menu-icon="menuIcon"
109
- :color="appColor"
110
- :backgroundColor="appBackgroundColor"
111
- :applications="applications"
112
- :business="business"
113
- :systems="systems"
114
- @click="handlerClickApp"
115
- ></apps>
116
- </el-drawer>
95
+ :menu-icon="menuIcon"
96
+ :color="appColor"
97
+ :backgroundColor="appBackgroundColor"
98
+ :applications="applications"
99
+ :business="business"
100
+ :systems="systems"
101
+ @click="handlerClickApp"
102
+ ></apps>
117
103
  <!-- 应用 end -->
118
104
 
119
105
  <!-- AI -->
@@ -157,7 +143,8 @@
157
143
  <el-card class="es-simplicity-tabs-handler" ref="tabsHandler">
158
144
  <div
159
145
  class="es-simplicity-tabs-handler-item"
160
- @click="handleTabsEvents(0)"
146
+ :class="{ 'is-disabled': isDisabled.refresh }"
147
+ @click="isDisabled.refresh ? '' : handleTabsEvents(0)"
161
148
  >
162
149
  刷新
163
150
  </div>
@@ -192,6 +179,7 @@
192
179
  </div>
193
180
  <el-tabs
194
181
  class="es-simplicity-iframe"
182
+ :class="{ 'is-open': showMenu, 'is-fold': fold }"
195
183
  v-model="activeName"
196
184
  closable
197
185
  hide-bar
@@ -210,14 +198,6 @@
210
198
  :notice-num="notice"
211
199
  @click="handleClick"
212
200
  ></handler>
213
- <div
214
- class="es-simplicity-unfold"
215
- ref="box"
216
- v-show="!showMenu && subMenus"
217
- @click="handleShowMenus"
218
- >
219
- <i class="el-icon-s-unfold" ref="area"></i>
220
- </div>
221
201
  <el-tab-pane
222
202
  v-for="item in tabs"
223
203
  :key="item.id"
@@ -246,7 +226,11 @@
246
226
  ></es-wujie>
247
227
  </template>
248
228
  <template v-else-if="item.method === 'router' && item.refresh">
249
- <router-view :name="item.appCode" />
229
+ <router-page
230
+ v-bind="item"
231
+ :show="activeName == item.id"
232
+ :query="$parent.params"
233
+ ></router-page>
250
234
  </template>
251
235
  </el-tab-pane>
252
236
  </el-tabs>
@@ -302,6 +286,7 @@ import user from './user.vue';
302
286
  import message from './message.vue';
303
287
  import notice from './notice.vue';
304
288
  import settings from './settings.vue';
289
+ import routerPage from './router-page.vue';
305
290
  import {
306
291
  wss,
307
292
  logout,
@@ -314,14 +299,14 @@ import store from 'eoss-ui/src/utils/store';
314
299
  import util from 'eoss-ui/src/utils/util';
315
300
  const isIE = navigator.userAgent.indexOf('MSIE') != -1;
316
301
  let events = [
317
- (tabs, index) => {
302
+ (tabs, index, that) => {
318
303
  let tab = tabs[index];
319
304
 
320
305
  if (tab.method == 'iframe') {
321
306
  tabs[index].url = util.handlerUrl(tab.url);
322
307
  } else {
323
308
  tabs[index].refresh = false;
324
- this.$nextTick(() => {
309
+ that.$nextTick(() => {
325
310
  tabs[index].refresh = true;
326
311
  });
327
312
  }
@@ -364,7 +349,7 @@ let events = [
364
349
  }
365
350
  ];
366
351
  export default {
367
- name: 'EsMainSimplicity',
352
+ name: 'Simplicity',
368
353
  components: {
369
354
  avatar,
370
355
  handler,
@@ -373,7 +358,8 @@ export default {
373
358
  user,
374
359
  message,
375
360
  notice,
376
- settings
361
+ settings,
362
+ routerPage
377
363
  },
378
364
  props: {
379
365
  appCode: String,
@@ -455,10 +441,13 @@ export default {
455
441
  wjProps: Object,
456
442
  //无界微前端Attrs属性
457
443
  wjAttrs: Object,
444
+ //菜单宽度
458
445
  menuWidth: {
459
446
  type: Number,
460
447
  default: 220
461
- }
448
+ },
449
+ //路由方式
450
+ routeType: String
462
451
  },
463
452
  data() {
464
453
  return {
@@ -472,12 +461,16 @@ export default {
472
461
  userApps: [],
473
462
  //所有菜单
474
463
  menus: [],
464
+ //菜单名称
465
+ title: '',
475
466
  //子菜单
476
467
  subMenus: null,
477
468
  //展示菜单导航
478
469
  showMenu: false,
479
- //展示菜单导航宽度
480
- width: this.menuWidth,
470
+ //子菜单选中
471
+ subActive: '',
472
+ //折叠菜单
473
+ fold: false,
481
474
  //人工智能配置
482
475
  aiConfig: null,
483
476
  //公用窗口面板配置
@@ -610,7 +603,7 @@ export default {
610
603
  util.win.refresh = this.handleRefresh;
611
604
  util.win.jumpMenu = this.jumpMenu;
612
605
  util.win.windowOpen = this.openPage;
613
- this.move();
606
+ this.handleListener();
614
607
  },
615
608
  methods: {
616
609
  /**
@@ -618,13 +611,13 @@ export default {
618
611
  * @author huangbo
619
612
  * @date 2024年9月7日
620
613
  **/
621
- hasRouter(res, url, code, parentName) {
614
+ hasRouter(res, url, code) {
622
615
  if (!url) {
623
616
  return false;
624
617
  }
625
618
  if (Array.isArray(res)) {
626
619
  for (let i in res) {
627
- let path = this.hasRouter(res[i], url, code, parentName);
620
+ let path = this.hasRouter(res[i], url, code);
628
621
  if (path) {
629
622
  return path;
630
623
  }
@@ -650,7 +643,7 @@ export default {
650
643
  return pathname;
651
644
  }
652
645
  if (res && Object.prototype.hasOwnProperty.call(res, 'children')) {
653
- let path = this.hasRouter(res.children, url, code, res.name);
646
+ let path = this.hasRouter(res.children, url, code);
654
647
  if (path) {
655
648
  return path;
656
649
  }
@@ -839,7 +832,6 @@ export default {
839
832
  this.menus = res.results;
840
833
  this.setTips(this.menus);
841
834
  store.set('nav', this.menus);
842
- console.log(12121);
843
835
  if (this.appCode) {
844
836
  let app = this.userApps.filter((item) => {
845
837
  return item.code === this.appCode;
@@ -852,100 +844,81 @@ export default {
852
844
  let tab = this.setIframeType(obj);
853
845
  this.tabs = [tab];
854
846
  this.activeName = tab.id;
855
- if (tab.method == 'router') {
856
- let params = util.getParams({ url: tab.url });
857
- this.$router.push({
858
- path: tab.path,
859
- query: params
860
- });
861
- }
862
847
  }
863
848
  }
864
849
  }
865
- if (this.tabs.length == 0) {
866
- let subMenus = this.getMenu(
867
- this.menus,
868
- this.appCode,
869
- 'appCode'
870
- );
871
- if (subMenus) {
872
- // this.subMenus = subMenus;
873
- // this.showMenu = true;
850
+ let subMenus = this.getMenu(
851
+ this.menus,
852
+ this.appCode,
853
+ 'appCode'
854
+ );
855
+ if (subMenus) {
856
+ if (this.tabs.length == 0) {
874
857
  let obj = this.getFirst(subMenus);
875
858
  if (obj) {
859
+ this.subActive = obj.id;
876
860
  let tab = this.setIframeType(obj);
877
861
  this.tabs = [tab];
878
862
  this.activeName = tab.id;
879
- if (tab.method == 'router') {
880
- let params = util.getParams({ url: tab.url });
881
- this.$router.push({
882
- path: tab.path,
883
- query: params
884
- });
885
- }
863
+ } else {
864
+ this.subActive = '';
886
865
  }
887
- } else {
888
- this.subMenus = null;
889
- this.showMenu = false;
890
866
  }
867
+ this.subMenus = subMenus;
868
+ this.showMenu = true;
869
+ } else {
870
+ this.subMenus = null;
871
+ this.showMenu = false;
891
872
  }
892
- // this.width = this.menuWidth;
893
- // this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
894
- }
895
- if (this.indexUrl) {
896
- let obj = this.getMenu(this.menus, this.indexUrl);
897
- if (obj) {
898
- if (!this.appCode) {
899
- let tab = this.setIframeType(obj);
900
- this.tabs = [tab];
901
- this.activeName = tab.id;
902
- if (tab.method == 'router') {
903
- let params = util.getParams({ url: tab.url });
904
- this.$router.push({
905
- path: tab.path,
906
- query: params
907
- });
873
+ } else {
874
+ if (this.indexUrl) {
875
+ let obj = this.getMenu(this.menus, this.indexUrl);
876
+ if (obj) {
877
+ if (!this.appCode) {
878
+ let tab = this.setIframeType(obj);
879
+ this.tabs = [tab];
880
+ this.activeName = tab.id;
908
881
  }
909
- }
910
- this.homePage = obj;
911
- } else {
912
- this.homePage = this.setIframeType({
913
- url: this.indexUrl,
914
- text: '工作台',
915
- id: '0',
916
- appCode: 'indexUrl'
917
- });
918
- if (!this.appCode) {
919
- this.tabs = [this.homePage];
920
- this.activeName = '0';
921
- if (this.homePage.method == 'router') {
922
- let params = util.getParams({ url: this.homePage.url });
923
- this.$router.push({
924
- path: this.homePage.path,
925
- query: params
926
- });
882
+ this.homePage = obj;
883
+ } else {
884
+ this.homePage = this.setIframeType({
885
+ url: this.indexUrl,
886
+ text: '工作台',
887
+ id: '0',
888
+ appCode: 'indexUrl'
889
+ });
890
+ if (!this.appCode) {
891
+ this.tabs = [this.homePage];
892
+ this.activeName = '0';
893
+ // if (this.homePage.method == 'router') {
894
+ // let params = util.getParams({ url: this.homePage.url });
895
+ // this.$router.push({
896
+ // path: this.homePage.path,
897
+ // query: { ...this.$parent.params, ...params }
898
+ // });
899
+ // }
927
900
  }
928
901
  }
929
- }
930
- } else if (
931
- this.initApps &&
932
- this.initApps.length &&
933
- !this.appCode
934
- ) {
935
- let obj = this.getMenu(
936
- this.menus,
937
- this.initApps[this.initApps.length - 1]
938
- );
939
- if (obj) {
940
- let tab = this.setIframeType(obj);
941
- this.tabs.push(tab);
942
- this.activeName = tab.id;
943
- if (tab.method == 'router') {
944
- let params = util.getParams({ url: tab.url });
945
- this.$router.push({
946
- path: tab.path,
947
- query: params
948
- });
902
+ } else if (
903
+ this.initApps &&
904
+ this.initApps.length &&
905
+ !this.appCode
906
+ ) {
907
+ let obj = this.getMenu(
908
+ this.menus,
909
+ this.initApps[this.initApps.length - 1]
910
+ );
911
+ if (obj) {
912
+ let tab = this.setIframeType(obj);
913
+ this.tabs.push(tab);
914
+ this.activeName = tab.id;
915
+ // if (tab.method == 'router') {
916
+ // let params = util.getParams({ url: tab.url });
917
+ // this.$router.push({
918
+ // path: tab.path,
919
+ // query: { ...this.$parent.params, ...params }
920
+ // });
921
+ // }
949
922
  }
950
923
  }
951
924
  }
@@ -986,7 +959,7 @@ export default {
986
959
  const routes = this.$router.options.routes;
987
960
  if (routes) {
988
961
  let path = this.hasRouter(routes, urls[0], res.appCode);
989
- if (path) {
962
+ if (path && this.routeType !== 'wujie') {
990
963
  res.method = 'router';
991
964
  res.path = path;
992
965
  } else {
@@ -1125,8 +1098,9 @@ export default {
1125
1098
  return flag;
1126
1099
  }
1127
1100
  } else {
1128
- if (this.menuTips[obj.id] && Number(this.menuTips[obj.id])) {
1129
- this.$set(obj, 'tips', Number(this.menuTips[obj.id]));
1101
+ let num = this.menuTips[obj.id] || this.menuTips[obj.code];
1102
+ if (num && Number(num)) {
1103
+ this.$set(obj, 'tips', Number(num));
1130
1104
  return this.menuTips[obj.id];
1131
1105
  }
1132
1106
  }
@@ -1204,6 +1178,8 @@ export default {
1204
1178
  * @date 2024年9月7日
1205
1179
  **/
1206
1180
  handlerClickApp(res) {
1181
+ this.showMsg = false;
1182
+ this.showSet = false;
1207
1183
  if (res) {
1208
1184
  if (res.permission === false) {
1209
1185
  return false;
@@ -1215,8 +1191,6 @@ export default {
1215
1191
  this.subMenus = res;
1216
1192
  this.showMenu = true;
1217
1193
  this.showApps = false;
1218
- this.width = this.menuWidth;
1219
- this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
1220
1194
  } else {
1221
1195
  let set = true;
1222
1196
  if (res.url) {
@@ -1231,25 +1205,16 @@ export default {
1231
1205
  this.activeName = res.id;
1232
1206
  if (i == -1) {
1233
1207
  let tab = this.setIframeType(res);
1234
- this.tabs.push(obj);
1235
- if (tab.method == 'router') {
1236
- let params = util.getParams({ url: tab.url });
1237
- this.$router.push({
1238
- path: tab.path,
1239
- query: params
1240
- });
1241
- }
1208
+ this.tabs.push(tab);
1242
1209
  }
1243
1210
  }
1244
1211
  }
1245
1212
  if (set && res.code) {
1246
1213
  let subMenus = this.getMenu(this.menus, res.code, 'appCode');
1247
- console.log(subMenus);
1214
+ this.title = res.text || res.name;
1248
1215
  this.subMenus = subMenus ? subMenus : null;
1249
1216
  this.showMenu = subMenus !== false;
1250
1217
  this.showApps = false;
1251
- this.width = this.menuWidth;
1252
- this.$refs.subMenus && this.$refs.subMenus.clearSubmenu();
1253
1218
  }
1254
1219
  }
1255
1220
  this.active = res.id;
@@ -1258,14 +1223,6 @@ export default {
1258
1223
  this.showApps = !this.showApps;
1259
1224
  }
1260
1225
  },
1261
- /**
1262
- * @desc:显示菜单界面
1263
- * @author huangbo
1264
- * @date 2024年9月7日
1265
- **/
1266
- handleShowMenus() {
1267
- this.showMenu = true;
1268
- },
1269
1226
  /**
1270
1227
  * @desc:显示Drawer界面
1271
1228
  * @author huangbo
@@ -1293,24 +1250,13 @@ export default {
1293
1250
  * @date 2024年9月7日
1294
1251
  **/
1295
1252
  handlerClickMenu(res) {
1296
- if (typeof res === 'number') {
1297
- let num = this.menuWidth;
1298
- this.width = num * res;
1299
- } else {
1300
- let i = util.indexOfObj(this.tabs, res, 'id');
1301
- this.activeName = res.id;
1302
- if (i == -1) {
1303
- let tab = this.setIframeType(res);
1304
- this.tabs.push(tab);
1305
- if (tab.method == 'router') {
1306
- let params = util.getParams({ url: tab.url });
1307
- this.$router.push({
1308
- path: tab.path,
1309
- query: params
1310
- });
1311
- }
1312
- }
1313
- this.showMenu = false;
1253
+ this.showMsg = false;
1254
+ this.showSet = false;
1255
+ let i = util.indexOfObj(this.tabs, res, 'id');
1256
+ this.activeName = res.id;
1257
+ if (i == -1) {
1258
+ let tab = this.setIframeType(res);
1259
+ this.tabs.push(tab);
1314
1260
  }
1315
1261
  },
1316
1262
  /**
@@ -1353,7 +1299,14 @@ export default {
1353
1299
  * @date 2024年9月7日
1354
1300
  **/
1355
1301
  handleRefresh() {
1356
- this.handleTab();
1302
+ let tab = this.tabs[this.activeName];
1303
+ if (tab.method === 'iframe') {
1304
+ tab.url = util.handlerUrl(tab.url);
1305
+ }
1306
+ tab.refresh = false;
1307
+ this.$nextTick(() => {
1308
+ tab.refresh = true;
1309
+ });
1357
1310
  },
1358
1311
  /**
1359
1312
  * @desc:删除iframe
@@ -1391,6 +1344,9 @@ export default {
1391
1344
  if (this.tabs.length == 1) {
1392
1345
  disabled.other = true;
1393
1346
  }
1347
+ if (this.tabs[index].id != this.activeName) {
1348
+ disabled.refresh = true;
1349
+ }
1394
1350
  this.isDisabled = disabled;
1395
1351
  this.$refs.tabsHandler.$el.style.setProperty('left', `${e.x}px`);
1396
1352
  this.$refs.tabsHandler.$el.style.setProperty('top', `${e.y}px`);
@@ -1439,6 +1395,8 @@ export default {
1439
1395
  this.handleQuit();
1440
1396
  break;
1441
1397
  case 'online':
1398
+ this.showMsg = false;
1399
+ this.showSet = false;
1442
1400
  if (this.onlineUrl) {
1443
1401
  this.dialog = {
1444
1402
  title: '查看在线人员',
@@ -1449,9 +1407,11 @@ export default {
1449
1407
  break;
1450
1408
  case 'notice':
1451
1409
  this.showMsg = !this.showMsg;
1410
+ this.showSet = false;
1452
1411
  break;
1453
1412
  case 'set':
1454
1413
  this.showSet = !this.showSet;
1414
+ this.showMsg = false;
1455
1415
  break;
1456
1416
  case 'home':
1457
1417
  if (this.homePage.id !== this.activeName) {
@@ -1460,10 +1420,14 @@ export default {
1460
1420
  this.tabs.unshift(this.homePage);
1461
1421
  }
1462
1422
  this.activeName = this.homePage.id;
1423
+ this.showMsg = false;
1424
+ this.showSet = false;
1463
1425
  }
1464
1426
  break;
1465
1427
  case 'search':
1466
1428
  this.handlerSetDrawer(res);
1429
+ this.showMsg = false;
1430
+ this.showSet = false;
1467
1431
  break;
1468
1432
  case 'goView':
1469
1433
  util.win.open(res.path, '_blank');
@@ -1714,7 +1678,10 @@ export default {
1714
1678
  }
1715
1679
  },
1716
1680
  jumpMenu(res) {
1717
- let apps = res.split(',');
1681
+ let apps = res;
1682
+ if (typeof res === 'string') {
1683
+ apps = res.split(',');
1684
+ }
1718
1685
  let obj = this.getMenu(this.menus, apps[apps.length - 1]);
1719
1686
  if (obj) {
1720
1687
  let i = util.indexOfObj(this.tabs, obj, 'id');
@@ -1723,69 +1690,24 @@ export default {
1723
1690
  if (i == -1) {
1724
1691
  let tab = this.setIframeType(obj);
1725
1692
  this.tabs.splice(n + 1, 0, tab);
1726
- if (tab.method == 'router') {
1727
- let params = util.getParams({ url: tab.url });
1728
- this.$router.push({
1729
- path: tab.path,
1730
- query: params
1731
- });
1732
- }
1733
1693
  }
1734
1694
  } else {
1735
1695
  this.$message.error('没有此菜单!');
1736
1696
  }
1737
1697
  },
1738
- //移动
1739
- move() {
1740
- let area = this.$refs.area;
1741
- let box = this.$refs.box;
1742
- let [sTime, eTime] = [0, 0];
1743
- area.addEventListener('mousedown', (e) => {
1744
- sTime = new Date().getTime();
1745
- let { y: downY, x: downX } = e;
1746
- let { height: winH, width: winW } =
1747
- document.body.getBoundingClientRect();
1748
- //防止拖动期间选中和复制网页文本
1749
- document.body.onselectstart = document.body.oncontextmenu = () => {
1750
- return false;
1751
- };
1752
- document.onmousemove = (eve) => {
1753
- let size = 40;
1754
- let { y: moveY, x: moveX } = eve;
1755
- let { top: boxTop, left: boxLeft } = box.getBoundingClientRect();
1756
- boxTop += moveY - downY;
1757
- boxLeft += moveX - downX;
1758
- boxTop >= winH - size && (boxTop = winH - size);
1759
- boxTop <= -size && (boxTop = -size);
1760
- boxLeft >= winW - size && (boxLeft = winW - size);
1761
- boxLeft <= -size && (boxLeft = -size);
1762
- if (boxTop < 60) {
1763
- boxTop = 60;
1698
+ //监听改变菜单
1699
+ handleListener() {
1700
+ util.win.addEventListener(
1701
+ 'message',
1702
+ (e) => {
1703
+ var msg = e.data;
1704
+ if (msg.key == 'jump_Menu') {
1705
+ let res = msg.data1;
1706
+ this.jumpMenu(res);
1764
1707
  }
1765
- if (boxLeft < 80) {
1766
- boxLeft = 80;
1767
- }
1768
- box.style.top = boxTop + 'px';
1769
- box.style.left = boxLeft + 'px';
1770
- downY = moveY;
1771
- downX = moveX;
1772
- };
1773
- document.onmouseup = () => {
1774
- eTime = new Date().getTime();
1775
- let isClick = eTime - sTime < 200;
1776
- if (isClick) {
1777
- let onArea = () => {
1778
- this.subMenu = [];
1779
- area.removeEventListener('click', onArea);
1780
- };
1781
- area.addEventListener('click', onArea);
1782
- }
1783
- document.onmousemove = null;
1784
- document.body.onselectstart = document.body.oncontextmenu = () => {
1785
- return true;
1786
- };
1787
- };
1788
- });
1708
+ },
1709
+ false
1710
+ );
1789
1711
  }
1790
1712
  },
1791
1713
  beforeDestroy() {