eoss-ui 0.5.81-beta13 → 0.5.81-beta15
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/CHANGELOG.md +929 -0
- package/lib/button-group.js +48 -46
- package/lib/button.js +48 -46
- package/lib/checkbox-group.js +48 -46
- package/lib/config/api.js +2 -1
- package/lib/data-table-form.js +48 -46
- package/lib/data-table.js +55 -54
- package/lib/date-picker.js +48 -46
- package/lib/dialog.js +48 -46
- package/lib/eoss-ui.common.js +412 -431
- package/lib/flow-group.js +48 -46
- package/lib/flow-list.js +49 -47
- package/lib/flow.js +68 -66
- package/lib/form.js +48 -46
- package/lib/handle-user.js +49 -47
- package/lib/handler.js +48 -46
- package/lib/icon.js +48 -46
- package/lib/index.js +1 -1
- package/lib/input-number.js +48 -46
- package/lib/input.js +48 -46
- package/lib/login.js +48 -46
- package/lib/main.js +366 -384
- package/lib/menu.js +1 -1
- package/lib/nav.js +48 -46
- package/lib/notify.js +53 -51
- package/lib/page.js +48 -46
- package/lib/pagination.js +48 -46
- package/lib/player.js +48 -46
- package/lib/qr-code.js +48 -46
- package/lib/radio-group.js +48 -46
- package/lib/retrial-auth.js +49 -47
- package/lib/select-ganged.js +48 -46
- package/lib/select.js +48 -46
- package/lib/selector-panel.js +48 -46
- package/lib/selector.js +48 -46
- package/lib/sizer.js +48 -46
- package/lib/steps.js +48 -46
- package/lib/switch.js +48 -46
- package/lib/table-form.js +48 -46
- package/lib/tabs.js +48 -46
- package/lib/tips.js +48 -46
- package/lib/tree-group.js +48 -46
- package/lib/tree.js +48 -46
- package/lib/upload.js +52 -50
- package/lib/wujie.js +48 -46
- package/lib/wxlogin.js +48 -46
- package/package.json +2 -2
- package/packages/data-table/src/sizer.vue +0 -1
- package/packages/main/src/default/index.vue +76 -157
- package/packages/main/src/main.vue +141 -2
- package/packages/main/src/simplicity/index.vue +21 -122
- package/packages/main/src/simplicity/menu-list.vue +1 -1
- package/packages/main/src/simplicity/sub-menu.vue +13 -4
- package/packages/menu/src/main.vue +4 -3
- package/src/config/api.js +2 -1
- package/src/index.js +157 -157
|
@@ -675,20 +675,13 @@ export default {
|
|
|
675
675
|
let mainConfig = util.getStorage('mainConfig');
|
|
676
676
|
if (mainConfig) {
|
|
677
677
|
const results = JSON.parse(mainConfig);
|
|
678
|
-
|
|
678
|
+
if (Object.keys(results).length) {
|
|
679
|
+
this.init(results);
|
|
680
|
+
}
|
|
679
681
|
}
|
|
680
682
|
},
|
|
681
683
|
mounted() {
|
|
682
|
-
util.win.reLogin = this.handleReLogin;
|
|
683
684
|
this.handleListener();
|
|
684
|
-
util.win.refresh = this.handleRefresh;
|
|
685
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
686
|
-
if (util.win.$wujie) {
|
|
687
|
-
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
688
|
-
util.updateTheme(res);
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
util.win.windowOpen = this.openPage;
|
|
692
685
|
util.win.addEventListener('popstate', this.stateHandle, false);
|
|
693
686
|
},
|
|
694
687
|
methods: {
|
|
@@ -983,7 +976,7 @@ export default {
|
|
|
983
976
|
option.url.indexOf('/#/') > -1 ||
|
|
984
977
|
option.url.indexOf('#/') > -1
|
|
985
978
|
) {
|
|
986
|
-
option.
|
|
979
|
+
option.isUrl = true;
|
|
987
980
|
ids = this.getId(this.menus, option.url);
|
|
988
981
|
if (!ids) {
|
|
989
982
|
if (
|
|
@@ -1024,6 +1017,9 @@ export default {
|
|
|
1024
1017
|
}
|
|
1025
1018
|
} else {
|
|
1026
1019
|
ids = option.url.split(',');
|
|
1020
|
+
if (ids.length == 1) {
|
|
1021
|
+
ids = this.getId(this.menus, option.url);
|
|
1022
|
+
}
|
|
1027
1023
|
}
|
|
1028
1024
|
} else {
|
|
1029
1025
|
ids = option.url;
|
|
@@ -1041,7 +1037,48 @@ export default {
|
|
|
1041
1037
|
}
|
|
1042
1038
|
for (let i = 0; i < menus.length; i++) {
|
|
1043
1039
|
let item = menus[i];
|
|
1044
|
-
if (
|
|
1040
|
+
if (item.id === url) {
|
|
1041
|
+
if (item.url) {
|
|
1042
|
+
if (
|
|
1043
|
+
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1044
|
+
item.children.length
|
|
1045
|
+
) {
|
|
1046
|
+
let id = this.getId(item.children, item.url);
|
|
1047
|
+
if (id) {
|
|
1048
|
+
if (typeof id === 'string') {
|
|
1049
|
+
this.isTabs = false;
|
|
1050
|
+
}
|
|
1051
|
+
if (item.pid === 'root' || Array.isArray(id)) {
|
|
1052
|
+
return [item.id].concat(id);
|
|
1053
|
+
} else if (typeof id === 'string') {
|
|
1054
|
+
return [item.id, id];
|
|
1055
|
+
}
|
|
1056
|
+
return id;
|
|
1057
|
+
}
|
|
1058
|
+
} else if (
|
|
1059
|
+
Object.prototype.hasOwnProperty.call(item, 'fourthTabs') &&
|
|
1060
|
+
item.fourthTabs.length
|
|
1061
|
+
) {
|
|
1062
|
+
let id = this.getId(item.fourthTabs, item.url);
|
|
1063
|
+
if (id) {
|
|
1064
|
+
if (typeof id === 'string') {
|
|
1065
|
+
this.isTabs = true;
|
|
1066
|
+
}
|
|
1067
|
+
if (item.pid === 'root') {
|
|
1068
|
+
return [item.id].concat(id);
|
|
1069
|
+
} else if (typeof id === 'string') {
|
|
1070
|
+
return [item.id, id];
|
|
1071
|
+
}
|
|
1072
|
+
return id;
|
|
1073
|
+
}
|
|
1074
|
+
} else {
|
|
1075
|
+
return item.id;
|
|
1076
|
+
}
|
|
1077
|
+
} else {
|
|
1078
|
+
console.error(item);
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
} else if (
|
|
1045
1082
|
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1046
1083
|
item.children.length
|
|
1047
1084
|
) {
|
|
@@ -1073,7 +1110,7 @@ export default {
|
|
|
1073
1110
|
}
|
|
1074
1111
|
return id;
|
|
1075
1112
|
}
|
|
1076
|
-
} else if (item.
|
|
1113
|
+
} else if (item.url == url) {
|
|
1077
1114
|
return item.id;
|
|
1078
1115
|
} else {
|
|
1079
1116
|
if (item.url) {
|
|
@@ -1340,7 +1377,7 @@ export default {
|
|
|
1340
1377
|
this.sysId = '';
|
|
1341
1378
|
this.tabsId = '';
|
|
1342
1379
|
this.active = '';
|
|
1343
|
-
this.getUrl(res, active, param);
|
|
1380
|
+
this.getUrl(res, active[active.length - 1], param);
|
|
1344
1381
|
if (
|
|
1345
1382
|
this.layout === 'subsystem' ||
|
|
1346
1383
|
this.layout === 'subSystem' ||
|
|
@@ -1393,7 +1430,7 @@ export default {
|
|
|
1393
1430
|
if (this.biserial) {
|
|
1394
1431
|
this.active = active.slice(
|
|
1395
1432
|
0,
|
|
1396
|
-
|
|
1433
|
+
this.tabs && this.tabs.length ? active.length - 1 : active.length
|
|
1397
1434
|
);
|
|
1398
1435
|
} else {
|
|
1399
1436
|
this.active = active.slice(1);
|
|
@@ -1403,34 +1440,29 @@ export default {
|
|
|
1403
1440
|
this.showPage = true;
|
|
1404
1441
|
},
|
|
1405
1442
|
//获取页面类型及地址
|
|
1406
|
-
getUrl(res, active,
|
|
1407
|
-
index = index === undefined ? 0 : index;
|
|
1443
|
+
getUrl(res, active, param) {
|
|
1408
1444
|
for (let i = 0; i < res.length; i++) {
|
|
1409
1445
|
let item = res[i];
|
|
1410
|
-
if (item.id === active
|
|
1411
|
-
if (
|
|
1446
|
+
if (item.id === active) {
|
|
1447
|
+
if (item.url) {
|
|
1412
1448
|
this.handleJump(item.url, item.urlopenmode, item, param);
|
|
1413
1449
|
return item.url;
|
|
1414
1450
|
} else {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1451
|
+
console.error(item);
|
|
1452
|
+
}
|
|
1453
|
+
} else {
|
|
1454
|
+
if (item.children && item.children.length) {
|
|
1455
|
+
let url = this.getUrl(item.children, active, param);
|
|
1456
|
+
if (url) {
|
|
1457
|
+
this.tabs = '';
|
|
1422
1458
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
}
|
|
1429
|
-
return url;
|
|
1459
|
+
}
|
|
1460
|
+
if (item.fourthTabs && item.fourthTabs.length) {
|
|
1461
|
+
let url = this.getUrl(item.fourthTabs, active, param);
|
|
1462
|
+
if (url) {
|
|
1463
|
+
this.$set(this, 'tabs', item.fourthTabs);
|
|
1430
1464
|
}
|
|
1431
1465
|
}
|
|
1432
|
-
} else if (item.children && item.children.length) {
|
|
1433
|
-
this.getUrl(item.children, active, index, param);
|
|
1434
1466
|
}
|
|
1435
1467
|
}
|
|
1436
1468
|
return false;
|
|
@@ -1553,13 +1585,16 @@ export default {
|
|
|
1553
1585
|
}
|
|
1554
1586
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1555
1587
|
}
|
|
1556
|
-
} else {
|
|
1557
|
-
|
|
1588
|
+
} else if (node.fourthTabs && node.fourthTabs.length) {
|
|
1589
|
+
this.tabs = [];
|
|
1590
|
+
let tab = node.fourthTabs.filter((item) => {
|
|
1558
1591
|
return item.url === node.url;
|
|
1559
1592
|
})[0];
|
|
1560
1593
|
if (tab) {
|
|
1561
|
-
this.tabs = node.fourthTabs;
|
|
1562
1594
|
this.tabsId = tab.id;
|
|
1595
|
+
this.$nextTick(() => {
|
|
1596
|
+
this.tabs = node.fourthTabs;
|
|
1597
|
+
});
|
|
1563
1598
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1564
1599
|
} else {
|
|
1565
1600
|
//this.navIds = this.getId(this.menus, node.url);
|
|
@@ -1567,8 +1602,10 @@ export default {
|
|
|
1567
1602
|
}
|
|
1568
1603
|
} else {
|
|
1569
1604
|
if (node.fourthTabs.length) {
|
|
1570
|
-
this.tabs = node.fourthTabs;
|
|
1571
1605
|
this.tabsId = this.tabs[0].id;
|
|
1606
|
+
this.$nextTick(() => {
|
|
1607
|
+
this.tabs = node.fourthTabs;
|
|
1608
|
+
});
|
|
1572
1609
|
this.handleJump(
|
|
1573
1610
|
this.tabs[0].url,
|
|
1574
1611
|
this.tabs[0].urlopenmode,
|
|
@@ -1992,124 +2029,6 @@ export default {
|
|
|
1992
2029
|
let n = parseInt(this.menuTips[id], 10) - 1;
|
|
1993
2030
|
this.$set(this.menuTips, id, n);
|
|
1994
2031
|
}
|
|
1995
|
-
},
|
|
1996
|
-
handleReLogin(res) {
|
|
1997
|
-
if (res && typeof res == 'string') {
|
|
1998
|
-
res = JSON.parse(res);
|
|
1999
|
-
}
|
|
2000
|
-
let msg = '提示';
|
|
2001
|
-
let btn = {
|
|
2002
|
-
confirmButtonText: '确定',
|
|
2003
|
-
cancelButtonText: '取消',
|
|
2004
|
-
closeOnClickModal: false,
|
|
2005
|
-
type: 'warning'
|
|
2006
|
-
};
|
|
2007
|
-
if (res) {
|
|
2008
|
-
if (res.rCode === 69) {
|
|
2009
|
-
msg = '该账号在其他地方已登陆!';
|
|
2010
|
-
btn = {
|
|
2011
|
-
confirmButtonText: '确定',
|
|
2012
|
-
closeOnClickModal: false,
|
|
2013
|
-
type: 'warning'
|
|
2014
|
-
};
|
|
2015
|
-
} else {
|
|
2016
|
-
msg = '登录已过期,请重新登录!';
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
cl;
|
|
2020
|
-
let remind = sessionStorage.getItem('remind');
|
|
2021
|
-
if (!remind) {
|
|
2022
|
-
clearTimeout(this.timer);
|
|
2023
|
-
this.timer = setTimeout(() => {
|
|
2024
|
-
console.log('handleReLogin');
|
|
2025
|
-
sessionStorage.setItem('remind', 1);
|
|
2026
|
-
this.$confirm(msg, btn)
|
|
2027
|
-
.then(() => {
|
|
2028
|
-
util.removeStorage([
|
|
2029
|
-
'Authorization',
|
|
2030
|
-
'token',
|
|
2031
|
-
'ssId',
|
|
2032
|
-
'userId',
|
|
2033
|
-
'userName',
|
|
2034
|
-
'auth',
|
|
2035
|
-
'deviceUnique',
|
|
2036
|
-
'menus',
|
|
2037
|
-
'useCaseCodes',
|
|
2038
|
-
'mainConfig',
|
|
2039
|
-
'jump'
|
|
2040
|
-
]);
|
|
2041
|
-
const loginPage =
|
|
2042
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
2043
|
-
try {
|
|
2044
|
-
if (loginPage) {
|
|
2045
|
-
let src;
|
|
2046
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
2047
|
-
let pathname = util.win.top.location.pathname;
|
|
2048
|
-
if (pathname !== '/') {
|
|
2049
|
-
pathname = pathname.split('/');
|
|
2050
|
-
pathname.splice(pathname.length - 1);
|
|
2051
|
-
pathname = pathname.join('/');
|
|
2052
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
2053
|
-
} else {
|
|
2054
|
-
src = pathname + loginPage.replace('./', '');
|
|
2055
|
-
}
|
|
2056
|
-
} else {
|
|
2057
|
-
src = loginPage;
|
|
2058
|
-
}
|
|
2059
|
-
util.win.top.location.href = src;
|
|
2060
|
-
} else if (
|
|
2061
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
2062
|
-
) {
|
|
2063
|
-
util.win.top.location.href = './login.html';
|
|
2064
|
-
} else {
|
|
2065
|
-
const hash = util.win.top.location.hash;
|
|
2066
|
-
if (hash) {
|
|
2067
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
2068
|
-
util.win.top.location.href =
|
|
2069
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
2070
|
-
} else {
|
|
2071
|
-
util.win.top.location.href = '/login.html';
|
|
2072
|
-
}
|
|
2073
|
-
}
|
|
2074
|
-
} catch (error) {
|
|
2075
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
2076
|
-
}
|
|
2077
|
-
})
|
|
2078
|
-
.catch((e) => {
|
|
2079
|
-
sessionStorage.removeItem('remind');
|
|
2080
|
-
});
|
|
2081
|
-
}, 2000);
|
|
2082
|
-
}
|
|
2083
|
-
},
|
|
2084
|
-
openPage(url, name, width, height) {
|
|
2085
|
-
let src = url;
|
|
2086
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
2087
|
-
let pathname = window.location.pathname;
|
|
2088
|
-
if (pathname !== '/') {
|
|
2089
|
-
pathname = pathname.split('/');
|
|
2090
|
-
pathname.splice(pathname.length - 1);
|
|
2091
|
-
pathname = pathname.join('/');
|
|
2092
|
-
}
|
|
2093
|
-
src = pathname + url.replace('./', '/');
|
|
2094
|
-
}
|
|
2095
|
-
if (name) {
|
|
2096
|
-
let w = 0;
|
|
2097
|
-
let h = 0;
|
|
2098
|
-
try {
|
|
2099
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
2100
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
2101
|
-
} catch (error) {
|
|
2102
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
2103
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
2104
|
-
}
|
|
2105
|
-
return util.win.open(
|
|
2106
|
-
src,
|
|
2107
|
-
name,
|
|
2108
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
2109
|
-
);
|
|
2110
|
-
} else {
|
|
2111
|
-
return util.win.open(src);
|
|
2112
|
-
}
|
|
2113
2032
|
}
|
|
2114
2033
|
},
|
|
2115
2034
|
beforeDestroy() {
|
|
@@ -47,8 +47,111 @@ export default {
|
|
|
47
47
|
this.appCode = this.params.appCode;
|
|
48
48
|
this.getConfig(this.params);
|
|
49
49
|
},
|
|
50
|
-
mounted() {
|
|
50
|
+
mounted() {
|
|
51
|
+
if (util.win.$wujie) {
|
|
52
|
+
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
53
|
+
util.updateTheme(res);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
util.win.reLogin = this.handleReLogin;
|
|
57
|
+
util.win.windowOpen = this.openPage;
|
|
58
|
+
util.win.refresh = this.$refs.main.handleRefresh;
|
|
59
|
+
util.win.jumpMenu = this.$refs.main.jumpMenu;
|
|
60
|
+
},
|
|
51
61
|
methods: {
|
|
62
|
+
/**
|
|
63
|
+
* @desc:重新登录
|
|
64
|
+
* @author huangbo
|
|
65
|
+
* @date 2024年9月7日
|
|
66
|
+
**/
|
|
67
|
+
handleReLogin(res) {
|
|
68
|
+
if (res && typeof res == 'string') {
|
|
69
|
+
res = JSON.parse(res);
|
|
70
|
+
}
|
|
71
|
+
let msg = '提示';
|
|
72
|
+
let btn = {
|
|
73
|
+
confirmButtonText: '确定',
|
|
74
|
+
cancelButtonText: '取消',
|
|
75
|
+
closeOnClickModal: false,
|
|
76
|
+
type: 'warning'
|
|
77
|
+
};
|
|
78
|
+
if (res) {
|
|
79
|
+
if (res.rCode === 69) {
|
|
80
|
+
msg = '该账号在其他地方已登陆!';
|
|
81
|
+
btn = {
|
|
82
|
+
confirmButtonText: '确定',
|
|
83
|
+
closeOnClickModal: false,
|
|
84
|
+
type: 'warning'
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
msg = '登录已过期,请重新登录!';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
cl;
|
|
91
|
+
let remind = sessionStorage.getItem('remind');
|
|
92
|
+
if (!remind) {
|
|
93
|
+
clearTimeout(this.timer);
|
|
94
|
+
this.timer = setTimeout(() => {
|
|
95
|
+
console.log('handleReLogin');
|
|
96
|
+
sessionStorage.setItem('remind', 1);
|
|
97
|
+
this.$confirm(msg, btn)
|
|
98
|
+
.then(() => {
|
|
99
|
+
util.removeStorage([
|
|
100
|
+
'Authorization',
|
|
101
|
+
'token',
|
|
102
|
+
'ssId',
|
|
103
|
+
'userId',
|
|
104
|
+
'userName',
|
|
105
|
+
'auth',
|
|
106
|
+
'deviceUnique',
|
|
107
|
+
'menus',
|
|
108
|
+
'useCaseCodes',
|
|
109
|
+
'mainConfig',
|
|
110
|
+
'jump'
|
|
111
|
+
]);
|
|
112
|
+
const loginPage =
|
|
113
|
+
util.getStorage('login') || util.getStorage('loginPage');
|
|
114
|
+
try {
|
|
115
|
+
if (loginPage) {
|
|
116
|
+
let src;
|
|
117
|
+
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
118
|
+
let pathname = util.win.top.location.pathname;
|
|
119
|
+
if (pathname !== '/') {
|
|
120
|
+
pathname = pathname.split('/');
|
|
121
|
+
pathname.splice(pathname.length - 1);
|
|
122
|
+
pathname = pathname.join('/');
|
|
123
|
+
src = pathname + '/' + loginPage.replace('./', '');
|
|
124
|
+
} else {
|
|
125
|
+
src = pathname + loginPage.replace('./', '');
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
src = loginPage;
|
|
129
|
+
}
|
|
130
|
+
util.win.top.location.href = src;
|
|
131
|
+
} else if (
|
|
132
|
+
util.win.top.location.href.indexOf('main.html') > -1
|
|
133
|
+
) {
|
|
134
|
+
util.win.top.location.href = './login.html';
|
|
135
|
+
} else {
|
|
136
|
+
const hash = util.win.top.location.hash;
|
|
137
|
+
if (hash) {
|
|
138
|
+
const len = util.win.top.location.href.indexOf(hash);
|
|
139
|
+
util.win.top.location.href =
|
|
140
|
+
util.win.location.href.slice(0, len) + '#/login';
|
|
141
|
+
} else {
|
|
142
|
+
util.win.top.location.href = '/login.html';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
} catch (error) {
|
|
146
|
+
util.win.postMessage({ type: 1 }, '*');
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
.catch((e) => {
|
|
150
|
+
sessionStorage.removeItem('remind');
|
|
151
|
+
});
|
|
152
|
+
}, 2000);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
52
155
|
/**
|
|
53
156
|
* @desc:获取系统配置
|
|
54
157
|
* @author huangbo
|
|
@@ -64,11 +167,47 @@ export default {
|
|
|
64
167
|
) {
|
|
65
168
|
return false;
|
|
66
169
|
}
|
|
67
|
-
|
|
170
|
+
let mainConfig = util.getStorage('mainConfig');
|
|
171
|
+
if (!mainConfig || mainConfig == '{}') {
|
|
68
172
|
util.getMainConfig((res) => {
|
|
69
173
|
this.$refs.main.init(res);
|
|
70
174
|
});
|
|
71
175
|
}
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
* @desc:打开页面
|
|
179
|
+
* @author huangbo
|
|
180
|
+
* @date 2024年9月7日
|
|
181
|
+
**/
|
|
182
|
+
openPage(url, name, width, height) {
|
|
183
|
+
let src = url;
|
|
184
|
+
if (!util.startWith(url, ['http', '/'], true)) {
|
|
185
|
+
let pathname = window.location.pathname;
|
|
186
|
+
if (pathname !== '/') {
|
|
187
|
+
pathname = pathname.split('/');
|
|
188
|
+
pathname.splice(pathname.length - 1);
|
|
189
|
+
pathname = pathname.join('/');
|
|
190
|
+
}
|
|
191
|
+
src = pathname + url.replace('./', '/');
|
|
192
|
+
}
|
|
193
|
+
if (name) {
|
|
194
|
+
let w = 0;
|
|
195
|
+
let h = 0;
|
|
196
|
+
try {
|
|
197
|
+
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
198
|
+
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
199
|
+
} catch (error) {
|
|
200
|
+
w = width ? width : util.win.screen.availWidth - 10;
|
|
201
|
+
h = height ? height : util.win.screen.availHeight - 60;
|
|
202
|
+
}
|
|
203
|
+
return util.win.open(
|
|
204
|
+
src,
|
|
205
|
+
name,
|
|
206
|
+
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
207
|
+
);
|
|
208
|
+
} else {
|
|
209
|
+
return util.win.open(src);
|
|
210
|
+
}
|
|
72
211
|
}
|
|
73
212
|
},
|
|
74
213
|
beforeDestroy() {}
|
|
@@ -323,6 +323,7 @@ import {
|
|
|
323
323
|
logout,
|
|
324
324
|
topic,
|
|
325
325
|
getUserAppWithTag,
|
|
326
|
+
recordUserApp,
|
|
326
327
|
getComplexApplications,
|
|
327
328
|
getComplexApplicationsNew
|
|
328
329
|
} from 'eoss-ui/src/config/api.js';
|
|
@@ -399,6 +400,11 @@ export default {
|
|
|
399
400
|
type: String,
|
|
400
401
|
default: dataTableMode
|
|
401
402
|
},
|
|
403
|
+
//记录菜单点击率作为工作台常用应用数据
|
|
404
|
+
recordApp: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: true
|
|
407
|
+
},
|
|
402
408
|
appCode: String,
|
|
403
409
|
//logo
|
|
404
410
|
logo: String,
|
|
@@ -631,15 +637,13 @@ export default {
|
|
|
631
637
|
let mainConfig = util.getStorage('mainConfig');
|
|
632
638
|
if (mainConfig) {
|
|
633
639
|
const results = JSON.parse(mainConfig);
|
|
634
|
-
|
|
640
|
+
if (Object.keys(results).length) {
|
|
641
|
+
this.init(results);
|
|
642
|
+
}
|
|
635
643
|
}
|
|
636
644
|
this.doorIndex = sessionStorage.getItem('doorIndex');
|
|
637
645
|
},
|
|
638
646
|
mounted() {
|
|
639
|
-
util.win.reLogin = this.handleReLogin;
|
|
640
|
-
util.win.refresh = this.handleRefresh;
|
|
641
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
642
|
-
util.win.windowOpen = this.openPage;
|
|
643
647
|
this.handleListener();
|
|
644
648
|
},
|
|
645
649
|
methods: {
|
|
@@ -1333,6 +1337,18 @@ export default {
|
|
|
1333
1337
|
* @date 2024年9月7日
|
|
1334
1338
|
**/
|
|
1335
1339
|
handlerClickMenu(res) {
|
|
1340
|
+
if (this.recordApp) {
|
|
1341
|
+
util
|
|
1342
|
+
.ajax({
|
|
1343
|
+
url: recordUserApp,
|
|
1344
|
+
params: {
|
|
1345
|
+
userId: this.user.userId,
|
|
1346
|
+
appId: res.id
|
|
1347
|
+
}
|
|
1348
|
+
})
|
|
1349
|
+
.then(() => {})
|
|
1350
|
+
.catch(() => {});
|
|
1351
|
+
}
|
|
1336
1352
|
this.showMsg = false;
|
|
1337
1353
|
this.showSet = false;
|
|
1338
1354
|
let i = util.indexOfObj(this.tabs, res, 'id');
|
|
@@ -1655,123 +1671,6 @@ export default {
|
|
|
1655
1671
|
clearTimeout(this.sysMsgOut);
|
|
1656
1672
|
}
|
|
1657
1673
|
},
|
|
1658
|
-
handleReLogin(res) {
|
|
1659
|
-
if (res && typeof res == 'string') {
|
|
1660
|
-
res = JSON.parse(res);
|
|
1661
|
-
}
|
|
1662
|
-
let msg = '提示';
|
|
1663
|
-
let btn = {
|
|
1664
|
-
confirmButtonText: '确定',
|
|
1665
|
-
cancelButtonText: '取消',
|
|
1666
|
-
closeOnClickModal: false,
|
|
1667
|
-
type: 'warning'
|
|
1668
|
-
};
|
|
1669
|
-
if (res) {
|
|
1670
|
-
if (res.rCode === 69) {
|
|
1671
|
-
msg = '该账号在其他地方已登陆!';
|
|
1672
|
-
btn = {
|
|
1673
|
-
confirmButtonText: '确定',
|
|
1674
|
-
closeOnClickModal: false,
|
|
1675
|
-
type: 'warning'
|
|
1676
|
-
};
|
|
1677
|
-
} else {
|
|
1678
|
-
msg = '登录已过期,请重新登录!';
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
cl;
|
|
1682
|
-
let remind = sessionStorage.getItem('remind');
|
|
1683
|
-
if (!remind) {
|
|
1684
|
-
clearTimeout(this.timer);
|
|
1685
|
-
this.timer = setTimeout(() => {
|
|
1686
|
-
sessionStorage.setItem('remind', 1);
|
|
1687
|
-
this.$confirm(msg, btn)
|
|
1688
|
-
.then(() => {
|
|
1689
|
-
util.removeStorage([
|
|
1690
|
-
'Authorization',
|
|
1691
|
-
'token',
|
|
1692
|
-
'ssId',
|
|
1693
|
-
'userId',
|
|
1694
|
-
'userName',
|
|
1695
|
-
'auth',
|
|
1696
|
-
'deviceUnique',
|
|
1697
|
-
'menus',
|
|
1698
|
-
'useCaseCodes',
|
|
1699
|
-
'mainConfig',
|
|
1700
|
-
'jump'
|
|
1701
|
-
]);
|
|
1702
|
-
const loginPage =
|
|
1703
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
1704
|
-
try {
|
|
1705
|
-
if (loginPage) {
|
|
1706
|
-
let src;
|
|
1707
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
1708
|
-
let pathname = util.win.top.location.pathname;
|
|
1709
|
-
if (pathname !== '/') {
|
|
1710
|
-
pathname = pathname.split('/');
|
|
1711
|
-
pathname.splice(pathname.length - 1);
|
|
1712
|
-
pathname = pathname.join('/');
|
|
1713
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
1714
|
-
} else {
|
|
1715
|
-
src = pathname + loginPage.replace('./', '');
|
|
1716
|
-
}
|
|
1717
|
-
} else {
|
|
1718
|
-
src = loginPage;
|
|
1719
|
-
}
|
|
1720
|
-
util.win.top.location.href = src;
|
|
1721
|
-
} else if (
|
|
1722
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
1723
|
-
) {
|
|
1724
|
-
util.win.top.location.href = './login.html';
|
|
1725
|
-
} else {
|
|
1726
|
-
const hash = util.win.top.location.hash;
|
|
1727
|
-
if (hash) {
|
|
1728
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
1729
|
-
util.win.top.location.href =
|
|
1730
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
1731
|
-
} else {
|
|
1732
|
-
util.win.top.location.href = '/login.html';
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
} catch (error) {
|
|
1736
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
1737
|
-
}
|
|
1738
|
-
})
|
|
1739
|
-
.catch((e) => {
|
|
1740
|
-
sessionStorage.removeItem('remind');
|
|
1741
|
-
});
|
|
1742
|
-
}, 2000);
|
|
1743
|
-
}
|
|
1744
|
-
},
|
|
1745
|
-
openPage(url, name, width, height) {
|
|
1746
|
-
let src = url;
|
|
1747
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
1748
|
-
let pathname = window.location.pathname;
|
|
1749
|
-
if (pathname !== '/') {
|
|
1750
|
-
pathname = pathname.split('/');
|
|
1751
|
-
pathname.splice(pathname.length - 1);
|
|
1752
|
-
pathname = pathname.join('/');
|
|
1753
|
-
}
|
|
1754
|
-
src = pathname + url.replace('./', '/');
|
|
1755
|
-
}
|
|
1756
|
-
if (name) {
|
|
1757
|
-
let w = 0;
|
|
1758
|
-
let h = 0;
|
|
1759
|
-
try {
|
|
1760
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
1761
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
1762
|
-
} catch (error) {
|
|
1763
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
1764
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
1765
|
-
}
|
|
1766
|
-
return util.win.open(
|
|
1767
|
-
src,
|
|
1768
|
-
name,
|
|
1769
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
1770
|
-
);
|
|
1771
|
-
} else {
|
|
1772
|
-
return util.win.open(src);
|
|
1773
|
-
}
|
|
1774
|
-
},
|
|
1775
1674
|
jumpMenu(res) {
|
|
1776
1675
|
let apps = res;
|
|
1777
1676
|
if (typeof res === 'string') {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-for="(item, index) in data"
|
|
11
11
|
class="es-simplicity-menus-item"
|
|
12
12
|
:key="item.id"
|
|
13
|
-
:class="{ 'is-fold': fold }"
|
|
13
|
+
:class="{ 'is-fold': fold, 'is-active': active == item.id }"
|
|
14
14
|
:title="fold ? item.text || item.name : ''"
|
|
15
15
|
@click="handleClick(item)"
|
|
16
16
|
@mouseenter="handleEnter(item)"
|