提交代码

This commit is contained in:
2024-09-24 16:39:45 +08:00
parent a010e5e2a2
commit cc858103db
7 changed files with 37 additions and 77 deletions
@@ -41,7 +41,7 @@ namespace FineUIPro.Web.HSSE.Hazard
{ {
if (projectUnit.UnitType == BLL.Const.ProjectUnitType_1 || projectUnit.UnitType == BLL.Const.ProjectUnitType_3 || projectUnit.UnitType == BLL.Const.ProjectUnitType_4) if (projectUnit.UnitType == BLL.Const.ProjectUnitType_1 || projectUnit.UnitType == BLL.Const.ProjectUnitType_3 || projectUnit.UnitType == BLL.Const.ProjectUnitType_4)
{ {
var ids = Funs.DB.HSSE_ConstructionRisk.Select(x => x.UnitId).Distinct().ToList(); var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).Select(x => x.UnitId).Distinct().ToList();
units = (from x in Funs.DB.Base_Unit units = (from x in Funs.DB.Base_Unit
where ids.Contains(x.UnitId) where ids.Contains(x.UnitId)
select x).OrderBy(x => x.UnitCode).ToList(); select x).OrderBy(x => x.UnitCode).ToList();
@@ -56,7 +56,7 @@ namespace FineUIPro.Web.HSSE.Hazard
} }
else if (user.UnitId == Const.UnitId_SEDIN || user.PersonId == Const.hfnbdId) else if (user.UnitId == Const.UnitId_SEDIN || user.PersonId == Const.hfnbdId)
{ {
var ids = Funs.DB.HSSE_ConstructionRisk.Select(x => x.UnitId).Distinct().ToList(); var ids = Funs.DB.HSSE_ConstructionRisk.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).Select(x => x.UnitId).Distinct().ToList();
units = (from x in Funs.DB.Base_Unit units = (from x in Funs.DB.Base_Unit
where ids.Contains(x.UnitId) where ids.Contains(x.UnitId)
select x).OrderBy(x => x.UnitCode).ToList(); select x).OrderBy(x => x.UnitCode).ToList();
@@ -108,7 +108,9 @@
var z = tileCoord[0]; var z = tileCoord[0];
var x = tileCoord[1]; var x = tileCoord[1];
var y = tileCoord[2]; var y = tileCoord[2];
return '../../File/Map/SD1-PC-2023-001/tiles/' + z + '/tile-' + x + '_' + y + '.png'; var projectCode = '<%=ProjectCode%>'
return '../../File/Map/' + projectCode + '/tiles/' + z + '/tile-' + x + '_' + y + '.png';
//return '../../File/Map/SD1-PC-2023-001/tiles/' + z + '/tile-' + x + '_' + y + '.png';
} }
}); });
@@ -18,22 +18,12 @@ namespace FineUIPro.Web.HSSE.Hazard
ViewState["ConstructionRiskId"] = value; ViewState["ConstructionRiskId"] = value;
} }
} }
public string ProjectCode public string ProjectCode = "";
{
get
{
return (string)ViewState["ProjectCode"];
}
set
{
ViewState["ProjectCode"] = value;
}
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId== ProjectCode); ProjectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId);
ConstructionRiskId = Request.Params["ConstructionRiskId"] ; ConstructionRiskId = Request.Params["ConstructionRiskId"] ;
if (!string.IsNullOrEmpty(Request.Params["type"])) if (!string.IsNullOrEmpty(Request.Params["type"]))
{ {
@@ -109,7 +109,9 @@
var z = tileCoord[0]; var z = tileCoord[0];
var x = tileCoord[1]; var x = tileCoord[1];
var y = tileCoord[2]; var y = tileCoord[2];
return '../../File/Map/SD1-PC-2023-001/tiles/' + z + '/tile-' + x + '_' + y + '.png'; var projectCode = '<%=ProjectCode%>'
return '../../File/Map/' + projectCode + '/tiles/' + z + '/tile-' + x + '_' + y + '.png';
//return '../../File/Map/SD1-PC-2023-001/tiles/' + z + '/tile-' + x + '_' + y + '.png';
} }
}); });
@@ -17,6 +17,7 @@ namespace FineUIPro.Web.ProjectData
ViewState["MainItemId"] = value; ViewState["MainItemId"] = value;
} }
} }
public string ProjectCode = "";
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
@@ -28,6 +29,7 @@ namespace FineUIPro.Web.ProjectData
txtLoc.Text = MainItem.Coordinate; txtLoc.Text = MainItem.Coordinate;
this.CurrUser.IdcardAddress = txtLoc.Text.Trim(); this.CurrUser.IdcardAddress = txtLoc.Text.Trim();
} }
ProjectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId);
} }
} }
@@ -74,13 +74,6 @@
<f:HiddenField runat="server" ID="hdMainItemAndDesignProfessionalIds"></f:HiddenField> <f:HiddenField runat="server" ID="hdMainItemAndDesignProfessionalIds"></f:HiddenField>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow ColumnWidths="95% 4% 1%">
<Items>
<f:Label runat="server" ID="Label1" Label="位置选择" LabelWidth="150px"></f:Label>
<f:Button runat="server" ID="Button1" OnClick="btnMap_Click" Text="选择"></f:Button>
<f:HiddenField runat="server" ID="HiddenField1"></f:HiddenField>
</Items>
</f:FormRow>
</Rows> </Rows>
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server"> <f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
+2 -31
View File
@@ -7,12 +7,10 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.ProjectData namespace FineUIPro.Web.ProjectData {
{
public partial class UnitWorkEdit public partial class UnitWorkEdit {
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -149,33 +147,6 @@ namespace FineUIPro.Web.ProjectData
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hdMainItemAndDesignProfessionalIds; protected global::FineUIPro.HiddenField hdMainItemAndDesignProfessionalIds;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary>
/// HiddenField1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField HiddenField1;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>