eoss-ui 0.5.81-beta8 → 0.5.82
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/button-group.js +82 -55
- package/lib/button.js +57 -48
- package/lib/checkbox-group.js +55 -47
- package/lib/clients.js +4 -3
- package/lib/config/api.js +3 -1
- package/lib/data-table-form.js +55 -47
- package/lib/data-table.js +473 -276
- package/lib/date-picker.js +69 -59
- package/lib/dialog.js +77 -72
- package/lib/eoss-ui.common.js +4299 -3288
- package/lib/flow-group.js +102 -65
- package/lib/flow-list.js +56 -48
- package/lib/flow.js +158 -85
- package/lib/form.js +88 -59
- package/lib/handle-user.js +66 -51
- package/lib/handler.js +69 -50
- package/lib/icon.js +55 -47
- package/lib/index.js +1 -1
- package/lib/input-number.js +55 -47
- package/lib/input.js +55 -47
- package/lib/login.js +104 -85
- package/lib/main.js +1684 -1158
- package/lib/menu.js +1 -1
- package/lib/nav.js +55 -47
- package/lib/notify.js +54 -50
- package/lib/page.js +55 -47
- package/lib/pagination.js +3723 -3
- package/lib/player.js +60 -52
- package/lib/qr-code.js +55 -47
- package/lib/radio-group.js +55 -47
- package/lib/retrial-auth.js +56 -48
- package/lib/select-ganged.js +55 -47
- package/lib/select.js +55 -47
- package/lib/selector-panel.js +69 -60
- package/lib/selector.js +495 -424
- package/lib/sizer.js +55 -47
- package/lib/steps.js +55 -47
- package/lib/switch.js +55 -47
- package/lib/table-form.js +55 -47
- package/lib/tabs.js +1532 -1480
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/button-group.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/theme-chalk/tree-group.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +55 -47
- package/lib/tree-group.js +79 -50
- package/lib/tree.js +55 -47
- package/lib/upload.js +59 -51
- package/lib/utils/util.js +6 -2
- package/lib/wujie.js +55 -47
- package/lib/wxlogin.js +55 -47
- package/package.json +3 -3
- package/packages/button/src/main.vue +2 -1
- package/packages/button-group/src/main.vue +8 -6
- package/packages/clients/src/main.vue +2 -1
- package/packages/data-table/src/column.vue +137 -54
- package/packages/data-table/src/main.vue +77 -68
- package/packages/data-table/src/sizer.vue +2 -0
- package/packages/date-picker/src/main.vue +22 -14
- package/packages/dialog/src/main.vue +17 -23
- package/packages/flow/src/main.vue +32 -17
- package/packages/flow-group/src/main.vue +18 -11
- package/packages/form/src/main.vue +21 -10
- package/packages/handle-user/src/main.vue +5 -1
- package/packages/handler/src/main.vue +7 -3
- package/packages/login/src/main.vue +22 -15
- package/packages/main/src/default/index.vue +111 -179
- package/packages/main/src/main.vue +233 -4
- package/packages/main/src/public/online.vue +89 -0
- package/packages/main/src/simplicity/apps.vue +3 -3
- package/packages/main/src/simplicity/avatar.vue +16 -5
- package/packages/main/src/simplicity/handler.vue +6 -2
- package/packages/main/src/simplicity/index.vue +314 -238
- package/packages/main/src/simplicity/menu-list.vue +22 -74
- package/packages/main/src/simplicity/router-page.vue +5 -14
- package/packages/main/src/simplicity/sub-menu.vue +111 -7
- package/packages/main/src/simplicity/user.vue +5 -1
- package/packages/menu/src/main.vue +4 -3
- package/packages/pagination/src/main.vue +20 -1
- package/packages/selector/src/main.vue +147 -135
- package/packages/selector-panel/src/main.vue +3 -2
- package/packages/selector-panel/src/selection.vue +2 -2
- package/packages/tabs/src/main.vue +25 -15
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/button-group.css +1 -1
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/pagination.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/tabs.css +1 -1
- package/packages/theme-chalk/lib/toolbar.css +1 -1
- package/packages/theme-chalk/lib/tree-group.css +1 -1
- package/packages/theme-chalk/lib/tree.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/base.scss +39 -0
- package/packages/theme-chalk/src/button-group.scss +16 -2
- package/packages/theme-chalk/src/common/var.scss +7 -2
- package/packages/theme-chalk/src/data-table.scss +60 -23
- package/packages/theme-chalk/src/form.scss +42 -40
- package/packages/theme-chalk/src/main.scss +11 -0
- package/packages/theme-chalk/src/pagination.scss +7 -0
- package/packages/theme-chalk/src/simplicity.scss +108 -40
- package/packages/theme-chalk/src/tabs.scss +24 -28
- package/packages/theme-chalk/src/toolbar.scss +16 -4
- package/packages/theme-chalk/src/tree-group.scss +8 -0
- package/packages/theme-chalk/src/tree.scss +19 -6
- package/packages/tree-group/src/main.vue +16 -7
- package/src/config/api.js +3 -1
- package/src/index.js +157 -157
- package/src/utils/util.js +6 -1
- package/CHANGELOG.md +0 -929
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
:notice="notice"
|
|
42
42
|
:data="handleData"
|
|
43
43
|
:max-height="_maxHeight"
|
|
44
|
+
@visible-change="handleVisibleChange"
|
|
44
45
|
@change="handleJobChange"
|
|
45
46
|
@select="
|
|
46
47
|
(res) => {
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
"
|
|
121
122
|
></es-menu>
|
|
122
123
|
</div>
|
|
123
|
-
<div class="es-body">
|
|
124
|
+
<div class="es-body" :class="{ 'es-body-wrapper': showJobs }">
|
|
124
125
|
<div
|
|
125
126
|
class="es-body-main"
|
|
126
127
|
v-loading="pageLoading"
|
|
@@ -192,8 +193,11 @@
|
|
|
192
193
|
</es-dialog>
|
|
193
194
|
<notice :data="sysMsg" :winopen="winopen" @opened="handleOpened"></notice>
|
|
194
195
|
<es-dialog :title="dialog.title" :visible.sync="dialog.show" size="md">
|
|
196
|
+
<template v-if="dialog.title == '查看在线人员' && !dialog.src">
|
|
197
|
+
<online></online>
|
|
198
|
+
</template>
|
|
195
199
|
<iframe
|
|
196
|
-
v-if="dialog.show"
|
|
200
|
+
v-else-if="dialog.show"
|
|
197
201
|
width="100%"
|
|
198
202
|
height="100%"
|
|
199
203
|
frameborder="0"
|
|
@@ -207,6 +211,7 @@ import userinfo from './userinfo.vue';
|
|
|
207
211
|
import settings from './settings.vue';
|
|
208
212
|
import message from './message.vue';
|
|
209
213
|
import notice from './notice.vue';
|
|
214
|
+
import online from '../public/online.vue';
|
|
210
215
|
import {
|
|
211
216
|
//authCenter,
|
|
212
217
|
wss,
|
|
@@ -226,14 +231,17 @@ export default {
|
|
|
226
231
|
inheritAttrs: false,
|
|
227
232
|
provide() {
|
|
228
233
|
return {
|
|
229
|
-
esMain: this
|
|
234
|
+
esMain: this,
|
|
235
|
+
refresh: this.handleRefresh,
|
|
236
|
+
jumpMenu: this.jumpMenu
|
|
230
237
|
};
|
|
231
238
|
},
|
|
232
239
|
components: {
|
|
233
240
|
userinfo,
|
|
234
241
|
settings,
|
|
235
242
|
message,
|
|
236
|
-
notice
|
|
243
|
+
notice,
|
|
244
|
+
online
|
|
237
245
|
},
|
|
238
246
|
props: {
|
|
239
247
|
jobScrollbar: Boolean,
|
|
@@ -534,9 +542,7 @@ export default {
|
|
|
534
542
|
},
|
|
535
543
|
onlineUrl() {
|
|
536
544
|
if (this.onlineView) {
|
|
537
|
-
return typeof this.onlineView == 'string'
|
|
538
|
-
? this.onlineView
|
|
539
|
-
: '/main/sysuseronline/list.dhtml';
|
|
545
|
+
return typeof this.onlineView == 'string' ? this.onlineView : '';
|
|
540
546
|
}
|
|
541
547
|
return false;
|
|
542
548
|
}
|
|
@@ -569,6 +575,7 @@ export default {
|
|
|
569
575
|
},
|
|
570
576
|
data() {
|
|
571
577
|
return {
|
|
578
|
+
showJobs: false,
|
|
572
579
|
layout: this.scene.toLowerCase(),
|
|
573
580
|
themeJSON: {
|
|
574
581
|
logo: { comp: '', data: {} },
|
|
@@ -672,20 +679,13 @@ export default {
|
|
|
672
679
|
let mainConfig = util.getStorage('mainConfig');
|
|
673
680
|
if (mainConfig) {
|
|
674
681
|
const results = JSON.parse(mainConfig);
|
|
675
|
-
|
|
682
|
+
if (Object.keys(results).length) {
|
|
683
|
+
this.init(results);
|
|
684
|
+
}
|
|
676
685
|
}
|
|
677
686
|
},
|
|
678
687
|
mounted() {
|
|
679
|
-
util.win.reLogin = this.handleReLogin;
|
|
680
688
|
this.handleListener();
|
|
681
|
-
util.win.refresh = this.handleRefresh;
|
|
682
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
683
|
-
if (util.win.$wujie) {
|
|
684
|
-
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
685
|
-
util.updateTheme(res);
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
util.win.windowOpen = this.openPage;
|
|
689
689
|
util.win.addEventListener('popstate', this.stateHandle, false);
|
|
690
690
|
},
|
|
691
691
|
methods: {
|
|
@@ -821,6 +821,8 @@ export default {
|
|
|
821
821
|
util.setStorage({
|
|
822
822
|
type: this.storage,
|
|
823
823
|
key: {
|
|
824
|
+
depId: results.userModel.depId,
|
|
825
|
+
orgId: results.userModel.orgId,
|
|
824
826
|
userId: results.userModel.userId,
|
|
825
827
|
userName: results.userModel.username,
|
|
826
828
|
useCaseCodes: results.resourceCodes || results.userModel.resourceCodes
|
|
@@ -980,7 +982,7 @@ export default {
|
|
|
980
982
|
option.url.indexOf('/#/') > -1 ||
|
|
981
983
|
option.url.indexOf('#/') > -1
|
|
982
984
|
) {
|
|
983
|
-
option.
|
|
985
|
+
option.isUrl = true;
|
|
984
986
|
ids = this.getId(this.menus, option.url);
|
|
985
987
|
if (!ids) {
|
|
986
988
|
if (
|
|
@@ -1021,6 +1023,9 @@ export default {
|
|
|
1021
1023
|
}
|
|
1022
1024
|
} else {
|
|
1023
1025
|
ids = option.url.split(',');
|
|
1026
|
+
if (ids.length == 1) {
|
|
1027
|
+
ids = this.getId(this.menus, option.url);
|
|
1028
|
+
}
|
|
1024
1029
|
}
|
|
1025
1030
|
} else {
|
|
1026
1031
|
ids = option.url;
|
|
@@ -1038,7 +1043,48 @@ export default {
|
|
|
1038
1043
|
}
|
|
1039
1044
|
for (let i = 0; i < menus.length; i++) {
|
|
1040
1045
|
let item = menus[i];
|
|
1041
|
-
if (
|
|
1046
|
+
if (item.id === url) {
|
|
1047
|
+
if (item.url) {
|
|
1048
|
+
if (
|
|
1049
|
+
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1050
|
+
item.children.length
|
|
1051
|
+
) {
|
|
1052
|
+
let id = this.getId(item.children, item.url);
|
|
1053
|
+
if (id) {
|
|
1054
|
+
if (typeof id === 'string') {
|
|
1055
|
+
this.isTabs = false;
|
|
1056
|
+
}
|
|
1057
|
+
if (item.pid === 'root' || Array.isArray(id)) {
|
|
1058
|
+
return [item.id].concat(id);
|
|
1059
|
+
} else if (typeof id === 'string') {
|
|
1060
|
+
return [item.id, id];
|
|
1061
|
+
}
|
|
1062
|
+
return id;
|
|
1063
|
+
}
|
|
1064
|
+
} else if (
|
|
1065
|
+
Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
|
|
1066
|
+
item.fourthTabs.length
|
|
1067
|
+
) {
|
|
1068
|
+
let id = this.getId(item.fourthTabs, item.url);
|
|
1069
|
+
if (id) {
|
|
1070
|
+
if (typeof id === 'string') {
|
|
1071
|
+
this.isTabs = true;
|
|
1072
|
+
}
|
|
1073
|
+
if (item.pid === 'root') {
|
|
1074
|
+
return [item.id].concat(id);
|
|
1075
|
+
} else if (typeof id === 'string') {
|
|
1076
|
+
return [item.id, id];
|
|
1077
|
+
}
|
|
1078
|
+
return id;
|
|
1079
|
+
}
|
|
1080
|
+
} else {
|
|
1081
|
+
return item.id;
|
|
1082
|
+
}
|
|
1083
|
+
} else {
|
|
1084
|
+
console.error(item);
|
|
1085
|
+
return false;
|
|
1086
|
+
}
|
|
1087
|
+
} else if (
|
|
1042
1088
|
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1043
1089
|
item.children.length
|
|
1044
1090
|
) {
|
|
@@ -1070,7 +1116,7 @@ export default {
|
|
|
1070
1116
|
}
|
|
1071
1117
|
return id;
|
|
1072
1118
|
}
|
|
1073
|
-
} else if (item.
|
|
1119
|
+
} else if (item.url == url) {
|
|
1074
1120
|
return item.id;
|
|
1075
1121
|
} else {
|
|
1076
1122
|
if (item.url) {
|
|
@@ -1271,7 +1317,10 @@ export default {
|
|
|
1271
1317
|
this.tabsId = tab.id;
|
|
1272
1318
|
this.handleJump(tab.url, tab.urlopenmode, tab);
|
|
1273
1319
|
}
|
|
1274
|
-
} else
|
|
1320
|
+
} else if (
|
|
1321
|
+
this.tabs[0].urlopenmode !== 1 &&
|
|
1322
|
+
this.tabs[0].urlopenmode !== 2
|
|
1323
|
+
) {
|
|
1275
1324
|
this.tabsId = this.tabs[0].id;
|
|
1276
1325
|
this.handleJump(
|
|
1277
1326
|
this.tabs[0].url,
|
|
@@ -1280,7 +1329,7 @@ export default {
|
|
|
1280
1329
|
);
|
|
1281
1330
|
}
|
|
1282
1331
|
}
|
|
1283
|
-
} else {
|
|
1332
|
+
} else if (obj.urlopenmode !== 1 && obj.urlopenmode !== 2) {
|
|
1284
1333
|
this.tabs = [];
|
|
1285
1334
|
this.handleJump(obj.url, obj.urlopenmode, obj);
|
|
1286
1335
|
}
|
|
@@ -1337,7 +1386,7 @@ export default {
|
|
|
1337
1386
|
this.sysId = '';
|
|
1338
1387
|
this.tabsId = '';
|
|
1339
1388
|
this.active = '';
|
|
1340
|
-
this.getUrl(res, active, param);
|
|
1389
|
+
this.getUrl(res, active[active.length - 1], param);
|
|
1341
1390
|
if (
|
|
1342
1391
|
this.layout === 'subsystem' ||
|
|
1343
1392
|
this.layout === 'subSystem' ||
|
|
@@ -1390,7 +1439,7 @@ export default {
|
|
|
1390
1439
|
if (this.biserial) {
|
|
1391
1440
|
this.active = active.slice(
|
|
1392
1441
|
0,
|
|
1393
|
-
|
|
1442
|
+
this.tabs && this.tabs.length ? active.length - 1 : active.length
|
|
1394
1443
|
);
|
|
1395
1444
|
} else {
|
|
1396
1445
|
this.active = active.slice(1);
|
|
@@ -1400,34 +1449,29 @@ export default {
|
|
|
1400
1449
|
this.showPage = true;
|
|
1401
1450
|
},
|
|
1402
1451
|
//获取页面类型及地址
|
|
1403
|
-
getUrl(res, active,
|
|
1404
|
-
index = index === undefined ? 0 : index;
|
|
1452
|
+
getUrl(res, active, param) {
|
|
1405
1453
|
for (let i = 0; i < res.length; i++) {
|
|
1406
1454
|
let item = res[i];
|
|
1407
|
-
if (item.id === active
|
|
1408
|
-
if (
|
|
1455
|
+
if (item.id === active) {
|
|
1456
|
+
if (item.url) {
|
|
1409
1457
|
this.handleJump(item.url, item.urlopenmode, item, param);
|
|
1410
1458
|
return item.url;
|
|
1411
1459
|
} else {
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1460
|
+
console.error(item);
|
|
1461
|
+
}
|
|
1462
|
+
} else {
|
|
1463
|
+
if (item.children && item.children.length) {
|
|
1464
|
+
let url = this.getUrl(item.children, active, param);
|
|
1465
|
+
if (url) {
|
|
1466
|
+
this.tabs = '';
|
|
1419
1467
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}
|
|
1426
|
-
return url;
|
|
1468
|
+
}
|
|
1469
|
+
if (item.fourthTabs && item.fourthTabs.length) {
|
|
1470
|
+
let url = this.getUrl(item.fourthTabs, active, param);
|
|
1471
|
+
if (url) {
|
|
1472
|
+
this.$set(this, 'tabs', item.fourthTabs);
|
|
1427
1473
|
}
|
|
1428
1474
|
}
|
|
1429
|
-
} else if (item.children && item.children.length) {
|
|
1430
|
-
this.getUrl(item.children, active, index, param);
|
|
1431
1475
|
}
|
|
1432
1476
|
}
|
|
1433
1477
|
return false;
|
|
@@ -1444,6 +1488,9 @@ export default {
|
|
|
1444
1488
|
let _url = params._baseUrl ? params._baseUrl : './primary.html';
|
|
1445
1489
|
return util.urlJoinParams({ url: _url, param: obj });
|
|
1446
1490
|
},
|
|
1491
|
+
handleVisibleChange(res) {
|
|
1492
|
+
this.showJobs = res;
|
|
1493
|
+
},
|
|
1447
1494
|
//应用导航交互
|
|
1448
1495
|
handleSelect(res, type, open) {
|
|
1449
1496
|
const { node, fourthTabs } = res;
|
|
@@ -1550,13 +1597,16 @@ export default {
|
|
|
1550
1597
|
}
|
|
1551
1598
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1552
1599
|
}
|
|
1553
|
-
} else {
|
|
1554
|
-
|
|
1600
|
+
} else if (node.fourthTabs && node.fourthTabs.length) {
|
|
1601
|
+
this.tabs = [];
|
|
1602
|
+
let tab = node.fourthTabs.filter((item) => {
|
|
1555
1603
|
return item.url === node.url;
|
|
1556
1604
|
})[0];
|
|
1557
1605
|
if (tab) {
|
|
1558
|
-
this.tabs = node.fourthTabs;
|
|
1559
1606
|
this.tabsId = tab.id;
|
|
1607
|
+
this.$nextTick(() => {
|
|
1608
|
+
this.tabs = node.fourthTabs;
|
|
1609
|
+
});
|
|
1560
1610
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1561
1611
|
} else {
|
|
1562
1612
|
//this.navIds = this.getId(this.menus, node.url);
|
|
@@ -1564,13 +1614,15 @@ export default {
|
|
|
1564
1614
|
}
|
|
1565
1615
|
} else {
|
|
1566
1616
|
if (node.fourthTabs.length) {
|
|
1567
|
-
this.
|
|
1568
|
-
this
|
|
1569
|
-
|
|
1570
|
-
this.
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1617
|
+
this.tabsId = node.fourthTabs[0].id;
|
|
1618
|
+
this.$nextTick(() => {
|
|
1619
|
+
this.tabs = node.fourthTabs;
|
|
1620
|
+
this.handleJump(
|
|
1621
|
+
this.tabs[0].url,
|
|
1622
|
+
this.tabs[0].urlopenmode,
|
|
1623
|
+
this.tabs[0]
|
|
1624
|
+
);
|
|
1625
|
+
});
|
|
1574
1626
|
//this.navIds = this.getId(this.menus, this.tabs[0].url);
|
|
1575
1627
|
}
|
|
1576
1628
|
}
|
|
@@ -1659,13 +1711,11 @@ export default {
|
|
|
1659
1711
|
this.showUserInfo = true;
|
|
1660
1712
|
break;
|
|
1661
1713
|
case 'online':
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
};
|
|
1668
|
-
}
|
|
1714
|
+
this.dialog = {
|
|
1715
|
+
title: '查看在线人员',
|
|
1716
|
+
show: true,
|
|
1717
|
+
src: this.onlineUrl
|
|
1718
|
+
};
|
|
1669
1719
|
break;
|
|
1670
1720
|
case 'notice':
|
|
1671
1721
|
this.showMsg = !this.showMsg;
|
|
@@ -1991,124 +2041,6 @@ export default {
|
|
|
1991
2041
|
let n = parseInt(this.menuTips[id], 10) - 1;
|
|
1992
2042
|
this.$set(this.menuTips, id, n);
|
|
1993
2043
|
}
|
|
1994
|
-
},
|
|
1995
|
-
handleReLogin(res) {
|
|
1996
|
-
if (res && typeof res == 'string') {
|
|
1997
|
-
res = JSON.parse(res);
|
|
1998
|
-
}
|
|
1999
|
-
let msg = '提示';
|
|
2000
|
-
let btn = {
|
|
2001
|
-
confirmButtonText: '确定',
|
|
2002
|
-
cancelButtonText: '取消',
|
|
2003
|
-
closeOnClickModal: false,
|
|
2004
|
-
type: 'warning'
|
|
2005
|
-
};
|
|
2006
|
-
if (res) {
|
|
2007
|
-
if (res.rCode === 69) {
|
|
2008
|
-
msg = '该账号在其他地方已登陆!';
|
|
2009
|
-
btn = {
|
|
2010
|
-
confirmButtonText: '确定',
|
|
2011
|
-
closeOnClickModal: false,
|
|
2012
|
-
type: 'warning'
|
|
2013
|
-
};
|
|
2014
|
-
} else {
|
|
2015
|
-
msg = '登录已过期,请重新登录!';
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
cl;
|
|
2019
|
-
let remind = sessionStorage.getItem('remind');
|
|
2020
|
-
if (!remind) {
|
|
2021
|
-
clearTimeout(this.timer);
|
|
2022
|
-
this.timer = setTimeout(() => {
|
|
2023
|
-
console.log('handleReLogin');
|
|
2024
|
-
sessionStorage.setItem('remind', 1);
|
|
2025
|
-
this.$confirm(msg, btn)
|
|
2026
|
-
.then(() => {
|
|
2027
|
-
util.removeStorage([
|
|
2028
|
-
'Authorization',
|
|
2029
|
-
'token',
|
|
2030
|
-
'ssId',
|
|
2031
|
-
'userId',
|
|
2032
|
-
'userName',
|
|
2033
|
-
'auth',
|
|
2034
|
-
'deviceUnique',
|
|
2035
|
-
'menus',
|
|
2036
|
-
'useCaseCodes',
|
|
2037
|
-
'mainConfig',
|
|
2038
|
-
'jump'
|
|
2039
|
-
]);
|
|
2040
|
-
const loginPage =
|
|
2041
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
2042
|
-
try {
|
|
2043
|
-
if (loginPage) {
|
|
2044
|
-
let src;
|
|
2045
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
2046
|
-
let pathname = util.win.top.location.pathname;
|
|
2047
|
-
if (pathname !== '/') {
|
|
2048
|
-
pathname = pathname.split('/');
|
|
2049
|
-
pathname.splice(pathname.length - 1);
|
|
2050
|
-
pathname = pathname.join('/');
|
|
2051
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
2052
|
-
} else {
|
|
2053
|
-
src = pathname + loginPage.replace('./', '');
|
|
2054
|
-
}
|
|
2055
|
-
} else {
|
|
2056
|
-
src = loginPage;
|
|
2057
|
-
}
|
|
2058
|
-
util.win.top.location.href = src;
|
|
2059
|
-
} else if (
|
|
2060
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
2061
|
-
) {
|
|
2062
|
-
util.win.top.location.href = './login.html';
|
|
2063
|
-
} else {
|
|
2064
|
-
const hash = util.win.top.location.hash;
|
|
2065
|
-
if (hash) {
|
|
2066
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
2067
|
-
util.win.top.location.href =
|
|
2068
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
2069
|
-
} else {
|
|
2070
|
-
util.win.top.location.href = '/login.html';
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
} catch (error) {
|
|
2074
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
2075
|
-
}
|
|
2076
|
-
})
|
|
2077
|
-
.catch((e) => {
|
|
2078
|
-
sessionStorage.removeItem('remind');
|
|
2079
|
-
});
|
|
2080
|
-
}, 2000);
|
|
2081
|
-
}
|
|
2082
|
-
},
|
|
2083
|
-
openPage(url, name, width, height) {
|
|
2084
|
-
let src = url;
|
|
2085
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
2086
|
-
let pathname = window.location.pathname;
|
|
2087
|
-
if (pathname !== '/') {
|
|
2088
|
-
pathname = pathname.split('/');
|
|
2089
|
-
pathname.splice(pathname.length - 1);
|
|
2090
|
-
pathname = pathname.join('/');
|
|
2091
|
-
}
|
|
2092
|
-
src = pathname + url.replace('./', '/');
|
|
2093
|
-
}
|
|
2094
|
-
if (name) {
|
|
2095
|
-
let w = 0;
|
|
2096
|
-
let h = 0;
|
|
2097
|
-
try {
|
|
2098
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
2099
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
2100
|
-
} catch (error) {
|
|
2101
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
2102
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
2103
|
-
}
|
|
2104
|
-
return util.win.open(
|
|
2105
|
-
src,
|
|
2106
|
-
name,
|
|
2107
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
2108
|
-
);
|
|
2109
|
-
} else {
|
|
2110
|
-
return util.win.open(src);
|
|
2111
|
-
}
|
|
2112
2044
|
}
|
|
2113
2045
|
},
|
|
2114
2046
|
beforeDestroy() {
|