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
5612eca7
Commit
5612eca7
authored
Apr 08, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
32559472
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
webkit.js
src/api/system/webkit.js
+15
-0
webmenu-form.vue
src/components/system/webmenu-form.vue
+21
-6
No files found.
src/api/system/webkit.js
View file @
5612eca7
...
...
@@ -60,6 +60,21 @@ export function GetWebNav(data) {
})
}
/**
* 获取网站菜单下拉
*
*/
export
function
GetWebMenuList
(
data
)
{
return
request
({
url
:
'/WebManager/GetWebMenuList'
,
method
:
'post'
,
data
})
}
/**
* 获取网站菜单分页
*
...
...
src/components/system/webmenu-form.vue
View file @
5612eca7
...
...
@@ -10,11 +10,11 @@
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.Name"
ref=
"Name"
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-pb-lg"
label=
"菜单地址"
/>
class=
"col-6 q-pb-lg"
label=
"菜单地址"
/>
<q-select
class=
"col-6 q-pr-lg q-pb-lg"
v-model=
"objOption.MenuLevel"
:options=
"MenuLevelOpts"
emit-value
map-options
label=
"菜单等级"
/>
<q-
input
stack-label
maxlength=
"200"
:dense=
"false"
v-model=
"objOption.ParentId"
class=
"col-6 q-pb-lg
"
label=
"父级Id"
/>
map-options
label=
"菜单等级"
@
input=
"getFatherData(objOption.MenuLevel)"
/>
<q-
select
class=
"col-6 q-pb-lg"
v-model=
"objOption.ParentId"
option-value=
"Id"
option-label=
"Name
"
:options=
"FatherLevelOpts"
emit-value
map-options
label=
"父级Id"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
v-model=
"objOption.ClassName"
ref=
"ClassName"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"样式"
/>
<q-input
filled
stack-label
maxlength=
"100"
:dense=
"false"
@
keyup
.
native=
"checkInteger(objOption,'SortNum')"
...
...
@@ -39,7 +39,8 @@
<
script
>
import
{
SetWebMenu
,
GetWebMenu
GetWebMenu
,
GetWebMenuList
}
from
'../../api/system/webkit'
import
{
UploadSelfFile
...
...
@@ -85,6 +86,7 @@
optionTitle
:
""
,
//菜单列表
MenuList
:
[],
FatherLevelOpts
:
[],
saveLoading
:
false
,
}
},
...
...
@@ -92,6 +94,19 @@
this
.
initObj
()
},
methods
:
{
//下拉切换父级数据
getFatherData
()
{
this
.
objOption
.
ParentId
=
0
;
this
.
FatherLevelOpts
=
[];
let
msg
=
{
MenuLevel
:
Number
(
this
.
objOption
.
MenuLevel
-
1
)
}
GetWebMenuList
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
FatherLevelOpts
=
res
.
Data
;
}
})
},
uploadFile
(
files
)
{
UploadSelfFile
(
"course"
,
files
[
0
],
res
=>
{
if
(
res
.
Code
==
1
)
{
...
...
@@ -105,7 +120,6 @@
GetWebMenu
({
Id
:
this
.
saveObj
.
Id
}).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
this
.
objOption
.
Id
=
res
.
Data
.
Id
;
this
.
objOption
.
Name
=
res
.
Data
.
Name
;
this
.
objOption
.
MenuUrl
=
res
.
Data
.
MenuUrl
;
...
...
@@ -114,6 +128,7 @@
this
.
objOption
.
ClassName
=
res
.
Data
.
ClassName
;
this
.
objOption
.
Icon
=
res
.
Data
.
Icon
;
this
.
objOption
.
SortNum
=
res
.
Data
.
SortNum
;
this
.
getFatherData
();
})
this
.
optionTitle
=
"修改网站菜单信息"
}
else
{
...
...
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