Files
HTCloud/HT.Cloud.Web/Areas/SystemManage/Controllers/QuickModuleController.cs
2023-03-03 16:07:50 +08:00

44 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*******************************************************************************
* Copyright © 2020 HT.Cloud.Framework 版权所有
* Author: HT.Cloud
* Description: WaterCloud快速开发平台
* Website
*********************************************************************************/
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using HT.Cloud.Code;
using HT.Cloud.Service.SystemManage;
namespace HT.Cloud.Web.Areas.SystemManage.Controllers
{
[Area("SystemManage")]
public class QuickModuleController : Controller
{
public QuickModuleService _moduleService { get; set; }
[HttpGet]
public virtual ActionResult Index()
{
return View();
}
[HttpGet]
[HandlerAjaxOnly]
public async Task<ActionResult> GetTransferJson()
{
var userId = _moduleService.currentuser.UserId;
var data = await _moduleService.GetTransferList(userId);
return Content(data.ToJson());
}
[HttpPost]
[HandlerAjaxOnly]
public async Task<ActionResult> SubmitForm(string permissionIds)
{
string[] temp = string.IsNullOrEmpty(permissionIds) ? null : permissionIds.Split(',');
await _moduleService.SubmitForm(temp);
return Content(new AlwaysResult { state = ResultType.success.ToString(), message = "操作成功" }.ToJson());
}
}
}