using AntDesign;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using wispro.sp.web.Models;

namespace wispro.sp.web.Pages.Project
{
    public partial class ReadAssignPointMsg
    {
        [Inject] protected NavigationManager NavigationManager { get; set; }
        ITable table;

        int _pageIndex = 1;
        int _pageSize = 10;
        int _total = 0;
        bool _loading = false;

        wispro.sp.entity.StaffGrade EditingStaff = null;
        bool _visible = false;
        bool _isAdd = false;

        private ProjectMessage projectMessage = new ProjectMessage()
        {
            From = "黄瑜",
            To = new List<MsgReadInfo>()
            {
                new(){Reciever = "李申"},
                new(){Reciever = "何倚雯"},
                new(){Reciever = "王晴"},
                new(){Reciever = "陆跃"}
            },
            MessageInfo = $"【黄瑜】已为专案【S2112394（美的-洗碗机专利调查）】分配9月绩效点数，请您查看确认，如有觉得有问题，请在【2021-10-08】日前点击申诉按钮反馈给项目负责人【黄瑜】",
            Type = "专案点数分配任务通知",
            Tasks = new List<Models.Task>()
            {
                new(){
                    ProjectInfo = new ProjectInfo(){
                        CaseNo ="S2112394",
                        CaseName ="美的-洗碗机专利调查",
                        DoItem="提出报告",
                        DoPerson=new List<string>(){"李申", "何倚雯", "王晴", "陆跃" },
                        ResponseMan ="黄瑜"
                    },
                    Id =1,
                    Name ="9月专案【S2112394】绩效点数确认",
                    Type="专案点数确认",
                    ResponseMan ="李申",
                    State="待处理",
                    LimiteDate = DateTime.Now.AddDays(4),
                    Handles= new List<TaskHandleInfo>()
                    {
                        new TaskHandleInfo(){Name = "查看分配详情",UIUrl="/Project/ConfirmProjectPoint"}
                    },
                    //UIUrl = "/Project/AssignPoint"
                }
            }
        };

        List<ProjectPoint> projectPoints = new List<ProjectPoint>() {
            new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="李申", Point=1.0},
            new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="何倚雯", Point=2.0},
            new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="王晴", Point=1.5},
            new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="陆跃", Point=1.0},
            new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="B", person="李申", Point=2.0},
            new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="B", person="何倚雯", Point=1.5},
            new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="B", person="王晴", Point=2.5},
            new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="B", person="陆跃", Point=3.0},
        };

        private void OnHandle()
        {
            NavigationManager.NavigateTo("/Project/ConfirmProjectPoint");
        }
    }
}
