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