Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
80cc2748
Commit
80cc2748
authored
Nov 24, 2022
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 菜单页面
parent
17a9a3dd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
9 deletions
+42
-9
src/common/api/sys/index.js
+3
-3
src/common/style/index.scss
+13
-0
src/main.js
+10
-0
src/store/tags.js
+6
-4
src/views/home/HomeHeader.vue
+2
-0
src/views/menu.vue
+8
-2
No files found.
src/common/api/sys/index.js
View file @
80cc2748
...
...
@@ -11,13 +11,13 @@ export function getAllMenusTree() {
}
export
function
addMenu
(
data
)
{
return
axios
.
post
(
'sysMenu/add'
,
data
)
return
axios
.
post
(
'sys
Saas
Menu/add'
,
data
)
}
export
function
updateMenu
(
data
)
{
return
axios
.
post
(
'sysMenu/update'
,
data
)
return
axios
.
post
(
'sys
Saas
Menu/update'
,
data
)
}
export
function
deleteMenu
(
id
)
{
return
axios
.
post
(
`sysMenu/delete/
${
id
}
`
)
return
axios
.
post
(
`sys
Saas
Menu/delete/
${
id
}
`
)
}
src/common/style/index.scss
View file @
80cc2748
...
...
@@ -48,3 +48,16 @@
background-color
:
#fff
;
border-radius
:
8px
;
}
.el-dialog__footer
{
text-align
:
center
;
padding
:
10px
;
.el-button--small
{
padding
:
9px
50px
;
}
}
.el-dialog__body
{
padding
:
10px
;
}
src/main.js
View file @
80cc2748
...
...
@@ -5,6 +5,7 @@ import store from './store'
import
element
from
'@/common/components/element-ui.js'
import
vxeTable
from
'@/common/components/vxeTable.js'
import
'./common/style/index.scss'
import
{
getToken
}
from
'@/utils/auth'
Vue
.
config
.
productionTip
=
false
...
...
@@ -21,6 +22,15 @@ router.afterEach((to, from) => {
store
.
commit
(
'tags/setActive'
,
to
.
name
)
})
router
.
beforeEach
((
to
,
form
,
next
)
=>
{
const
auth
=
getToken
()
if
(
!
auth
&&
to
.
path
!==
'/login'
)
{
next
({
path
:
'/login'
})
}
else
{
next
()
}
})
new
Vue
({
router
,
store
,
...
...
src/store/tags.js
View file @
80cc2748
const
lastSavedTags
=
JSON
.
parse
(
localStorage
.
getItem
(
'tags'
))
||
[]
const
lastSavedTags
=
localStorage
.
getItem
(
'tags'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'tags'
))
||
[]
:
[]
let
tagId
=
lastSavedTags
.
reduce
(
(
a
,
c
)
=>
Math
.
max
(
a
,
c
.
id
),
0
,
)
console
.
log
(
lastSavedTags
)
/**
* @type {import('vuex').StoreOptions}
*/
const
tags
=
{
namespaced
:
true
,
state
:
{
tags
:
lastSavedTags
,
tags
:
lastSavedTags
||
[]
,
activeTag
:
undefined
,
},
getters
:
{
...
...
@@ -66,6 +65,9 @@ const tags = {
JSON
.
stringify
(
state
.
tags
),
)
},
removeAllTags
(
state
)
{
state
.
tags
=
[]
},
},
}
...
...
src/views/home/HomeHeader.vue
View file @
80cc2748
...
...
@@ -31,6 +31,8 @@ export default {
setUser
(
null
)
setToken
(
''
)
localStorage
.
setItem
(
'tags'
,
null
)
this
.
$store
.
commit
(
'tags/removeAllTags'
)
this
.
$router
.
push
(
'/login'
)
},
},
...
...
src/views/menu.vue
View file @
80cc2748
...
...
@@ -100,6 +100,12 @@
v-model=
"editForm.url"
></el-input>
</el-form-item>
<el-form-item
label=
"等级"
prop=
"level"
>
<el-input
style=
"width: 164px"
v-model=
"editForm.level"
/>
</el-form-item>
<el-form-item
label=
"启用状态"
>
<div
style=
"width: 164px; display: inline-block"
>
<el-radio
...
...
@@ -135,11 +141,11 @@
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
size=
"
mini
"
@
click=
"clone"
<el-button
size=
"
small
"
@
click=
"clone"
>
取 消
</el-button
>
<el-button
size=
"
mini
"
size=
"
small
"
type=
"primary"
@
click=
"submit"
>
保 存
</el-button
...
...
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