Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
0e6844fc
Commit
0e6844fc
authored
Dec 25, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
eddaf3d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
menu-form.vue
src/components/system/menu-form.vue
+10
-3
MainLayout.vue
src/layouts/MainLayout.vue
+17
-5
No files found.
src/components/system/menu-form.vue
View file @
0e6844fc
...
...
@@ -11,11 +11,15 @@
class=
"col-6 q-pr-lg q-pb-lg"
label=
"菜单名称"
:rules=
"[val => !!val || '请填写菜单名称']"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.MenuUrl"
ref=
"MenuUrl"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"菜单地址"
/>
<div
class=
"col-6 q-pr-lg q-pb-lg q-pt-lg"
>
<q-toggle
size=
"md"
label=
"固定用户中心"
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsUserCenter"
/>
</div>
<q-select
class=
"col-6 q-pb-lg"
v-model=
"objOption.MenuType"
:options=
"MenuTypeOpts"
emit-value
map-options
label=
"菜单类型"
@
input=
"queryMenuList()"
/>
<q-select
class=
"col-6 q-pb-lg"
v-model=
"objOption.MenuLevel"
:options=
"MenuLevelOpts"
emit-value
map-options
<q-select
class=
"col-6 q-pb-lg"
v-
if=
"objOption.IsUserCenter==0"
v-
model=
"objOption.MenuLevel"
:options=
"MenuLevelOpts"
emit-value
map-options
label=
"菜单等级"
@
input=
"queryMenuList()"
/>
<q-select
:option-value=
"(item) => item === null ? null : item.MenuId"
option-label=
"MenuName"
<q-select
v-if=
"objOption.IsUserCenter==0"
:option-value=
"(item) => item === null ? null : item.MenuId"
option-label=
"MenuName"
v-model=
"objOption.ParentId"
:options=
"MenuList"
label=
"上级菜单"
:dense=
"false"
emit-value
map-options
class=
"col-6 q-pb-lg"
/>
<q-input
stack-label
maxlength=
"50"
:dense=
"false"
v-model=
"objOption.MenuIcon"
class=
"col-6 q-pr-lg q-pb-lg"
...
...
@@ -70,7 +74,8 @@
MenuLevel
:
-
1
,
//菜单等级
MenuType
:
-
1
,
//菜单类型
SortNum
:
0
,
//排序
Status
:
0
,
//状态(0-正常,1-禁用)},
Status
:
0
,
//状态(0-正常,1-禁用)
IsUserCenter
:
0
,
//是否个人中心页面
},
optionTitle
:
""
,
//菜单列表
...
...
@@ -130,6 +135,7 @@
this
.
objOption
.
MenuType
=
res
.
Data
.
MenuType
;
this
.
objOption
.
SortNum
=
res
.
Data
.
SortNum
;
this
.
objOption
.
Status
=
res
.
Data
.
Status
;
this
.
objOption
.
IsUserCenter
=
res
.
Data
.
IsUserCenter
;
})
this
.
optionTitle
=
"修改菜单信息"
}
else
{
...
...
@@ -143,6 +149,7 @@
this
.
objOption
.
MenuType
=
-
1
;
this
.
objOption
.
SortNum
=
0
;
this
.
objOption
.
Status
=
0
;
this
.
objOption
.
IsUserCenter
=
0
;
}
},
//关闭弹窗
...
...
src/layouts/MainLayout.vue
View file @
0e6844fc
...
...
@@ -108,8 +108,14 @@
<div
class=
"row no-wrap q-pa-md"
>
<div
class=
"column"
>
<div
class=
"text-h6 q-mb-md"
>
Settings
</div>
<q-toggle
label=
"Use Mobile Data"
/>
<q-toggle
label=
"Bluetooth"
/>
<q-list
bordered
padding
v-if=
"userCenterMenuList&&userCenterMenuList.length>0"
>
<q-item
v-for=
"(uItem,uIndex) in userCenterMenuList"
:to=
"uItem.MenuUrl"
:key=
"uIndex"
>
<q-item-section
avatar
>
<q-icon
:name=
"uItem.MenuIcon"
/>
</q-item-section>
<q-item-section>
{{uItem.MenuName}}
</q-item-section>
</q-item>
</q-list>
</div>
<q-separator
vertical
inset
class=
"q-mx-lg"
/>
<div
class=
"column items-center"
>
...
...
@@ -209,7 +215,8 @@
backgroundColor
:
'#027be3'
,
width
:
'5px'
,
opacity
:
0.75
}
},
userCenterMenuList
:
[],
//用户中心菜单
}
},
watch
:
{
...
...
@@ -221,9 +228,12 @@
},
userInfo
:
{
handler
:
function
(
newVal
)
{
let
i
=
this
.
tab
.
split
(
'_'
)[
1
]
let
i
=
this
.
tab
.
split
(
'_'
)[
1
]
;
if
(
newVal
&&
newVal
.
MenuList
)
{
this
.
secondNavs
=
newVal
.
MenuList
.
length
>
0
?
newVal
.
MenuList
[
i
].
SubList
:
[]
this
.
secondNavs
=
newVal
.
MenuList
.
length
>
0
?
newVal
.
MenuList
[
i
].
SubList
:
[];
}
if
(
newVal
&&
newVal
.
UserCenterList
)
{
this
.
userCenterMenuList
=
newVal
.
UserCenterList
;
}
},
immediate
:
true
...
...
@@ -245,6 +255,8 @@
if
(
this
.
userInfo
&&
this
.
userInfo
.
MenuList
)
{
this
.
secondNavs
=
this
.
userInfo
.
MenuList
.
length
>
0
?
this
.
userInfo
.
MenuList
[
i
].
SubList
:
[]
}
},
methods
:
{
logout
()
{
...
...
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