Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
9a895763
Commit
9a895763
authored
Aug 23, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化页面内嵌iframe切换tab不刷新数据
parent
7347cbae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
Constants.java
...on/src/main/java/com/ruoyi/common/constant/Constants.java
+5
-0
SysMenuServiceImpl.java
...ava/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+2
-2
tagsView.js
ruoyi-ui/src/store/modules/tagsView.js
+14
-9
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
View file @
9a895763
...
@@ -19,6 +19,11 @@ public class Constants
...
@@ -19,6 +19,11 @@ public class Constants
*/
*/
public
static
final
String
GBK
=
"GBK"
;
public
static
final
String
GBK
=
"GBK"
;
/**
* www主域
*/
public
static
final
String
WWW
=
"www."
;
/**
/**
* http请求
* http请求
*/
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
View file @
9a895763
...
@@ -529,7 +529,7 @@ public class SysMenuServiceImpl implements ISysMenuService
...
@@ -529,7 +529,7 @@ public class SysMenuServiceImpl implements ISysMenuService
*/
*/
public
String
innerLinkReplaceEach
(
String
path
)
public
String
innerLinkReplaceEach
(
String
path
)
{
{
return
StringUtils
.
replaceEach
(
path
,
new
String
[]
{
Constants
.
HTTP
,
Constants
.
HTTPS
},
return
StringUtils
.
replaceEach
(
path
,
new
String
[]
{
Constants
.
HTTP
,
Constants
.
HTTPS
,
Constants
.
WWW
,
"."
},
new
String
[]
{
""
,
""
});
new
String
[]
{
""
,
""
,
""
,
"/"
});
}
}
}
}
ruoyi-ui/src/store/modules/tagsView.js
View file @
9a895763
...
@@ -6,11 +6,12 @@ const state = {
...
@@ -6,11 +6,12 @@ const state = {
const
mutations
=
{
const
mutations
=
{
ADD_IFRAME_VIEW
:
(
state
,
view
)
=>
{
ADD_IFRAME_VIEW
:
(
state
,
view
)
=>
{
if
(
state
.
iframeViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
{
if
(
state
.
iframeViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
return
state
.
iframeViews
.
push
(
}
else
{
Object
.
assign
({},
view
,
{
state
.
iframeViews
.
push
(
view
)
title
:
view
.
meta
.
title
||
'no-name'
}
})
)
},
},
ADD_VISITED_VIEW
:
(
state
,
view
)
=>
{
ADD_VISITED_VIEW
:
(
state
,
view
)
=>
{
if
(
state
.
visitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
if
(
state
.
visitedViews
.
some
(
v
=>
v
.
path
===
view
.
path
))
return
...
@@ -87,10 +88,12 @@ const mutations = {
...
@@ -87,10 +88,12 @@ const mutations = {
if
(
i
>
-
1
)
{
if
(
i
>
-
1
)
{
state
.
cachedViews
.
splice
(
i
,
1
)
state
.
cachedViews
.
splice
(
i
,
1
)
}
}
if
(
item
.
meta
.
link
)
{
const
fi
=
state
.
iframeViews
.
findIndex
(
v
=>
v
.
path
===
item
.
path
)
state
.
iframeViews
.
splice
(
fi
,
1
)
}
return
false
return
false
})
})
const
iframeIndex
=
state
.
iframeViews
.
findIndex
(
v
=>
v
.
path
===
view
.
path
)
state
.
iframeViews
=
state
.
iframeViews
.
filter
((
item
,
idx
)
=>
idx
<=
iframeIndex
)
},
},
DEL_LEFT_VIEWS
:
(
state
,
view
)
=>
{
DEL_LEFT_VIEWS
:
(
state
,
view
)
=>
{
const
index
=
state
.
visitedViews
.
findIndex
(
v
=>
v
.
path
===
view
.
path
)
const
index
=
state
.
visitedViews
.
findIndex
(
v
=>
v
.
path
===
view
.
path
)
...
@@ -105,10 +108,12 @@ const mutations = {
...
@@ -105,10 +108,12 @@ const mutations = {
if
(
i
>
-
1
)
{
if
(
i
>
-
1
)
{
state
.
cachedViews
.
splice
(
i
,
1
)
state
.
cachedViews
.
splice
(
i
,
1
)
}
}
if
(
item
.
meta
.
link
)
{
const
fi
=
state
.
iframeViews
.
findIndex
(
v
=>
v
.
path
===
item
.
path
)
state
.
iframeViews
.
splice
(
fi
,
1
)
}
return
false
return
false
})
})
const
iframeIndex
=
state
.
iframeViews
.
findIndex
(
v
=>
v
.
path
===
view
.
path
)
state
.
iframeViews
=
state
.
iframeViews
.
filter
((
item
,
idx
)
=>
idx
>=
iframeIndex
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment