@page  "/Report/StaticsTrend"

<AuthorizeView>
    <Authorized>
        <PageContainer>
            <Breadcrumb>
                <Breadcrumb>
                    <BreadcrumbItem>
                        <a href="/Home"><Icon Type="home"></Icon></a>
                    </BreadcrumbItem>
                    <BreadcrumbItem>
                        <span>申诉单项统计</span>
                    </BreadcrumbItem>
                </Breadcrumb>
            </Breadcrumb>
            <Content>
                <Space>
                    <SpaceItem>统计类型：</SpaceItem>
                    <SpaceItem>
                        <Select DataSource="@Types"
                                @bind-Value="@iType"
                                LabelName="@nameof(TJType.Name)"
                                ValueName="@nameof(TJType.value)"
                                Placeholder="请选择统计类型">
                        </Select>
                    </SpaceItem>
                    <SpaceItem><Button Icon="search" Loading="_noIconLoading" OnClick="OnButtonClick">开始统计</Button></SpaceItem>
                </Space>
            </Content>
            <ChildContent>
                <div>
                    @if (Datas == null)
                    {

                    }
                    else
                    {
                        <div>
                            <center>
                                <Blazor.ECharts.Components.ELine Option="option" Class="chart-normal" EventTypes="EventTypes" OnEventCallback="OnEchartsEvent" @ref="chart"/>
                                @{
                                    System.Data.DataTable tableData = Datas.GetTableData();

                                    <table width="80%" border="1">
                                        <thead>
                                        <th>序号</th>

                                        @foreach (System.Data.DataColumn column in tableData.Columns)
                                        {
                                            <th>@column.ColumnName</th>
                                        }

                                        </thead>
                                        <tbody>
                                            @{
                                                int iIndex = 1;
                                                foreach (System.Data.DataRow row in tableData.Rows)
                                                {
                                                    <tr>
                                                        <td style="text-align: center;">@iIndex</td>

                                                        @foreach (System.Data.DataColumn column in tableData.Columns)
                                                        {
                                                            <td>@row[column.ColumnName].ToString()</td>
                                                        }
                                                    </tr>
                                                    iIndex++;
                                                }
                                            }
                                        </tbody>
                                    </table>
                                }



                            </center>
                        </div>
                    }
                </div>
            </ChildContent>
        </PageContainer>
    </Authorized>
    <NotAuthorized>
        <div><h1>您没有授权使用此功能</h1></div>
    </NotAuthorized>
</AuthorizeView>


