eoss-ui 0.5.81-beta14 → 0.5.81-beta16
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/clients.js +4 -3
- 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 +429 -447
- 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 +57 -50
- package/lib/main.js +360 -383
- 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/clients/src/main.vue +2 -1
- package/packages/data-table/src/forms.vue +414 -0
- package/packages/data-table/src/sizer.vue +0 -1
- package/packages/login/src/main.vue +3 -2
- package/packages/main/src/default/index.vue +79 -162
- package/packages/main/src/main.vue +139 -1
- package/packages/main/src/simplicity/index.vue +18 -121
- 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/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +1 -0
- package/packages/theme-chalk/lib/calendar.css +1 -0
- package/packages/theme-chalk/lib/card.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +1 -0
- package/packages/theme-chalk/lib/clients.css +1 -0
- package/packages/theme-chalk/lib/data-table-form.css +1 -0
- package/packages/theme-chalk/lib/data-table.css +1 -0
- package/packages/theme-chalk/lib/date-picker.css +1 -0
- package/packages/theme-chalk/lib/dialog.css +1 -0
- package/packages/theme-chalk/lib/enterprise.css +1 -0
- package/packages/theme-chalk/lib/error-page.css +1 -0
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/handle-user.css +1 -0
- package/packages/theme-chalk/lib/handler.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/icons.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +1 -0
- package/packages/theme-chalk/lib/label.css +1 -0
- package/packages/theme-chalk/lib/layout.css +1 -0
- package/packages/theme-chalk/lib/login.css +1 -0
- package/packages/theme-chalk/lib/main.css +1 -0
- package/packages/theme-chalk/lib/menu.css +1 -0
- package/packages/theme-chalk/lib/nav.css +1 -0
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/player.css +1 -0
- package/packages/theme-chalk/lib/qr-code.css +1 -0
- package/packages/theme-chalk/lib/radio-group.css +1 -0
- package/packages/theme-chalk/lib/retrial-auth.css +1 -0
- package/packages/theme-chalk/lib/select-ganged.css +1 -0
- package/packages/theme-chalk/lib/select.css +1 -0
- package/packages/theme-chalk/lib/selector-panel.css +1 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/simplicity.css +1 -0
- package/packages/theme-chalk/lib/sizer.css +1 -0
- package/packages/theme-chalk/lib/steps.css +1 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tips.css +1 -0
- package/packages/theme-chalk/lib/toolbar.css +1 -0
- package/packages/theme-chalk/lib/tree-group.css +1 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/upload.css +1 -0
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +1 -0
- package/src/config/api.js +2 -1
- package/src/index.js +157 -157
- package/packages/theme-chalk/gulpfile.js +0 -25
|
@@ -681,16 +681,7 @@ export default {
|
|
|
681
681
|
}
|
|
682
682
|
},
|
|
683
683
|
mounted() {
|
|
684
|
-
util.win.reLogin = this.handleReLogin;
|
|
685
684
|
this.handleListener();
|
|
686
|
-
util.win.refresh = this.handleRefresh;
|
|
687
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
688
|
-
if (util.win.$wujie) {
|
|
689
|
-
util.win.$wujie.bus.$on('changeTheme', (res) => {
|
|
690
|
-
util.updateTheme(res);
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
util.win.windowOpen = this.openPage;
|
|
694
685
|
util.win.addEventListener('popstate', this.stateHandle, false);
|
|
695
686
|
},
|
|
696
687
|
methods: {
|
|
@@ -985,7 +976,7 @@ export default {
|
|
|
985
976
|
option.url.indexOf('/#/') > -1 ||
|
|
986
977
|
option.url.indexOf('#/') > -1
|
|
987
978
|
) {
|
|
988
|
-
option.
|
|
979
|
+
option.isUrl = true;
|
|
989
980
|
ids = this.getId(this.menus, option.url);
|
|
990
981
|
if (!ids) {
|
|
991
982
|
if (
|
|
@@ -1026,6 +1017,9 @@ export default {
|
|
|
1026
1017
|
}
|
|
1027
1018
|
} else {
|
|
1028
1019
|
ids = option.url.split(',');
|
|
1020
|
+
if (ids.length == 1) {
|
|
1021
|
+
ids = this.getId(this.menus, option.url);
|
|
1022
|
+
}
|
|
1029
1023
|
}
|
|
1030
1024
|
} else {
|
|
1031
1025
|
ids = option.url;
|
|
@@ -1043,7 +1037,48 @@ export default {
|
|
|
1043
1037
|
}
|
|
1044
1038
|
for (let i = 0; i < menus.length; i++) {
|
|
1045
1039
|
let item = menus[i];
|
|
1046
|
-
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 (
|
|
1047
1082
|
Object.prototype.hasOwnProperty.call(item, 'children') &&
|
|
1048
1083
|
item.children.length
|
|
1049
1084
|
) {
|
|
@@ -1075,7 +1110,7 @@ export default {
|
|
|
1075
1110
|
}
|
|
1076
1111
|
return id;
|
|
1077
1112
|
}
|
|
1078
|
-
} else if (item.
|
|
1113
|
+
} else if (item.url == url) {
|
|
1079
1114
|
return item.id;
|
|
1080
1115
|
} else {
|
|
1081
1116
|
if (item.url) {
|
|
@@ -1342,7 +1377,7 @@ export default {
|
|
|
1342
1377
|
this.sysId = '';
|
|
1343
1378
|
this.tabsId = '';
|
|
1344
1379
|
this.active = '';
|
|
1345
|
-
this.getUrl(res, active, param);
|
|
1380
|
+
this.getUrl(res, active[active.length - 1], param);
|
|
1346
1381
|
if (
|
|
1347
1382
|
this.layout === 'subsystem' ||
|
|
1348
1383
|
this.layout === 'subSystem' ||
|
|
@@ -1395,7 +1430,7 @@ export default {
|
|
|
1395
1430
|
if (this.biserial) {
|
|
1396
1431
|
this.active = active.slice(
|
|
1397
1432
|
0,
|
|
1398
|
-
|
|
1433
|
+
this.tabs && this.tabs.length ? active.length - 1 : active.length
|
|
1399
1434
|
);
|
|
1400
1435
|
} else {
|
|
1401
1436
|
this.active = active.slice(1);
|
|
@@ -1405,34 +1440,29 @@ export default {
|
|
|
1405
1440
|
this.showPage = true;
|
|
1406
1441
|
},
|
|
1407
1442
|
//获取页面类型及地址
|
|
1408
|
-
getUrl(res, active,
|
|
1409
|
-
index = index === undefined ? 0 : index;
|
|
1443
|
+
getUrl(res, active, param) {
|
|
1410
1444
|
for (let i = 0; i < res.length; i++) {
|
|
1411
1445
|
let item = res[i];
|
|
1412
|
-
if (item.id === active
|
|
1413
|
-
if (
|
|
1446
|
+
if (item.id === active) {
|
|
1447
|
+
if (item.url) {
|
|
1414
1448
|
this.handleJump(item.url, item.urlopenmode, item, param);
|
|
1415
1449
|
return item.url;
|
|
1416
1450
|
} else {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
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 = '';
|
|
1424
1458
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
}
|
|
1431
|
-
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);
|
|
1432
1464
|
}
|
|
1433
1465
|
}
|
|
1434
|
-
} else if (item.children && item.children.length) {
|
|
1435
|
-
this.getUrl(item.children, active, index, param);
|
|
1436
1466
|
}
|
|
1437
1467
|
}
|
|
1438
1468
|
return false;
|
|
@@ -1555,13 +1585,16 @@ export default {
|
|
|
1555
1585
|
}
|
|
1556
1586
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1557
1587
|
}
|
|
1558
|
-
} else {
|
|
1559
|
-
|
|
1588
|
+
} else if (node.fourthTabs && node.fourthTabs.length) {
|
|
1589
|
+
this.tabs = [];
|
|
1590
|
+
let tab = node.fourthTabs.filter((item) => {
|
|
1560
1591
|
return item.url === node.url;
|
|
1561
1592
|
})[0];
|
|
1562
1593
|
if (tab) {
|
|
1563
|
-
this.tabs = node.fourthTabs;
|
|
1564
1594
|
this.tabsId = tab.id;
|
|
1595
|
+
this.$nextTick(() => {
|
|
1596
|
+
this.tabs = node.fourthTabs;
|
|
1597
|
+
});
|
|
1565
1598
|
//this.navIds = this.getId(this.menus, tab.url);
|
|
1566
1599
|
} else {
|
|
1567
1600
|
//this.navIds = this.getId(this.menus, node.url);
|
|
@@ -1569,13 +1602,15 @@ export default {
|
|
|
1569
1602
|
}
|
|
1570
1603
|
} else {
|
|
1571
1604
|
if (node.fourthTabs.length) {
|
|
1572
|
-
this.
|
|
1573
|
-
this
|
|
1574
|
-
|
|
1575
|
-
this.
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1605
|
+
this.tabsId = node.fourthTabs[0].id;
|
|
1606
|
+
this.$nextTick(() => {
|
|
1607
|
+
this.tabs = node.fourthTabs;
|
|
1608
|
+
this.handleJump(
|
|
1609
|
+
this.tabs[0].url,
|
|
1610
|
+
this.tabs[0].urlopenmode,
|
|
1611
|
+
this.tabs[0]
|
|
1612
|
+
);
|
|
1613
|
+
});
|
|
1579
1614
|
//this.navIds = this.getId(this.menus, this.tabs[0].url);
|
|
1580
1615
|
}
|
|
1581
1616
|
}
|
|
@@ -1994,124 +2029,6 @@ export default {
|
|
|
1994
2029
|
let n = parseInt(this.menuTips[id], 10) - 1;
|
|
1995
2030
|
this.$set(this.menuTips, id, n);
|
|
1996
2031
|
}
|
|
1997
|
-
},
|
|
1998
|
-
handleReLogin(res) {
|
|
1999
|
-
if (res && typeof res == 'string') {
|
|
2000
|
-
res = JSON.parse(res);
|
|
2001
|
-
}
|
|
2002
|
-
let msg = '提示';
|
|
2003
|
-
let btn = {
|
|
2004
|
-
confirmButtonText: '确定',
|
|
2005
|
-
cancelButtonText: '取消',
|
|
2006
|
-
closeOnClickModal: false,
|
|
2007
|
-
type: 'warning'
|
|
2008
|
-
};
|
|
2009
|
-
if (res) {
|
|
2010
|
-
if (res.rCode === 69) {
|
|
2011
|
-
msg = '该账号在其他地方已登陆!';
|
|
2012
|
-
btn = {
|
|
2013
|
-
confirmButtonText: '确定',
|
|
2014
|
-
closeOnClickModal: false,
|
|
2015
|
-
type: 'warning'
|
|
2016
|
-
};
|
|
2017
|
-
} else {
|
|
2018
|
-
msg = '登录已过期,请重新登录!';
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
cl;
|
|
2022
|
-
let remind = sessionStorage.getItem('remind');
|
|
2023
|
-
if (!remind) {
|
|
2024
|
-
clearTimeout(this.timer);
|
|
2025
|
-
this.timer = setTimeout(() => {
|
|
2026
|
-
console.log('handleReLogin');
|
|
2027
|
-
sessionStorage.setItem('remind', 1);
|
|
2028
|
-
this.$confirm(msg, btn)
|
|
2029
|
-
.then(() => {
|
|
2030
|
-
util.removeStorage([
|
|
2031
|
-
'Authorization',
|
|
2032
|
-
'token',
|
|
2033
|
-
'ssId',
|
|
2034
|
-
'userId',
|
|
2035
|
-
'userName',
|
|
2036
|
-
'auth',
|
|
2037
|
-
'deviceUnique',
|
|
2038
|
-
'menus',
|
|
2039
|
-
'useCaseCodes',
|
|
2040
|
-
'mainConfig',
|
|
2041
|
-
'jump'
|
|
2042
|
-
]);
|
|
2043
|
-
const loginPage =
|
|
2044
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
2045
|
-
try {
|
|
2046
|
-
if (loginPage) {
|
|
2047
|
-
let src;
|
|
2048
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
2049
|
-
let pathname = util.win.top.location.pathname;
|
|
2050
|
-
if (pathname !== '/') {
|
|
2051
|
-
pathname = pathname.split('/');
|
|
2052
|
-
pathname.splice(pathname.length - 1);
|
|
2053
|
-
pathname = pathname.join('/');
|
|
2054
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
2055
|
-
} else {
|
|
2056
|
-
src = pathname + loginPage.replace('./', '');
|
|
2057
|
-
}
|
|
2058
|
-
} else {
|
|
2059
|
-
src = loginPage;
|
|
2060
|
-
}
|
|
2061
|
-
util.win.top.location.href = src;
|
|
2062
|
-
} else if (
|
|
2063
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
2064
|
-
) {
|
|
2065
|
-
util.win.top.location.href = './login.html';
|
|
2066
|
-
} else {
|
|
2067
|
-
const hash = util.win.top.location.hash;
|
|
2068
|
-
if (hash) {
|
|
2069
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
2070
|
-
util.win.top.location.href =
|
|
2071
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
2072
|
-
} else {
|
|
2073
|
-
util.win.top.location.href = '/login.html';
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
} catch (error) {
|
|
2077
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
2078
|
-
}
|
|
2079
|
-
})
|
|
2080
|
-
.catch((e) => {
|
|
2081
|
-
sessionStorage.removeItem('remind');
|
|
2082
|
-
});
|
|
2083
|
-
}, 2000);
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
openPage(url, name, width, height) {
|
|
2087
|
-
let src = url;
|
|
2088
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
2089
|
-
let pathname = window.location.pathname;
|
|
2090
|
-
if (pathname !== '/') {
|
|
2091
|
-
pathname = pathname.split('/');
|
|
2092
|
-
pathname.splice(pathname.length - 1);
|
|
2093
|
-
pathname = pathname.join('/');
|
|
2094
|
-
}
|
|
2095
|
-
src = pathname + url.replace('./', '/');
|
|
2096
|
-
}
|
|
2097
|
-
if (name) {
|
|
2098
|
-
let w = 0;
|
|
2099
|
-
let h = 0;
|
|
2100
|
-
try {
|
|
2101
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
2102
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
2103
|
-
} catch (error) {
|
|
2104
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
2105
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
2106
|
-
}
|
|
2107
|
-
return util.win.open(
|
|
2108
|
-
src,
|
|
2109
|
-
name,
|
|
2110
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
2111
|
-
);
|
|
2112
|
-
} else {
|
|
2113
|
-
return util.win.open(src);
|
|
2114
|
-
}
|
|
2115
2032
|
}
|
|
2116
2033
|
},
|
|
2117
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
|
|
@@ -70,6 +173,41 @@ export default {
|
|
|
70
173
|
this.$refs.main.init(res);
|
|
71
174
|
});
|
|
72
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
|
+
}
|
|
73
211
|
}
|
|
74
212
|
},
|
|
75
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,
|
|
@@ -638,10 +644,6 @@ export default {
|
|
|
638
644
|
this.doorIndex = sessionStorage.getItem('doorIndex');
|
|
639
645
|
},
|
|
640
646
|
mounted() {
|
|
641
|
-
util.win.reLogin = this.handleReLogin;
|
|
642
|
-
util.win.refresh = this.handleRefresh;
|
|
643
|
-
util.win.jumpMenu = this.jumpMenu;
|
|
644
|
-
util.win.windowOpen = this.openPage;
|
|
645
647
|
this.handleListener();
|
|
646
648
|
},
|
|
647
649
|
methods: {
|
|
@@ -1335,6 +1337,18 @@ export default {
|
|
|
1335
1337
|
* @date 2024年9月7日
|
|
1336
1338
|
**/
|
|
1337
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
|
+
}
|
|
1338
1352
|
this.showMsg = false;
|
|
1339
1353
|
this.showSet = false;
|
|
1340
1354
|
let i = util.indexOfObj(this.tabs, res, 'id');
|
|
@@ -1657,123 +1671,6 @@ export default {
|
|
|
1657
1671
|
clearTimeout(this.sysMsgOut);
|
|
1658
1672
|
}
|
|
1659
1673
|
},
|
|
1660
|
-
handleReLogin(res) {
|
|
1661
|
-
if (res && typeof res == 'string') {
|
|
1662
|
-
res = JSON.parse(res);
|
|
1663
|
-
}
|
|
1664
|
-
let msg = '提示';
|
|
1665
|
-
let btn = {
|
|
1666
|
-
confirmButtonText: '确定',
|
|
1667
|
-
cancelButtonText: '取消',
|
|
1668
|
-
closeOnClickModal: false,
|
|
1669
|
-
type: 'warning'
|
|
1670
|
-
};
|
|
1671
|
-
if (res) {
|
|
1672
|
-
if (res.rCode === 69) {
|
|
1673
|
-
msg = '该账号在其他地方已登陆!';
|
|
1674
|
-
btn = {
|
|
1675
|
-
confirmButtonText: '确定',
|
|
1676
|
-
closeOnClickModal: false,
|
|
1677
|
-
type: 'warning'
|
|
1678
|
-
};
|
|
1679
|
-
} else {
|
|
1680
|
-
msg = '登录已过期,请重新登录!';
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
cl;
|
|
1684
|
-
let remind = sessionStorage.getItem('remind');
|
|
1685
|
-
if (!remind) {
|
|
1686
|
-
clearTimeout(this.timer);
|
|
1687
|
-
this.timer = setTimeout(() => {
|
|
1688
|
-
sessionStorage.setItem('remind', 1);
|
|
1689
|
-
this.$confirm(msg, btn)
|
|
1690
|
-
.then(() => {
|
|
1691
|
-
util.removeStorage([
|
|
1692
|
-
'Authorization',
|
|
1693
|
-
'token',
|
|
1694
|
-
'ssId',
|
|
1695
|
-
'userId',
|
|
1696
|
-
'userName',
|
|
1697
|
-
'auth',
|
|
1698
|
-
'deviceUnique',
|
|
1699
|
-
'menus',
|
|
1700
|
-
'useCaseCodes',
|
|
1701
|
-
'mainConfig',
|
|
1702
|
-
'jump'
|
|
1703
|
-
]);
|
|
1704
|
-
const loginPage =
|
|
1705
|
-
util.getStorage('login') || util.getStorage('loginPage');
|
|
1706
|
-
try {
|
|
1707
|
-
if (loginPage) {
|
|
1708
|
-
let src;
|
|
1709
|
-
if (!util.startWith(loginPage, ['http', '/'], true)) {
|
|
1710
|
-
let pathname = util.win.top.location.pathname;
|
|
1711
|
-
if (pathname !== '/') {
|
|
1712
|
-
pathname = pathname.split('/');
|
|
1713
|
-
pathname.splice(pathname.length - 1);
|
|
1714
|
-
pathname = pathname.join('/');
|
|
1715
|
-
src = pathname + '/' + loginPage.replace('./', '');
|
|
1716
|
-
} else {
|
|
1717
|
-
src = pathname + loginPage.replace('./', '');
|
|
1718
|
-
}
|
|
1719
|
-
} else {
|
|
1720
|
-
src = loginPage;
|
|
1721
|
-
}
|
|
1722
|
-
util.win.top.location.href = src;
|
|
1723
|
-
} else if (
|
|
1724
|
-
util.win.top.location.href.indexOf('main.html') > -1
|
|
1725
|
-
) {
|
|
1726
|
-
util.win.top.location.href = './login.html';
|
|
1727
|
-
} else {
|
|
1728
|
-
const hash = util.win.top.location.hash;
|
|
1729
|
-
if (hash) {
|
|
1730
|
-
const len = util.win.top.location.href.indexOf(hash);
|
|
1731
|
-
util.win.top.location.href =
|
|
1732
|
-
util.win.location.href.slice(0, len) + '#/login';
|
|
1733
|
-
} else {
|
|
1734
|
-
util.win.top.location.href = '/login.html';
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
} catch (error) {
|
|
1738
|
-
util.win.postMessage({ type: 1 }, '*');
|
|
1739
|
-
}
|
|
1740
|
-
})
|
|
1741
|
-
.catch((e) => {
|
|
1742
|
-
sessionStorage.removeItem('remind');
|
|
1743
|
-
});
|
|
1744
|
-
}, 2000);
|
|
1745
|
-
}
|
|
1746
|
-
},
|
|
1747
|
-
openPage(url, name, width, height) {
|
|
1748
|
-
let src = url;
|
|
1749
|
-
if (!util.startWith(url, ['http', '/'], true)) {
|
|
1750
|
-
let pathname = window.location.pathname;
|
|
1751
|
-
if (pathname !== '/') {
|
|
1752
|
-
pathname = pathname.split('/');
|
|
1753
|
-
pathname.splice(pathname.length - 1);
|
|
1754
|
-
pathname = pathname.join('/');
|
|
1755
|
-
}
|
|
1756
|
-
src = pathname + url.replace('./', '/');
|
|
1757
|
-
}
|
|
1758
|
-
if (name) {
|
|
1759
|
-
let w = 0;
|
|
1760
|
-
let h = 0;
|
|
1761
|
-
try {
|
|
1762
|
-
w = width ? width : util.win.top.screen.availWidth - 10;
|
|
1763
|
-
h = height ? height : util.win.top.screen.availHeight - 60;
|
|
1764
|
-
} catch (error) {
|
|
1765
|
-
w = width ? width : util.win.screen.availWidth - 10;
|
|
1766
|
-
h = height ? height : util.win.screen.availHeight - 60;
|
|
1767
|
-
}
|
|
1768
|
-
return util.win.open(
|
|
1769
|
-
src,
|
|
1770
|
-
name,
|
|
1771
|
-
`width=${w}px,height=${h}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
1772
|
-
);
|
|
1773
|
-
} else {
|
|
1774
|
-
return util.win.open(src);
|
|
1775
|
-
}
|
|
1776
|
-
},
|
|
1777
1674
|
jumpMenu(res) {
|
|
1778
1675
|
let apps = res;
|
|
1779
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)"
|