修改移交

This commit is contained in:
2024-08-09 10:48:15 +08:00
parent cc639f4cab
commit 8c3bd0fe80
65 changed files with 1335 additions and 471 deletions
@@ -50,7 +50,7 @@
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="600px" ShowBorder="true"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server" AutoPostBack="true" OnTabIndexChanged="TabStrip1_TabIndexChanged">
<Tabs>
<f:Tab ID="Tab1" Title="图形" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
TitleToolTip="图形">
@@ -71,6 +71,109 @@
</f:ContentPanel>
</Items>
</f:Tab>
<f:Tab ID="Tab3" Title="按专业统计" BodyPadding="5px" Layout="VBox" IconFont="ListAlt" runat="server">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" DataKeyNames="Disc" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Disc" AllowSorting="true" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true" SummaryPosition="Flow">
<Columns>
<f:BoundField DataField="Disc" ColumnID="Disc" HeaderText="专业" ExpandUnusedSpace="true" MinWidth="150px" />
<f:GroupField HeaderText="类别" TextAlign="Center" MinWidth="600px">
<Columns>
<f:RenderField Width="150px" ColumnID="Cat_A_Count" DataField="Cat_A_Count" HeaderText="A" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_B_Count" DataField="Cat_B_Count" HeaderText="B" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_C_Count" DataField="Cat_C_Count" HeaderText="C" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_D_Count" DataField="Cat_D_Count" HeaderText="D" TextAlign="Center" FieldType="Double" />
</Columns>
</f:GroupField>
</Columns>
<PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="Tab4" Title="按单位统计" BodyPadding="5px" Layout="VBox" IconFont="ListAlt" runat="server">
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" DataKeyNames="Action_By" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Action_By" AllowSorting="true" OnSort="Grid2_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid2_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true" EnableSummary="true" SummaryPosition="Flow">
<Columns>
<f:BoundField DataField="Action_By" ColumnID="Action_By" HeaderText="单位" ExpandUnusedSpace="true" MinWidth="150px" />
<f:RenderField Width="150px" ColumnID="Cat_All_Count" DataField="Cat_All_Count" HeaderText="汇总" TextAlign="Center" FieldType="Double" />
<f:GroupField HeaderText="类别" TextAlign="Center" MinWidth="600px">
<Columns>
<f:RenderField Width="150px" ColumnID="Cat_A_Count" DataField="Cat_A_Count" HeaderText="A" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_B_Count" DataField="Cat_B_Count" HeaderText="B" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_C_Count" DataField="Cat_C_Count" HeaderText="C" TextAlign="Center" FieldType="Double" />
<f:RenderField Width="150px" ColumnID="Cat_D_Count" DataField="Cat_D_Count" HeaderText="D" TextAlign="Center" FieldType="Double" />
</Columns>
</f:GroupField>
</Columns>
<PageItems>
<f:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize2" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize2_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="Tab5" Title="尾项进度跟踪表" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
TitleToolTip="图形">
<Items>
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="System_No" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="System_No" AllowSorting="true" OnSort="Grid3_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid3_PageIndexChange"
EnableRowDoubleClickEvent="true" EnableTextSelection="true">
<Columns>
<f:BoundField Width="180px" TextAlign="Center" ColumnID="System_No" DataField="System_No" HeaderText="System No." />
<f:RenderField Width="180px" TextAlign="Center" ColumnID="SystemNoCount" DataField="SystemNoCount" HeaderText="尾项数量" FieldType="Double" />
<f:RenderField Width="180px" TextAlign="Center" ColumnID="ActualDateCount" DataField="ActualDateCount" HeaderText="已完成数量" FieldType="Double"/>
<f:RenderField Width="180px" TextAlign="Center" ColumnID="ClearedByCount" DataField="ClearedByCount" HeaderText="Cleared(PIC)" FieldType="Double"/>
<f:RenderField Width="180px" TextAlign="Center" ColumnID="ConfirmedByCount" DataField="ConfirmedByCount" HeaderText="Confirmed(WUH)" FieldType="Double"/>
<f:RenderField Width="180px" TextAlign="Center" ColumnID="VerifiedByCount" DataField="VerifiedByCount" HeaderText="Verified(BASF)" FieldType="Double"/>
</Columns>
<PageItems>
<f:ToolbarText ID="ToolbarText3" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize3" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize3_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
@@ -2,9 +2,12 @@
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Web.Services.Description;
using BLL;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
namespace FineUIPro.Web.Transfer.Chart
@@ -23,7 +26,7 @@ namespace FineUIPro.Web.Transfer.Chart
ddlSystemNo.Items.Insert(indexRow, new FineUIPro.ListItem(t.System_No, t.System_No));
indexRow++;
}
AnalyseData();
}
}
@@ -144,6 +147,8 @@ namespace FineUIPro.Web.Transfer.Chart
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
this.AnalyseData();
BindGrid1();
BindGrid2();
}
/// <summary>
@@ -174,6 +179,295 @@ namespace FineUIPro.Web.Transfer.Chart
protected void ddlSystemNo_SelectedIndexChanged(object sender, EventArgs e)
{
this.AnalyseData();
BindGrid1();
BindGrid2();
}
#region
#region
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid1();
}
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid1();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid1();
}
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e)
{
Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue);
BindGrid2();
}
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid2();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid2_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid2.SortDirection = e.SortDirection;
Grid2.SortField = e.SortField;
BindGrid2();
}
#endregion
/// <summary>
/// 查询绑定数据
/// </summary>
public void BindGrid1()
{
List<SqlParameter> listStr = new List<SqlParameter>();
string _systemNo = string.Empty;
_systemNo = ddlSystemNo.SelectedValue;
StringBuilder strSql = new StringBuilder("");
strSql.AppendLine(" IF OBJECT_ID('tempdb..#AllPunchlistFromSortTemp1') IS NOT NULL drop table #AllPunchlistFromSortTemp1; ");
strSql.AppendLine(" IF OBJECT_ID('tempdb..#PunchlistFromSortTemp1') IS NOT NULL drop table #PunchlistFromSortTemp1; ");
strSql.AppendLine(" select * INTO #AllPunchlistFromSortTemp1 from Transfer_PunchlistFrom(NOLOCK) where ProjectId=@ProjectId ");
if (!string.IsNullOrWhiteSpace(_systemNo))
{
strSql.AppendLine(" AND System_No=@System_No ");
listStr.Add(new SqlParameter("@System_No", _systemNo));
}
strSql.AppendLine(" select Disc,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp1 from #AllPunchlistFromSortTemp1 Group by Disc; ");
strSql.AppendLine(" update a set a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')) ");
strSql.AppendLine(",a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) ");
strSql.AppendLine(",a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) ");
strSql.AppendLine(",a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp1 b where a.Disc=b.Disc AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) ");
strSql.AppendLine("from #PunchlistFromSortTemp1 a;");
strSql.AppendLine("select * from #PunchlistFromSortTemp1 ");
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
strSql.AppendLine(" order by Disc ");
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql.ToString(), parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
//合计
int cat_A_Count = 0;
int cat_B_Count = 0;
int cat_C_Count = 0;
int cat_D_Count = 0;
foreach (DataRow row in tb.Rows)
{
cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]);
cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]);
cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]);
cat_D_Count += Convert.ToInt32(row["Cat_D_Count"]);
}
JObject summary = new JObject();
summary.Add("Disc", "合计");
summary.Add("Cat_A_Count", cat_A_Count.ToString());
summary.Add("Cat_B_Count", cat_B_Count.ToString());
summary.Add("Cat_C_Count", cat_C_Count.ToString());
summary.Add("Cat_D_Count", cat_D_Count.ToString());
Grid1.SummaryData = summary;
}
/// <summary>
/// 查询绑定数据
/// </summary>
public void BindGrid2()
{
List<SqlParameter> listStr = new List<SqlParameter>();
string _systemNo = string.Empty;
_systemNo = ddlSystemNo.SelectedValue;
StringBuilder strSql = new StringBuilder("");
strSql.AppendLine(" IF OBJECT_ID('tempdb..#AllPunchlistFromSortTemp2') IS NOT NULL drop table #AllPunchlistFromSortTemp2; ");
strSql.AppendLine(" IF OBJECT_ID('tempdb..#PunchlistFromSortTemp2') IS NOT NULL drop table #PunchlistFromSortTemp2; ");
strSql.AppendLine(" select * INTO #AllPunchlistFromSortTemp2 from Transfer_PunchlistFrom(NOLOCK) where ProjectId=@ProjectId ");
if (!string.IsNullOrWhiteSpace(_systemNo))
{
strSql.AppendLine(" AND System_No=@System_No ");
listStr.Add(new SqlParameter("@System_No", _systemNo));
}
strSql.AppendLine(" select Action_By,cast(0 as decimal(18,2)) Cat_All_Count,cast(0 as decimal(18,2)) Cat_A_Count,cast(0 as decimal(18,2)) Cat_B_Count,cast(0 as decimal(18,2)) Cat_C_Count,cast(0 as decimal(18,2)) Cat_D_Count INTO #PunchlistFromSortTemp2 from #AllPunchlistFromSortTemp2 Group by Action_By; ");
strSql.AppendLine(" update a set a.Cat_A_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='A' or isnull(b.Cat,'')='a')) ");
strSql.AppendLine(",a.Cat_B_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='B' or isnull(b.Cat,'')='b')) ");
strSql.AppendLine(",a.Cat_C_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='C' or isnull(b.Cat,'')='c')) ");
strSql.AppendLine(",a.Cat_D_Count=(select count(1) from #AllPunchlistFromSortTemp2 b where a.Action_By=b.Action_By AND (isnull(b.Cat,'')='D' or isnull(b.Cat,'')='d')) ");
strSql.AppendLine("from #PunchlistFromSortTemp2 a;");
strSql.AppendLine(" update #PunchlistFromSortTemp2 set Cat_All_Count=Cat_A_Count+Cat_B_Count+Cat_C_Count+Cat_D_Count; ");
strSql.AppendLine("select * from #PunchlistFromSortTemp2 ");
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
strSql.AppendLine(" order by Action_By ");
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql.ToString(), parameter);
Grid2.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid2.DataSource = table;
Grid2.DataBind();
//合计
int cat_A_Count = 0;
int cat_B_Count = 0;
int cat_C_Count = 0;
int cat_D_Count = 0;
int cat_All_Count = 0;
foreach (DataRow row in tb.Rows)
{
cat_All_Count += Convert.ToInt32(row["Cat_All_Count"]);
cat_A_Count += Convert.ToInt32(row["Cat_A_Count"]);
cat_B_Count += Convert.ToInt32(row["Cat_B_Count"]);
cat_C_Count += Convert.ToInt32(row["Cat_C_Count"]);
cat_D_Count += Convert.ToInt32(row["Cat_D_Count"]);
}
JObject summary = new JObject();
summary.Add("Action_By", "合计");
summary.Add("Cat_All_Count", cat_All_Count.ToString());
summary.Add("Cat_A_Count", cat_A_Count.ToString());
summary.Add("Cat_B_Count", cat_B_Count.ToString());
summary.Add("Cat_C_Count", cat_C_Count.ToString());
summary.Add("Cat_D_Count", cat_D_Count.ToString());
Grid2.SummaryData = summary;
}
protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
{
if (TabStrip1.ActiveTabIndex == 2)
{
ddlSystemNo.Hidden = false;
ddlDateType.Hidden = true;
drpChartType.Hidden = true;
BindGrid1();
}
else if (TabStrip1.ActiveTabIndex == 3)
{
ddlSystemNo.Hidden = false;
ddlDateType.Hidden = true;
drpChartType.Hidden = true;
BindGrid2();
}
else if (TabStrip1.ActiveTabIndex == 4)
{
ddlDateType.Hidden = true;
drpChartType.Hidden = true;
ddlSystemNo.Hidden = true;
BindGrid3();
}
else {
this.AnalyseData();
ddlSystemNo.Hidden = false;
ddlDateType.Hidden = false;
drpChartType.Hidden = false;
}
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid3()
{
StringBuilder strSql = new StringBuilder("");
strSql.AppendLine("IF OBJECT_ID('tempdb..#AllPunchlistFromProgressTemp') IS NOT NULL drop table #AllPunchlistFromProgressTemp; ");
strSql.AppendLine("IF OBJECT_ID('tempdb..#PunchlistFromProgressTemp') IS NOT NULL drop table #PunchlistFromProgressTemp; ");
strSql.AppendLine(" select System_No,Actual_Date,Cleared_By,Confirmed_By,Verified_By,ProjectId ");
strSql.AppendLine(" INTO #AllPunchlistFromProgressTemp from Transfer_PunchlistFrom where ProjectId = @ProjectId ");
strSql.AppendLine(" select System_No,count(System_No) SystemNoCount,cast(0 as decimal(18,2)) ActualDateCount ");
strSql.AppendLine(" ,cast(0 as decimal(18,2)) ClearedByCount,cast(0 as decimal(18,2)) ConfirmedByCount,cast(0 as decimal(18,2)) VerifiedByCount ");
strSql.AppendLine(" INTO #PunchlistFromProgressTemp from #AllPunchlistFromProgressTemp where ProjectId = @ProjectId group by System_No ");
strSql.AppendLine(" update a set a.ActualDateCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Actual_Date,'')<>'') ");
strSql.AppendLine(" ,a.ClearedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Cleared_By,'')<>'') ");
strSql.AppendLine(" ,a.ConfirmedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Confirmed_By,'')<>'') ");
strSql.AppendLine(" ,a.VerifiedByCount=(select count(1) from #AllPunchlistFromProgressTemp b where a.System_No=b.System_No AND isnull(b.Verified_By,'')<>'') ");
strSql.AppendLine(" from #PunchlistFromProgressTemp a ");
strSql.AppendLine(" select * from #PunchlistFromProgressTemp ");
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
strSql.AppendLine(" order by System_No ");
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql.ToString(), parameter);
Grid3.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid3.DataSource = table;
Grid3.DataBind();
}
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize3_SelectedIndexChanged(object sender, EventArgs e)
{
Grid3.PageSize = Convert.ToInt32(ddlPageSize3.SelectedValue);
BindGrid3();
}
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid3_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid3();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid3_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid3.SortDirection = e.SortDirection;
Grid3.SortField = e.SortField;
BindGrid3();
}
#endregion
}
}
@@ -157,5 +157,113 @@ namespace FineUIPro.Web.Transfer.Chart
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::Web.Controls.ChartControl ChartAccidentTime1;
/// <summary>
/// Tab3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab3;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Tab4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab4;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// ToolbarText2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText2;
/// <summary>
/// ddlPageSize2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize2;
/// <summary>
/// Tab5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab5;
/// <summary>
/// Grid3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid3;
/// <summary>
/// ToolbarText3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText3;
/// <summary>
/// ddlPageSize3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize3;
}
}
@@ -30,7 +30,7 @@
</f:Form>
</Items>
</f:Panel>
<div id='two' style="width: 100%; height: 500px;"></div>
<div id='two' style="width: 95%; height: 600px;"></div>
<%-- <f:Panel ID="Panel4" CssClass="blockpanel" runat="server" EnableCollapse="false"
BodyPadding="10px" ShowBorder="true" ShowHeader="false" Hidden="true">
@@ -60,130 +60,6 @@
<script type="text/javascript" src="../../res/index/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="../../res/index/js/echarts.min.js"></script>
<script type="text/javascript">
function category_Two(id, xArr, data, num) {
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '移交统计图表',
textStyle: {
color: '#000',
fontWeight: 'normal',
fontSize: 12
},
show: true
},
tooltip: {},
legend: {
left: '15%',
show: true,
textStyle: {//图例文字的样式
color: '#000',
fontSize: 10,
}
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#000',
}
},
axisLabel: {
margin: 20,
show: true,
textStyle: {
color: '#000'
},
interval: 0,
formatter: function (value) {
var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于maxLength,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN - 1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
},
type: 'category',
data: xArr,
boundaryGap: [0, 0.01],
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#000'
}
},
axisLabel: {
show: true,
textStyle: {
color: '#000'
}
},
},
series: data,
grid: {
top: '20%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
option.dataZoom = [//给x轴设置滚动条
{
start: 0,//默认为0
type: 'slider',
show: true,
startValue: 0,
endValue: 9,
height: 6,
bottom: '6%',
zoomLock: true,
moveOnMouseWheel: true,
brushSelect: true,
showDetail: false,
borderColor: "rgba(43,48,67,0.8)",
fillerColor: '#269cdb',//滑动块的颜色
backgroundColor: '#33384b',//两边未选中的滑动条区域的颜色
}]
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = [<%=AllSystemNo%>]
//var xArr = two2.categories
var data = [
@@ -242,5 +118,107 @@
itemStyle: { normal: { color: '#EB3324' } }
}
]
category_Two('two', xArr, data, 20)
//category_Two('two', xArr, data, 20)
category_SystemChart('two', xArr, data, 20);
function category_SystemChart(id, xArr, data, num){
var myChart = echarts.init(document.getElementById(id))
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value'
},
yAxis: {
type: 'category',
data: xArr
},
series: [
{
name: '完成数量',
type: 'bar',
stack: '总量',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [<%=completed%>],
itemStyle: { normal: { color: '#84CF75' } }
},
{
name: '进行中数量',
type: 'bar',
stack: '总量',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [<%=Inprogress%>],
itemStyle: { normal: { color: '#3282F6' } }
},
{
name: '未完成数量',
type: 'bar',
stack: '总量',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [<%=NotStart%>],
itemStyle: { normal: { color: '#EB3324' } }
}
],
};
option.dataZoom = [{
type: "inside",
startValue: 0,
endValue: 10,
minValueSpan: 10,
maxValueSpan: 10,
yAxisIndex: [0],
zoomOnMouseWheel: false, // 关闭滚轮缩放
moveOnMouseWheel: true, // 开启滚轮平移
moveOnMouseMove: true // 鼠标移动能触发数据窗口平移
},
{
type: 'slider',
realtime: true,
startValue: 0,
endValue: 10000,
width: '8',
yAxisIndex: [0], // 控制y轴滚动
fillerColor: "rgba(154, 181, 215, 1)", // 滚动条颜色
borderColor: "rgba(17, 100, 210, 0.12)",
backgroundColor: '#cfcfcf',//两边未选中的滑动条区域的颜色
handleSize: 0, // 两边手柄尺寸
showDataShadow: false,//是否显示数据阴影 默认auto
showDetail: false, // 拖拽时是否展示滚动条两侧的文字
top: 'middle',
// 滚动条显示位置
height: "80%",
// 距离右边
right: 3,
}]
myChart.setOption(option);
}
</script>