安全管理,公司级树补充

This commit is contained in:
夏菊 2025-04-10 17:46:57 +08:00
parent d9a4bb09ac
commit f550c9c63c
5 changed files with 371 additions and 286 deletions

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialHazardsReportList.aspx.cs" Inherits="FineUIPro.Web.Customization.CNCEC4.HSSE.Report.SpecialHazardsReportList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@ -10,10 +12,21 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" EnableColumnLines="true"
@ -30,7 +43,8 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:DatePicker ID="txtMonth" runat="server" Label="月份" Width="200px" LabelAlign="Right" DateFormatString="yyyy-MM" DisplayType="Month"
ShowTodayButton="false" AutoPostBack="true" OnTextChanged="btnSearch_Click"></f:DatePicker>
ShowTodayButton="false" AutoPostBack="true" OnTextChanged="btnSearch_Click">
</f:DatePicker>
@ -155,6 +169,8 @@
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1000px" Height="600px">

View File

@ -35,9 +35,22 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
{
if (!IsPostBack)
{
this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
GetButtonPower();
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
@ -46,6 +59,22 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
#region
private string Btn_Menu = "D9B85395-CF56-442D-8BBB-1FFC35785BA8";
/// <summary>
@ -84,9 +113,11 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
public void BindGrid()
{
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
if (string.IsNullOrEmpty(this.ProjectId))
{
DataTable tb = ChecklistData(this.CurrUser.LoginProjectId);
return;
}
DataTable tb = ChecklistData(this.ProjectId);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
@ -94,7 +125,6 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
Grid1.DataSource = table;
Grid1.DataBind();
}
}
protected DataTable ChecklistData(string projectId)
{

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>

View File

@ -42,7 +42,8 @@
LabelAlign="right">
</f:TextBox>
<f:DatePicker ID="txtMonth" runat="server" Width="100px" LabelAlign="Right" DateFormatString="yyyy" DisplayType="year"
ShowTodayButton="false" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"></f:DatePicker>
ShowTodayButton="false" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
</f:DatePicker>
<f:DropDownList runat="server" ID="ddlFileType" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true" Label="">
<f:ListItem Text="请选择收发文类型" Value="" />

View File

@ -660,7 +660,8 @@ namespace FineUIPro.Web.ZHGL.FinalFileManage
}
#endregion
protected void btnMenuUpdate(object sender, EventArgs e) {
protected void btnMenuUpdate(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
@ -678,7 +679,8 @@ namespace FineUIPro.Web.ZHGL.FinalFileManage
{
model.States = "2";
}
else {
else
{
Alert.ShowInTop("当前数据不允许修改状态!", MessageBoxIcon.Warning);
return;
}