Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
4d6d53a0
Commit
4d6d53a0
authored
Jan 09, 2023
by
李鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式化代码
parent
5e712cc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
81 deletions
+82
-81
src/App.vue
src/App.vue
+82
-81
No files found.
src/App.vue
View file @
4d6d53a0
...
@@ -4,17 +4,22 @@
...
@@ -4,17 +4,22 @@
<bg-menu
:path=
"nowParent.path"
v-if=
"menuShow"
@
openMsg=
"openMsg"
></bg-menu>
<bg-menu
:path=
"nowParent.path"
v-if=
"menuShow"
@
openMsg=
"openMsg"
></bg-menu>
<div
class=
"container"
:class=
"menuShow ? '' : 'full_screen'"
v-if=
"pageShow"
>
<div
class=
"container"
:class=
"menuShow ? '' : 'full_screen'"
v-if=
"pageShow"
>
<!--
<bg-nav
:highlightParentRule=
"highlightParentRule"
:title=
"nowParent.menuName"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
-->
<!--
<bg-nav
:highlightParentRule=
"highlightParentRule"
:title=
"nowParent.menuName"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
-->
<bg-nav
:highlightParentRule=
"highlightParentRule"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
<bg-nav
:highlightParentRule=
"highlightParentRule"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
<div
class=
"bg-main view"
>
<div
class=
"bg-main view"
>
<router-view
/>
<router-view
/>
</div>
</div>
</div>
</div>
<div
class=
"container"
v-else-if=
"$route.path
==
'/login'"
>
<div
class=
"container"
v-else-if=
"$route.path
==
'/login'"
>
<div
class=
"bg-main view"
>
<div
class=
"bg-main view"
>
<login></login>
<login></login>
</div>
</div>
</div>
</div>
<div
class=
"container"
v-else-if=
"$route.path
==
'/404'"
>
<div
class=
"container"
v-else-if=
"$route.path
==
'/404'"
>
<div
class=
"bg-main view"
>
<div
class=
"bg-main view"
>
<page404></page404>
<page404></page404>
</div>
</div>
...
@@ -25,131 +30,127 @@
...
@@ -25,131 +30,127 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
bgMenu
from
'
@/components/bg-menu.vue
'
import
bgMenu
from
"
@/components/bg-menu.vue
"
;
import
login
from
'
@/page/login/index.vue
'
import
login
from
"
@/page/login/index.vue
"
;
import
page404
from
'
@/page/404.vue
'
import
page404
from
"
@/page/404.vue
"
;
export
default
{
export
default
{
components
:{
components
:
{
bgMenu
,
bgMenu
,
login
,
login
,
page404
,
page404
,
},
},
computed
:{
computed
:
{
msgBoxFlag
(){
msgBoxFlag
()
{
return
this
.
$store
.
state
.
msgBoxFlag
return
this
.
$store
.
state
.
msgBoxFlag
;
},
},
userInfo
()
{
userInfo
()
{
return
this
.
$store
.
state
.
userInfo
||
{};
return
this
.
$store
.
state
.
userInfo
||
{};
},
},
navMenu
(){
navMenu
()
{
return
this
.
$store
.
state
.
menu
return
this
.
$store
.
state
.
menu
;
},
},
menuObj
(){
menuObj
()
{
return
this
.
$store
.
state
.
menuObj
return
this
.
$store
.
state
.
menuObj
;
},
},
navShow
(){
navShow
()
{
return
false
||!
[
'
/
'
,
'
/404
'
,
'
/login
'
].
includes
(
this
.
$route
.
path
)
return
false
||
!
[
"
/
"
,
"
/404
"
,
"
/login
"
].
includes
(
this
.
$route
.
path
);
},
},
pageShow
(){
pageShow
()
{
return
false
||!
[
'
/404
'
,
'
/login
'
].
includes
(
this
.
$route
.
path
)
return
false
||
!
[
"
/404
"
,
"
/login
"
].
includes
(
this
.
$route
.
path
);
},
},
rowPath
(){
rowPath
()
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
return
this
.
menuObj
[
this
.
$route
.
path
]
&&
this
.
menuObj
[
this
.
$route
.
path
].
rowPath
return
this
.
menuObj
[
this
.
$route
.
path
]
&&
this
.
menuObj
[
this
.
$route
.
path
].
rowPath
;
}
else
{
}
else
{
return
''
return
""
;
}
}
},
},
nowParent
(){
nowParent
()
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
// console.log(2222222)
// console.log(2222222)
// console.log(this.navMenu)
// console.log(this.navMenu)
// console.log(this.rowPath)
// console.log(this.rowPath)
return
this
.
rowPath
?
this
.
navMenu
[
this
.
rowPath
.
slice
(
1
,
2
)]:
''
return
this
.
rowPath
?
this
.
navMenu
[
this
.
rowPath
.
slice
(
1
,
2
)]
:
""
;
}
else
{
}
else
{
return
""
;
return
''
}
}
},
},
menuShow
()
{
menuShow
()
{
return
false
||!
[
"
/ui-example
"
].
includes
(
this
.
$route
.
path
)
return
false
||
!
[
"
/ui-example
"
].
includes
(
this
.
$route
.
path
);
}
},
},
watch
:{
},
msgBoxFlag
(
n
,
o
){
watch
:
{
this
.
readFlag
=
!
this
.
readFlag
msgBoxFlag
(
n
,
o
)
{
this
.
readFlag
=
!
this
.
readFlag
;
},
},
userInfo
:
{
userInfo
:
{
handler
()
{
handler
()
{
this
.
initMsg
()
this
.
initMsg
()
;
},
},
deep
:
true
,
deep
:
true
,
}
},
},
data
(){
return
{
readFlag
:
false
,
menuIndex
:
''
,
}
},
},
created
(){
data
()
{
// this.initMsg()
return
{
readFlag
:
false
,
menuIndex
:
""
,
};
},
},
mounted
()
{
created
()
{
// this.initMsg()
},
},
methods
:{
mounted
()
{},
methods
:
{
openMsg
(
data
)
{
openMsg
(
data
)
{
this
.
readFlag
=
!
this
.
readFlag
;
this
.
readFlag
=
!
this
.
readFlag
;
},
},
initMsg
()
{
initMsg
()
{
if
(
this
.
userInfo
&&
this
.
userInfo
.
system_id
)
{
if
(
this
.
userInfo
&&
this
.
userInfo
.
system_id
)
{
this
.
$trace
.
setOptionValue
(
'
userId
'
,
this
.
userInfo
.
system_id
)
this
.
$trace
.
setOptionValue
(
"
userId
"
,
this
.
userInfo
.
system_id
);
// this.$trace.setOptionValue('userType',this.userInfo.userType)
// this.$trace.setOptionValue('userType',this.userInfo.userType)
// this.$trace.setOptionValue('roleId',this.userInfo.roleIds.join(','))
// this.$trace.setOptionValue('roleId',this.userInfo.roleIds.join(','))
this
.
$trace
.
setOptionValue
(
'
organization
'
,
this
.
userInfo
.
organization_id
)
this
.
$trace
.
setOptionValue
(
"
organization
"
,
this
.
userInfo
.
organization_id
);
}
}
},
},
pathToData
(
data
,
path
){
pathToData
(
data
,
path
)
{
let
arr
=
path
.
split
(
"
.
"
);
let
arr
=
path
.
split
(
'
.
'
)
let
temp
=
null
;
let
temp
=
null
let
tempName
=
""
;
let
tempName
=
''
let
tempPath
=
""
;
let
tempPath
=
''
arr
.
forEach
((
e
,
idx
)
=>
{
arr
.
forEach
((
e
,
idx
)
=>
{
if
(
idx
==
1
)
{
temp
=
data
[
e
];
if
(
idx
==
1
){
tempName
=
data
[
e
].
menuName
;
temp
=
data
[
e
]
tempPath
=
data
[
e
].
path
;
tempName
=
data
[
e
].
menuName
data
=
data
[
e
];
tempPath
=
data
[
e
].
path
data
=
data
[
e
]
}
}
if
(
idx
==
2
)
{
if
(
idx
==
2
)
{
if
(
data
.
children
&&
data
.
children
.
length
)
{
if
(
data
.
children
&&
data
.
children
.
length
)
{
temp
=
data
.
children
[
e
]
temp
=
data
.
children
[
e
]
;
data
=
data
.
children
[
e
]
data
=
data
.
children
[
e
]
;
}
}
}
}
});
});
return
{
return
{
menuName
:
tempName
,
menuName
:
tempName
,
path
:
tempPath
,
path
:
tempPath
,
children
:
[
temp
]
children
:
[
temp
],
}
}
;
},
},
highlightParentRule
(
pathArr
){
highlightParentRule
(
pathArr
)
{
return
pathArr
.
includes
(
this
.
$route
.
path
)
return
pathArr
.
includes
(
this
.
$route
.
path
)
;
},
},
ada
(){
ada
()
{
console
.
log
(
12312
);
console
.
log
(
12312
);
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
>
<
style
>
#app
{
#app
{
height
:
100%
;
height
:
100%
;
}
}
.container
{
.container
{
width
:
100%
;
width
:
100%
;
height
:
calc
(
100%
-
56px
);
height
:
calc
(
100%
-
56px
);
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -160,10 +161,10 @@ export default {
...
@@ -160,10 +161,10 @@ export default {
.full_screen
.bg-main
{
.full_screen
.bg-main
{
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
.con-nav
{
.con-nav
{
float
:
left
;
float
:
left
;
}
}
.view
{
.view
{
height
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
overflow-y
:
auto
;
background-color
:
#ebedf2
;
background-color
:
#ebedf2
;
...
...
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