Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
96ead719
authored
2025-02-20 16:51:39 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
解决菜单删除问题
1 parent
8f6925b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
src/layouts/components/Tabbar/index.vue
src/views/data_inventory/dictionary.vue
src/layouts/components/Tabbar/index.vue
View file @
96ead71
...
...
@@ -73,15 +73,18 @@ const removeTab = (targetName) => {
tabbarActive
.
value
=
activeName
;
tabbarList
.
value
=
tabbarList
.
value
.
filter
((
tab
)
=>
tab
.
fullPath
!==
targetName
);
userStore
.
setTabbar
(
tabbarList
.
value
);
//被删除之后,需要同步清除activeTabbar里的信息。
const
oldCombPath
=
targetName
?.
split
(
'/'
)?.[
1
];
oldCombPath
&&
userStore
.
setActiveTabbar
(
oldCombPath
,
''
);
const
combPath
=
activeName
.
split
(
'/'
)[
1
]
userStore
.
setActiveTabbar
(
combPath
,
activeName
);
let
tabIndex
=
visibleTabs
.
value
.
findIndex
(
v
=>
v
===
targetName
)
if
(
tabIndex
>
-
1
)
{
visibleTabs
.
value
.
splice
(
tabIndex
,
1
);
if
(
activeTab
&&
router
.
currentRoute
.
value
.
fullPath
!=
targetName
)
{
keepAliveStore
.
remove
(
activeTab
.
meta
.
reuse
?
activeTab
.
fullPath
:
activeTab
.
matched
.
at
(
-
1
)?.
components
?.
default
?.
name
)
}
}
//
let tabIndex = visibleTabs.value.findIndex(v => v === targetName)
//
if (tabIndex > -1) {
//
visibleTabs.value.splice(tabIndex, 1);
//
if (activeTab && router.currentRoute.value.fullPath != targetName) {
//
keepAliveStore.remove(activeTab.meta.reuse ? activeTab.fullPath : activeTab.matched.at(-1)?.components?.default?.name)
//
}
//
}
nextTick
(()
=>
{
nextTab
.
name
&&
router
.
push
({
name
:
nextTab
.
name
,
query
:
nextTab
.
query
});
// setTabVisible()
...
...
src/views/data_inventory/dictionary.vue
View file @
96ead71
...
...
@@ -654,7 +654,7 @@ const getCodeRuleData = () => {
getCoderuleList
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
data
.
map
(
item
=>
{
data
?
.
map
(
item
=>
{
item
.
label
=
item
.
ruleName
item
.
value
=
item
.
guid
})
...
...
@@ -1573,6 +1573,7 @@ const drawerBtnClick = (btn, info) => {
params
.
dataDictionarySchemaAddDTOS
=
dtos
if
(
drawerInfo
.
value
.
type
==
'add'
)
{
formTable
.
value
.
tableInfo
.
loading
=
true
params
.
state
=
1
;
//添加字典时默认启用
addDictionary
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment