Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
026a4271
Commit
026a4271
authored
Nov 24, 2021
by
RuoYi
Browse files
优化前端代码
parent
bafb1372
Changes
13
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/package.json
View file @
026a4271
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
"vue"
:
"2.6.12"
,
"vue"
:
"2.6.12"
,
"vue-count-to"
:
"1.0.13"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.5.5"
,
"vue-cropper"
:
"0.5.5"
,
"vue-meta"
:
"
^
2.4.0"
,
"vue-meta"
:
"2.4.0"
,
"vue-router"
:
"3.4.9"
,
"vue-router"
:
"3.4.9"
,
"vuedraggable"
:
"2.24.3"
,
"vuedraggable"
:
"2.24.3"
,
"vuex"
:
"3.6.0"
"vuex"
:
"3.6.0"
...
...
ruoyi-ui/src/components/Breadcrumb/index.vue
View file @
026a4271
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<transition-group
name=
"breadcrumb"
>
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
:key=
"item.path"
>
<span
v-if=
"item.redirect==='noRedirect'||index==levelList.length
-
1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<span
v-if=
"item.redirect
===
'noRedirect'
||
index
==
levelList.length
-
1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<a
v-else
@
click.prevent=
"handleLink(item)"
>
{{
item
.
meta
.
title
}}
</a>
<a
v-else
@
click.prevent=
"handleLink(item)"
>
{{
item
.
meta
.
title
}}
</a>
</el-breadcrumb-item>
</el-breadcrumb-item>
</transition-group>
</transition-group>
...
...
ruoyi-ui/src/components/RuoYi/Doc/index.vue
View file @
026a4271
<
template
>
<
template
>
<div>
<div>
<svg-icon
icon-class=
"question"
@
click=
"goto"
/>
<svg-icon
icon-class=
"question"
@
click=
"goto"
/>
</div>
</div>
</
template
>
</
template
>
...
...
ruoyi-ui/src/components/RuoYi/Git/index.vue
View file @
026a4271
<
template
>
<
template
>
<div>
<div>
<svg-icon
icon-class=
"github"
@
click=
"goto"
/>
<svg-icon
icon-class=
"github"
@
click=
"goto"
/>
</div>
</div>
</
template
>
</
template
>
...
...
ruoyi-ui/src/components/SizeSelect/index.vue
View file @
026a4271
...
@@ -5,8 +5,7 @@
...
@@ -5,8 +5,7 @@
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"item of sizeOptions"
:key=
"item.value"
:disabled=
"size===item.value"
:command=
"item.value"
>
<el-dropdown-item
v-for=
"item of sizeOptions"
:key=
"item.value"
:disabled=
"size===item.value"
:command=
"item.value"
>
{{
{{
item
.
label
}}
item
.
label
}}
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
...
ruoyi-ui/src/layout/components/Sidebar/Logo.vue
View file @
026a4271
...
@@ -29,7 +29,7 @@ export default {
...
@@ -29,7 +29,7 @@ export default {
variables
()
{
variables
()
{
return
variables
;
return
variables
;
},
},
sideTheme
()
{
sideTheme
()
{
return
this
.
$store
.
state
.
settings
.
sideTheme
return
this
.
$store
.
state
.
settings
.
sideTheme
}
}
},
},
...
...
ruoyi-ui/src/layout/index.vue
View file @
026a4271
...
@@ -98,7 +98,7 @@ export default {
...
@@ -98,7 +98,7 @@ export default {
}
}
.hideSidebar
.fixed-header
{
.hideSidebar
.fixed-header
{
width
:
calc
(
100%
-
54px
)
width
:
calc
(
100%
-
54px
)
;
}
}
.mobile
.fixed-header
{
.mobile
.fixed-header
{
...
...
ruoyi-ui/src/main.js
View file @
026a4271
...
@@ -10,7 +10,7 @@ import '@/assets/styles/ruoyi.scss' // ruoyi css
...
@@ -10,7 +10,7 @@ import '@/assets/styles/ruoyi.scss' // ruoyi css
import
App
from
'
./App
'
import
App
from
'
./App
'
import
store
from
'
./store
'
import
store
from
'
./store
'
import
router
from
'
./router
'
import
router
from
'
./router
'
import
directive
from
'
./directive
'
//directive
import
directive
from
'
./directive
'
//
directive
import
plugins
from
'
./plugins
'
// plugins
import
plugins
from
'
./plugins
'
// plugins
import
{
download
}
from
'
@/utils/request
'
import
{
download
}
from
'
@/utils/request
'
...
...
ruoyi-ui/src/plugins/download.js
View file @
026a4271
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
responseType
:
'
blob
'
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
async
(
res
)
=>
{
}).
then
(
async
(
res
)
=>
{
const
isLogin
=
await
this
.
blobValidate
(
res
.
data
);
const
isLogin
=
await
blobValidate
(
res
.
data
);
if
(
isLogin
)
{
if
(
isLogin
)
{
const
blob
=
new
Blob
([
res
.
data
])
const
blob
=
new
Blob
([
res
.
data
])
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
responseType
:
'
blob
'
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
async
(
res
)
=>
{
}).
then
(
async
(
res
)
=>
{
const
isLogin
=
await
this
.
blobValidate
(
res
.
data
);
const
isLogin
=
await
blobValidate
(
res
.
data
);
if
(
isLogin
)
{
if
(
isLogin
)
{
const
blob
=
new
Blob
([
res
.
data
])
const
blob
=
new
Blob
([
res
.
data
])
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
...
...
ruoyi-ui/src/router/index.js
View file @
026a4271
...
@@ -95,7 +95,7 @@ export const constantRoutes = [
...
@@ -95,7 +95,7 @@ export const constantRoutes = [
path
:
'
role/:userId(
\\
d+)
'
,
path
:
'
role/:userId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/system/user/authRole
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/system/user/authRole
'
],
resolve
),
name
:
'
AuthRole
'
,
name
:
'
AuthRole
'
,
meta
:
{
title
:
'
分配角色
'
,
activeMenu
:
'
/system/user
'
}
meta
:
{
title
:
'
分配角色
'
,
activeMenu
:
'
/system/user
'
}
}
}
]
]
},
},
...
@@ -108,7 +108,7 @@ export const constantRoutes = [
...
@@ -108,7 +108,7 @@ export const constantRoutes = [
path
:
'
user/:roleId(
\\
d+)
'
,
path
:
'
user/:roleId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/system/role/authUser
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/system/role/authUser
'
],
resolve
),
name
:
'
AuthUser
'
,
name
:
'
AuthUser
'
,
meta
:
{
title
:
'
分配用户
'
,
activeMenu
:
'
/system/role
'
}
meta
:
{
title
:
'
分配用户
'
,
activeMenu
:
'
/system/role
'
}
}
}
]
]
},
},
...
@@ -121,7 +121,7 @@ export const constantRoutes = [
...
@@ -121,7 +121,7 @@ export const constantRoutes = [
path
:
'
index/:dictId(
\\
d+)
'
,
path
:
'
index/:dictId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/system/dict/data
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/system/dict/data
'
],
resolve
),
name
:
'
Data
'
,
name
:
'
Data
'
,
meta
:
{
title
:
'
字典数据
'
,
activeMenu
:
'
/system/dict
'
}
meta
:
{
title
:
'
字典数据
'
,
activeMenu
:
'
/system/dict
'
}
}
}
]
]
},
},
...
@@ -134,7 +134,7 @@ export const constantRoutes = [
...
@@ -134,7 +134,7 @@ export const constantRoutes = [
path
:
'
index
'
,
path
:
'
index
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/monitor/job/log
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/monitor/job/log
'
],
resolve
),
name
:
'
JobLog
'
,
name
:
'
JobLog
'
,
meta
:
{
title
:
'
调度日志
'
,
activeMenu
:
'
/monitor/job
'
}
meta
:
{
title
:
'
调度日志
'
,
activeMenu
:
'
/monitor/job
'
}
}
}
]
]
},
},
...
@@ -147,7 +147,7 @@ export const constantRoutes = [
...
@@ -147,7 +147,7 @@ export const constantRoutes = [
path
:
'
index
'
,
path
:
'
index
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/tool/gen/editTable
'
],
resolve
),
component
:
(
resolve
)
=>
require
([
'
@/views/tool/gen/editTable
'
],
resolve
),
name
:
'
GenEdit
'
,
name
:
'
GenEdit
'
,
meta
:
{
title
:
'
修改生成配置
'
,
activeMenu
:
'
/tool/gen
'
}
meta
:
{
title
:
'
修改生成配置
'
,
activeMenu
:
'
/tool/gen
'
}
}
}
]
]
}
}
...
...
ruoyi-ui/src/store/modules/permission.js
View file @
026a4271
import
{
constantRoutes
}
from
'
@/router
'
import
{
constantRoutes
}
from
'
@/router
'
import
{
getRouters
}
from
'
@/api/menu
'
import
{
getRouters
}
from
'
@/api/menu
'
import
Layout
from
'
@/layout/index
'
import
Layout
from
'
@/layout/index
'
import
ParentView
from
'
@/components/ParentView
'
;
import
ParentView
from
'
@/components/ParentView
'
import
InnerLink
from
'
@/layout/components/InnerLink
'
import
InnerLink
from
'
@/layout/components/InnerLink
'
const
permission
=
{
const
permission
=
{
...
@@ -24,7 +24,7 @@ const permission = {
...
@@ -24,7 +24,7 @@ const permission = {
// 顶部导航菜单默认添加统计报表栏指向首页
// 顶部导航菜单默认添加统计报表栏指向首页
const
index
=
[{
const
index
=
[{
path
:
'
index
'
,
path
:
'
index
'
,
meta
:
{
title
:
'
统计报表
'
,
icon
:
'
dashboard
'
}
meta
:
{
title
:
'
统计报表
'
,
icon
:
'
dashboard
'
}
}]
}]
state
.
topbarRouters
=
routes
.
concat
(
index
);
state
.
topbarRouters
=
routes
.
concat
(
index
);
},
},
...
...
ruoyi-ui/src/store/modules/settings.js
View file @
026a4271
...
@@ -8,7 +8,7 @@ const state = {
...
@@ -8,7 +8,7 @@ const state = {
theme
:
storageSetting
.
theme
||
'
#409EFF
'
,
theme
:
storageSetting
.
theme
||
'
#409EFF
'
,
sideTheme
:
storageSetting
.
sideTheme
||
sideTheme
,
sideTheme
:
storageSetting
.
sideTheme
||
sideTheme
,
showSettings
:
showSettings
,
showSettings
:
showSettings
,
topNav
:
storageSetting
.
topNav
===
undefined
?
topNav
:
storageSetting
.
topNav
,
topNav
:
storageSetting
.
topNav
===
undefined
?
topNav
:
storageSetting
.
topNav
,
tagsView
:
storageSetting
.
tagsView
===
undefined
?
tagsView
:
storageSetting
.
tagsView
,
tagsView
:
storageSetting
.
tagsView
===
undefined
?
tagsView
:
storageSetting
.
tagsView
,
fixedHeader
:
storageSetting
.
fixedHeader
===
undefined
?
fixedHeader
:
storageSetting
.
fixedHeader
,
fixedHeader
:
storageSetting
.
fixedHeader
===
undefined
?
fixedHeader
:
storageSetting
.
fixedHeader
,
sidebarLogo
:
storageSetting
.
sidebarLogo
===
undefined
?
sidebarLogo
:
storageSetting
.
sidebarLogo
,
sidebarLogo
:
storageSetting
.
sidebarLogo
===
undefined
?
sidebarLogo
:
storageSetting
.
sidebarLogo
,
...
...
ruoyi-ui/src/store/modules/user.js
View file @
026a4271
...
@@ -66,7 +66,7 @@ const user = {
...
@@ -66,7 +66,7 @@ const user = {
})
})
})
})
},
},
// 退出系统
// 退出系统
LogOut
({
commit
,
state
})
{
LogOut
({
commit
,
state
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
Write
Preview
Supports
Markdown
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