更新 评测前bug修复
This commit is contained in:
@ -58,7 +58,22 @@ namespace HT.Cloud.Web.Areas.DevicesManage.Controllers
|
||||
var data = await _metaTagService.GetGroupVarTable(groupIId);
|
||||
return Content(data);
|
||||
}
|
||||
[HttpPost]
|
||||
[HttpPost]
|
||||
public async Task<ActionResult> GetGroupVarTreeTable(string[] groupId)
|
||||
{
|
||||
int groupIId = 0;
|
||||
try
|
||||
{
|
||||
groupIId = int.Parse(Regex.Replace(groupId[0], "[a-zA-Z]", "", RegexOptions.IgnoreCase));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
var data = await _metaTagService.GetGroupVarTreeTable(groupIId);
|
||||
return Content(data);
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<ActionResult> SaveArgument(string driverId, string name, string value)
|
||||
{
|
||||
var data = "";
|
||||
|
@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using HT.Cloud.Code;
|
||||
using HT.Cloud.Domain.DevicesManage;
|
||||
using HT.Cloud.Service;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using HT.Cloud.Service.DevicesManage;
|
||||
|
||||
namespace HT.Cloud.Web.Areas.DevicesManage.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 创 建:cdl
|
||||
/// 日 期:2023-03-16 09:39
|
||||
/// 描 述:设备报警信息控制器类
|
||||
/// </summary>
|
||||
[Area("DevicesManage")]
|
||||
public class MetaTagScopeController : BaseController
|
||||
{
|
||||
public MetaTagScopeService _service {get;set;}
|
||||
|
||||
#region 获取数据
|
||||
[HandlerAjaxOnly]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public async Task<ActionResult> GetGridJson(SoulPage<MetaTagScopeEntity> pagination, string keyword)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pagination.field))
|
||||
{
|
||||
pagination.field = "TagID";
|
||||
pagination.order = "asc";
|
||||
}
|
||||
var data = await _service.GetLookList(pagination,keyword);
|
||||
return Content(pagination.setData(data).ToJson());
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HandlerAjaxOnly]
|
||||
public async Task<ActionResult> GetListJson(string keyword)
|
||||
{
|
||||
var data = await _service.GetList(keyword);
|
||||
return Content(data.ToJson());
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HandlerAjaxOnly]
|
||||
public async Task<ActionResult> GetFormJson(string keyValue)
|
||||
{
|
||||
var data = await _service.GetLookForm(keyValue);
|
||||
return Content(data.ToJson());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交数据
|
||||
[HttpPost]
|
||||
[HandlerAjaxOnly]
|
||||
public async Task<ActionResult> SubmitForm(MetaTagScopeEntity entity, string keyValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _service.SubmitForm(entity, keyValue);
|
||||
return await Success("操作成功。", "", keyValue);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return await Error(ex.Message, "", keyValue);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[HandlerAjaxOnly]
|
||||
[HandlerAuthorize]
|
||||
public async Task<ActionResult> DeleteForm(string keyValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _service.DeleteForm(keyValue);
|
||||
return await Success("操作成功。", "", keyValue, DbLogType.Delete);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return await Error(ex.Message, "", keyValue, DbLogType.Delete);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user