@namespace wispro.sp.web
@inherits LayoutComponentBase
@using Microsoft.AspNetCore.Components.Authorization

<CascadingAuthenticationState>
    <AuthorizeView>
        <Authorized>
            
            <AntDesign.ProLayout.BasicLayout 
                           Logo="@("images/小美logo-64-64.png")"
                           MenuData="_menuData" 
                           Theme="MenuTheme.Light" 
                           Layout="AntDesign.ProLayout.Layout.Mix">

                <RightContentRender>
                    <wispro.sp.web.Components.RightContent />
                </RightContentRender>
                <ChildContent>
                    @Body
                </ChildContent>
                <FooterRender>
                    <FooterView Copyright="2021 小美知识产权集团" Links="Links"></FooterView>
                </FooterRender>
            </AntDesign.ProLayout.BasicLayout>
        </Authorized>
        <NotAuthorized>
            <wispro.sp.web.Pages.LoginPages />
        </NotAuthorized>
        
    </AuthorizeView>
    
</CascadingAuthenticationState>
@code
{

    RenderFragment sub1Title =
    @<Template>
        <Icon Type="user" Theme="outline"></Icon>
        我的配置
        <Icon Type="down" />
    </Template>;

    RenderFragment myPerformanceIcon =
        @<svg class="icon" width="1em" height="1em" viewBox="0 0 1050 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
            <path fill="#333333" d="M699.09839799 697.494468l39.86160901-49.764855a441.633001 441.633001 0 0 0-116.272762-67.103021A305.726491 305.726491 0 0 0 794.334504 305.710196 305.769427 305.769427 0 1 0 333.917489 569.577055c-181.889 55.034004-314.3117 224.004251-314.3117 423.911405h63.747022a378.992331 378.992331 0 0 1 378.991332-379.034269c87.289945 0 169.989729 29.577931 236.753256 83.040277zM246.456799 305.710196a242.06534199 242.06534199 0 1 1 484.13068299 0 242.06534199 242.06534199 0 0 1-484.13068299 0z" /><path fill="#333333" d="M791.23212601 591.973685l-10.96366501 62.76848 138.28596501 24.096099-238.49466201 150.313045-76.32628-79.640342-285.795187 212.78496699 38.077268 51.12383001 240.66343-179.21099001 73.43558699 76.62283801 277.67828101-175.047193-29.493058 126.387692 62.087495 14.448473 56.437911-241.937532z" />
        </svg>;

    private readonly MenuDataItem[] _menuData =
    {
        new MenuDataItem
        {
            Path = "/Home",
            Name = "首页",
            Key = "index",
            Icon = "home",
        },
        new MenuDataItem
        {
            Name="绩效管理",
            Key="PerformanceManager",
            Icon ="line-chart",
            Children= new MenuDataItem[]
            {
                new MenuDataItem
                {
                    Name="我的绩效",
                    Key="MyPerformance",
                    Path="/MyCaselist",
                    Icon ="user",
                },
                new MenuDataItem
                {
                    Name="绩效查询",
                    Key="performanceSearch",
                    Path="/CaseManager",
                    Icon ="search",
                },
                new MenuDataItem
                {
                    Name="申诉记录",
                    Key="appealRecords",
                    Path="/AppealRecords",
                    Icon ="message",
                },
                new MenuDataItem
                {
                    Name="级别调整计算",
                    Key="Level",
                    Path="/LevelStatistics",
                    Icon ="message",
                }

            }
        },
        new MenuDataItem
        {
            Name="专案管理",
            Key="ProjectManager",
            Icon ="line-chart",
            Children= new MenuDataItem[]
            {
                new MenuDataItem
                {
                    Name="我的专案",
                    Key="myProject",
                    Path="/Project/MyProjects",
                    Icon ="user",
                },
                //new MenuDataItem
                //{
                //    Name="专案工作内容",
                //    Key="ProjectWorkContent",
                //    Path="/Project/WorkContent",
                //    Icon ="search",
                //},
                new MenuDataItem
                {
                    Name="专案查询",
                    Key="ProjectSearch",
                    Path="/Project/ProjectSearch",
                    Icon ="search",
                },
            }
        },
        new MenuDataItem
        {
            Name = "报表管理",
            Key = "ReportManage",
            Icon = "dashboard",
            Children= new MenuDataItem[]
            {
                new MenuDataItem
                {
                    Path ="/Report/SingleChart",
                    Name ="申诉单选统计",
                    Key= "appealType",
                    Icon = "pie-chart"
                },
                new MenuDataItem
                {
                    Path ="/Report/AppealTrend",
                    Name ="申诉趋势统计",
                    Key= "appealTrend",
                    Icon = "line-chart"
                },
                new MenuDataItem
                {
                    Path ="/Report/StaticsTrend",
                    Name ="绩效统计",
                    Key= "StaticsTrend",
                    Icon = "line-chart"
                }
                

            }
        },
        new MenuDataItem
        {
            Name = "基本资料管理",
            Key = "baseResource",
            Icon = "setting",
            Children= new MenuDataItem[]
            {
                //new MenuDataItem
                //{
                //    Path ="/StaffList",
                //    Name ="账号管理",
                //    Key= "staff",
                //    Icon = ""
                //},
                new MenuDataItem
                {
                    Path ="/Department",
                    Name ="部门管理",
                    Key= "dept",
                    Icon = "team"
                },
                new MenuDataItem
                {
                    Path ="/StaffGrade",
                    Name ="代理人系数设定",
                    Key= "sg",
                    Icon = "ci"
                },
                new MenuDataItem
                {
                    Path ="/CustomerList",
                    Name ="客户信息管理",
                    Key="customer",
                    Icon = "solution"
                }

            }
        },
        //new MenuDataItem
        //{
        //    Path ="/Workflow/Manage",
        //    Name ="流程管理",
        //    Key= "wfManage",
        //    Icon = "apartment"
        //}

    };

    public LinkItem[] Links { get; set; } =
    {
        new LinkItem
        {
            Key = "威世博官网",
            Title = "深圳威世博",
            Href = "https://www.weishibo.cn/",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "patentics",
            Title = "Patentics数据库",
            Href = "https://www.patentics.com/",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "合享数据库",
            Title = "合享数据库",
            Href = "https://www.incopat.com/intelLib/node/initIntelligentLib",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "zhihuiya",
            Title = "智慧芽数据库",
            Href = "https://account.zhihuiya.com/",
            BlankTarget = true,
        }
    };
    }
