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.
- package/lib/eoss-ui.common.js +1610 -1104
- package/lib/index.js +1 -1
- package/lib/main.js +1571 -1122
- package/lib/selector-panel.js +64 -11
- package/lib/selector.js +8 -4
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/selector-panel.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/package.json +1 -1
- package/packages/main/src/default/index.vue +1 -1
- package/packages/main/src/main.vue +13 -12
- package/packages/main/src/simplicity/apps.vue +176 -145
- package/packages/main/src/simplicity/index.vue +160 -238
- package/packages/main/src/simplicity/menu-list.vue +117 -32
- package/packages/main/src/simplicity/message.vue +35 -25
- package/packages/main/src/simplicity/notice.vue +72 -39
- package/packages/main/src/simplicity/router-page.vue +53 -0
- package/packages/main/src/simplicity/settings.vue +1 -1
- package/packages/main/src/simplicity/sub-menu.vue +69 -69
- package/packages/main/src/simplicity/user.vue +4 -4
- package/packages/main/src/simplicity/userinfo.vue +1 -0
- package/packages/selector/src/main.vue +6 -2
- package/packages/selector-panel/src/main.vue +21 -2
- package/packages/selector-panel/src/selection.vue +6 -0
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/selector-panel.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/tree.css +1 -1
- package/packages/theme-chalk/src/common/var.scss +2 -0
- package/packages/theme-chalk/src/selector-panel.scss +2 -1
- package/packages/theme-chalk/src/simplicity.scss +191 -5
- package/packages/theme-chalk/src/tree.scss +4 -2
- package/src/index.js +1 -1
|
@@ -74,46 +74,32 @@
|
|
|
74
74
|
</div>
|
|
75
75
|
<div class="es-simplicity-main">
|
|
76
76
|
<!-- 菜单 -->
|
|
77
|
-
<
|
|
78
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
<
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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: '
|
|
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
|
-
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if (
|
|
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
|
-
|
|
880
|
-
|
|
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
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
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
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
this
|
|
924
|
-
|
|
925
|
-
|
|
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
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
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
|
-
|
|
1129
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
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.
|
|
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
|
|
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
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
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
|
-
|
|
1766
|
-
|
|
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() {
|