Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
鲁尚清
3 years ago
Commit
3c127841221c17806d3151f4784487fc57d03213
1 parent
2e6a3d49
在天津项目下添加aj的页签按照页面显示title功能
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
hg-monitor-web-base/src/main/resources/static/src/index.js
hg-monitor-web-base/src/main/resources/static/src/index.js
View file @
3c12784
...
...
@@ -134,11 +134,35 @@ layui.extend({
}
});
var
tabName
;
//start lsq 页面刷新后名称改变,把aj得存储到localStorage中 2022-04-18
let
routerPath
=
router
.
path
;
if
(
routerPath
.
indexOf
(
'ajConfig'
)
!=-
1
&&
routerPath
.
indexOf
(
'view'
)
!=-
1
&&
!
localStorage
.
getItem
(
router
.
search
.
ajConfig
)){
localStorage
.
setItem
(
router
.
search
.
ajConfig
,
admin
.
tabsPage
.
elem
.
text
());
}
try
{
let
el
=
admin
.
tabsPage
.
elem
;
if
(
el
&&
el
.
attr
(
'lay-href-type'
)){
if
(
el
.
attr
(
'lay-href-type'
)
==
'menu'
&&
!
matchTo
){
tabName
=
admin
.
tabsPage
.
elem
.
text
();
}
}
}
catch
(
e
){
}
if
(
!
tabName
){
if
(
routerPath
.
indexOf
(
'ajConfig'
)
!=-
1
&&
routerPath
.
indexOf
(
'view'
)
!=-
1
){
tabName
=
localStorage
.
getItem
(
router
.
search
.
ajConfig
);
}
else
{
tabName
=
res
.
title
}
}
//end lsq 页面刷新后名称改变 2022-04-18
//如果未在选项卡中匹配到,则追加选项卡
if
(
setter
.
pageTabs
&&
pathURL
!==
'/'
){
if
(
!
matchTo
){
var
tabName
=
''
// tab标签名
/*
var tabName='' // tab标签名
var url=pathURL.substring(1)
tabList.forEach((e) =>{
if(url === e.path){
...
...
@@ -147,7 +171,7 @@ layui.extend({
});
if(!tabName){
tabName= res.title
}
}
*/
$
(
APP_BODY
).
append
(
'<div class="layadmin-tabsbody-item layui-show"></div>'
);
tabsPage
.
index
=
tabs
.
length
;
element
.
tabAdd
(
FILTER_TAB_TBAS
,
{
...
...
@@ -164,6 +188,8 @@ layui.extend({
//定位当前tabs
element
.
tabChange
(
FILTER_TAB_TBAS
,
pathURL
);
// 修改为当前菜单名称 lsq 2022-04-18
$
(
'* [lay-id="'
+
pathURL
+
'"] span'
).
text
(
tabName
)
admin
.
tabsBodyChange
(
tabsPage
.
index
);
}).
done
(
function
(){
...
...
Please
register
or
login
to post a comment