Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
8f0a0a8c
Commit
8f0a0a8c
authored
Apr 23, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
1429f257
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
11 deletions
+37
-11
App.vue
src/App.vue
+1
-1
menu.vue
src/components/system/menu.vue
+36
-10
No files found.
src/App.vue
View file @
8f0a0a8c
...
...
@@ -11,7 +11,7 @@ export default {
</
script
>
<
style
>
@import
"//at.alicdn.com/t/font_1769104_
25q16n3sqko
.css"
;
@import
"//at.alicdn.com/t/font_1769104_
sg5novwcbz
.css"
;
@import
"./assets/css/common.css"
;
@import
"./assets/css/zkcss.css"
;
html
,
...
...
src/components/system/menu.vue
View file @
8f0a0a8c
...
...
@@ -79,22 +79,26 @@
<el-option
label=
"三级"
:key=
"3"
:value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"父级菜单编号"
prop=
"ParentId"
>
<el-form-item
label=
"父级菜单编号"
v-if=
"addMsg.MenuLevel!=1"
prop=
"ParentId"
>
<el-select
style=
"width:234px;"
size=
"small"
v-model=
"addMsg.ParentId"
>
<el-option
label=
"编号1"
:key=
"0"
:value=
"0"
></el-option>
<el-option
label=
"编号2"
:key=
"1"
:value=
"1"
></el-option>
<el-option
v-for=
"item in parentList"
:key=
"item.MenuId"
:label=
"item.MenuName"
:value=
"item.MenuId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"图标"
prop=
"IconClass"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.IconClass"
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.SortNum"
></el-input>
<el-input
type=
"text"
style=
"width:234px"
@
keyup
.
native=
"checkInteger(addMsg,'SortNum')"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.SortNum"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"menuDialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"
addMenu(
)"
>
确 定
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"
submitForm('addMsg'
)"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -121,8 +125,18 @@
Status
:
0
,
SortNum
:
0
,
},
parentList
:[],
menurules
:
{
MenuName
:
[{
required
:
true
,
message
:
'请填写菜单名称。'
,
trigger
:
'blur'
}],
// MenuUrl: [{
// required: true,
// message: '请填写菜单链接。',
// trigger: 'blur'
// }]
}
};
},
...
...
@@ -134,6 +148,16 @@
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
();
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
addMenu
();
}
else
{
return
false
;
}
});
},
//重置菜单
resetMsg
(){
let
msg
=
{
...
...
@@ -177,6 +201,7 @@
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
menuDialog
=
true
;
this
.
getChildMenuList
(
this
.
addMsg
.
MenuLevel
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
...
...
@@ -213,14 +238,14 @@
}
})
},
//
恢复菜单
//
获取父级菜单编号
getChildMenuList
(
MenuLevel
)
{
this
.
parentList
=
[];
this
.
apipost
(
"/api/Tenant/GetMenuChildList"
,
{
MenuLevel
:
MenuLevel
,
MenuLevel
:
MenuLevel
-
1
,
},
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
parentList
=
res
.
data
.
data
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
...
...
@@ -229,6 +254,7 @@
},
mounted
()
{
this
.
getPageList
();
this
.
getChildMenuList
(
1
);
}
};
...
...
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