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
c65384c8
Commit
c65384c8
authored
Apr 23, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b1212478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
17 deletions
+83
-17
menu.vue
src/components/system/menu.vue
+83
-17
No files found.
src/components/system/menu.vue
View file @
c65384c8
...
...
@@ -38,14 +38,7 @@
<th>
父级菜单编号
</th>
<th>
状态
</th>
</tr>
<tr>
<td>
1
</td>
<td>
2
</td>
<td>
3
</td>
<td>
4
</td>
<td>
5
</td>
<td>
正常
</td>
</tr>
</table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
v-if=
"dataList.length>0"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
"total"
>
...
...
@@ -61,7 +54,7 @@
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"25"
v-model=
"addMsg.MenuUrl"
></el-input>
</el-form-item>
<el-form-item
label=
"菜单等级"
prop=
"MenuLevel"
>
<el-select
style=
"width:234px;"
size=
"small"
v-model=
"addMsg.MenuLevel"
>
<el-select
style=
"width:234px;"
size=
"small"
v-model=
"addMsg.MenuLevel"
@
change=
"getChildMenuList(addMsg.MenuLevel)"
>
<el-option
label=
"一级"
:key=
"1"
:value=
"1"
></el-option>
<el-option
label=
"二级"
:key=
"2"
:value=
"2"
></el-option>
<el-option
label=
"三级"
:key=
"3"
:value=
"3"
></el-option>
...
...
@@ -76,7 +69,9 @@
<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-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"menuDialog = false"
>
取 消
</el-button>
...
...
@@ -101,10 +96,11 @@
addMsg
:
{
MenuName
:
''
,
MenuUrl
:
''
,
MenuLevel
:
0
,
MenuLevel
:
1
,
ParentId
:
0
,
IconClass
:
''
,
Status
:
0
,
SortNum
:
0
,
},
menurules
:
{
...
...
@@ -117,17 +113,87 @@
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
this
.
get
Page
List
();
},
//获取数据
getList
()
{
//获取分页数据
getPageList
()
{
this
.
apipost
(
"/api/Tenant/GetMenuPage"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//添加修改菜单
addMenu
()
{
}
this
.
apipost
(
"/api/Tenant/SetMenu"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getPageList
();
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//根据编号获取菜单
getMenu
(
Id
)
{
this
.
apipost
(
"/api/Tenant/GetMenu"
,
{
MenuId
:
Id
},
res
=>
{
console
.
log
(
res
);
1
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//删除菜单
delMenu
(
Id
)
{
this
.
apipost
(
"/api/Tenant/SetMenuStatus"
,
{
MenuId
:
Id
,
Status
:
1
},
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//恢复菜单
recoverMenu
(
Id
)
{
this
.
apipost
(
"/api/Tenant/SetMenuStatus"
,
{
MenuId
:
Id
,
Status
:
0
},
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//恢复菜单
getChildMenuList
(
MenuLevel
)
{
this
.
apipost
(
"/api/Tenant/SetMenuStatus"
,
{
MenuLevel
:
MenuLevel
,
},
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
},
mounted
()
{
this
.
get
List
();
this
.
getPage
List
();
}
};
...
...
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