using SWS.Commons;
using SWS.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SWS.Service
{
public class IOModuleService : HttpService
{
public IOModuleService() : base()
{
}
///
/// 获取所有的信号
///
///
///
///
public async Task> GetPanelTree()
{
var res = await this.GetAsync>($"IOModuleApi/GetPanelTree?projectId={GlobalObject.curProject?.ProjectId}");
if (res.code == 200)
{
return res.data;
}
else
{
}
return null;
}
///
/// 在IO分配界面,从左侧目录树中选择一个“端子排”后,进行查询
///
///
///
/// false时,带上下面的通道和端子。true时,就是返回端子排自己
///
public async Task GetPanelStrip(string StripID, bool OnlySelf = false, bool HaveChannel = true)
{
var res = await this.GetAsync($"IOModuleApi/GetPanelStrip?StripID={StripID}&projId={GlobalObject.curProject?.ProjectId}&OnlySelf={OnlySelf}&HaveChannel={HaveChannel}");
if (res.code == 200)
{
return res.data;
}
else
{
}
return null;
}
///
/// 保存端子排 通道 端子的信息(不管信号和接线关系)。
/// 迁移通道也是这里。
///
///
///
public async Task