luocaiyang 3 gadi atpakaļ
vecāks
revīzija
b2078bfcbf
52 mainītis faili ar 1789 papildinājumiem un 641 dzēšanām
  1. 105 0
      wispro.sp.api/AppealHandler/ChangeDoPersonReviewer.cs
  2. 124 1
      wispro.sp.api/Controllers/AppealController.cs
  3. 1 1
      wispro.sp.api/Controllers/AttachFilesController.cs
  4. 1 1
      wispro.sp.api/Controllers/FileProcesTaskController.cs
  5. 14 1
      wispro.sp.api/Controllers/OrganizationController.cs
  6. 57 23
      wispro.sp.api/Controllers/PerformanceItemController.cs
  7. 109 4
      wispro.sp.api/Controllers/StaffController.cs
  8. 33 1
      wispro.sp.api/Job/ImportReportJob.cs
  9. 0 3
      wispro.sp.api/Job/QuartzUtil.cs
  10. 8 4
      wispro.sp.api/appsettings.json
  11. 29 0
      wispro.sp.share/AppealRecordFilter.cs
  12. 1 1
      wispro.sp.utility/IPEasyUtility.cs
  13. 0 1
      wispro.sp.web/Components/CreateAppeal.razor
  14. 2 2
      wispro.sp.web/Components/CreateAppeal.razor.cs
  15. 1 1
      wispro.sp.web/Components/InputValueSetting.razor.cs
  16. 1 0
      wispro.sp.web/Components/Radar.razor
  17. 105 102
      wispro.sp.web/Components/ReviewerAppeal.razor
  18. 1 1
      wispro.sp.web/Components/StaffSelect.razor
  19. 9 1
      wispro.sp.web/Components/StaffSelect.razor.cs
  20. 7 0
      wispro.sp.web/Layouts/BasicLayout.razor
  21. 190 0
      wispro.sp.web/Pages/AppCase/AppealRecords.razor
  22. 94 0
      wispro.sp.web/Pages/AppCase/AppealRecords.razor.cs
  23. 95 85
      wispro.sp.web/Pages/AppCase/CaseManager.razor
  24. 21 0
      wispro.sp.web/Pages/AppCase/CaseManager.razor.cs
  25. 86 80
      wispro.sp.web/Pages/AppCase/MyCaselist.razor
  26. 24 0
      wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs
  27. 12 9
      wispro.sp.web/Pages/Organization/Department.razor
  28. 2 12
      wispro.sp.web/Pages/Organization/Department.razor.cs
  29. 3 3
      wispro.sp.web/Pages/Project/AssignPoint.razor
  30. 75 74
      wispro.sp.web/Pages/Project/MyProject.razor
  31. 51 51
      wispro.sp.web/Pages/Project/ProjectReviewer.razor
  32. 5 6
      wispro.sp.web/Pages/Project/ProjectSearch.razor
  33. 5 16
      wispro.sp.web/Pages/Project/ProjectSearch.razor.cs
  34. 3 1
      wispro.sp.web/Pages/StaffGrade.razor.cs
  35. 2 2
      wispro.sp.web/Pages/StartPerformanceCalculation.razor
  36. 5 0
      wispro.sp.web/Pages/TestGraphviz.razor
  37. 38 0
      wispro.sp.web/Pages/TestGraphviz.razor.cs
  38. 47 47
      wispro.sp.web/Pages/Workflow/WorkflowDefine.razor
  39. 1 13
      wispro.sp.web/Pages/Workflow/WorkflowDefine.razor.cs
  40. 37 38
      wispro.sp.web/Pages/Workflow/WorkflowDetail.razor
  41. 3 1
      wispro.sp.web/Pages/Workflow/WorkflowDetail.razor.cs
  42. 19 1
      wispro.sp.web/Services/AppealTypeService.cs
  43. 30 6
      wispro.sp.web/Services/AuthService.cs
  44. 2 2
      wispro.sp.web/Services/HttpService.cs
  45. 1 1
      wispro.sp.web/Services/IAuthService.cs
  46. 14 0
      wispro.sp.web/Services/PerformanceItemServices.cs
  47. 8 3
      wispro.sp.web/wispro.sp.web.csproj
  48. 2 1
      wispro.sp.web/wwwroot/appsettings.json
  49. 9 0
      wispro.sp.web/wwwroot/diagrams.js
  50. 3 0
      wispro.sp.web/wwwroot/index.html
  51. 290 40
      wispro.sp.winClient/Form1.cs
  52. 4 1
      wospro.sp.entity/workflowDefine/ConditionTree.cs

+ 105 - 0
wispro.sp.api/AppealHandler/ChangeDoPersonReviewer.cs

@@ -0,0 +1,105 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.api.Controllers;
+using wispro.sp.entity;
+using wispro.sp.share;
+
+namespace wispro.sp.api.AppealHandler
+{
+    public class ChangeDoPersonReviewer : IDoAppealObject
+    {
+        public void DoAppeal(AppealObject appeal, int appealRecordId, DbContext spContext)
+        {
+            bool isAggree = false;
+            foreach (var iv in appeal.inputFieldValues)
+            {
+                if (iv.InputField == null)
+                {
+                    iv.InputField = ((spDbContext)spContext).InputFields.FirstOrDefault(s => s.Id == iv.InputFieldId);
+                }
+
+                if (iv.InputField.FieldName == "审核意见" && iv.Value == "确认变更")
+                {
+                    isAggree = true;
+                    break;
+                }
+
+            }
+            if (isAggree)
+            {
+                var result = ((spDbContext)spContext).InputFieldValues.Where<InputFieldValue>(f => f.AppealRecordId == appealRecordId && f.InputField.AppealState == 0).ToList();
+
+                string strOldPerson = "";
+                string strNewPerson = "";
+                
+                foreach (var iv in result)
+                {
+                    if (iv.InputField == null)
+                    {
+                        iv.InputField = ((spDbContext)spContext).InputFields.FirstOrDefault(s => s.Id == iv.InputFieldId);
+                    }
+
+                    if (iv.InputField.FieldName == "变更前处理人")
+                    {
+                        strOldPerson = iv.Value;
+                        continue;
+                    }
+
+                    if (iv.InputField.FieldName == "变更后处理人")
+                    {
+                        strNewPerson = iv.Value;
+                        continue;
+                    }
+
+                }
+
+                var appRecord = ((spDbContext)spContext).AppealRecords.FirstOrDefault(f => f.Id == appealRecordId);
+
+                if(appRecord != null)
+                {
+                    var itemStaffs = ((spDbContext)spContext).ItemStaffs.Include(p=>p.DoPerson).Where(s => s.ItemId == appRecord.ItemId.Value);
+
+                    var newStaff = ((spDbContext)spContext).Staffs.FirstOrDefault(s=>s.Name == strNewPerson.Trim());
+
+                    if (newStaff != null)
+                    {
+                        bool oldPersonExist = false;
+                        foreach (ItemStaff staff in itemStaffs)
+                        {
+                            if (staff.DoPerson.Name == strOldPerson.Trim())
+                            {
+                                ((spDbContext)spContext).Staffs.Remove(staff.DoPerson);
+                                oldPersonExist = true;
+                                break;
+                            }
+                        }
+
+                        if (oldPersonExist)
+                        {
+                            ((spDbContext)spContext).ItemStaffs.Add(new ItemStaff() { 
+                                ItemId = appRecord.ItemId.Value,
+                                DoPersonId = newStaff.Id
+                            });
+                        }
+                        else
+                        {
+                            throw new ApplicationException("变更前处理人不存在!");
+                        }
+                    }
+                    else
+                    {
+                        throw new ApplicationException("变更后处理人不存在!");
+                    }
+
+                }
+
+                
+                //((spDbContext)spContext).PerformanceItems.Add(Item);
+                //((spDbContext)spContext).SaveChanges();
+            }
+        }
+    }
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 124 - 1
wispro.sp.api/Controllers/AppealController.cs


+ 1 - 1
wispro.sp.api/Controllers/AttachFilesController.cs

@@ -17,7 +17,7 @@ namespace wispro.sp.api.Controllers
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
-    [Authorize]
+    //[Authorize]
     public class AttachFilesController : ControllerBase
     {
         private readonly IWebHostEnvironment env;

+ 1 - 1
wispro.sp.api/Controllers/FileProcesTaskController.cs

@@ -12,7 +12,7 @@ namespace wispro.sp.api.Controllers
 {
     [Route("api/[controller]/[action]")]
     [ApiController]
-    [Authorize]
+    //[Authorize]
     public class FileProcesTaskController : ControllerBase
     {
         Services.IFileTaskService fileTaskService;

+ 14 - 1
wispro.sp.api/Controllers/OrganizationController.cs

@@ -290,7 +290,7 @@ namespace wispro.sp.api.Controllers
                         if(pDept != null)
                         {
 
-                            DepartmentPosition dp = Context.DepartmentPositions.FirstOrDefault(p => p.StaffId == sf.Id && p.departmentId == pDept.Id && p.PositionId == ptPosition.Id);
+                            DepartmentPosition dp = Context.DepartmentPositions.FirstOrDefault(p => p.StaffId == sf.Id);
                             if (dp == null)
                             {
 
@@ -302,6 +302,19 @@ namespace wispro.sp.api.Controllers
                                 Context.DepartmentPositions.Add(dp);
                                 Context.SaveChanges();
                             }
+                            else
+                            {
+                                if (pDept.Id != dp.departmentId)
+                                {
+                                    dp.departmentId = pDept.Id;
+                                    dp.PositionId = ptPosition.Id;
+
+                                    Context.SaveChanges();
+                                }
+
+                                
+                            }
+
                         }
                         
                     }

+ 57 - 23
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -395,37 +395,76 @@ namespace wispro.sp.api.Controllers
                 CaseXiShu.Add(cx.Ceoffcient, cx.Value);
             }
 
-            var results = Context.PerformanceItems.Where<PerformanceItem>(p => p.CalMonth.Year == year && p.CalMonth.Month == month && ((p.Type == "新申请" && p.BasePoint > 0) || p.Type == "专案"));
+            var results = Context.PerformanceItems.Where<PerformanceItem>(p => p.CalMonth.Year == year && p.CalMonth.Month == month && ((p.Type == "新申请" && p.BasePoint > 0) || p.Type == "专案") && p.BasePoint > 0.0);
 
             if(userId != null)
             {
                 results = Context.PerformanceItems.Where<PerformanceItem>(p => 
                 p.CalMonth.Year == year && p.CalMonth.Month == month && ((p.Type == "新申请" && p.BasePoint >0) || p.Type == "专案") && 
-                (p.ItemStaffs.Where<ItemStaff>(s=>s.DoPerson.Id == userId).Count ()>0 || p.ReviewerId == userId ));
+                (p.ItemStaffs.Where<ItemStaff>(s=>s.DoPerson.Id == userId).Count ()>0 ) && p.BasePoint >0.0);
             }
 
-            var groupResult = results.GroupBy(x => x.CaseCoefficient).Select(g=> new { 
-                CaseCeoffcient = g.Key,
-                count = g.Count()
-            });
-
+            #region 循环计算
             int iCount = 0;
             double d = 0.0;
-            foreach(var g in groupResult)
+            var retList = results.ToList();
+
+            foreach(var item in retList)
             {
-                if (!string.IsNullOrEmpty(g.CaseCeoffcient))
-                {
-                    
+                string strCaseCeoffcient = item.CaseCoefficient;
 
-                    if (CaseXiShu.ContainsKey(g.CaseCeoffcient))
+                if(item.isDanger() && string.IsNullOrEmpty(item.OverDueMemo))
+                {
+                    switch (item.CaseCoefficient)
                     {
-                        d += g.count * CaseXiShu[g.CaseCeoffcient];
-                        iCount += g.count;
+                        case "S":
+                            strCaseCeoffcient = "A";
+                            break;
+                        case "A":
+                            strCaseCeoffcient = "B";
+                            break;
+                        case "B":
+                            strCaseCeoffcient = "C";
+                            break;
+                        case "C":
+                            strCaseCeoffcient = "D";
+                            break;
                     }
                 }
+
+                if (CaseXiShu.ContainsKey(strCaseCeoffcient))
+                {
+                    d += CaseXiShu[strCaseCeoffcient];
+                    iCount += 1;
+                }
+
             }
+            #endregion
 
-            return d/(double)iCount;
+            #region 统计计算
+            //var groupResult = results.GroupBy(x => x.CaseCoefficient).Select(g=> new { 
+            //    CaseCeoffcient = g.Key,
+            //    count = g.Count()
+            //});
+
+            //int iCount = 0;
+            //double d = 0.0;
+            //foreach(var g in groupResult)
+            //{
+            //    if (!string.IsNullOrEmpty(g.CaseCeoffcient))
+            //    {
+
+
+            //        if (CaseXiShu.ContainsKey(g.CaseCeoffcient))
+            //        {
+            //            d += g.count * CaseXiShu[g.CaseCeoffcient];
+            //            iCount += g.count;
+            //        }
+            //    }
+            //}
+            #endregion
+
+            return d /(double)iCount;
         }
 
         public List<string> GetFeedbackString(int itemId)
@@ -668,7 +707,7 @@ namespace wispro.sp.api.Controllers
                             }
                             else
                             {
-                                itemStaff.DoPerson.StaffGrade = Context.StaffGrades.FirstOrDefault(s=>s.Id == itemStaff.DoPerson.StaffGradeId);
+                                itemStaff.DoPerson.StaffGrade = spDb.StaffGrades.FirstOrDefault(s=>s.Id == itemStaff.DoPerson.StaffGradeId);
                                 temStatic = new StaffStatistics()
                                 {
                                     CalMonth = calMonth,
@@ -918,11 +957,6 @@ namespace wispro.sp.api.Controllers
 
                 try
                 {
-
-                    if (item.CaseNo == "")
-                    {
-                        System.Diagnostics.Debug.WriteLine(item.CaseNo);
-                    }
                     var row = dt.NewRow();
                     row["我方文号"] = item.CaseNo;
                     row["申请类型"] = item.ApplicationType;
@@ -944,8 +978,8 @@ namespace wispro.sp.api.Controllers
 
                     foreach (var istaff in item.ItemStaffs)
                     {
-                        strISLevels = string.IsNullOrEmpty(strISLevels) ? istaff.DoPerson.StaffGrade.Grade : $"{strISLevels},{istaff.DoPerson.StaffGrade.Grade}";
-                        strISNames = string.IsNullOrEmpty(strISNames) ? istaff.DoPerson.Name : $"{strISNames},{istaff.DoPerson.Name}";
+                        strISLevels = string.IsNullOrEmpty(strISLevels)?istaff.DoPerson.StaffGrade?.Grade : $"{strISLevels},{istaff.DoPerson.StaffGrade?.Grade}";
+                        strISNames = string.IsNullOrEmpty(strISNames)?istaff.DoPerson.Name : $"{strISNames},{istaff.DoPerson.Name}";
                     }
 
                     row["处理人等级"] = strISLevels;

+ 109 - 4
wispro.sp.api/Controllers/StaffController.cs

@@ -92,7 +92,14 @@ namespace wispro.sp.api.Controllers
                         break;
                     case UserConditionType.Department:
                         var retList = Context.DepartmentPositions.Where(d => d.departmentId == int.Parse(userField.Department)).Select(p => p.Staff).ToList();
-                        return retList;
+                        return retList.Where(s=>s.IsOnJob ).ToList();
+                        break;
+                    case UserConditionType.Position:
+                        var query = Context.Staffs.Where(s=>true);
+                        var queryList = from u in query
+                                        where ((from dp in Context.DepartmentPositions.Where(d => d.PositionId == int.Parse(userField.Positon)) select dp.StaffId).Contains(u.Id))
+                                        select u;
+                        return queryList.ToList();
                         break;
                     case UserConditionType.UserDepartment:
 
@@ -140,19 +147,38 @@ namespace wispro.sp.api.Controllers
                 }
                 else
                 {
-                    UserField userField = new UserField();
+                    List<UserField> lstUserField = new List<UserField>();
+                    
                     if (apType.ReviewerExpress.StartsWith("p."))
                     {
+                        UserField userField = new UserField();
                         userField.UserConditionType = UserConditionType.Staff;
                         userField.UserType = UserType.BindObjectProperty;
                         userField.UserValue = apType.ReviewerExpress.Replace("p.", "").Trim();
+                        lstUserField.Add(userField);
                     }
                     else
                     {
-                        userField = System.Text.Json.JsonSerializer.Deserialize<UserField>(apType.ReviewerExpress);
+                        lstUserField = System.Text.Json.JsonSerializer.Deserialize<List<UserField>>(apType.ReviewerExpress);
+                        //UserField userField = System.Text.Json.JsonSerializer.Deserialize<UserField>(apType.ReviewerExpress);
                     }
 
-                    return GetStaffList(item, userField);
+                    List<Staff> retStaffs = new List<Staff>();
+                    foreach(UserField uf in lstUserField)
+                    {
+                        var temStaffs = GetStaffList(item, uf);
+
+                        if(temStaffs != null)
+                        {
+                            foreach(var staff in temStaffs)
+                            {
+                                if(retStaffs.FirstOrDefault(s=>s.Id == staff.Id) == null) {
+                                    retStaffs.Add(staff);
+                                }
+                            }
+                        }
+                    }
+                    return retStaffs;
                 }
             }
             catch (Exception ex)
@@ -165,6 +191,11 @@ namespace wispro.sp.api.Controllers
         {
             return Context.Staffs.FirstOrDefault(p=>p.Id == Id);
         }
+
+        public Staff GetByName(string Name)
+        {
+            return Context.Staffs.FirstOrDefault(p => p.Name  == Name);
+        }
         public ListApiResponse<Staff> Query(int pageIndex,int pageSize)
         {
             ListApiResponse<Staff> ret = new ListApiResponse<Staff>();
@@ -198,6 +229,80 @@ namespace wispro.sp.api.Controllers
             return ret;
         }
 
+        public ApiSaveResponse UpdateUser(SaveUserObject saveUser)
+        {
+            ApiSaveResponse ret = new ApiSaveResponse();
+
+            Staff editObject = null;
+            if (saveUser.staff.Id == 0)
+            {
+                editObject = Context.Staffs.FirstOrDefault(p=>p.Name == saveUser.staff.Name);
+            }
+            else
+            {
+                editObject = Context.Staffs.FirstOrDefault(p => p.Id  == saveUser.staff.Id);
+            }
+
+            if(editObject == null)
+            {
+                ret.Success = false;
+                ret.ErrorMessage = "用户不存在";
+            }
+            else
+            {
+                using (var t = Context.Database.BeginTransaction())
+                {
+                    try
+                    {
+                        editObject.Account = saveUser.staff.Account;
+                        editObject.Department = saveUser.staff.Department;
+                        editObject.EntyDate = saveUser.staff.EntyDate;
+                        editObject.IsCalPerformsnce = saveUser.staff.IsCalPerformsnce;
+                        editObject.IsOnJob = saveUser.staff.IsOnJob;
+                        editObject.Mail = saveUser.staff.Mail;
+                        editObject.Memo = saveUser.staff.Memo;
+                        editObject.Mobile = saveUser.staff.Mobile;
+                        editObject.Name = saveUser.staff.Name;
+                        editObject.Password = saveUser.staff.Password;
+                        editObject.Sex = saveUser.staff.Sex;
+                        editObject.StaffGradeId = saveUser.staff.StaffGradeId;
+                        editObject.Status = saveUser.staff.Status;
+                        editObject.Tel = saveUser.staff.Tel;
+                        editObject.WorkPlace = saveUser.staff.WorkPlace;
+                        Context.SaveChanges();
+
+                        var temDP = Context.DepartmentPositions
+                            .Where<DepartmentPosition>(d =>
+                                d.departmentId == saveUser.deptId &&
+                                d.StaffId == editObject.Id).ToList<DepartmentPosition>();
+
+                        foreach (var depPosition in temDP)
+                        {
+                            Context.DepartmentPositions.Remove(depPosition);
+                        }
+                        Context.SaveChanges();
+
+                        DepartmentPosition dp = new DepartmentPosition();
+                        dp.departmentId = saveUser.deptId;
+                        dp.PositionId = saveUser.positionId;
+                        dp.StaffId = editObject.Id;
+                        Context.DepartmentPositions.Add(dp);
+                        Context.SaveChanges();
+
+                        t.Commit();
+                    }
+                    catch(Exception ex)
+                    {
+                        ret.Success = false;
+                        ret.ErrorMessage = ex.Message;
+                        
+                    }
+                }
+
+            }
+            return ret;
+
+        }
         
         public ApiSaveResponse SaveUser(SaveUserObject saveUser)
         {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 33 - 1
wispro.sp.api/Job/ImportReportJob.cs


+ 0 - 3
wispro.sp.api/Job/QuartzUtil.cs

@@ -26,7 +26,6 @@ namespace wispro.sp.api.Job
             if (trigger == null)
             {
                 trigger = TriggerBuilder.Create()
-                    .WithIdentity("april.trigger")
                     .WithDescription("default")
                     .WithSimpleSchedule(x => x.WithMisfireHandlingInstructionFireNow().WithRepeatCount(-1))
                     .Build();
@@ -46,7 +45,6 @@ namespace wispro.sp.api.Job
             if (trigger == null)
             {
                 trigger = TriggerBuilder.Create()
-                    .WithIdentity("april.trigger")
                     .WithDescription("default")
                     .WithSimpleSchedule(x => x.WithMisfireHandlingInstructionFireNow().WithRepeatCount(-1))
                     .Build();
@@ -65,7 +63,6 @@ namespace wispro.sp.api.Job
                .Build();
 
             var job = JobBuilder.Create(typeof(MailJob))
-                .WithIdentity("邮件任务")
                 .Build();
 
             job.JobDataMap.Put("Subject",Subject);

+ 8 - 4
wispro.sp.api/appsettings.json

@@ -28,7 +28,7 @@
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
     "ChormeDriverPath": "D:\\source\\repos\\ConsoleApp2\\ConsoleApp2\\bin\\Debug",
-    "ScheduleSetting": "00 51 13 1 * ? *",
+    "ScheduleSetting": "00 55 10 3 * ? *",
     "IPEasyWeb": "http://47.106.221.167/Login.aspx"
   },
 
@@ -44,8 +44,12 @@
     "/Department": "[94]-[1],[128]-[7]",
     "/Workflow/Manage": "[94]-[1]",
     "/CaseManager": "[128]-[7]",
-    "/Project/ProjectSearch": "[128]-[7]"
+    "/Project/ProjectSearch": "[128]-[7]",
+    "/AppealRecords": "[94]-[1],[128]-[7]",
+    "/CustomerList": "[94]-[1],[128]-[7]",
+    "/StaffGrade": "[94]-[1],[128]-[7]"
+  },
+
+  "Lastest_feedback_date": "8"
 
-  }
-  
 }

+ 29 - 0
wispro.sp.share/AppealRecordFilter.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace wispro.sp.share
+{
+    public class AppealRecordFilter
+    {
+        public int AppealTypeId { get; set; }
+
+        public string CreateUser { get; set; }
+
+        public string Reviewer { get; set; }
+
+        public DateTime? beginCreateTime { get; set; }
+
+        public DateTime? endCreateTime { get; set; }
+
+        public string CaseNo { get; set; }
+
+        public DateTime? beginReviewTime { get; set; }
+
+        public DateTime? endReviewTime { get; set; }
+
+        public string SortField { get; set; }
+    }
+}

+ 1 - 1
wispro.sp.utility/IPEasyUtility.cs

@@ -111,7 +111,7 @@ namespace wispro.sp.utility
                 driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(500);
 
                 //进入登录界面
-                driver.Navigate().GoToUrl("http://47.106.221.167/Login.aspx");
+                driver.Navigate().GoToUrl(ConfigHelper.GetSectionValue("IPEasySetting:IPEasyWeb"));
 
                 //输入用户名和密码
                 driver.FindElement(By.Id("txtUser")).SendKeys(Account);

+ 0 - 1
wispro.sp.web/Components/CreateAppeal.razor

@@ -61,7 +61,6 @@
                                     case "System.DateTime":
                                         <DatePicker @bind-Value="@temValue.Value" />
                                         break;
-
                                     default:
                                         <Input @bind-Value="@temValue.Value" />
                                         break;

+ 2 - 2
wispro.sp.web/Components/CreateAppeal.razor.cs

@@ -46,7 +46,7 @@ namespace wispro.sp.web.Components
                 _Model.FileList.Where(file => file.State == UploadState.Success && !string.IsNullOrWhiteSpace(file.Response)).ForEach(file =>
                 {
                     var result = file.GetResponse<List<AttachFile>>();
-                    file.Url = $"http://localhost:39476/api/AttachFiles/Download?id={result[0].Id}";
+                    file.Url = $"{_configuration.GetValue<string>("APIUrl")}AttachFiles/Download?id={result[0].Id}";
                 });
             }
             catch { }
@@ -57,7 +57,7 @@ namespace wispro.sp.web.Components
             try
             {
                 var result = fileinfo.GetResponse<List<AttachFile>>();
-                return await _httpClient.Get<bool>($"http://localhost:39476/api/AttachFiles/Delete?id={result[0].Id}");
+                return await _httpClient.Get<bool>($"{_configuration.GetValue<string>("APIUrl")}AttachFiles/Delete?id={result[0].Id}");
             }
             catch {
                 return false;

+ 1 - 1
wispro.sp.web/Components/InputValueSetting.razor.cs

@@ -81,7 +81,7 @@ namespace wispro.sp.web.Components
                 EditAction.NewInputValueSettingObjects.Add(newSettingobj);
             }
 
-            Console.WriteLine($"AddNew End:{System.Text.Json.JsonSerializer.Serialize(EditAction, options)}");
+            //Console.WriteLine($"AddNew End:{System.Text.Json.JsonSerializer.Serialize(EditAction, options)}");
         }
 
         async void Delete(entity.workflowDefine.InputValueSetting setting)

+ 1 - 0
wispro.sp.web/Components/Radar.razor

@@ -32,6 +32,7 @@
     {
         Height = 400,
         ForceFit = true,
+        
         AngleField = "label",
         RadiusField = "value",
         SeriesField = "name",

+ 105 - 102
wispro.sp.web/Components/ReviewerAppeal.razor

@@ -1,33 +1,36 @@
 @inherits FeedbackComponent<ReviewerAppealModel>
-<Collapse >
+@using Microsoft.Extensions.Configuration
+
+@inject IConfiguration configuration
+<Collapse>
     @if (_Model.Item != null)
     {
-    <Panel Active="true" Style="width:100%" Header="案件信息摘要">
-        <div>
-            <Row>
-                <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>
-                <AntDesign.Col Span="8">@_Model.Item.CaseNo</AntDesign.Col>
-                <AntDesign.Col Span="4"><b>处理事项:</b></AntDesign.Col>
-                <AntDesign.Col Span="8">@_Model.Item.DoItem</AntDesign.Col>
-            </Row>
-            
-            <Row>
-                <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
-                <AntDesign.Col Span="20">@_Model.Item.CaseName</AntDesign.Col>
-            </Row>
-        </div>
-    </Panel>
+        <Panel Active="true" Style="width:100%" Header="案件信息摘要">
+            <div>
+                <Row>
+                    <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>
+                    <AntDesign.Col Span="8">@_Model.Item.CaseNo</AntDesign.Col>
+                    <AntDesign.Col Span="4"><b>处理事项:</b></AntDesign.Col>
+                    <AntDesign.Col Span="8">@_Model.Item.DoItem</AntDesign.Col>
+                </Row>
+
+                <Row>
+                    <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
+                    <AntDesign.Col Span="20">@_Model.Item.CaseName</AntDesign.Col>
+                </Row>
+            </div>
+        </Panel>
     }
     <Panel Active="true" Header="@($"{@_Model.AppealRecord.Creater.Name}与{@_Model.AppealRecord.CreateTime.ToString("yyyy-MM-dd")}提交如下审核内容")">
         @*<Row>
-            <AntDesign.Col Span="4"><b>提交人:</b></AntDesign.Col>
-            <AntDesign.Col Span="8">@_Model.AppealRecord.Creater.Name</AntDesign.Col>
-            <AntDesign.Col Span="4"><b>提交时间:</b></AntDesign.Col>
-            <AntDesign.Col Span="8"></AntDesign.Col>
-        </Row>
-        <Row>
-            <AntDesign.Col Span="24"><b>提交内容:</b></AntDesign.Col>
-        </Row>*@
+                <AntDesign.Col Span="4"><b>提交人:</b></AntDesign.Col>
+                <AntDesign.Col Span="8">@_Model.AppealRecord.Creater.Name</AntDesign.Col>
+                <AntDesign.Col Span="4"><b>提交时间:</b></AntDesign.Col>
+                <AntDesign.Col Span="8"></AntDesign.Col>
+            </Row>
+            <Row>
+                <AntDesign.Col Span="24"><b>提交内容:</b></AntDesign.Col>
+            </Row>*@
         @foreach (InputField field in _Model.CreateInputFields)
         {
             List<InputFieldValue> fValues = _Model.CreateAppealFieldValues.Where<InputFieldValue>(iv => iv.InputFieldId == field.Id).ToList();
@@ -65,7 +68,7 @@
     @if (_Model.attachFiles != null && _Model.attachFiles.Count > 0)
     {
         <Panel Active="true" Header="附件">
-            
+
             <Row>
                 <AntDesign.Col Span="2"></AntDesign.Col>
                 <AntDesign.Col Span="14">文件名称</AntDesign.Col>
@@ -75,94 +78,77 @@
             {
                 <Row>
                     <AntDesign.Col Span="2"></AntDesign.Col>
-                    <AntDesign.Col Span="14"><a href="@($"http://localhost:39476/api/AttachFiles/Download?id={file.Id}")">@file.Name </a></AntDesign.Col>
+                    <AntDesign.Col Span="14"><a href="@($"{configuration.GetValue<string>("APIUrl")}AttachFiles/Download?id={file.Id}")">@file.Name </a></AntDesign.Col>
                     <AntDesign.Col Span="8">@file.UploadUser.Name</AntDesign.Col>
                 </Row>
             }
         </Panel>
     }
-    </Collapse>
+</Collapse>
 
-    <Card>
-        <Form Model="@_Model" LabelColSpan="6" WrapperColSpan="16" Size="@AntSizeLDSType.Small">
+<Card>
+    <Form Model="@_Model" LabelColSpan="6" WrapperColSpan="16" Size="@AntSizeLDSType.Small">
+
+        @foreach (InputField field in context.inputFields)
+        {
+            List<InputFieldValue> fValues = context.inputFieldValues.Where<InputFieldValue>(iv => iv.InputFieldId == field.Id).ToList();
 
-            @foreach (InputField field in context.inputFields)
+            if (!string.IsNullOrEmpty(field.MapObjectField) && !string.IsNullOrEmpty(field.MapObjectFieldLabel))
             {
-                List<InputFieldValue> fValues = context.inputFieldValues.Where<InputFieldValue>(iv => iv.InputFieldId == field.Id).ToList();
+                <Divider />
+                <FormItem><span>请输入 @field.FieldName:</span></FormItem>
 
-                if (!string.IsNullOrEmpty(field.MapObjectField) && !string.IsNullOrEmpty(field.MapObjectFieldLabel))
+                @foreach (InputFieldValue temValue in fValues)
                 {
-                    <Divider />
-                    <FormItem><span>请输入 @field.FieldName:</span></FormItem>
 
-                    @foreach (InputFieldValue temValue in fValues)
-                    {
-
-                        <FormItem Label="@temValue.Label">
-                            @switch (temValue.InputField.FieldType)
-                            {
-                                case "System.String":
-                                    if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
-                                    {
-                                        <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
-                                                ValueName="@nameof(SelectValue.Value)"
-                                                LabelName="@nameof(SelectValue.Value)" />
-                                    }
-                                    else
-                                    {
-                                        <Input @bind-Value="@temValue.Value" />
-                                    }
-
-                                    break;
-                                case "System.DateTime":
-                                    <DatePicker @bind-Value="@temValue.Value" />
-                                    break;
-
-                                default:
+                    <FormItem Label="@temValue.Label">
+                        @switch (temValue.InputField.FieldType)
+                        {
+                            case "System.String":
+                                if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
+                                {
+                                    <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
+                                            ValueName="@nameof(SelectValue.Value)"
+                                            LabelName="@nameof(SelectValue.Value)" />
+                                }
+                                else
+                                {
                                     <Input @bind-Value="@temValue.Value" />
-                                    break;
+                                }
 
-                            }
+                                break;
+                            case "System.DateTime":
+                                <DatePicker @bind-Value="@temValue.Value" />
+                                break;
 
-                        </FormItem>
+                            default:
+                                <Input @bind-Value="@temValue.Value" />
+                                break;
 
-                    }
-                    <Divider />
+                        }
 
-                }
-                else
-                {
-                    @foreach (InputFieldValue temValue in fValues)
-                    {
-                        <FormItem Label="@temValue.InputField.FieldName">
-                            @switch (temValue.InputField.FieldType)
-                            {
-                                case "System.String":
-                                    if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
-                                    {
-                                        <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
-                                                ValueName="@nameof(SelectValue.Value)"
-                                                LabelName="@nameof(SelectValue.Value)" />
-                                    }
-                                    else
-                                    {
-                                        if (temValue.InputField.MaxSize != null && temValue.InputField.MaxSize > 20)
-                                        {
-                                            <TextArea @bind-Value="@temValue.Value" Rows="5" />
-                                        }
-                                        else
-                                        {
-                                            <Input @bind-Value="@temValue.Value" />
-                                        }
-
-                                    }
+                    </FormItem>
 
-                                    break;
-                                case "System.DateTime":
-                                    <DatePicker @bind-Value="@temValue.Value" />
-                                    break;
+                }
+                <Divider />
 
-                                default:
+            }
+            else
+            {
+                @foreach (InputFieldValue temValue in fValues)
+                {
+                    <FormItem Label="@temValue.InputField.FieldName">
+                        @switch (temValue.InputField.FieldType)
+                        {
+                            case "System.String":
+                                if (temValue.InputField.SelectValues != null && temValue.InputField.SelectValues.Count > 0)
+                                {
+                                    <Select @bind-Value="@temValue.Value" DataSource="@temValue.InputField.SelectValues"
+                                            ValueName="@nameof(SelectValue.Value)"
+                                            LabelName="@nameof(SelectValue.Value)" />
+                                }
+                                else
+                                {
                                     if (temValue.InputField.MaxSize != null && temValue.InputField.MaxSize > 20)
                                     {
                                         <TextArea @bind-Value="@temValue.Value" Rows="5" />
@@ -171,16 +157,33 @@
                                     {
                                         <Input @bind-Value="@temValue.Value" />
                                     }
-                                    break;
 
-                            }
+                                }
 
-                        </FormItem>
-                    }
-                }
+                                break;
+                            case "System.DateTime":
+                                <DatePicker @bind-Value="@temValue.Value" />
+                                break;
 
+                            default:
+                                if (temValue.InputField.MaxSize != null && temValue.InputField.MaxSize > 20)
+                                {
+                                    <TextArea @bind-Value="@temValue.Value" Rows="5" />
+                                }
+                                else
+                                {
+                                    <Input @bind-Value="@temValue.Value" />
+                                }
+                                break;
+
+                        }
+
+                    </FormItem>
+                }
             }
 
-        </Form>
+        }
+
+    </Form>
 
-    </Card>
+</Card>

+ 1 - 1
wispro.sp.web/Components/StaffSelect.razor

@@ -10,7 +10,7 @@
         AllowClear
         OnSelectedItemChanged="OnSelectedItemChangedHandler"
         OnSearch="OnSearch"
-        DefaultActiveFirstOption>
+        >
 </Select>
 
 

+ 9 - 1
wispro.sp.web/Components/StaffSelect.razor.cs

@@ -28,12 +28,20 @@ namespace wispro.sp.web.Components
         protected override void OnInitialized()
         {
             _ShowStaffs = StaffLists;
+            if(_ShowStaffs !=null && _ShowStaffs.Count > 0)
+            {
+                StaffId = _ShowStaffs[0].Id;
+            }
             base.OnInitialized();
         }
 
         protected override Task OnParametersSetAsync()
         {
             _ShowStaffs = StaffLists;
+            if (_ShowStaffs != null && _ShowStaffs.Count > 0)
+            {
+                StaffId = _ShowStaffs[0].Id;
+            }
             return base.OnParametersSetAsync();
         }
 
@@ -46,7 +54,7 @@ namespace wispro.sp.web.Components
         private void OnSearch(string value)
         {
             _ShowStaffs = _ShowStaffs.Where<Staff>(p => p.Name.Contains(value)).ToList();
-            StateHasChanged();
+            //StateHasChanged();
         }
     }
 }

+ 7 - 0
wispro.sp.web/Layouts/BasicLayout.razor

@@ -75,6 +75,13 @@
                     Path="/CaseManager",
                     Icon ="search",
                 },
+                new MenuDataItem
+                {
+                    Name="申诉记录",
+                    Key="appealRecords",
+                    Path="/AppealRecords",
+                    Icon ="message",
+                }
             }
         },
         new MenuDataItem

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 190 - 0
wispro.sp.web/Pages/AppCase/AppealRecords.razor


+ 94 - 0
wispro.sp.web/Pages/AppCase/AppealRecords.razor.cs

@@ -0,0 +1,94 @@
+using Microsoft.AspNetCore.Components;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using wispro.sp.entity;
+using wispro.sp.share;
+using wispro.sp.web.Services;
+
+namespace wispro.sp.web.Pages.AppCase
+{
+    public partial class AppealRecords
+    {
+        AppealRecordFilter _filter = new AppealRecordFilter();
+        AntDesign.Internal.IForm _form;
+        bool ShowSearchPanel = true;
+        bool _ShowDetail = false;
+        List<AppealType> AppealTypes;
+        private List<AppealRecord> showRecords;
+
+        [Inject] protected AppealTypeService _atService { get; set; }
+
+        [Inject] protected IAuthService _authService { get; set; }
+
+        [Parameter]
+        public int pageIndex { get; set; }
+
+        [Parameter]
+        public int pageSize { get; set; }
+
+        protected async override Task OnInitializedAsync()
+        {
+            await _authService.CanVisitResource();
+
+            AppealTypes = await _atService.GetItems();
+            showRecords = await _atService.GetUserAppeals(0);
+            await base.OnInitializedAsync();
+        }
+
+        string GetDescription(AppealRecord context)
+        {
+            if(context.State == 0)
+            {
+                if (context.Item != null)
+                {
+                    return $"[{context.CreateTime.ToString("yyyy-MM-dd hh:mm:ss")}] {context.Creater.Name}提交[{context.Item.CaseNo}]{context.Type.Name}申诉,正等待{context.Reviewer.Name}审核中......";
+                }
+                else
+                {
+                    return $"{context.Creater.Name}提交提交{context.Type.Name}申诉,正等待{context.Reviewer.Name}审核中......";
+                }
+            }
+            else
+            {
+                if (context.Item != null)
+                {
+                    return $"[{context.CreateTime.ToString("yyyy-MM-dd hh:mm:ss")}] {context.Creater.Name}提交[{context.Item.CaseNo}]{context.Type.Name}申诉,{context.Reviewer.Name}已审核!";
+                }
+                else
+                {
+                    return $"{context.Creater.Name}提交提交{context.Type.Name}申诉,{context.Reviewer.Name}已审核!";
+                }
+            }
+        }
+
+        async void OnSearch()
+        {
+            showRecords = await _atService.GetUserAppeals(_filter);
+            StateHasChanged();
+        }
+
+        AppealRecord CurrentAppealRecord;
+        List<InputFieldValue> _FieldValues;
+        List<InputFieldValue> _ReviewValues;
+        List<AttachFile> attachFiles;
+        async Task ShowDetail(AppealRecord appealRecord)
+        {
+            CurrentAppealRecord = appealRecord ;
+            _FieldValues = await _atService.GetInputFieldValues(appealRecord.Id, 0);
+            attachFiles = await _atService.GetAppealRecordAttachFiles(CurrentAppealRecord.Id);
+
+            if (appealRecord.State > 0)
+            {
+                _ReviewValues = await _atService.GetInputFieldValues(appealRecord.Id, 1);
+            }
+
+            _ShowDetail = true;
+        }
+        void CloseDetail()
+        {
+            _ShowDetail = false;
+        }
+    }
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 95 - 85
wispro.sp.web/Pages/AppCase/CaseManager.razor


+ 21 - 0
wispro.sp.web/Pages/AppCase/CaseManager.razor.cs

@@ -1,6 +1,7 @@
 using AntDesign;
 using AntDesign.TableModels;
 using Microsoft.AspNetCore.Components;
+using Microsoft.Extensions.Configuration;
 using ServiceStack;
 using System;
 using System.Collections.Generic;
@@ -47,6 +48,8 @@ namespace wispro.sp.web.Pages.AppCase
 
         [Inject] protected CalMonthServices _CalMonthService { get; set; }
 
+        [Inject] IConfiguration _configuration { get; set; }
+
         protected override async Task OnInitializedAsync()
         {
             await iconService.CreateFromIconfontCN("//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js");
@@ -108,5 +111,23 @@ namespace wispro.sp.web.Pages.AppCase
             }
             return (pageIndex - 1) * pageSize + iIndex;
         }
+
+        bool isDownloading = false;
+        private async Task ExportDataAsync(CalMonth calMonth)
+        {
+            isDownloading = true;
+            var fileData = await _ItemService.ExportData(calMonth.Id);
+
+            while (!fileData.Finished)
+            {
+                fileData = await _ItemService.getExportDataProcessing(fileData.Id);
+                await Task.Delay(20);
+            }
+
+            NavigationManager.NavigateTo($"{_configuration.GetValue<string>("APIUrl")}FileProcesTask/Download?Id={fileData.Id}");
+
+            isDownloading = false;
+
+        }
     }
 }

+ 86 - 80
wispro.sp.web/Pages/AppCase/MyCaselist.razor

@@ -1,10 +1,12 @@
 @page "/MyCaseList"
 @using wispro.sp.web.Components
-@using wispro.sp.share 
+@using wispro.sp.share
 
-@inject IAgentFeedBackMemoItemsService _afService; 
+
+@inject IAgentFeedBackMemoItemsService _afService;
 @inject IAuthService _authService;
 
+@attribute [Authorize]
 <PageContainer TabList="@tabList" OnTabChange="OnTabChange">
     <Breadcrumb>
         <Breadcrumb>
@@ -17,7 +19,7 @@
 
         </Breadcrumb>
     </Breadcrumb>
-    
+
 
     <ChildContent>
 
@@ -34,14 +36,15 @@
                     <PageHeader>
                         <PageHeaderTitle>基础点数统计</PageHeaderTitle>
                         <PageHeaderExtra>
-                            @*<AuthorizeView Roles="@strAddProjectJX">*@
-
-                                @*<Button Type="@ButtonType.Primary" OnClick="()=>goAssignPoint()">项目绩效</Button>*@
-                            @*</AuthorizeView>*@
-                            @foreach (AppealType at in apTypeService.GetItems(1))
+                            
+                            @if (ShowMenu())
                             {
-                                <Button Type="@ButtonType.Primary" OnClick="()=>ShowModel(null,at)">@at.Name</Button>
+                                foreach (AppealType at in apTypeService.GetItems(1))
+                                {
+                                    <Button Type="@ButtonType.Primary" OnClick="() => ShowModel(null, at)">@at.Name</Button>
+                                }
                             }
+                            
 
                             @if (isDownloading)
                             {
@@ -78,7 +81,7 @@
                                 </AntDesign.Row>
                                 <AntDesign.Row>
                                     <AntDesign.Col Span="2" style="border:1px solid #000000"><center>基础点数</center></AntDesign.Col>
-                                    <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("新申请处理",true)</center></AntDesign.Col>
+                                    <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("新申请处理", true)</center></AntDesign.Col>
                                     <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("新申请审核", true)</center></AntDesign.Col>
                                     <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("OA处理", true)</center></AntDesign.Col>
                                     <AntDesign.Col Span="2" style="border:1px solid #000000"><center>@GetStatistics("OA审核", true)</center></AntDesign.Col>
@@ -108,32 +111,32 @@
                     </PageHeader>
 
                     <AntDesign.Table DataSource="_Datas" TItem="PerformanceItem" @ref="@table"
-                                        @bind-PageIndex="_pageIndex"
-                                        @bind-PageSize="_pageSize"
-                                        Total="_total"
-                                        ScrollX="1150" Size="TableSize.Small" Bordered
-                                        @bind-SelectedRows="selectedItems"
-                                        OnRow="OnRow"
-                                        Loading="_loading"
-                                        RowClassName="@(x => x.Data.isDanger() ? "danger" : "")"
-                                        OnChange="HandleTableChange" RemoteDataSource>
+                                     @bind-PageIndex="_pageIndex"
+                                     @bind-PageSize="_pageSize"
+                                     Total="_total"
+                                     ScrollX="1150" Size="TableSize.Small" Bordered
+                                     @bind-SelectedRows="selectedItems"
+                                     OnRow="OnRow"
+                                     Loading="_loading"
+                                     RowClassName="@(x => x.Data.isDanger() ? "danger" : "")"
+                                     OnChange="HandleTableChange" RemoteDataSource>
                         <RowTemplate>
                             <AntDesign.Selection Key="@(context.Id.ToString())" Width="50" Fixed="left" />
                             <AntDesign.Column Title="序号" TData="int" Width="50" Fixed="left">
                                 @serialNumber(_pageIndex, _pageSize, context.Id)
                             </AntDesign.Column>
                             <AntDesign.Column Title="基础点数" Width="100" @bind-Field="@context.BasePoint" Sortable>
-                                <span>@(context.BasePoint == null ? "" : context.BasePoint)</span> 
+                                <span>@(context.BasePoint == null ? "" : context.BasePoint)</span>
                             </AntDesign.Column>
                             <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
-                            <AntDesign.Column Title="申请类型" @bind-Field="@context.ApplicationType" Width="120" Sortable Filterable/>
+                            <AntDesign.Column Title="申请类型" @bind-Field="@context.ApplicationType" Width="120" Sortable Filterable />
                             <AntDesign.Column Title="案件系数"
-                                                @bind-Field="@context.CaseCoefficient" Width="100"
-                                                Filters="CaseCoeFilters"
-                                                FilterMultiple="false"
-                                                OnFilter="((value,name)=>name.StartsWith(value))"
-                                                Sortable />
+                                              @bind-Field="@context.CaseCoefficient" Width="100"
+                                              Filters="CaseCoeFilters"
+                                              FilterMultiple="false"
+                                              OnFilter="((value,name)=>name.StartsWith(value))"
+                                              Sortable />
                             <AntDesign.Column Title="处理事项" @bind-Field="@context.DoItem" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="处理事项系数" @bind-Field="@context.DoItemCoefficient" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="案件阶段" @bind-Field="@context.CaseStage" Width="100"></AntDesign.Column>
@@ -148,38 +151,41 @@
                             </AntDesign.Column>
                             <AntDesign.Column Title="核稿人" TData="string" Width="100">@(context.Reviewer == null ? "" : context.Reviewer.Name)</AntDesign.Column>
 
-                            <ActionColumn Fixed="right" Title="操作" Width="50" Style="text-align:right">
-                                <Space>
-                                    <SpaceItem>
-                                        @{
-                                            <AntDesign.Dropdown>
-                                                <Overlay>
-                                                    <Menu>
-                                                        @{
-                                                            if (context.AgentFeedbackMemo != "已算绩效")
-                                                            {
-                                                                <MenuItem OnClick="() => menuYSJXClick(context)">已算绩效</MenuItem>
-                                                            }
-                                                            var menuItems = apTypeService.GetItems(context);
-                                                            if (menuItems.Count > 0)
-                                                            {
-                                                                @foreach (var apType in menuItems)
+                            @if (ShowMenu())
+                            {
+                                <ActionColumn Fixed="right" Title="操作" Width="50" Style="text-align:right">
+                                    <Space>
+                                        <SpaceItem>
+                                            @{
+                                                <AntDesign.Dropdown>
+                                                    <Overlay>
+                                                        <Menu>
+                                                            @{
+                                                                if (context.AgentFeedbackMemo != "已算绩效")
+                                                                {
+                                                                    <MenuItem OnClick="() => menuYSJXClick(context)">已算绩效</MenuItem>
+                                                                }
+                                                                var menuItems = apTypeService.GetItems(context);
+                                                                if (menuItems.Count > 0)
                                                                 {
-                                                                    <MenuItem @key="@($"{context.Id}-{apType.Id}")" OnClick="()=>ShowModel(context,apType)">@apType.Name</MenuItem>
+                                                                    @foreach (var apType in menuItems)
+                                                                    {
+                                                                        <MenuItem @key="@($"{context.Id}-{apType.Id}")" OnClick="() => ShowModel(context, apType)">@apType.Name</MenuItem>
+                                                                    }
                                                                 }
                                                             }
-                                                        }
-                                                    </Menu>
-                                                </Overlay>
-                                                <ChildContent>
-                                                    <Button Type="Primary" Icon="down" Style="background: #f6ffed;"></Button>
-                                                </ChildContent>
-                                            </AntDesign.Dropdown>
-                                        }
-                                    </SpaceItem>
-                                </Space>
+                                                        </Menu>
+                                                    </Overlay>
+                                                    <ChildContent>
+                                                        <Button Type="Primary" Icon="down" Style="background: #f6ffed;"></Button>
+                                                    </ChildContent>
+                                                </AntDesign.Dropdown>
+                                            }
+                                        </SpaceItem>
+                                    </Space>
 
-                            </ActionColumn>
+                                </ActionColumn>
+                            }
                         </RowTemplate>
                         <ExpandTemplate>
                             <div style="width:1000px;margin-left:30px;">
@@ -189,18 +195,18 @@
                                             <DescriptionsItem Title="绩效特殊字段" Span="3">
                                                 @context.Data.AgentFeedbackMemo
                                                 @*<Select DataSource="@_afService.GetItems(context.Data)"
-                                                        @bind-Value="@context.Data.AgentFeedbackMemo"
-                                                        LabelName="@nameof(Reason.Name)"
-                                                        ValueName="@nameof(Reason.Value)"
-                                                        Placeholder="请选项一项"
-                                                        DefaultActiveFirstItem="false"
-                                                        EnableSearch="true"
-                                                        AllowClear="true"
-                                                        Style="width:220px;"
-                                                        OnSelectedItemChanged="SelectChanged"
-                                                        OnClearSelected="() => ClearSelect(context.Data.Id)"
-                                                        OnFocus="() => OnFocus(context.Data)">
-                                                </Select>*@
+                                                            @bind-Value="@context.Data.AgentFeedbackMemo"
+                                                            LabelName="@nameof(Reason.Name)"
+                                                            ValueName="@nameof(Reason.Value)"
+                                                            Placeholder="请选项一项"
+                                                            DefaultActiveFirstItem="false"
+                                                            EnableSearch="true"
+                                                            AllowClear="true"
+                                                            Style="width:220px;"
+                                                            OnSelectedItemChanged="SelectChanged"
+                                                            OnClearSelected="() => ClearSelect(context.Data.Id)"
+                                                            OnFocus="() => OnFocus(context.Data)">
+                                                    </Select>*@
                                             </DescriptionsItem>
                                             <DescriptionsItem Title="完成时间">@(context.Data.FinishedDate.HasValue ? context.Data.FinishedDate.Value.ToString("yyyy-MM-dd") : "")</DescriptionsItem>
                                             <DescriptionsItem Title="返稿日">@(context.Data.ReturnDate.HasValue ? context.Data.ReturnDate.Value.ToString("yyyy-MM-dd") : "")</DescriptionsItem>
@@ -223,14 +229,14 @@
                 else
                 {
                     <AntDesign.Table DataSource="_Datas" TItem="PerformanceItem" @ref="@table"
-                                        @bind-PageIndex="_pageIndex"
-                                        @bind-PageSize="_pageSize"
-                                        Total="_total" ScrollX="1200"
-                                        Size="TableSize.Small" Bordered
-                                        @bind-SelectedRows="selectedItems"
-                                        OnRow="OnRow"
-                                        Loading="_loading"
-                                        OnChange="HandleTableChange" RemoteDataSource>
+                                     @bind-PageIndex="_pageIndex"
+                                     @bind-PageSize="_pageSize"
+                                     Total="_total" ScrollX="1200"
+                                     Size="TableSize.Small" Bordered
+                                     @bind-SelectedRows="selectedItems"
+                                     OnRow="OnRow"
+                                     Loading="_loading"
+                                     OnChange="HandleTableChange" RemoteDataSource>
                         <RowTemplate>
                             <AntDesign.Selection Key="@(context.Id.ToString())" Width="50" Fixed="left" />
                             <AntDesign.Column Title="序号" TData="int" Width="50" Fixed="left">
@@ -241,11 +247,11 @@
                             <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
                             <AntDesign.Column Title="案件系数"
-                                                @bind-Field="@context.CaseCoefficient" Width="120"
-                                                Filters="CaseCoeFilters"
-                                                FilterMultiple="false"
-                                                OnFilter="((value,name)=>name.StartsWith(value))"
-                                                Sortable />
+                                              @bind-Field="@context.CaseCoefficient" Width="120"
+                                              Filters="CaseCoeFilters"
+                                              FilterMultiple="false"
+                                              OnFilter="((value,name)=>name.StartsWith(value))"
+                                              Sortable />
                             <AntDesign.Column Title="处理事项" @bind-Field="@context.DoItem" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="处理事项系数" @bind-Field="@context.DoItemCoefficient" Width="150" Sortable Filterable />
                             <AntDesign.Column Title="绩效特殊字段" @bind-Field="@context.AgentFeedbackMemo" Width="250" />
@@ -287,7 +293,7 @@
         </Card>
 
     </ChildContent>
-   
+
 </PageContainer>
 
 <style>

+ 24 - 0
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -66,11 +66,14 @@ namespace wispro.sp.web.Pages.AppCase
         [Inject] protected CalMonthServices _CalMonthService { get; set; }
         [Inject] protected IJSRuntime JSRuntime { get; set; }
 
+        [Inject] IConfiguration configuration{get;set;}
+
 
         private bool isFirstInit = true;
         private Table<PerformanceItem> table;
         private CurrentUser _user;
         private string strAddProjectJX = "";
+        
         protected async override Task OnInitializedAsync()
         {
             if (isFirstInit)
@@ -88,6 +91,27 @@ namespace wispro.sp.web.Pages.AppCase
             StateHasChanged();
         }
 
+        private bool ShowMenu()
+        {
+            var strlfd = configuration.GetValue<string>("Latest_feedback_date");
+
+            if (string.IsNullOrEmpty(strlfd))
+            {
+                return true;
+            }
+            else
+            {
+                if(DateTime.Now.Day <= int.Parse(strlfd))
+                {
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+            }
+        }
+
         private async Task RefreshMyStatistics()
         {
             var HandlingCalMonth = await _CalMonthService.GetHandlingMonth();

+ 12 - 9
wispro.sp.web/Pages/Organization/Department.razor

@@ -1,5 +1,5 @@
 @page "/Department"
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
@@ -30,15 +30,14 @@
                               ChildrenExpression="x => GetChildren(x.DataItem)"
                               IsLeafExpression="x => GetChildren(x.DataItem)?.Count == 0"
                               KeyExpression="x => x.DataItem.Id.ToString()"
-                              TItem="wispro.sp.entity.Department" 
+                              TItem="wispro.sp.entity.Department"
                               OnClick="OnSelect"
                               Style="width:250px;">
                             <TitleTemplate>
-                                <wispro.sp.web.Components.RightMenuTreeNode 
-                                                Department="@context.DataItem"
-                                                OnCreate="()=>AddNew(context.DataItem)"
-                                                OnEdit="()=>EditDept(context.DataItem)"
-                                                OnDelete="() => DeleteDept(context.DataItem)" />
+                                <wispro.sp.web.Components.RightMenuTreeNode Department="@context.DataItem"
+                                                                            OnCreate="()=>AddNew(context.DataItem)"
+                                                                            OnEdit="()=>EditDept(context.DataItem)"
+                                                                            OnDelete="() => DeleteDept(context.DataItem)" />
 
                             </TitleTemplate>
                         </Tree>
@@ -127,11 +126,11 @@
        Visible="@_newUserModal"
        OnOk="@HandleOk"
        OnCancel="@HandleCancel">
-    
+
     <Form Model="EditingStaff" LabelColSpan="6"
           WrapperColSpan="16">
         <FormItem Label="姓名">
-            <wispro.sp.web.Components.StaffAutoComplete OnSelected="UserSelected" @bind-SelectName="@context.Name"/>
+            <wispro.sp.web.Components.StaffAutoComplete OnSelected="UserSelected" @bind-SelectName="@context.Name" />
             @*<Input @bind-Value="@context.Name" />*@
         </FormItem>
         <FormItem Label="岗位状态">
@@ -167,6 +166,10 @@
             </Select>
         </FormItem>
 
+        <FormItem Label="邮箱">
+            <DatePicker @bind-Value="@context.Mail" />
+        </FormItem>
+
         <FormItem Label="入职时间">
             <DatePicker @bind-Value="@context.EntyDate" />
         </FormItem>

+ 2 - 12
wispro.sp.web/Pages/Organization/Department.razor.cs

@@ -35,19 +35,9 @@ namespace wispro.sp.web.Pages.Organization
 
         protected override async System.Threading.Tasks.Task OnInitializedAsync()
         {
-            var canVisist = await _authService.CanVisitResource("/Department");
+            await _authService.CanVisitResource();
+            
             
-            if (!canVisist)
-            {
-                var config = new MessageConfig()
-                {
-                    Content = "您没有权限使用该功能",
-                    Type = MessageType.Error
-                };
-
-                var ret = _message.Open(config);
-                await JSRuntime.InvokeVoidAsync("history.back");
-            }
 
             _loading = true;
 

+ 3 - 3
wispro.sp.web/Pages/Project/AssignPoint.razor

@@ -1,5 +1,5 @@
 @page "/Project/WorkContent/{Id:int?}"
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
@@ -154,8 +154,8 @@
                     </Space>
                 </Card>
             }
-            </Card>
-        
+        </Card>
+
     </ChildContent>
 </PageContainer>
 

+ 75 - 74
wispro.sp.web/Pages/Project/MyProject.razor

@@ -1,4 +1,5 @@
 @page "/Project/MyProjects"
+@attribute [Authorize]
 
 <PageContainer>
     <Breadcrumb>
@@ -23,85 +24,85 @@
         else
         {
 
-    <AntDesign.Table @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
-                     Total="@_total"
-                     TItem="ProjectContentRecord"
-                     Loading="_loading"
-                     DataSource="@ProjectInfos"
-                     Bordered=@true
-                     Size=@TableSize.Middle>
-        <RowTemplate>
-            @*<Selection Key="@(context.ProjectNo)" />*@
-            <AntDesign.Column Title="序号" TData="int" Width="60">
-                @serialNumber(_pageIndex, _pageSize, context)
-            </AntDesign.Column>
-            <AntDesign.Column Title="我方文号" @bind-Field="@context.ProjectNo" Sortable Filterable />
-            <AntDesign.Column Title="案件名称" DataIndex="Project.CaseName" TData="string" Sortable Filterable />
-            <AntDesign.Column Title="案件类型" DataIndex="Project.CaseType" TData="string" Sortable Filterable />
-            <AntDesign.Column Title="客户" DataIndex="Project.Customer.Name" TData="string" Sortable Filterable />
-            <AntDesign.Column Title="绩效月份" TData="string" Sortable Filterable>
-                @if (context.CalMonth != null)
-                {
-                    @($"{context.CalMonth.Year}年{context.CalMonth.Month}月")
-                }
-            </AntDesign.Column>
-            <AntDesign.Column Title="最终绩效" TData="string">
-                @($"{context.Point}{context.CaseCoefficient}")
-            </AntDesign.Column>
-            <AntDesign.Column Title="业务类型" DataIndex="Project.BusinessType" TData="string" Sortable Filterable />
-            <AntDesign.Column Title="状态" TData="string">
-                @getStatus(context.State)
-            </AntDesign.Column>
-            <ActionColumn>
-                <Space>
-                    @if (context.State == 0)
-                    {
-                        <SpaceItem><Button Danger OnClick="() => Edit(context)">修改</Button></SpaceItem>
-                        <SpaceItem><Button Danger OnClick="() => Submit(context)">提交审核</Button></SpaceItem>
-                    }
-                </Space>
-            </ActionColumn>
-        </RowTemplate>
-        <ExpandTemplate>
-            <Table DataSource="context.Data.ProjectWorkContents" Context="pp">
-                <ChildContent>
-
-                    <AntDesign.Column Title="工作内容" TData="string">
-                        @pp.Content
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="工作日期" TData="string">
-                        @pp.WorkDate.ToString("yyyy-MM-dd")
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="时间跨度" TData="string">
-                        @pp.TimeSpan 天
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="耗时" TData="string">
-                        @pp.TakeTime 小时
+            <AntDesign.Table @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
+                             Total="@_total"
+                             TItem="ProjectContentRecord"
+                             Loading="_loading"
+                             DataSource="@ProjectInfos"
+                             Bordered=@true
+                             Size=@TableSize.Middle>
+                <RowTemplate>
+                    @*<Selection Key="@(context.ProjectNo)" />*@
+                    <AntDesign.Column Title="序号" TData="int" Width="60">
+                        @serialNumber(_pageIndex, _pageSize, context)
                     </AntDesign.Column>
-                    <AntDesign.Column Title="工作难度系数" TData="string">
-                        @pp.DifficultFactor
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="实际绩效" TData="string">
-                        @pp.ActualPerformance
+                    <AntDesign.Column Title="我方文号" @bind-Field="@context.ProjectNo" Sortable Filterable />
+                    <AntDesign.Column Title="案件名称" DataIndex="Project.CaseName" TData="string" Sortable Filterable />
+                    <AntDesign.Column Title="案件类型" DataIndex="Project.CaseType" TData="string" Sortable Filterable />
+                    <AntDesign.Column Title="客户" DataIndex="Project.Customer.Name" TData="string" Sortable Filterable />
+                    <AntDesign.Column Title="绩效月份" TData="string" Sortable Filterable>
+                        @if (context.CalMonth != null)
+                        {
+                            @($"{context.CalMonth.Year}年{context.CalMonth.Month}月")
+                        }
                     </AntDesign.Column>
                     <AntDesign.Column Title="最终绩效" TData="string">
-                        @pp.FinalPerformance
+                        @($"{context.Point}{context.CaseCoefficient}")
+                    </AntDesign.Column>
+                    <AntDesign.Column Title="业务类型" DataIndex="Project.BusinessType" TData="string" Sortable Filterable />
+                    <AntDesign.Column Title="状态" TData="string">
+                        @getStatus(context.State)
                     </AntDesign.Column>
+                    <ActionColumn>
+                        <Space>
+                            @if (context.State == 0)
+                            {
+                                <SpaceItem><Button Danger OnClick="() => Edit(context)">修改</Button></SpaceItem>
+                                <SpaceItem><Button Danger OnClick="() => Submit(context)">提交审核</Button></SpaceItem>
+                            }
+                        </Space>
+                    </ActionColumn>
+                </RowTemplate>
+                <ExpandTemplate>
+                    <Table DataSource="context.Data.ProjectWorkContents" Context="pp">
+                        <ChildContent>
+
+                            <AntDesign.Column Title="工作内容" TData="string">
+                                @pp.Content
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="工作日期" TData="string">
+                                @pp.WorkDate.ToString("yyyy-MM-dd")
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="时间跨度" TData="string">
+                                @pp.TimeSpan 天
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="耗时" TData="string">
+                                @pp.TakeTime 小时
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="工作难度系数" TData="string">
+                                @pp.DifficultFactor
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="实际绩效" TData="string">
+                                @pp.ActualPerformance
+                            </AntDesign.Column>
+                            <AntDesign.Column Title="最终绩效" TData="string">
+                                @pp.FinalPerformance
+                            </AntDesign.Column>
 
-                </ChildContent>
-            </Table>
-        </ExpandTemplate>
-        <PaginationTemplate>
-            <div style="display: flex; align-items: center">
-                <Pagination Class="my-custom-pagination"
-                            Total="@_total"
-                            PageSize="@_pageSize"
-                            Current="@_pageIndex"
-                            ShowSizeChanger="@true"
-                            OnChange="HandlePageChange" />
-            </div>
-        </PaginationTemplate>
-    </AntDesign.Table>
+                        </ChildContent>
+                    </Table>
+                </ExpandTemplate>
+                <PaginationTemplate>
+                    <div style="display: flex; align-items: center">
+                        <Pagination Class="my-custom-pagination"
+                                    Total="@_total"
+                                    PageSize="@_pageSize"
+                                    Current="@_pageIndex"
+                                    ShowSizeChanger="@true"
+                                    OnChange="HandlePageChange" />
+                    </div>
+                </PaginationTemplate>
+            </AntDesign.Table>
 
         }
 

+ 51 - 51
wispro.sp.web/Pages/Project/ProjectReviewer.razor

@@ -1,5 +1,5 @@
 @page "/Project/Reviewer/{ProjectNo?}"
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
@@ -25,60 +25,60 @@
                 <SpaceItem>@ProjectNo</SpaceItem>
             }
         </Space>
-            
+
         @if (projectContents != null)
         {
-            foreach(var pContent in projectContents)
+            foreach (var pContent in projectContents)
             {
                 //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(pContent));
-    <Card Title="@pContent.ProjectContentRecord.Staff.Name">
-        <Extra>
-            <Space>
-                <SpaceItem>最终绩效点数:<AntDesign.InputNumber @bind-Value="@pContent.ProjectContentRecord.Point" Step="0.01" Size="50"/></SpaceItem>
-                <SpaceItem>
-                    <Select @bind-Value="@pContent.ProjectContentRecord.CaseCoefficient"
-                            TItemValue="string" TItem="string" Size="50" DefaultActiveFirstOption>
-                        <SelectOptions>
-                            <SelectOption TItemValue="string" TItem="string" Value="@("S")" Label="S" />
-                            <SelectOption TItemValue="string" TItem="string" Value="@("A")" Label="A" />
-                            <SelectOption TItemValue="string" TItem="string" Value="@("B")" Label="B" />
-                            <SelectOption TItemValue="string" TItem="string" Value="@("C")" Label="C" />
-                            <SelectOption TItemValue="string" TItem="string" Value="@("D")" Label="D" />
-                        </SelectOptions>
-                    </Select>
-                </SpaceItem>
-            </Space>
-        </Extra>
-        <Body>
-            <Table DataSource="pContent.ProjectWorkContents" Context="pp" Size="@TableSize.Small" Title="工作内容" HidePagination="@true">
-                <ChildContent>
-                    <AntDesign.Column Title="工作内容" TData="string">
-                        @pp.Content
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="工作日期" TData="string">
-                        @pp.WorkDate.ToString("yyyy-MM-dd")
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="时间跨度" TData="string">
-                        @pp.TimeSpan 天
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="耗时" TData="string">
-                        @pp.TakeTime 小时
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="工作难度系数" TData="string">
-                        <Input Type="text" @bind-Value="@pp.DifficultFactor"  Size="20"  @oninput="()=>ContentChanged(pp)"/>
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="实际绩效" TData="string">
-                        <Input Type="text" @bind-Value="@pp.ActualPerformance" OnBlur="stopEdit" Size="20"  @oninput="()=>ContentChanged(pp)" />
-                    </AntDesign.Column>
-                    <AntDesign.Column Title="最终绩效" TData="string">
-                        <Input Type="text" @bind-Value="@pp.FinalPerformance" OnBlur="stopEdit" Size="20"  @oninput="()=>ContentChanged(pp)" />
-                    </AntDesign.Column>
-                </ChildContent>
-            </Table>
-           
-        </Body>
-        
-    </Card>
+                <Card Title="@pContent.ProjectContentRecord.Staff.Name">
+                    <Extra>
+                        <Space>
+                            <SpaceItem>最终绩效点数:<AntDesign.InputNumber @bind-Value="@pContent.ProjectContentRecord.Point" Step="0.01" Size="50" /></SpaceItem>
+                            <SpaceItem>
+                                <Select @bind-Value="@pContent.ProjectContentRecord.CaseCoefficient"
+                                        TItemValue="string" TItem="string" Size="50" DefaultActiveFirstOption>
+                                    <SelectOptions>
+                                        <SelectOption TItemValue="string" TItem="string" Value="@("S")" Label="S" />
+                                        <SelectOption TItemValue="string" TItem="string" Value="@("A")" Label="A" />
+                                        <SelectOption TItemValue="string" TItem="string" Value="@("B")" Label="B" />
+                                        <SelectOption TItemValue="string" TItem="string" Value="@("C")" Label="C" />
+                                        <SelectOption TItemValue="string" TItem="string" Value="@("D")" Label="D" />
+                                    </SelectOptions>
+                                </Select>
+                            </SpaceItem>
+                        </Space>
+                    </Extra>
+                    <Body>
+                        <Table DataSource="pContent.ProjectWorkContents" Context="pp" Size="@TableSize.Small" Title="工作内容" HidePagination="@true">
+                            <ChildContent>
+                                <AntDesign.Column Title="工作内容" TData="string">
+                                    @pp.Content
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="工作日期" TData="string">
+                                    @pp.WorkDate.ToString("yyyy-MM-dd")
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="时间跨度" TData="string">
+                                    @pp.TimeSpan 天
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="耗时" TData="string">
+                                    @pp.TakeTime 小时
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="工作难度系数" TData="string">
+                                    <Input Type="text" @bind-Value="@pp.DifficultFactor" Size="20" @oninput="()=>ContentChanged(pp)" />
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="实际绩效" TData="string">
+                                    <Input Type="text" @bind-Value="@pp.ActualPerformance" OnBlur="stopEdit" Size="20" @oninput="()=>ContentChanged(pp)" />
+                                </AntDesign.Column>
+                                <AntDesign.Column Title="最终绩效" TData="string">
+                                    <Input Type="text" @bind-Value="@pp.FinalPerformance" OnBlur="stopEdit" Size="20" @oninput="()=>ContentChanged(pp)" />
+                                </AntDesign.Column>
+                            </ChildContent>
+                        </Table>
+
+                    </Body>
+
+                </Card>
             }
         }
         else

+ 5 - 6
wispro.sp.web/Pages/Project/ProjectSearch.razor

@@ -1,5 +1,5 @@
 @page "/Project/ProjectSearch"
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
@@ -21,13 +21,12 @@
         else
         {
 
-            <AntDesign.Table @ref="table"  @bind-PageIndex="@_pageIndex" @bind-PageSize="@_pageSize" Total="@_total"
+            <AntDesign.Table @ref="table" @bind-PageIndex="@_pageIndex" @bind-PageSize="@_pageSize" Total="@_total"
                              TItem="ProjectInfo"
                              Loading="_loading"
                              DataSource="@ProjectInfos"
                              Bordered=@true
-                             Size=@TableSize.Middle
-                             >
+                             Size=@TableSize.Middle>
                 <ChildContent>
                     @*<Selection Key="@(context.CaseNo)" />*@
                     <AntDesign.Column Title="序号" TData="int" Width="70">
@@ -38,7 +37,7 @@
                     <AntDesign.Column Title="案件类型" Field="@context.CaseType" Sortable Filterable />
                     <AntDesign.Column Title="业务类型" @bind-Field="@context.BusinessType" Sortable Filterable />
                     <AntDesign.Column Title="客户" TData="string" DataIndex=@("Customer.Name") Sortable Filterable />
-                    <AntDesign.Column Title="案件状态" TData="string"  Sortable Filterable>
+                    <AntDesign.Column Title="案件状态" TData="string" Sortable Filterable>
                         <Template>
                             <span>@(context.CaseState==0?"处理中":"已完成")</span>
                         </Template>
@@ -58,7 +57,7 @@
                                     Total="@_total"
                                     PageSize="@_pageSize"
                                     Current="@_pageIndex"
-                                    ShowSizeChanger="@true" 
+                                    ShowSizeChanger="@true"
                                     OnChange="HandlePageChange" />
                     </div>
                 </PaginationTemplate>

+ 5 - 16
wispro.sp.web/Pages/Project/ProjectSearch.razor.cs

@@ -33,22 +33,11 @@ namespace wispro.sp.web.Pages.Project
         protected async override Task OnInitializedAsync()
         {
             string strResourceId = navigation.Uri.Replace(navigation.BaseUri,"/");
-            Console.WriteLine(navigation.ToAbsoluteUri(navigation.Uri));
-            Console.WriteLine(navigation.ToBaseRelativePath(navigation.Uri));
+            //Console.WriteLine(navigation.ToAbsoluteUri(navigation.Uri));
+            //Console.WriteLine(navigation.ToBaseRelativePath(navigation.Uri));
 
-            var canVisist = await _authService.CanVisitResource(strResourceId);
-
-            if (!canVisist)
-            {
-                var config = new MessageConfig()
-                {
-                    Content = "您没有权限使用该功能",
-                    Type = MessageType.Error
-                };
-
-                var ret = MsgSvr.Open(config);
-                await JSRuntime.InvokeVoidAsync("history.back");
-            }
+            await _authService.CanVisitResource();
+            
 
             ProjectInfos = await _itemService.GetAllProjects();
             _total = ProjectInfos.Count;
@@ -84,7 +73,7 @@ namespace wispro.sp.web.Pages.Project
 
         public async Task OnChange(QueryModel<ProjectInfo> queryModel)
         {
-            Console.WriteLine(JsonSerializer.Serialize(queryModel));
+            //Console.WriteLine(JsonSerializer.Serialize(queryModel));
         }
 
         private void HandlePageChange(PaginationEventArgs args)

+ 3 - 1
wispro.sp.web/Pages/StaffGrade.razor.cs

@@ -19,7 +19,8 @@ namespace wispro.sp.web.Pages
 
         private List<wispro.sp.entity.StaffGrade> staffGrades;
         IEnumerable<wispro.sp.entity.StaffGrade> selectedRows;
-        
+        [Inject] protected IAuthService _authService { get; set; }
+
         ITable table;
 
         int _pageIndex = 1;
@@ -33,6 +34,7 @@ namespace wispro.sp.web.Pages
 
         protected override async Task OnInitializedAsync()
         {
+            _authService.CanVisitResource();
 
             _loading = true;
 

+ 2 - 2
wispro.sp.web/Pages/StartPerformanceCalculation.razor

@@ -1,5 +1,5 @@
 @page "/StartPerformanceCalculation"
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <BreadcrumbItem>
@@ -51,6 +51,6 @@
 
             </div>
 
-</Card>
+        </Card>
     </ChildContent>
 </PageContainer>

+ 5 - 0
wispro.sp.web/Pages/TestGraphviz.razor

@@ -0,0 +1,5 @@
+@page "/TestGraphviz"
+
+<div  style="height:800px;width:100%;overflow:auto;background:#FFFFFF;" id="div-Container">
+    <div @ref="_renderTo"></div>
+</div>

+ 38 - 0
wispro.sp.web/Pages/TestGraphviz.razor.cs

@@ -0,0 +1,38 @@
+using Microsoft.AspNetCore.Components;
+using Microsoft.JSInterop;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace wispro.sp.web.Pages
+{
+    public partial class TestGraphviz
+    {
+        private ElementReference _renderTo;
+
+        [Inject]
+        IJSRuntime JsRuntime { get; set; }
+
+        protected override async Task OnInitializedAsync()
+        {
+            var diagramModule = await JsRuntime
+                .InvokeAsync<IJSObjectReference>("import", "/diagrams.js");
+            //n,ne,e,se,s,sw,w,nw
+            var diagram = "digraph {label=\"案件系数申诉流程图\"  rankdir=\"TB\"  center=\"true\"\r\n" +
+                "start[label=开始 shape=circle size=\"2pt,2pt\" fixedsize=true fontsize=8]\r\n" +
+                "shensu[label=申诉, shape=box,fillcolor=chartreuse,style=filled href=\"http://www.baidu.com\"]\r\n" +
+                "review[label=审核, shape=box,fillcolor=chartreuse,style=filled]\r\n" +
+                "end[label=结束, shape=doublecircle fillcolor=gray,style=filled  fixedsize=true fontsize=8 size=\"2pt,2pt\"]\r\n" +
+                "start->shensu->review->end\r\n" +
+                "review:w->shensu:w}";
+
+            await diagramModule.InvokeVoidAsync("renderDot", diagram, _renderTo,1100,800);
+        }
+
+        void ClickNode()
+        {
+            //Console.WriteLine("ClickNode!");
+        }
+    }
+}

+ 47 - 47
wispro.sp.web/Pages/Workflow/WorkflowDefine.razor

@@ -1,6 +1,6 @@
 @page "/Workflow/Manage"
 @using wispro.sp.entity
-
+@attribute [Authorize]
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
@@ -71,8 +71,8 @@
                 </PaginationTemplate>
             </AntDesign.Table>
         }
-        
-</ChildContent>
+
+    </ChildContent>
 </PageContainer>
 
 <style>
@@ -85,53 +85,53 @@
             border-radius: 100%;
         }
 </style>
-    
-    <Modal Title="修改"
-           Visible="@_visible"
-           OnOk="@HandleOk"
-           OnCancel="@HandleCancel"
-           OkText="@("保存")"
-           CancelText="@("取消")"
-           Width="1000" MaskClosable="false">
 
-        <Form Model="EditingObj" LabelColSpan="6"
-              WrapperColSpan="16">
-            <FormItem Label="流程名称">
-                <Input @bind-Value="@context.Name" />
-            </FormItem>
-            <FormItem Label="生效日期">
-                <DatePicker TValue="DateTime" Picker="@DatePickerType.Date" @bind-Value="@context.EffectivrDate" />
-            </FormItem>
+<Modal Title="修改"
+       Visible="@_visible"
+       OnOk="@HandleOk"
+       OnCancel="@HandleCancel"
+       OkText="@("保存")"
+       CancelText="@("取消")"
+       Width="1000" MaskClosable="false">
+
+    <Form Model="EditingObj" LabelColSpan="6"
+          WrapperColSpan="16">
+        <FormItem Label="流程名称">
+            <Input @bind-Value="@context.Name" />
+        </FormItem>
+        <FormItem Label="生效日期">
+            <DatePicker TValue="DateTime" Picker="@DatePickerType.Date" @bind-Value="@context.EffectivrDate" />
+        </FormItem>
 
-            <FormItem Label="失效日期">
-                <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" @bind-Value="@context.ExpirationDate" />
-            </FormItem>
+        <FormItem Label="失效日期">
+            <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" @bind-Value="@context.ExpirationDate" />
+        </FormItem>
 
-            <FormItem Label="启动时绑定对象">
-                <Select DataSource="@workflowService.GetBindObjects()"
-                        @bind-Value="@context.ContentObjectType"
-                        LabelName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.Name)"
-                        ValueName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.ObjectTypeFullName)"
-                        Placeholder="请选项一项"
-                        DefaultActiveFirstItem="false"
-                        EnableSearch="true"
-                        AllowClear="true"
-                        Style="width:220px;">
-                </Select>
-            </FormItem>
+        <FormItem Label="启动时绑定对象">
+            <Select DataSource="@workflowService.GetBindObjects()"
+                    @bind-Value="@context.ContentObjectType"
+                    LabelName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.Name)"
+                    ValueName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.ObjectTypeFullName)"
+                    Placeholder="请选项一项"
+                    DefaultActiveFirstItem="false"
+                    EnableSearch="true"
+                    AllowClear="true"
+                    Style="width:220px;">
+            </Select>
+        </FormItem>
 
-            <FormItem Label="说明">
-                <TextArea @bind-Value="@context.Memo" MinRows="4" />
-            </FormItem>
+        <FormItem Label="说明">
+            <TextArea @bind-Value="@context.Memo" MinRows="4" />
+        </FormItem>
 
-            <Divider />
-            <FormItem Label="初始化操作名称">
-                <Input @bind-Value="@InitAction.Action.Name" />
-            </FormItem>
-            <FormItem Label="初始化界面">
-                <Input @bind-Value="@InitAction.Action.InputForm" />
-            </FormItem>
-            <wispro.sp.web.Components.InputValueSetting EditAction="InitAction" />
-        </Form>
+        <Divider />
+        <FormItem Label="初始化操作名称">
+            <Input @bind-Value="@InitAction.Action.Name" />
+        </FormItem>
+        <FormItem Label="初始化界面">
+            <Input @bind-Value="@InitAction.Action.InputForm" />
+        </FormItem>
+        <wispro.sp.web.Components.InputValueSetting EditAction="InitAction" />
+    </Form>
 
-    </Modal>
+</Modal>

+ 1 - 13
wispro.sp.web/Pages/Workflow/WorkflowDefine.razor.cs

@@ -49,19 +49,7 @@ namespace wispro.sp.web.Pages.Workflow
 
         protected override async System.Threading.Tasks.Task OnInitializedAsync()
         {
-            var canVisist = await _authService.CanVisitResource("/Department");
-
-            if (!canVisist)
-            {
-                var config = new MessageConfig()
-                {
-                    Content = "您没有权限使用该功能",
-                    Type = MessageType.Error
-                };
-
-                var ret = _msgService.Open(config);
-                await JSRuntime.InvokeVoidAsync("history.back");
-            }
+            await _authService.CanVisitResource();
 
             await base.OnInitializedAsync();
             workflows = await workflowService.getAllWorkflows();

+ 37 - 38
wispro.sp.web/Pages/Workflow/WorkflowDetail.razor

@@ -1,11 +1,11 @@
 @page "/Workflow/Detail/{WorkflowId:int}"
-
+@attribute [Authorize]
 
 <PageContainer>
     <Breadcrumb>
         <Breadcrumb>
             <BreadcrumbItem>
-                <a href="/Home"><Icon Type="home"></Icon></a> 
+                <a href="/Home"><Icon Type="home"></Icon></a>
             </BreadcrumbItem>
             <BreadcrumbItem>
                 <Icon Type="apartment" Theme="outline" /><span>流程管理</span>
@@ -22,7 +22,7 @@
                             OnConfirm="DeleteObject"
                             OkText="Yes"
                             CancelText="No">
-                    <a><Icon Type="delete" Theme="outline"/>删除</a>
+                    <a><Icon Type="delete" Theme="outline" />删除</a>
                 </Popconfirm>
             </MenuItem>
 
@@ -35,20 +35,19 @@
         }
         else
         {
-    <div style="height:800px;width:100%;overflow:auto;background:#FFFFFF;" id="div-Container">
-        <Affix TargetSelector="#div-Container" OffsetTop="10" Style="float:right">
-            <a href="@DownloadUrl"><Icon Type="download" Theme="outline" /></a>
-        </Affix>
-        <wispro.sp.web.Components.FlowChart @ref="chart"
-                                            workflow="@workflow" Actions="@Actions"
-                                            Transfers="@Transfers" Steps="@Steps"
-                                            OnDoubleClickStep="OnDblClickStep"
-                                            OnDoubleClickAction="OnDblClickAction"
-                                            OnDoubleClickTransfer="OnDblClickTransfer"
-                                            hSeparation="60"
-                                            ChartWidth="900" ChartHeight="600"
-                                            />
-    </div>
+            <div style="height:800px;width:100%;overflow:auto;background:#FFFFFF;" id="div-Container">
+                <Affix TargetSelector="#div-Container" OffsetTop="10" Style="float:right">
+                    <a href="@DownloadUrl"><Icon Type="download" Theme="outline" /></a>
+                </Affix>
+                <wispro.sp.web.Components.FlowChart @ref="chart"
+                                                    workflow="@workflow" Actions="@Actions"
+                                                    Transfers="@Transfers" Steps="@Steps"
+                                                    OnDoubleClickStep="OnDblClickStep"
+                                                    OnDoubleClickAction="OnDblClickAction"
+                                                    OnDoubleClickTransfer="OnDblClickTransfer"
+                                                    hSeparation="60"
+                                                    ChartWidth="900" ChartHeight="600" />
+            </div>
         }
     </ChildContent>
 </PageContainer>
@@ -69,27 +68,27 @@
             <Input @bind-Value="context.Step.Name" />
         </FormItem>
         <FormItem Label="责任人">
-            <wispro.sp.web.Components.ResponseManCondition Workflow="workflow" UserField="userField"/>
+            <wispro.sp.web.Components.ResponseManCondition Workflow="workflow" UserField="userField" />
         </FormItem>
 
         <div><Button Type="primary" Icon="plus" OnClick="AddNewAction" Style="float:right">添加操作</Button></div>
-       
+
         <AntDesign.Table DataSource="@context.actions"
                          Bordered=@true
                          Size=@TableSize.Middle
                          HidePagination
                          Context="ss">
             <ChildContent>
-                
+
                 <AntDesign.Column Title="名称" TData="string">
                     @if (ss.Action != null)
                     {
                         <span>@ss.Action.Name</span>
                     }
-                    
-                </AntDesign.Column> 
+
+                </AntDesign.Column>
                 <AntDesign.Column Title="操作界面" TData="string">
-                    @if(ss.Action != null)
+                    @if (ss.Action != null)
                     {
                         <span>@ss.Action.InputForm</span>
                     }
@@ -111,7 +110,7 @@
                     </Space>
                 </ActionColumn>
             </ChildContent>
-            
+
         </AntDesign.Table>
     </Form>
 
@@ -128,25 +127,25 @@
     <Form Model="EditAction" LabelColSpan="6"
           WrapperColSpan="16">
         @*<FormItem Label="所属步骤">
-            <Select DataSource="@Steps"
-                DefaultValue="@EditAction.Action.StepId"
-                @bind-Value="@EditAction.Action.StepId"
-                LabelName="@nameof(wispro.sp.entity.workflowDefine.Step.Name)"
-                ValueName="@nameof(wispro.sp.entity.workflowDefine.Step.Id)"
-                Style="width: 200px"
-                Placeholder="请选择"
-                IgnoreItemChanges="false"
-                EnableSearch="true"
-                AllowClear>
-        </Select>
-        </FormItem>*@
+                <Select DataSource="@Steps"
+                    DefaultValue="@EditAction.Action.StepId"
+                    @bind-Value="@EditAction.Action.StepId"
+                    LabelName="@nameof(wispro.sp.entity.workflowDefine.Step.Name)"
+                    ValueName="@nameof(wispro.sp.entity.workflowDefine.Step.Id)"
+                    Style="width: 200px"
+                    Placeholder="请选择"
+                    IgnoreItemChanges="false"
+                    EnableSearch="true"
+                    AllowClear>
+            </Select>
+            </FormItem>*@
         <FormItem Label="操作名称">
             <Input @bind-Value="@EditAction.Action.Name" />
         </FormItem>
         <FormItem Label="初始化界面">
             <Input @bind-Value="@EditAction.Action.InputForm" />
         </FormItem>
-        
+
         <wispro.sp.web.Components.InputValueSetting EditAction="@EditAction" />
     </Form>
 
@@ -191,7 +190,7 @@
             <Input @bind-Value="@EditTransfer.Condition" />
         </FormItem>
 
-        
+
     </Form>
 
 </Modal>

+ 3 - 1
wispro.sp.web/Pages/Workflow/WorkflowDetail.razor.cs

@@ -67,9 +67,11 @@ namespace wispro.sp.web.Pages.Workflow
 
             stepItems.Add(new StepItem() { Name = "结束", StepId = workflow.EndStepId });
         }
-        
+        [Inject] protected IAuthService _authService { get; set; }
         protected async override Task OnInitializedAsync()
         {
+            await _authService.CanVisitResource();
+
             await base.OnInitializedAsync();
 
             #region Demo流程数据

+ 19 - 1
wispro.sp.web/Services/AppealTypeService.cs

@@ -82,7 +82,22 @@ namespace wispro.sp.web.Services
 
         public async Task<List<AppealRecord>> GetUserAppeals(int? userid)
         {
-            var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId={userid}");
+            if (userid.HasValue)
+            {
+                var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId={userid}");
+                return data;
+            }
+            else
+            {
+                var data = await _httpClient.Get<List<AppealRecord>>($"Appeal/GetAppealRecords?userId=0");
+                return data;
+            }
+            
+        }
+
+        public async Task<List<AppealRecord>> GetUserAppeals(AppealRecordFilter filter)
+        {
+            var data = await _httpClient.Post<List<AppealRecord>>($"Appeal/QueryByFilter",filter);
             return data;
         }
 
@@ -114,6 +129,8 @@ namespace wispro.sp.web.Services
         {
             List<AttachFile> attachFiles = new List<AttachFile>();
 
+            Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(model));
+
             foreach (var file in model.FileList)
             {
                 AttachFile atfile = new AttachFile();
@@ -145,6 +162,7 @@ namespace wispro.sp.web.Services
             }
             catch(Exception ex)
             {
+                Console.WriteLine(ex.StackTrace);
                 throw ex;
             }
 

+ 30 - 6
wispro.sp.web/Services/AuthService.cs

@@ -13,6 +13,8 @@ using wispro.sp.web.Auth;
 using System.Text.Json;
 using wispro.sp.web.Models;
 using AntDesign;
+using Microsoft.AspNetCore.Components;
+using Microsoft.JSInterop;
 
 namespace wispro.sp.web.Services
 {
@@ -22,13 +24,18 @@ namespace wispro.sp.web.Services
         private readonly IHttpService httpClient;
         private readonly AuthenticationStateProvider authenticationStateProvider;
         private IUserService UserService;
-
-        public AuthService(ILocalStorageService localStorageService, IHttpService httpClient, AuthenticationStateProvider authenticationStateProvider, IUserService UserService)
+        private NavigationManager NavigationManager;
+        private MessageService _message;
+        private IJSRuntime JSRuntime;
+        public AuthService(ILocalStorageService localStorageService, IHttpService httpClient, AuthenticationStateProvider authenticationStateProvider, IUserService UserService, MessageService message, IJSRuntime _JSRuntime, NavigationManager navigation)
         {
             this.localStorageService = localStorageService;
             this.httpClient = httpClient;
             this.authenticationStateProvider = authenticationStateProvider;
             this.UserService = UserService;
+            this._message = message;
+            this.JSRuntime = _JSRuntime;
+            this.NavigationManager = navigation;
         }
 
         
@@ -37,7 +44,7 @@ namespace wispro.sp.web.Services
             bool result = false;
 
             var httpResponse = await httpClient.Post<userToken>($"account/Login", userInfo);
-            Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(httpResponse));
+            //Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(httpResponse));
             if (httpResponse.StatusCode != System.Net.HttpStatusCode.NotFound)
             {
                 userToken userToken = httpResponse;
@@ -72,10 +79,16 @@ namespace wispro.sp.web.Services
             
         }
 
-        public async Task<bool> CanVisitResource(string resId)
+        
+        
+        public async Task CanVisitResource()
         {
+            string strUrl = NavigationManager.Uri;
+            //Console.WriteLine($"Uri:{strUrl}");
+            //Console.WriteLine($"Uri:{NavigationManager.BaseUri}");
+            string strResourceId = NavigationManager.Uri.Replace(NavigationManager.BaseUri, "/");
             bool canVisist = false;
-            var Roles = await httpClient.Get<List<string>>($"account/GetRoles?ResourceId={resId}");
+            var Roles = await httpClient.Get<List<string>>($"account/GetRoles?ResourceId={strResourceId}");
 
             CurrentUser _user =await UserService.GetUser();
 
@@ -97,8 +110,19 @@ namespace wispro.sp.web.Services
                 
             }
 
-            return canVisist;
+            if (!canVisist)
+            {
+                
+                    var config = new MessageConfig()
+                    {
+                        Content = "您没有权限使用该功能",
+                        Type = MessageType.Error
+                    };
 
+                    var ret = _message.Open(config);
+                    await JSRuntime.InvokeVoidAsync("history.back");
+                
+            }
             
 
         }

+ 2 - 2
wispro.sp.web/Services/HttpService.cs

@@ -155,8 +155,8 @@ namespace wispro.sp.web.Services
             // throw exception on error response
             if (!response.IsSuccessStatusCode)
             {
-                var error = await response.Content.ReadFromJsonAsync<Dictionary<string, string>>();
-                throw new Exception(error["message"]);
+                var error = await response.Content.ReadFromJsonAsync<string>();
+                throw new Exception(error);
             }
             var retData =await response.Content.ReadFromJsonAsync<T>();
             

+ 1 - 1
wispro.sp.web/Services/IAuthService.cs

@@ -16,6 +16,6 @@ namespace wispro.sp.web.Services
 
         Task<bool> ChangePassword(changePasswordDto dto);
 
-        Task<bool> CanVisitResource(string resId);
+        Task CanVisitResource();
     }
 }

+ 14 - 0
wispro.sp.web/Services/PerformanceItemServices.cs

@@ -51,6 +51,20 @@ namespace wispro.sp.web.Services
         }
 
         
+        public async Task<FileProcessTask> ExportData(int calMonthId)
+        {
+            QueryFilter query = new QueryFilter();
+            query.CalMonthId = calMonthId;
+
+            query.PageIndex = 1;
+            query.PageSize = 1;
+            query.ConditionTree = new List<FieldCondition>();
+            query.Sorts = new List<OrderField>();
+
+            var fileData = await _httpClient.Post<FileProcessTask>($"PerformanceItem/ExportData", query);
+
+            return fileData;
+        }
 
         public async Task<FileProcessTask> ExportData(int userid, jxType jxType)
         {

+ 8 - 3
wispro.sp.web/wispro.sp.web.csproj

@@ -17,6 +17,7 @@
   </ItemGroup>
 
   <ItemGroup>
+    <Content Remove="Components\Radar.razor" />
     <Content Remove="Pages\AppCase\ShensuReview.razor" />
     <Content Remove="Pages\Project\ConfirmProjectPoint.razor" />
     <Content Remove="Pages\Project\ProjectList.razor" />
@@ -27,9 +28,13 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="AntDesign" Version="0.10.2" />
-    <PackageReference Include="AntDesign.Charts" Version="0.2.1" />
-    <PackageReference Include="AntDesign.ProLayout" Version="0.1.8" />
+    <None Remove="Components\Radar.razor.css" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="AntDesign" Version="0.10.3.1" />
+    <PackageReference Include="AntDesign.Charts" Version="0.2.2" />
+    <PackageReference Include="AntDesign.ProLayout" Version="0.1.10" />
     <PackageReference Include="Blazor.ContextMenu" Version="1.10.1" />
     <PackageReference Include="Blazored.LocalStorage" Version="4.1.5" />
     <PackageReference Include="DynamicExpresso.Core" Version="2.9.3" />

+ 2 - 1
wispro.sp.web/wwwroot/appsettings.json

@@ -17,5 +17,6 @@
 
   },
 
-  "APIUrl": "http://localhost:39476/api/"
+  "APIUrl": "http://localhost:39476/api/",
+  "Latest_feedback_date":"30"
 }

+ 9 - 0
wispro.sp.web/wwwroot/diagrams.js

@@ -0,0 +1,9 @@
+export async function renderDot(model, element,width,height) {
+    element.width = width;
+    element.height = height;
+
+    var graphviz = d3.select(element)
+        .graphviz();
+    
+    graphviz.width(width).height(height).renderDot(model);
+}

+ 3 - 0
wispro.sp.web/wwwroot/index.html

@@ -226,6 +226,9 @@
     <script src="_content/AntDesign.Charts/ant-design-charts-blazor.js"></script>
     <script src="_framework/blazor.webassembly.js"></script>
     <!--<script src="script/helper.js"></script>-->
+    <script src="https://d3js.org/d3.v5.min.js"></script>
+    <script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script>
+    <script src="https://unpkg.com/d3-graphviz@3.1.0/build/d3-graphviz.js"></script>
 </body>
 
 </html>

+ 290 - 40
wispro.sp.winClient/Form1.cs

@@ -14,11 +14,14 @@ using System.Linq;
 using System.Net.Http;
 using System.Net.Http.Json;
 using System.Text;
+using System.Text.Json;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using wispro.sp.entity;
+using wispro.sp.entity.workflowDefine;
 using wispro.sp.share;
 using wispro.sp.share.Utility;
+using wispro.sp.share.webViewObject;
 using wispro.sp.utility;
 
 namespace wispro.sp.winClient
@@ -184,6 +187,7 @@ namespace wispro.sp.winClient
        
         private async void button3_Click(object sender, EventArgs e)
         {
+            await UserField2String();
             //share.Utility.UserConditionHelper.GetPropertyDescription<Staff>(typeof(PerformanceItem).AssemblyQualifiedName);
 
             #region Demo流程数据
@@ -259,7 +263,7 @@ namespace wispro.sp.winClient
             ////return;
 
             //await ImportUsers();
-            await InputPerformanceItem("c:\\temp\\21.01-21.11 工程师绩效报表-总表.xlsx", true, false, 0);
+            //await InputPerformanceItem("c:\\temp\\21.01-21.11 工程师绩效报表-总表.xlsx", true, false, 0);
 
             ////CalMonth cal = new CalMonth()
             ////{
@@ -616,6 +620,157 @@ namespace wispro.sp.winClient
 
         }
 
+        private async Task UserField2String()
+        {
+            if (Token == null)
+            {
+                await Login();
+            }
+
+            //List<Staff> Reviewers = await getReviewers(14232, 1);
+
+            //Reviewers = await getReviewers(14232, 5);
+
+            List<Staff> Staffs = await GetStaffsAsync();
+
+            List<UserField> lstUsers = new List<UserField>();
+
+
+            
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("柳芳", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("杨超", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("何倚雯", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("李姣", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("张庆玲", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("李申", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("李莉", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("刘桂兰", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("唐双", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("瞿璨", Staffs).ToString()
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("张鹏", Staffs).ToString()
+            });
+
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("钟锦光", Staffs).ToString()
+            });
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("李建民", Staffs).ToString()
+            });
+
+            JsonSerializerOptions options = new() { IgnoreNullValues = true };
+            var strJson = System.Text.Json.JsonSerializer.Serialize(lstUsers, lstUsers.GetType(), options);
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("夏敏", Staffs).ToString()
+            });
+
+            
+            strJson = System.Text.Json.JsonSerializer.Serialize(lstUsers, lstUsers.GetType(), options);
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("钟子敏", Staffs).ToString()
+            });
+
+            strJson = System.Text.Json.JsonSerializer.Serialize(lstUsers, lstUsers.GetType(), options);
+
+            System.Diagnostics.Debug.WriteLine(strJson);
+
+            lstUsers = new List<UserField>();
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Department,
+                Department = "1"
+            });
+
+            lstUsers.Add(new UserField()
+            {
+                UserConditionType = UserConditionType.Staff,
+                UserType = UserType.Staff,
+                UserValue = GetStaff("邢丽霞", Staffs).ToString()
+            });
+
+            strJson = System.Text.Json.JsonSerializer.Serialize(lstUsers, lstUsers.GetType(), options);
+
+            
+        }
         private int? GetStaff(string v, List<Staff> staffs)
         {
             if (!string.IsNullOrEmpty(v))
@@ -636,49 +791,93 @@ namespace wispro.sp.winClient
 
         private async Task ImportUsers()
         {
-            DataTable dt = NPOIExcel.ExcelToDataTable(@"C:\temp\用户列表(2021年10月26日).xlsx", true,false,1);
-            List<StaffGrade> staffGrades = await GetStaffGrades();
-
-            foreach (DataRow row in dt.Rows)
+            OpenFileDialog ofd = new OpenFileDialog();
+            if (ofd.ShowDialog() == DialogResult.OK)
             {
-                Staff staff = new Staff();
-                staff.Account = row["用户名"].ToString().Trim();
-                staff.Name = row["姓名"].ToString().Trim();
-                staff.Tel = row["电话号码"].ToString().Trim();
-                staff.Mobile = row["手机号码"].ToString().Trim();
-                staff.Sex = row["性别"].ToString().Trim();
-                staff.Mail = row["邮箱"].ToString().Trim();
+                string fileName = ofd.FileName;
+                DataTable dt = NPOIExcel.ExcelToDataTable(fileName, true, false, 1);
+
+                if(Token == null)
+                {
+                    await Login();
+                }
 
-                string strGrade = row["工程师等级"].ToString().Trim(); // + "级";
+                List<StaffGrade> staffGrades = await GetStaffGrades();
 
-                foreach (StaffGrade sg in staffGrades)
+                foreach (DataRow row in dt.Rows)
                 {
-                    if (strGrade.Trim() == sg.Grade.Trim())
+                    Staff staff = new Staff();
+                    staff.Account = row["用户名"].ToString().Trim();
+                    staff.Name = row["姓名"].ToString().Trim();
+                    staff.Tel = row["电话号码"].ToString().Trim();
+                    staff.Mobile = row["手机号码"].ToString().Trim();
+                    staff.Sex = row["性别"].ToString().Trim();
+                    staff.Mail = row["邮箱"].ToString().Trim();
+
+                    string strGrade = row["工程师等级"].ToString().Trim(); // + "级";
+
+                    foreach (StaffGrade sg in staffGrades)
                     {
-                        staff.StaffGradeId = sg.Id;
-                        break;
+                        if (strGrade.Trim() == sg.Grade.Trim())
+                        {
+                            staff.StaffGradeId = sg.Id;
+                            break;
+                        }
                     }
-                }
 
-                staff.IsOnJob = (row["是否在职"].ToString().Trim()=="是");
+                    staff.IsOnJob = (row["是否在职"].ToString().Trim() == "是");
+
+                    staff.Status = row["岗位状态"].ToString().Trim();
+                    staff.Department = row["部门"].ToString();
+                    staff.WorkPlace = row["工作地"].ToString();
 
-                staff.Status = row["岗位状态"].ToString().Trim();
-                staff.Department = row["部门"].ToString();
-                staff.WorkPlace = row["工作地"].ToString();
 
-                DateTime temDate;
-                if (DateTime.TryParse(row["入职时间"].ToString(), out temDate))
-                {
-                    staff.EntyDate = temDate;
-                }
 
-                //staff.IsCalPerformsnce = (row["是否核算绩效"].ToString() == "是");
-                //staff.Memo = row["备注"].ToString().Trim();
+                    DateTime temDate;
+                    if (DateTime.TryParse(row["入职时间"].ToString(), out temDate))
+                    {
+                        staff.EntyDate = temDate;
+                    }
 
-                staff.Password = MD5Utility.GetMD5("12345678");
-                //staff.StaffGradeId = row["姓名"].ToString();
+                    var temStaff = await GetStaff(staff.Name);
 
-                await SaveStaff(staff);
+                    bool isSaved = false;
+
+                    if (temStaff == null)
+                    {
+                        isSaved = true;
+                        staff.Password = MD5Utility.GetMD5("12345678");
+                    }
+                    else
+                    {
+                        staff.Id = temStaff.Id;
+                        staff.Password = temStaff.Password;
+                        isSaved =
+                            (staff.Name != temStaff.Name) ||
+                            (staff.Account != temStaff.Account) ||
+                            (staff.Department != temStaff.Department) ||
+                            (staff.EntyDate != temStaff.EntyDate) ||
+                            (staff.IsOnJob != temStaff.IsOnJob) ||
+                            (staff.Mail != temStaff.Mail) ||
+                            (staff.Mobile != temStaff.Mobile) ||
+                            (staff.Sex != temStaff.Sex) ||
+                            (staff.Status != temStaff.Status) ||
+                            (staff.Tel != temStaff.Tel) ||
+                            (staff.WorkPlace != temStaff.WorkPlace) ||
+                            (staff.StaffGradeId != temStaff.StaffGradeId);
+                    }
+
+                    if (isSaved)
+                    {
+                        //staff.IsCalPerformsnce = (row["是否核算绩效"].ToString() == "是");
+                        //staff.Memo = row["备注"].ToString().Trim();
+
+                        
+                        //staff.StaffGradeId = row["姓名"].ToString();
+
+                        await SaveStaff(staff);
+                    }
+                }
             }
         }
 
@@ -696,7 +895,22 @@ namespace wispro.sp.winClient
             return retStr;
         }
 
-        string strAPIBaseUri = "http://47.106.221.167:8081";
+        string strAPIBaseUri = "https://47.106.221.167"; //"http://localhost:39476";//
+
+        userToken Token;
+        public async Task Login()
+        {
+            share.webViewObject.loginDto dto = new share.webViewObject.loginDto();
+            dto.Name = "caiyangl";
+            dto.Password = "Lqftiu807005";
+
+            var response =await CreateHttp().PostAsJsonAsync<loginDto>($"{strAPIBaseUri}/api/account/Login", dto);
+
+            if (response.IsSuccessStatusCode)
+            {
+                Token = await response.Content.ReadFromJsonAsync<userToken>();
+            }
+        }
         public async Task<entity.workflowDefine.Workflow> GetWorkflow(int Id, HttpClient _httpClient)
         {
             var ret = await _httpClient.GetFromJsonAsync<entity.workflowDefine.Workflow>($"{strAPIBaseUri}/api/WorkflowEngine/GetWorkflow?workflowId={Id}");
@@ -724,7 +938,8 @@ namespace wispro.sp.winClient
         }
         private async  Task SaveStaff(Staff obj)
         {
-            HttpClient http = new HttpClient();
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
             var data = await http.PostAsJsonAsync<wispro.sp.entity.Staff>($"{strAPIBaseUri}/api/Staff/Save", obj);
             if (data.IsSuccessStatusCode)
             {
@@ -743,9 +958,25 @@ namespace wispro.sp.winClient
             }
         }
 
+        private async Task<Staff> GetStaff(string strName)
+        {
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
+            try
+            {
+                var data = await http.GetFromJsonAsync<wispro.sp.entity.Staff>($"{strAPIBaseUri}/api/Staff/GetByName?Name={strName}");
+                return data;
+            }
+            catch
+            {
+                return null;
+            }
+        }
+
         private async Task SaveBasePointRule(BasePointRule obj)
         {
-            HttpClient http = new HttpClient();
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
             var data = await http.PostAsJsonAsync<BasePointRule>($"{strAPIBaseUri}/api/BasePointRule/New", obj);
             if (data.IsSuccessStatusCode)
             {
@@ -767,8 +998,8 @@ namespace wispro.sp.winClient
         }
         private async Task SavePerformanceItem(PerformanceItem obj)
         {
-            HttpClient http = new HttpClient();
-
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
             if (obj.CalMonth.Month == 10)
             {
                 System.Diagnostics.Debug.WriteLine($"{obj.CalMonth.Year}-{obj.CalMonth.Month}\t{obj.CaseNo}");
@@ -801,23 +1032,42 @@ namespace wispro.sp.winClient
             }
         }
 
+        private HttpClient CreateHttp()
+        {
+            HttpClientHandler clientHandler = new HttpClientHandler();
+            clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return true; };
+
+            return new HttpClient(clientHandler);
+
+        }
         private async Task<List<StaffGrade>> GetStaffGrades()
         {
-            HttpClient http = new HttpClient();
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
             var _StaffGrade = await http.GetFromJsonAsync<List<StaffGrade>>($"{strAPIBaseUri}/api/StaffGrade/GetAll");
             return _StaffGrade;
         }
 
         private async Task<List<Staff>> GetStaffsAsync()
         {
-            HttpClient http = new HttpClient();
-            ListApiResponse<Staff> data = await http.GetFromJsonAsync<ListApiResponse<Staff>>($"{strAPIBaseUri}/api/Staff/Query?pageIndex=1&pageSize=200");
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
+            ListApiResponse<Staff> data = await http.GetFromJsonAsync<ListApiResponse<Staff>>($"{strAPIBaseUri}/api/Staff/Query?pageIndex=1&pageSize=1000");
 
             return data.Results;
 
 
         }
 
+        private async Task<List<Staff>> getReviewers(int itemId,int appealTypeId)
+        {
+            HttpClient http = CreateHttp();
+            http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
+            List<Staff> data = await http.GetFromJsonAsync<List<Staff>>($"{strAPIBaseUri}/api/Staff/GetReviewers?itemId={itemId}&appealTypeId={appealTypeId}");
+
+            return data;
+        }
+
         private void button4_Click(object sender, EventArgs e)
         {
             Stopwatch watch = new Stopwatch();

+ 4 - 1
wospro.sp.entity/workflowDefine/ConditionTree.cs

@@ -97,7 +97,10 @@ namespace wispro.sp.entity.workflowDefine
         [Description("指定用户部门")]
         UserDepartment,
         [Description("指定用户部门职位")]
-        UserDepartmentPosition
+        UserDepartmentPosition,
+        [Description("指定职位")]
+        Position,
+
     }
 
     public enum UserType