修改菜单排序
This commit is contained in:
parent
17ff4c405d
commit
b2a6dfd5c0
@ -172,13 +172,19 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
/// <summary>
|
||||
/// 保存排序
|
||||
/// </summary>
|
||||
/// <param name="MenuDto"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[ActionPermissionFilter(Permission = "system:menu:update")]
|
||||
[HttpPost("ChangeSort")]
|
||||
[HttpGet("ChangeSort")]
|
||||
[Log(Title = "保存排序", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult ChangeSort([FromBody] MenuDto MenuDto)
|
||||
public IActionResult ChangeSort(int id = 0, int value = 0)
|
||||
{
|
||||
MenuDto MenuDto = new()
|
||||
{
|
||||
MenuId = id,
|
||||
orderNum = value
|
||||
};
|
||||
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
||||
|
||||
int result = sysMenuService.ChangeSortMenu(MenuDto);
|
||||
|
||||
@ -63,8 +63,8 @@ export function delMenu(menuId) {
|
||||
export function changeMenuSort(data) {
|
||||
return request({
|
||||
url: '/system/Menu/ChangeSort',
|
||||
method: 'post',
|
||||
data: data
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -425,7 +425,7 @@ export default {
|
||||
*/
|
||||
handleChangeSort(item) {
|
||||
this.editIndex = -1;
|
||||
changeMenuSort({ orderNum: item.orderNum, menuId: item.menuId }).then(
|
||||
changeMenuSort({ value: item.orderNum, id: item.menuId }).then(
|
||||
(response) => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.getList();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user