项目环境设置增加云眸设置
This commit is contained in:
@@ -27,9 +27,8 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
|
||||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
@@ -60,7 +59,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 操作 Events
|
#region 操作 Events
|
||||||
@@ -165,7 +164,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId== Grid1.SelectedRowID) ;
|
var device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == Grid1.SelectedRowID);
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||||
@@ -201,13 +200,14 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||||
var token = YunMouHelper.getToken();
|
var token = YunMouHelper.getToken();
|
||||||
var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
|
var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
|
||||||
YunMouHelper.setDefence(device.DeviceSerial,"1",token);
|
YunMouHelper.setDefence(device.DeviceSerial, "1", token);
|
||||||
if (string.IsNullOrEmpty(res))
|
if (string.IsNullOrEmpty(res))
|
||||||
{
|
{
|
||||||
Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
|
Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
device.YunMouPermission = "是";
|
device.YunMouPermission = "是";
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
ShowNotify("关联成功", MessageBoxIcon.Success);
|
ShowNotify("关联成功", MessageBoxIcon.Success);
|
||||||
@@ -215,7 +215,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnMenuDeletePermission_Click(object sender, EventArgs e)
|
protected void btnMenuDeletePermission_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
@@ -255,8 +255,8 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -282,18 +282,18 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string menuId = BLL.Const.ProjectDevicesMenuId;
|
string menuId = BLL.Const.ProjectDevicesMenuId;
|
||||||
|
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
{
|
{
|
||||||
this.btnAdd.Hidden = false;
|
this.btnAdd.Hidden = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
{
|
{
|
||||||
this.btnMenuDeletePermission.Hidden= false;
|
this.btnMenuDeletePermission.Hidden = false;
|
||||||
this.btnAdd.Hidden = false;
|
this.btnAdd.Hidden = false;
|
||||||
this.btnMenuEdit.Hidden = false;
|
this.btnMenuEdit.Hidden = false;
|
||||||
this.btnMenuDeviceToYunMou.Hidden = false;
|
this.btnMenuDeviceToYunMou.Hidden = false;
|
||||||
@@ -304,7 +304,7 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
this.btnMenuDelete.Hidden = false;
|
this.btnMenuDelete.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -320,8 +320,8 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,10 @@ using System.Web;
|
|||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using BLL;
|
using BLL;
|
||||||
using BLL.Common;
|
using BLL.Common;
|
||||||
|
using FastReport.Cloud.OAuth;
|
||||||
|
using FineUIPro.Web.DataShow;
|
||||||
|
using Org.BouncyCastle.Crypto;
|
||||||
|
|
||||||
namespace FineUIPro.Web.ProjectData
|
namespace FineUIPro.Web.ProjectData
|
||||||
{
|
{
|
||||||
@@ -39,11 +42,11 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
this.DeviceId = Request.Params["DeviceId"];
|
this.DeviceId = Request.Params["DeviceId"];
|
||||||
if (!string.IsNullOrEmpty(this.DeviceId))
|
if (!string.IsNullOrEmpty(this.DeviceId))
|
||||||
{
|
{
|
||||||
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId==this.DeviceId);
|
Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == this.DeviceId);
|
||||||
if (device != null)
|
if (device != null)
|
||||||
{
|
{
|
||||||
this.txtDeviceName.Text = device.DeviceName;
|
this.txtDeviceName.Text = device.DeviceName;
|
||||||
@@ -59,8 +62,8 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
{
|
{
|
||||||
this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
|
this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,15 +77,15 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Model.Project_Devices device = new Model.Project_Devices
|
Model.Project_Devices device = new Model.Project_Devices
|
||||||
{
|
{
|
||||||
ProjectId = this.CurrUser.LoginProjectId,
|
ProjectId = this.CurrUser.LoginProjectId,
|
||||||
DeviceName = this.txtDeviceName.Text.Trim(),
|
DeviceName = this.txtDeviceName.Text.Trim(),
|
||||||
DeviceSerial = this.txtDeviceSerial.Text.Trim(),
|
DeviceSerial = this.txtDeviceSerial.Text.Trim(),
|
||||||
Address = txtAddress.Text.Trim(),
|
Address = txtAddress.Text.Trim(),
|
||||||
ValidateCode=txtValidateCode.Text.Trim(),
|
ValidateCode = txtValidateCode.Text.Trim(),
|
||||||
CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
|
CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
|
||||||
};
|
};
|
||||||
if (this.drpInOut.SelectedValue != BLL.Const._Null)
|
if (this.drpInOut.SelectedValue != BLL.Const._Null)
|
||||||
@@ -120,9 +123,9 @@ namespace FineUIPro.Web.ProjectData
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,12 +30,7 @@
|
|||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
</Rows>
|
</Rows>
|
||||||
</f:Form>
|
</f:Form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Items>
|
</Items>
|
||||||
</f:GroupPanel>
|
</f:GroupPanel>
|
||||||
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
|
<f:GroupPanel ID="GroupPanel2" Layout="Anchor" Title="焊接环境设置" runat="server" >
|
||||||
|
|||||||
@@ -51,6 +51,35 @@ namespace FineUIPro.Web.common.ProjectSet
|
|||||||
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
|
ShowNotify("请选择项目!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#region 云眸
|
||||||
|
///通用
|
||||||
|
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||||
|
if (getProject != null)
|
||||||
|
{
|
||||||
|
getProject.IsYunMou = this.ckbIsYunMou.Checked;
|
||||||
|
if (this.ckbIsYunMou.Checked)
|
||||||
|
{
|
||||||
|
var token = YunMouHelper.getToken();
|
||||||
|
string data;
|
||||||
|
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||||
|
YunMouHelper.addDevicesGroups(getProject.ProjectName, data, token);
|
||||||
|
var groupId = YunMouHelper.addPermissionGroups(getProject.ProjectName, token);
|
||||||
|
if (!string.IsNullOrEmpty(groupId))
|
||||||
|
{
|
||||||
|
getProject.YunMouGroupId = groupId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var token = YunMouHelper.getToken();
|
||||||
|
string data;
|
||||||
|
data = Regex.Replace(getProject.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
|
||||||
|
YunMouHelper.deleteDevicesGroups(data, token);//删除设备分组,如果有子节点,可以不删除
|
||||||
|
|
||||||
|
}
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region 焊接
|
#region 焊接
|
||||||
// 焊接
|
// 焊接
|
||||||
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
|
Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId);
|
||||||
@@ -339,7 +368,11 @@ namespace FineUIPro.Web.common.ProjectSet
|
|||||||
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
|
SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem);
|
||||||
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
|
if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2";
|
||||||
}
|
}
|
||||||
|
var getProject = ProjectService.GetProjectByProjectId(projectId);
|
||||||
|
if (getProject != null && getProject.IsYunMou == true)
|
||||||
|
{
|
||||||
|
this.ckbIsYunMou.Checked = true;
|
||||||
|
}
|
||||||
//颜色模型设置
|
//颜色模型设置
|
||||||
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
var m1 = BLL.Project_SysSetService.GetSysSetBySetName("管线未完成", this.CurrUser.LoginProjectId);
|
||||||
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
|
if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user