BasicLayout.razor 3.56 KB
@namespace DataAcquisition
@inherits LayoutComponentBase

<AntDesign.ProLayout.BasicLayout Logo="@("/favicon.ico")"
                                 MenuData="_menuData">
    <RightContentRender>
    </RightContentRender>
    <ChildContent>
        @Body
    </ChildContent>
    <FooterRender>
        <FooterView Copyright="2024 长沙华恒机器人系统有限公司" Links="Links"></FooterView>
    </FooterRender>
</AntDesign.ProLayout.BasicLayout>
<SettingDrawer />

@code
{
    private readonly MenuDataItem[] _menuData =
    {
        new MenuDataItem
        {
            Path = "/",
            Name = "日志",
            Key = "logPage",
            Icon = "bell",
        },
        new MenuDataItem
        {
            Path = "/Basic",
            Name = "基础数据",
            Key = "basic",
            Icon = "database",
            Children = new MenuDataItem[]
            {
                 new MenuDataItem
                {
                    Path = "/Basic/Communication",
                    Name = "通讯配置",
                    Key = "Communication",
                    Icon = "api",
                },
                new MenuDataItem
                {
                    Path = "/Basic/Equipment",
                    Name = "设备信息",
                    Key = "Equipment",
                    Icon = "mac-command",
                },
                // new MenuDataItem
                // {
                //     Path = "/Basic/WorkpieceModel",
                //     Name = "工件型号配置",
                //     Key = "WorkpieceModel",
                //     Icon = "mac-command",
                // },
            }
        },
        new MenuDataItem
        {
            Path = "/DataAnalysis",
            Name = "数据统计",
            Key = "dataAnalysis",
            Icon = "mac-command",
            Children = new MenuDataItem[]
            {
                new MenuDataItem
                {
                    Path = "/DataAnalysis/WorkpieceProduction",
                    Name = "加工记录",
                    Key = "WorkpieceProduction",
                    Icon = "mac-command"
                },
                new MenuDataItem
                {
                    Path = "DataAnalysis/Report",
                    Name = "报表",
                    Key = "Report",
                    Icon = "schedule"
                },
                new MenuDataItem
                {
                    Path = "DataAnalysis/EquipmentPropertyRecord",
                    Name = "状态日志",
                    Key = "equipmentPropertyRecord",
                    Icon = "schedule"
                },
            }
        },
        new MenuDataItem
        {
            Path = "/EquipmentDataQueuePage",
            Name = "待推送数据",
            Key = "EquipmentDataQueuePage",
            Icon = "mac-command",
        },
    };

    public LinkItem[] Links { get; set; } =
    {
    // new LinkItem
    // {
    //     Key = "Ant Design Blazor",
    //     Title = "Ant Design Blazor",
    //     Href = "https://antblazor.com",
    //     BlankTarget = true,
    // },
    // new LinkItem
    // {
    //     Key = "github",
    //     Title = (RenderFragment)(@<Icon Type="github" />),
    //     Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
    //     BlankTarget = true,
    // },
    // new LinkItem
    // {
    //     Key = "Blazor",
    //     Title = "Blazor",
    //     Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
    //     BlankTarget = true,
    // }
    };
}