eoss-ui 0.5.81-beta2 → 0.5.81-beta20
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 +76 -53
- package/lib/button.js +51 -46
- package/lib/checkbox-group.js +49 -45
- package/lib/clients.js +4 -3
- package/lib/config/api.js +3 -1
- package/lib/data-table-form.js +49 -45
- package/lib/data-table.js +443 -240
- package/lib/date-picker.js +49 -45
- package/lib/dialog.js +58 -53
- package/lib/eoss-ui.common.js +3698 -2064
- package/lib/flow-group.js +52 -48
- package/lib/flow-list.js +50 -46
- package/lib/flow.js +138 -75
- package/lib/form.js +96 -49
- package/lib/handle-user.js +66 -49
- package/lib/handler.js +61 -48
- package/lib/icon.js +49 -45
- package/lib/index.js +1 -1
- package/lib/input-number.js +49 -45
- package/lib/input.js +49 -45
- package/lib/login.js +64 -53
- package/lib/main.js +2632 -1466
- package/lib/menu.js +1 -1
- package/lib/nav.js +49 -45
- package/lib/notify.js +54 -50
- package/lib/page.js +49 -45
- package/lib/pagination.js +3719 -3
- package/lib/player.js +54 -50
- package/lib/qr-code.js +49 -45
- package/lib/radio-group.js +49 -45
- package/lib/retrial-auth.js +50 -46
- package/lib/select-ganged.js +49 -45
- package/lib/select.js +50 -46
- package/lib/selector-panel.js +115 -63
- package/lib/selector.js +491 -422
- package/lib/sizer.js +49 -45
- package/lib/steps.js +49 -45
- package/lib/switch.js +49 -45
- package/lib/table-form.js +49 -45
- package/lib/tabs.js +49 -45
- 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/handler.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/nav.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/selector-panel.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +49 -45
- package/lib/tree-group.js +49 -45
- package/lib/tree.js +49 -45
- package/lib/upload.js +59 -55
- package/lib/wujie.js +49 -45
- package/lib/wxlogin.js +49 -45
- package/package.json +2 -2
- 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 +113 -41
- package/packages/data-table/src/formItem.vue +430 -0
- package/packages/data-table/src/main.vue +85 -45
- package/packages/data-table/src/sizer.vue +2 -0
- package/packages/dialog/src/main.vue +4 -3
- package/packages/flow/src/main.vue +30 -17
- package/packages/flow-group/src/main.vue +1 -1
- package/packages/form/src/main.vue +45 -10
- package/packages/handle-user/src/main.vue +10 -3
- package/packages/handler/src/main.vue +5 -3
- package/packages/login/src/main.vue +13 -6
- package/packages/main/src/default/index.vue +102 -179
- package/packages/main/src/main.vue +243 -16
- package/packages/main/src/public/online.vue +90 -0
- package/packages/main/src/simplicity/apps.vue +176 -145
- package/packages/main/src/simplicity/avatar.vue +16 -6
- package/packages/main/src/simplicity/handler.vue +6 -2
- package/packages/main/src/simplicity/index.vue +477 -323
- package/packages/main/src/simplicity/menu-list.vue +75 -24
- 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 +169 -54
- package/packages/main/src/simplicity/user.vue +10 -5
- package/packages/main/src/simplicity/userinfo.vue +1 -0
- package/packages/menu/src/main.vue +4 -3
- package/packages/pagination/src/main.vue +20 -1
- package/packages/select/src/main.vue +4 -1
- package/packages/selector/src/main.vue +151 -136
- package/packages/selector-panel/src/main.vue +23 -9
- package/packages/selector-panel/src/selection.vue +6 -0
- 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/handler.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/nav.css +1 -1
- package/packages/theme-chalk/lib/pagination.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/sizer.css +1 -1
- package/packages/theme-chalk/lib/toolbar.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 +5 -0
- package/packages/theme-chalk/src/button-group.scss +18 -4
- package/packages/theme-chalk/src/common/var.scss +9 -2
- package/packages/theme-chalk/src/data-table.scss +60 -23
- package/packages/theme-chalk/src/handler.scss +5 -1
- package/packages/theme-chalk/src/login.scss +2 -2
- package/packages/theme-chalk/src/nav.scss +3 -2
- package/packages/theme-chalk/src/pagination.scss +7 -0
- package/packages/theme-chalk/src/selector-panel.scss +2 -1
- package/packages/theme-chalk/src/simplicity.scss +355 -58
- package/packages/theme-chalk/src/toolbar.scss +16 -4
- package/packages/theme-chalk/src/tree.scss +4 -2
- package/packages/upload/src/main.vue +3 -1
- package/src/config/api.js +3 -1
- package/src/index.js +1 -1
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
custom-class="es-clients-dialog"
|
|
353
353
|
:visible.sync="showDownLoadApp"
|
|
354
354
|
>
|
|
355
|
-
<es-clients :downloads="download"></es-clients>
|
|
355
|
+
<es-clients :downloads="download" :showTips="showIosTips"></es-clients>
|
|
356
356
|
</es-dialog>
|
|
357
357
|
<slot name="calogin"></slot>
|
|
358
358
|
<es-dialog
|
|
@@ -579,6 +579,7 @@ export default {
|
|
|
579
579
|
type: String,
|
|
580
580
|
default: 'center'
|
|
581
581
|
},
|
|
582
|
+
translate: String,
|
|
582
583
|
useResults: {
|
|
583
584
|
type: Boolean,
|
|
584
585
|
default: true
|
|
@@ -587,35 +588,41 @@ export default {
|
|
|
587
588
|
type: Number,
|
|
588
589
|
default: 1500
|
|
589
590
|
},
|
|
590
|
-
isScale: Boolean
|
|
591
|
+
isScale: Boolean,
|
|
592
|
+
showIosTips: Boolean
|
|
591
593
|
},
|
|
592
594
|
computed: {
|
|
593
595
|
transform() {
|
|
596
|
+
let translate = this.translate
|
|
597
|
+
? this.translate
|
|
598
|
+
: this.align === 'center'
|
|
599
|
+
? '-50%, -51%'
|
|
600
|
+
: '-51%';
|
|
594
601
|
if (this.align.indexOf('%') > -1) {
|
|
595
602
|
return {
|
|
596
603
|
left: this.align,
|
|
597
604
|
top: '50%',
|
|
598
|
-
transform:
|
|
605
|
+
transform: `translateY(${translate})`
|
|
599
606
|
};
|
|
600
607
|
}
|
|
601
608
|
if (this.align === 'left') {
|
|
602
609
|
return {
|
|
603
610
|
left: '30%',
|
|
604
611
|
top: '50%',
|
|
605
|
-
transform:
|
|
612
|
+
transform: `translateY(${translate})`
|
|
606
613
|
};
|
|
607
614
|
}
|
|
608
615
|
if (this.align === 'right') {
|
|
609
616
|
return {
|
|
610
617
|
left: '70%',
|
|
611
618
|
top: '50%',
|
|
612
|
-
transform:
|
|
619
|
+
transform: `translateY(${translate})`
|
|
613
620
|
};
|
|
614
621
|
}
|
|
615
622
|
return {
|
|
616
623
|
left: '50%',
|
|
617
624
|
top: '50%',
|
|
618
|
-
transform:
|
|
625
|
+
transform: `translate(${translate})`
|
|
619
626
|
};
|
|
620
627
|
},
|
|
621
628
|
redirectUri() {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
></es-menu>
|
|
32
32
|
</div>
|
|
33
33
|
<es-handler
|
|
34
|
+
:job-scrollbar="jobScrollbar"
|
|
34
35
|
:userModel="userModel"
|
|
35
36
|
:hide="hide"
|
|
36
37
|
:subSystem="subsystem"
|
|
@@ -191,8 +192,11 @@
|
|
|
191
192
|
</es-dialog>
|
|
192
193
|
<notice :data="sysMsg" :winopen="winopen" @opened="handleOpened"></notice>
|
|
193
194
|
<es-dialog :title="dialog.title" :visible.sync="dialog.show" size="md">
|
|
195
|
+
<template v-if="dialog.title == '查看在线人员' && !dialog.src">
|
|
196
|
+
<online></online>
|
|
197
|
+
</template>
|
|
194
198
|
<iframe
|
|
195
|
-
v-if="dialog.show"
|
|
199
|
+
v-else-if="dialog.show"
|
|
196
200
|
width="100%"
|
|
197
201
|
height="100%"
|
|
198
202
|
frameborder="0"
|
|
@@ -206,6 +210,7 @@ import userinfo from './userinfo.vue';
|
|
|
206
210
|
import settings from './settings.vue';
|
|
207
211
|
import message from './message.vue';
|
|
208
212
|
import notice from './notice.vue';
|
|
213
|
+
import online from '../public/online.vue';
|
|
209
214
|
import {
|
|
210
215
|
//authCenter,
|
|
211
216
|
wss,
|
|
@@ -213,8 +218,7 @@ import {
|
|
|
213
218
|
mainConfig,
|
|
214
219
|
updateUserCustomInfo,
|
|
215
220
|
getComplexApplications,
|
|
216
|
-
getComplexApplicationsNew
|
|
217
|
-
mainDetail
|
|
221
|
+
getComplexApplicationsNew
|
|
218
222
|
} from 'eoss-ui/src/config/api.js';
|
|
219
223
|
import store from 'eoss-ui/src/utils/store';
|
|
220
224
|
import util from 'eoss-ui/src/utils/util';
|
|
@@ -222,20 +226,24 @@ const isIE = navigator.userAgent.indexOf('MSIE') != -1;
|
|
|
222
226
|
const log = util.getParams('console');
|
|
223
227
|
const appCode = util.getParams('appCode') || util.getParams('appcode');
|
|
224
228
|
export default {
|
|
225
|
-
name: '
|
|
229
|
+
name: 'MainDefault',
|
|
226
230
|
inheritAttrs: false,
|
|
227
231
|
provide() {
|
|
228
232
|
return {
|
|
229
|
-
esMain: this
|
|
233
|
+
esMain: this,
|
|
234
|
+
refresh: this.handleRefresh,
|
|
235
|
+
jumpMenu: this.jumpMenu
|
|
230
236
|
};
|
|
231
237
|
},
|
|
232
238
|
components: {
|
|
233
239
|
userinfo,
|
|
234
240
|
settings,
|
|
235
241
|
message,
|
|
236
|
-
notice
|
|
242
|
+
notice,
|
|
243
|
+
online
|
|
237
244
|
},
|
|
238
245
|
props: {
|
|
246
|
+
jobScrollbar: Boolean,
|
|
239
247
|
maxHeight: String,
|
|
240
248
|
//菜单导航地址
|
|
241
249
|
menuUrl: String,
|
|
@@ -533,9 +541,7 @@ export default {
|
|
|
533
541
|
},
|
|
534
542
|
onlineUrl() {
|
|
535
543
|
if (this.onlineView) {
|
|
536
|
-
return typeof this.onlineView == 'string'
|
|
537
|
-
? this.onlineView
|
|
538
|
-
: '/main/sysuseronline/list.dhtml';
|
|
544
|
+
return typeof this.onlineView == 'string' ? this.onlineView : '';
|
|
539
545
|
}
|
|
540
546
|
return false;
|
|
541
547
|
}
|
|
@@ -671,20 +677,13 @@ export default {
|
|
|
671
677
|
let mainConfig = util.getStorage('mainConfig');
|
|
672
678
|
if (mainConfig) {
|
|
673
679
|
const results = JSON.parse(mainConfig);
|
|
674
|
-
|
|
680
|
+
if (Object.keys(results).length) {
|
|
681
|
+
this.init(results);
|
|
682
|
+
}
|
|
675
683
|
}
|
|
676
684
|
},
|
|
677
685
|
mounted() {
|
|
678
|
-
util.win.reLogin = this.handleReLogin;
|
|
679
686
|
this.handleListener();
|
|
680
|
-
util.win.refresh = this.handleRefresh;
|
|
681
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
682
|
-
if (util.win.$wujie) {
|
|
683
|
-
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
684
|
-
util.updateTheme(res);
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
util.win.windowOpen = this.openPage;
|
|
688
687
|
util.win.addEventListener('popstate', this.stateHandle, false);
|
|
689
688
|
},
|
|
690
689
|
methods: {
|
|
@@ -979,7 +978,7 @@ export default {
|
|
|
979
978
|
option.url.indexOf('/#/') > -1 ||
|
|
980
979
|
option.url.indexOf('#/') > -1
|
|
981
980
|
) {
|
|
982
|
-
option.
|
|
981
|
+
option.isUrl = true;
|
|
983
982
|
ids = this.getId(this.menus, option.url);
|
|
984
983
|
if (!ids) {
|
|
985
984
|
if (
|
|
@@ -1020,6 +1019,9 @@ export default {
|
|
|
1020
1019
|
}
|
|
1021
1020
|
} else {
|
|
1022
1021
|
ids = option.url.split(',');
|
|
1022
|
+
if (ids.length == 1) {
|
|
1023
|
+
ids = this.getId(this.menus, option.url);
|
|
1024
|
+
}
|
|
1023
1025
|
}
|
|
1024
1026
|
} else {
|
|
1025
1027
|
ids = option.url;
|
|
@@ -1037,7 +1039,48 @@ export default {
|
|
|
1037
1039
|
}
|
|
1038
1040
|
for (let i = 0; i < menus.length; i++) {
|
|
1039
1041
|
let item = menus[i];
|
|
1040
|
-
if (
|
|
1042
|
+
if (item.id === url) {
|
|
1043
|
+
if (item.url) {
|
|
1044
|
+
if (
|
|
1045
|
+
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1046
|
+
item.children.length
|
|
1047
|
+
) {
|
|
1048
|
+
let id = this.getId(item.children, item.url);
|
|
1049
|
+
if (id) {
|
|
1050
|
+
if (typeof id === 'string') {
|
|
1051
|
+
this.isTabs = false;
|
|
1052
|
+
}
|
|
1053
|
+
if (item.pid === 'root' || Array.isArray(id)) {
|
|
1054
|
+
return [item.id].concat(id);
|
|
1055
|
+
} else if (typeof id === 'string') {
|
|
1056
|
+
return [item.id, id];
|
|
1057
|
+
}
|
|
1058
|
+
return id;
|
|
1059
|
+
}
|
|
1060
|
+
} else if (
|
|
1061
|
+
Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
|
|
1062
|
+
item.fourthTabs.length
|
|
1063
|
+
) {
|
|
1064
|
+
let id = this.getId(item.fourthTabs, item.url);
|
|
1065
|
+
if (id) {
|
|
1066
|
+
if (typeof id === 'string') {
|
|
1067
|
+
this.isTabs = true;
|
|
1068
|
+
}
|
|
1069
|
+
if (item.pid === 'root') {
|
|
1070
|
+
return [item.id].concat(id);
|
|
1071
|
+
} else if (typeof id === 'string') {
|
|
1072
|
+
return [item.id, id];
|
|
1073
|
+
}
|
|
1074
|
+
return id;
|
|
1075
|
+
}
|
|
1076
|
+
} else {
|
|
1077
|
+
return item.id;
|
|
1078
|
+
}
|
|
1079
|
+
} else {
|
|
1080
|
+
console.error(item);
|
|
1081
|
+
return false;
|
|
1082
|
+
}
|
|
1083
|
+
} else if (
|
|
1041
1084
|
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1042
1085
|
item.children.length
|
|
1043
1086
|
) {
|
|
@@ -1069,7 +1112,7 @@ export default {
|
|
|
1069
1112
|
}
|
|
1070
1113
|
return id;
|
|
1071
1114
|
}
|
|
1072
|
-
} else if (item.
|
|
1115
|
+
} else if (item.url == url) {
|
|
1073
1116
|
return item.id;
|
|
1074
1117
|
} else {
|
|
1075
1118
|
if (item.url) {
|
|
@@ -1336,7 +1379,7 @@ export default {
|
|
|
1336
1379
|
this.sysId = '';
|
|
1337
1380
|
this.tabsId = '';
|
|
1338
1381
|
this.active = '';
|
|
1339
|
-
this.getUrl(res, active, param);
|
|
1382
|
+
this.getUrl(res, active[active.length - 1], param);
|
|
1340
1383
|
if (
|
|
1341
1384
|
this.layout === 'subsystem' ||
|
|
1342
1385
|
this.layout === 'subSystem' ||
|
|
@@ -1389,7 +1432,7 @@ export default {
|
|
|
1389
1432
|
if (this.biserial) {
|
|
1390
1433
|
this.active = active.slice(
|
|
1391
1434
|
0,
|
|
1392
|
-
|
|
1435
|
+
this.tabs && this.tabs.length ? active.length - 1 : active.length
|
|
1393
1436
|
);
|
|
1394
1437
|
} else {
|
|
1395
1438
|
this.active = active.slice(1);
|
|
@@ -1399,34 +1442,29 @@ export default {
|
|
|
1399
1442
|
this.showPage = true;
|
|
1400
1443
|
},
|
|
1401
1444
|
//获取页面类型及地址
|
|
1402
|
-
getUrl(res, active,
|
|
1403
|
-
index = index === undefined ? 0 : index;
|
|
1445
|
+
getUrl(res, active, param) {
|
|
1404
1446
|
for (let i = 0; i < res.length; i++) {
|
|
1405
1447
|
let item = res[i];
|
|
1406
|
-
if (item.id === active
|
|
1407
|
-
if (
|
|
1448
|
+
if (item.id === active) {
|
|
1449
|
+
if (item.url) {
|
|
1408
1450
|
this.handleJump(item.url, item.urlopenmode, item, param);
|
|
1409
1451
|
return item.url;
|
|
1410
1452
|
} else {
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1453
|
+
console.error(item);
|
|
1454
|
+
}
|
|
1455
|
+
} else {
|
|
1456
|
+
if (item.children && item.children.length) {
|
|
1457
|
+
let url = this.getUrl(item.children, active, param);
|
|
1458
|
+
if (url) {
|
|
1459
|
+
this.tabs = '';
|
|
1418
1460
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
}
|
|
1425
|
-
return url;
|
|
1461
|
+
}
|
|
1462
|
+
if (item.fourthTabs && item.fourthTabs.length) {
|
|
1463
|
+
let url = this.getUrl(item.fourthTabs, active, param);
|
|
1464
|
+
if (url) {
|
|
1465
|
+
this.$set(this, 'tabs', item.fourthTabs);
|
|
1426
1466
|
}
|
|
1427
1467
|
}
|
|
1428
|
-
} else if (item.children && item.children.length) {
|
|
1429
|
-
this.getUrl(item.children, active, index, param);
|
|
1430
1468
|
}
|
|
1431
1469
|
}
|
|
1432
1470
|
return false;
|
|
@@ -1549,13 +1587,16 @@ export default {
|
|
|
1549
1587
|
}
|
|
1550
1588
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1551
1589
|
}
|
|
1552
|
-
} else {
|
|
1553
|
-
|
|
1590
|
+
} else if (node.fourthTabs && node.fourthTabs.length) {
|
|
1591
|
+
this.tabs = [];
|
|
1592
|
+
let tab = node.fourthTabs.filter((item) => {
|
|
1554
1593
|
return item.url === node.url;
|
|
1555
1594
|
})[0];
|
|
1556
1595
|
if (tab) {
|
|
1557
|
-
this.tabs = node.fourthTabs;
|
|
1558
1596
|
this.tabsId = tab.id;
|
|
1597
|
+
this.$nextTick(() => {
|
|
1598
|
+
this.tabs = node.fourthTabs;
|
|
1599
|
+
});
|
|
1559
1600
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1560
1601
|
} else {
|
|
1561
1602
|
//this.navIds = this.getId(this.menus, node.url);
|
|
@@ -1563,13 +1604,15 @@ export default {
|
|
|
1563
1604
|
}
|
|
1564
1605
|
} else {
|
|
1565
1606
|
if (node.fourthTabs.length) {
|
|
1566
|
-
this.
|
|
1567
|
-
this
|
|
1568
|
-
|
|
1569
|
-
this.
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1607
|
+
this.tabsId = node.fourthTabs[0].id;
|
|
1608
|
+
this.$nextTick(() => {
|
|
1609
|
+
this.tabs = node.fourthTabs;
|
|
1610
|
+
this.handleJump(
|
|
1611
|
+
this.tabs[0].url,
|
|
1612
|
+
this.tabs[0].urlopenmode,
|
|
1613
|
+
this.tabs[0]
|
|
1614
|
+
);
|
|
1615
|
+
});
|
|
1573
1616
|
//this.navIds = this.getId(this.menus, this.tabs[0].url);
|
|
1574
1617
|
}
|
|
1575
1618
|
}
|
|
@@ -1658,13 +1701,11 @@ export default {
|
|
|
1658
1701
|
this.showUserInfo = true;
|
|
1659
1702
|
break;
|
|
1660
1703
|
case 'online':
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
};
|
|
1667
|
-
}
|
|
1704
|
+
this.dialog = {
|
|
1705
|
+
title: '查看在线人员',
|
|
1706
|
+
show: true,
|
|
1707
|
+
src: this.onlineUrl
|
|
1708
|
+
};
|
|
1668
1709
|
break;
|
|
1669
1710
|
case 'notice':
|
|
1670
1711
|
this.showMsg = !this.showMsg;
|
|
@@ -1990,124 +2031,6 @@ export default {
|
|
|
1990
2031
|
let n = parseInt(this.menuTips[id], 10) - 1;
|
|
1991
2032
|
this.$set(this.menuTips, id, n);
|
|
1992
2033
|
}
|
|
1993
|
-
},
|
|
1994
|
-
handleReLogin(res) {
|
|
1995
|
-
if (res && typeof res == 'string') {
|
|
1996
|
-
res = JSON.parse(res);
|
|
1997
|
-
}
|
|
1998
|
-
let msg = '提示';
|
|
1999
|
-
let btn = {
|
|
2000
|
-
confirmButtonText: '确定',
|
|
2001
|
-
cancelButtonText: '取消',
|
|
2002
|
-
closeOnClickModal: false,
|
|
2003
|
-
type: 'warning'
|
|
2004
|
-
};
|
|
2005
|
-
if (res) {
|
|
2006
|
-
if (res.rCode === 69) {
|
|
2007
|
-
msg = '该账号在其他地方已登陆!';
|
|
2008
|
-
btn = {
|
|
2009
|
-
confirmButtonText: '确定',
|
|
2010
|
-
closeOnClickModal: false,
|
|
2011
|
-
type: 'warning'
|
|
2012
|
-
};
|
|
2013
|
-
} else {
|
|
2014
|
-
msg = '登录已过期,请重新登录!';
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
cl;
|
|
2018
|
-
let remind = sessionStorage.getItem('remind');
|
|
2019
|
-
if (!remind) {
|
|
2020
|
-
clearTimeout(this.timer);
|
|
2021
|
-
this.timer = setTimeout(() => {
|
|
2022
|
-
console.log('handleReLogin');
|
|
2023
|
-
sessionStorage.setItem('remind', 1);
|
|
2024
|
-
this.$confirm(msg, btn)
|
|
2025
|
-
.then(() => {
|
|
2026
|
-
util.removeStorage([
|
|
2027
|
-
'Authorization',
|
|
2028
|
-
'token',
|
|
2029
|
-
'ssId',
|
|
2030
|
-
'userId',
|
|
2031
|
-
'userName',
|
|
2032
|
-
'auth',
|
|
2033
|
-
'deviceUnique',
|
|
2034
|
-
'menus',
|
|
2035
|
-
'useCaseCodes',
|
|
2036
|
-
'mainConfig',
|
|
2037
|
-
'jump'
|
|
2038
|
-
]);
|
|
2039
|
-
const loginPage =
|
|
2040
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
2041
|
-
try {
|
|
2042
|
-
if (loginPage) {
|
|
2043
|
-
let src;
|
|
2044
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
2045
|
-
let pathname = util.win.top.location.pathname;
|
|
2046
|
-
if (pathname !== '/') {
|
|
2047
|
-
pathname = pathname.split('/');
|
|
2048
|
-
pathname.splice(pathname.length - 1);
|
|
2049
|
-
pathname = pathname.join('/');
|
|
2050
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
2051
|
-
} else {
|
|
2052
|
-
src = pathname + loginPage.replace('./', '');
|
|
2053
|
-
}
|
|
2054
|
-
} else {
|
|
2055
|
-
src = loginPage;
|
|
2056
|
-
}
|
|
2057
|
-
util.win.top.location.href = src;
|
|
2058
|
-
} else if (
|
|
2059
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
2060
|
-
) {
|
|
2061
|
-
util.win.top.location.href = './login.html';
|
|
2062
|
-
} else {
|
|
2063
|
-
const hash = util.win.top.location.hash;
|
|
2064
|
-
if (hash) {
|
|
2065
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
2066
|
-
util.win.top.location.href =
|
|
2067
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
2068
|
-
} else {
|
|
2069
|
-
util.win.top.location.href = '/login.html';
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
} catch (error) {
|
|
2073
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
2074
|
-
}
|
|
2075
|
-
})
|
|
2076
|
-
.catch((e) => {
|
|
2077
|
-
sessionStorage.removeItem('remind');
|
|
2078
|
-
});
|
|
2079
|
-
}, 2000);
|
|
2080
|
-
}
|
|
2081
|
-
},
|
|
2082
|
-
openPage(url, name, width, height) {
|
|
2083
|
-
let src = url;
|
|
2084
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
2085
|
-
let pathname = window.location.pathname;
|
|
2086
|
-
if (pathname !== '/') {
|
|
2087
|
-
pathname = pathname.split('/');
|
|
2088
|
-
pathname.splice(pathname.length - 1);
|
|
2089
|
-
pathname = pathname.join('/');
|
|
2090
|
-
}
|
|
2091
|
-
src = pathname + url.replace('./', '/');
|
|
2092
|
-
}
|
|
2093
|
-
if (name) {
|
|
2094
|
-
let w = 0;
|
|
2095
|
-
let h = 0;
|
|
2096
|
-
try {
|
|
2097
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
2098
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
2099
|
-
} catch (error) {
|
|
2100
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
2101
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
2102
|
-
}
|
|
2103
|
-
return util.win.open(
|
|
2104
|
-
src,
|
|
2105
|
-
name,
|
|
2106
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
2107
|
-
);
|
|
2108
|
-
} else {
|
|
2109
|
-
return util.win.open(src);
|
|
2110
|
-
}
|
|
2111
2034
|
}
|
|
2112
2035
|
},
|
|
2113
2036
|
beforeDestroy() {
|