Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
sgaqgl-vue
Commits
fcccc14a
Commit
fcccc14a
authored
Nov 23, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态存取
parent
93bf10c2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
common.js
src/api/common/common.js
+9
-0
Logo.vue
src/layout/components/Sidebar/Logo.vue
+8
-1
app.js
src/store/modules/app.js
+2
-0
permission.js
src/store/modules/permission.js
+7
-1
No files found.
src/api/common/common.js
View file @
fcccc14a
...
@@ -27,3 +27,12 @@ export function systeminfo(query) {
...
@@ -27,3 +27,12 @@ export function systeminfo(query) {
data
:
query
||
{}
data
:
query
||
{}
})
})
}
}
// 公司接口
export
function
queryGs
(
query
)
{
return
request
({
url
:
'/jcsj/common/bm/queryGs'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/layout/components/Sidebar/Logo.vue
View file @
fcccc14a
...
@@ -24,8 +24,14 @@ export default {
...
@@ -24,8 +24,14 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
required
:
true
required
:
true
}
}
},
watch
:{
},
},
computed
:
{
computed
:
{
title
(){
return
$store
.
state
.
permission
.
appName
},
variables
()
{
variables
()
{
return
variables
;
return
variables
;
},
},
...
@@ -34,7 +40,8 @@ export default {
...
@@ -34,7 +40,8 @@ export default {
}
}
},
},
mounted
(){
mounted
(){
this
.
title
=
localStorage
.
getItem
(
'appName'
)
// this.title=this.$store.state.permission.appName
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/store/modules/app.js
View file @
fcccc14a
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
const
state
=
{
const
state
=
{
isInit
:
false
,
isInit
:
false
,
sidebar
:
{
sidebar
:
{
opened
:
Cookies
.
get
(
'sidebarStatus'
)
?
!!+
Cookies
.
get
(
'sidebarStatus'
)
:
true
,
opened
:
Cookies
.
get
(
'sidebarStatus'
)
?
!!+
Cookies
.
get
(
'sidebarStatus'
)
:
true
,
...
@@ -12,6 +13,7 @@ const state = {
...
@@ -12,6 +13,7 @@ const state = {
}
}
const
mutations
=
{
const
mutations
=
{
changeInit
:
state
=>
{
changeInit
:
state
=>
{
state
.
isInit
=
true
state
.
isInit
=
true
},
},
...
...
src/store/modules/permission.js
View file @
fcccc14a
...
@@ -13,9 +13,13 @@ const permission = {
...
@@ -13,9 +13,13 @@ const permission = {
addRoutes
:
[],
addRoutes
:
[],
defaultRoutes
:
[],
defaultRoutes
:
[],
topbarRouters
:
[],
topbarRouters
:
[],
sidebarRouters
:
[]
sidebarRouters
:
[],
appName
:
''
,
},
},
mutations
:
{
mutations
:
{
SET_APPNAME
:(
state
,
appName
)
=>
{
state
.
appName
=
appName
},
SET_SIDEBAR_SHOW
:(
state
,
menusBizType
)
=>
{
SET_SIDEBAR_SHOW
:(
state
,
menusBizType
)
=>
{
state
.
sidebarRouters
.
forEach
((
e
,
index
)
=>
{
state
.
sidebarRouters
.
forEach
((
e
,
index
)
=>
{
if
(
menusBizType
!=
'root'
&&
e
.
menusBizType
&&
e
.
menusBizType
==
menusBizType
){
if
(
menusBizType
!=
'root'
&&
e
.
menusBizType
&&
e
.
menusBizType
==
menusBizType
){
...
@@ -79,7 +83,9 @@ const permission = {
...
@@ -79,7 +83,9 @@ const permission = {
getRouters
({}).
then
(
res
=>
{
getRouters
({}).
then
(
res
=>
{
let
appName
=
res
.
data
.
appName
||
''
let
appName
=
res
.
data
.
appName
||
''
commit
(
'SET_APPNAME'
,
appName
)
localStorage
.
setItem
(
'appName'
,
appName
)
localStorage
.
setItem
(
'appName'
,
appName
)
let
menus
=
res
.
data
.
menu
let
menus
=
res
.
data
.
menu
let
asymenus
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
menu
))
let
asymenus
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
.
menu
))
/* 权限路由*/
/* 权限路由*/
...
...
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