/******************************************************************************* * 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 GetTransferJson() { var userId = _moduleService.currentuser.UserId; var data = await _moduleService.GetTransferList(userId); return Content(data.ToJson()); } [HttpPost] [HandlerAjaxOnly] public async Task 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()); } } }