Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
中汽测评-信息安全测评系统
web
Commits
186b12fc
Commit
186b12fc
authored
Dec 18, 2023
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(全局): preitter格式化src
parent
ceb65d2b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
145 additions
and
131 deletions
+145
-131
App.vue
src/App.vue
+32
-28
main.js
src/main.js
+103
-96
permission.js
src/permission.js
+10
-7
No files found.
src/App.vue
View file @
186b12fc
...
@@ -6,20 +6,24 @@
...
@@ -6,20 +6,24 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
ThemePicker
from
"@/components/ThemePicker"
;
import
ThemePicker
from
'@/components/ThemePicker'
export
default
{
export
default
{
name
:
"App"
,
name
:
'App'
,
components
:
{
ThemePicker
},
components
:
{
ThemePicker
},
metaInfo
()
{
metaInfo
()
{
return
{
return
{
title
:
this
.
$store
.
state
.
settings
.
dynamicTitle
&&
this
.
$store
.
state
.
settings
.
title
,
title
:
this
.
$store
.
state
.
settings
.
dynamicTitle
&&
this
.
$store
.
state
.
settings
.
title
,
titleTemplate
:
title
=>
{
titleTemplate
:
title
=>
{
return
title
?
`
${
title
}
-
${
process
.
env
.
VUE_APP_TITLE
}
`
:
process
.
env
.
VUE_APP_TITLE
return
title
?
`
${
title
}
-
${
process
.
env
.
VUE_APP_TITLE
}
`
:
process
.
env
.
VUE_APP_TITLE
}
}
}
}
}
}
}
;
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
#app
.theme-picker
{
#app
.theme-picker
{
...
...
src/main.js
View file @
186b12fc
...
@@ -16,23 +16,30 @@ import { download } from '@/utils/request'
...
@@ -16,23 +16,30 @@ import { download } from '@/utils/request'
import
'./assets/icons'
// icon
import
'./assets/icons'
// icon
import
'./permission'
// permission control
import
'./permission'
// permission control
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getDicts
}
from
'@/api/system/dict/data'
import
{
getConfigKey
}
from
"@/api/system/config"
;
import
{
getConfigKey
}
from
'@/api/system/config'
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
}
from
"@/utils/ruoyi"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
}
from
'@/utils/ruoyi'
// 分页组件
// 分页组件
import
Pagination
from
"@/components/Pagination"
;
import
Pagination
from
'@/components/Pagination'
// 自定义表格工具组件
// 自定义表格工具组件
import
RightToolbar
from
"@/components/RightToolbar"
import
RightToolbar
from
'@/components/RightToolbar'
// 富文本组件
// 富文本组件
import
Editor
from
"@/components/Editor"
import
Editor
from
'@/components/Editor'
// 文件上传组件
// 文件上传组件
import
FileUpload
from
"@/components/FileUpload"
import
FileUpload
from
'@/components/FileUpload'
// 图片上传组件
// 图片上传组件
import
ImageUpload
from
"@/components/ImageUpload"
import
ImageUpload
from
'@/components/ImageUpload'
// 图片预览组件
// 图片预览组件
import
ImagePreview
from
"@/components/ImagePreview"
import
ImagePreview
from
'@/components/ImagePreview'
// 页面模板
// 页面模板
import
PageStandard
from
"@/components/Page/standard"
import
PageStandard
from
'@/components/Page/standard'
// 字典标签组件
// 字典标签组件
import
DictTag
from
'@/components/DictTag'
import
DictTag
from
'@/components/DictTag'
// 头部标签组件
// 头部标签组件
...
@@ -40,7 +47,7 @@ import VueMeta from 'vue-meta'
...
@@ -40,7 +47,7 @@ import VueMeta from 'vue-meta'
// 字典数据组件
// 字典数据组件
import
DictData
from
'@/components/DictData'
import
DictData
from
'@/components/DictData'
import
TalkItem
from
"@/components/TalkItem"
;
import
TalkItem
from
'@/components/TalkItem'
// if (process.env.NODE_ENV === 'production') {
// if (process.env.NODE_ENV === 'production') {
// const { mockXHR } = require('../mock')
// const { mockXHR } = require('../mock')
// mockXHR()
// mockXHR()
...
...
src/permission.js
View file @
186b12fc
...
@@ -24,14 +24,17 @@ router.beforeEach((to, from, next) => {
...
@@ -24,14 +24,17 @@ router.beforeEach((to, from, next) => {
if
(
store
.
getters
.
roles
.
length
===
0
)
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
isRelogin
.
show
=
true
isRelogin
.
show
=
true
// 判断当前用户是否已拉取完user_info信息
// 判断当前用户是否已拉取完user_info信息
store
.
dispatch
(
'GetInfo'
).
then
(()
=>
{
store
.
dispatch
(
'GetInfo'
)
.
then
(()
=>
{
isRelogin
.
show
=
false
isRelogin
.
show
=
false
store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
store
.
dispatch
(
'GenerateRoutes'
).
then
(
accessRoutes
=>
{
// 根据roles权限生成可访问的路由表
// 根据roles权限生成可访问的路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
router
.
addRoutes
(
accessRoutes
)
// 动态添加可访问路由表
next
({
...
to
,
replace
:
true
})
// hack方法 确保addRoutes已完成
next
({
...
to
,
replace
:
true
})
// hack方法 确保addRoutes已完成
})
})
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
Message
.
error
(
err
)
next
({
path
:
'/'
})
next
({
path
:
'/'
})
...
...
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