Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xxx_phase2_web
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
夏敏伟
xxx_phase2_web
Commits
fffdfaba
Commit
fffdfaba
authored
Jul 04, 2024
by
夏敏伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐藏模块名称
parent
5f4181e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
src/store/actions.js
src/store/actions.js
+4
-2
src/view/homepage.vue
src/view/homepage.vue
+38
-10
No files found.
src/store/actions.js
View file @
fffdfaba
...
@@ -57,7 +57,8 @@ function generateHomeRoute(list) {
...
@@ -57,7 +57,8 @@ function generateHomeRoute(list) {
name
:
menu1
[
i
].
name
,
name
:
menu1
[
i
].
name
,
component
:
loadView
(
menu1
[
i
].
url
,
menu1
[
i
].
url
),
component
:
loadView
(
menu1
[
i
].
url
,
menu1
[
i
].
url
),
children
:
[],
children
:
[],
meta
:
menu1
[
i
]
meta
:
menu1
[
i
],
description
:
menu1
[
i
].
description
});
});
//过滤二级目录
//过滤二级目录
...
@@ -68,7 +69,8 @@ function generateHomeRoute(list) {
...
@@ -68,7 +69,8 @@ function generateHomeRoute(list) {
path
:
'
/
'
+
element
.
url
,
path
:
'
/
'
+
element
.
url
,
name
:
element
.
name
,
name
:
element
.
name
,
component
:
loadView
(
menu1
[
i
].
url
,
element
.
url
),
component
:
loadView
(
menu1
[
i
].
url
,
element
.
url
),
meta
:
element
meta
:
element
,
description
:
element
.
description
});
});
});
});
if
(
route2
.
length
)
{
//一级目录有子菜单,此目录才会加入路由
if
(
route2
.
length
)
{
//一级目录有子菜单,此目录才会加入路由
...
...
src/view/homepage.vue
View file @
fffdfaba
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<div
:class=
"['module-info', isSelected == item.id ? ('selectedModule-left' + index) : '', 'left-div-' + index]"
<div
:class=
"['module-info', isSelected == item.id ? ('selectedModule-left' + index) : '', 'left-div-' + index]"
@
click=
"choiceModule(item.id)"
>
@
click=
"choiceModule(item.id)"
>
<div
class=
"info-description"
>
<div
class=
"info-description"
>
<div
v-text=
"item.
titl
e"
></div>
<div
v-text=
"item.
nam
e"
></div>
<div
v-text=
"item.
eg
"
></div>
<div
v-text=
"item.
description
"
></div>
</div>
</div>
</div>
</div>
<div
style=
"position: absolute;top:50%;right: 3.1%;"
:id=
"'left' + index"
></div>
<div
style=
"position: absolute;top:50%;right: 3.1%;"
:id=
"'left' + index"
></div>
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
<div
:class=
"['module-info', isSelected == item.id ? ('selectedModule-right' + index) : '', 'right-div-' + index]"
<div
:class=
"['module-info', isSelected == item.id ? ('selectedModule-right' + index) : '', 'right-div-' + index]"
@
click=
"choiceModule(item.id)"
>
@
click=
"choiceModule(item.id)"
>
<div
class=
"info-description"
>
<div
class=
"info-description"
>
<div
v-text=
"item.
titl
e"
></div>
<div
v-text=
"item.
nam
e"
></div>
<div
v-text=
"item.
eg
"
></div>
<div
v-text=
"item.
description
"
></div>
</div>
</div>
</div>
</div>
<div
style=
"position: absolute;top:50%;left: 3.1%;"
:id=
"'right' + index"
></div>
<div
style=
"position: absolute;top:50%;left: 3.1%;"
:id=
"'right' + index"
></div>
...
@@ -59,14 +59,14 @@ export default {
...
@@ -59,14 +59,14 @@ export default {
isSelected
:
0
,
isSelected
:
0
,
modules
:
{
modules
:
{
leftModule
:
[
leftModule
:
[
{
id
:
1
,
title
:
'
目标对象库
'
,
eg
:
'
Target Object Library
'
},
{
id
:
1
,
name
:
'
目标对象库
'
,
description
:
'
Target Object Library
'
},
{
id
:
2
,
title
:
'
战法策略库
'
,
eg
:
'
Method Strategy Library
'
},
{
id
:
2
,
name
:
'
战法策略库
'
,
description
:
'
Method Strategy Library
'
},
{
id
:
3
,
title
:
'
信息制品库
'
,
eg
:
'
Infomation product Library
'
},
{
id
:
3
,
name
:
'
信息制品库
'
,
description
:
'
Infomation product Library
'
},
],
],
rightModule
:
[
rightModule
:
[
{
id
:
4
,
title
:
'
导调控制模块
'
,
eg
:
'
Pilot Control Module
'
},
{
id
:
4
,
name
:
'
导调控制模块
'
,
description
:
'
Pilot Control Module
'
},
{
id
:
5
,
title
:
'
学习训练模块
'
,
eg
:
'
Learning And Training Module
'
},
{
id
:
5
,
name
:
'
学习训练模块
'
,
description
:
'
Learning And Training Module
'
},
{
id
:
6
,
title
:
'
新技术实验模块
'
,
eg
:
'
New Technology Experiment Module
'
},
{
id
:
6
,
name
:
'
新技术实验模块
'
,
description
:
'
New Technology Experiment Module
'
},
]
]
},
},
line1
:
null
,
line1
:
null
,
...
@@ -161,6 +161,34 @@ export default {
...
@@ -161,6 +161,34 @@ export default {
this
.
system_name
+=
item
.
name
;
this
.
system_name
+=
item
.
name
;
});
});
})
})
let
arr
=
this
.
$store
.
state
.
navList
[
0
].
children
.
filter
((
e
)
=>
e
.
path
==
'
/sjgl
'
);
this
.
$store
.
state
.
navList
[
0
].
children
.
forEach
((
item
)
=>
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
forEach
((
items
)
=>
{
if
(
arr
.
length
>
0
)
{
items
.
meta
.
gly
=
true
}
else
{
items
.
meta
.
gly
=
false
}
items
.
meta
.
type_name
=
"
_
"
+
item
.
name
;
})
}
});
this
.
manager_module
=
this
.
$store
.
state
.
navList
[
0
].
children
.
filter
(
(
e
)
=>
e
.
meta
.
type
==
"
1
"
);
this
.
modules
.
leftModule
=
this
.
manager_module
.
slice
(
0
,
3
);
this
.
modules
.
rightModule
=
this
.
manager_module
.
slice
(
3
,
6
);
console
.
log
(
this
.
modules
);
this
.
$store
.
commit
(
"
homeModule
"
,
this
.
manager_module
);
this
.
visualizingIndex
=
this
.
manager_module
.
length
;
this
.
manager_module_backstage
=
this
.
$store
.
state
.
navList
[
0
].
children
.
filter
(
(
e
)
=>
e
.
meta
.
type
==
"
0
"
);
this
.
manager_module_search_qz
=
this
.
$store
.
state
.
navList
[
0
].
children
.
filter
(
(
e
)
=>
e
.
meta
.
type
==
"
3
"
);
}
}
}
}
</
script
>
</
script
>
...
...
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