ConfirmProjectPoint.razor.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. using AntDesign;
  2. using AntDesign.ProLayout;
  3. using Microsoft.AspNetCore.Components;
  4. using Microsoft.AspNetCore.Components.Web;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using wispro.sp.entity;
  9. using wispro.sp.web.Models;
  10. namespace wispro.sp.web.Pages.Project
  11. {
  12. public partial class ConfirmProjectPoint
  13. {
  14. [Inject] public MessageService _message { get; set; }
  15. static ProjectInfo EditingItem = new ProjectInfo()
  16. {
  17. CaseNo = "S2112394",
  18. CaseName = "美的-洗碗机专利调查",
  19. DoItem = "提出报告",
  20. DoPerson = new List<string>() { "李申", "何倚雯", "王晴", "陆跃" },
  21. ResponseMan = "黄瑜"
  22. };
  23. Task task = new()
  24. {
  25. ProjectInfo = EditingItem,
  26. Id = 1,
  27. Name = "2021年9月专案【S2112394】点数确认",
  28. Type = "专案点数确认",
  29. ResponseMan = "李申",
  30. State = "待处理",
  31. LimiteDate = DateTime.Now.AddDays(4),
  32. UIUrl = "/Project/ConfirmProjectPoint"
  33. };
  34. List<ProjectPoint> projectPoints = new List<ProjectPoint>() {
  35. new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="李申", Point=1.0},
  36. new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="何倚雯", Point=2.0},
  37. new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="王晴", Point=1.5},
  38. new ProjectPoint(){ doItem="检索条件策略", DoItemCoefficient="B", person="陆跃", Point=1.0},
  39. new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="A", person="李申", Point=2.0},
  40. new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="A", person="何倚雯", Point=1.5},
  41. new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="A", person="王晴", Point=2.5},
  42. new ProjectPoint(){ doItem="专利分类", DoItemCoefficient="A", person="陆跃", Point=3.0},
  43. };
  44. #region 文件上传控件设定
  45. List<UploadFileItem> fileList = new List<UploadFileItem>
  46. {
  47. new UploadFileItem
  48. {
  49. Id = "1",
  50. FileName = "客户往来邮件1.jpg",
  51. Url = "#",
  52. State = UploadState.Success
  53. },
  54. new UploadFileItem
  55. {
  56. Id = "2",
  57. FileName = "与客户微信聊天图片.jpg",
  58. Url = "#",
  59. State = UploadState.Success
  60. },
  61. new UploadFileItem
  62. {
  63. Id = "3",
  64. FileName = "附件.docx",
  65. Url = "#",
  66. State = UploadState.Success
  67. }
  68. };
  69. Dictionary<string, object> attrs = new Dictionary<string, object>
  70. {
  71. {"Action", "#" },
  72. {"Name", "files" },
  73. {"Multiple", true }
  74. };
  75. void HandleChange(UploadInfo fileinfo)
  76. {
  77. //if (fileList.Count > 5)
  78. //{
  79. // fileList.RemoveRange(0, fileList.Count - 2);
  80. //}
  81. //fileList.Where(file => file.State == UploadState.Success && !string.IsNullOrWhiteSpace(file.Response)).ForEach(file => {
  82. // var result = file.GetResponse<ResponseModel>();
  83. // file.Url = result.url;
  84. //});
  85. }
  86. public class ResponseModel
  87. {
  88. public string name { get; set; }
  89. public string status { get; set; }
  90. public string url { get; set; }
  91. public string thumbUrl { get; set; }
  92. }
  93. #endregion
  94. private bool _visible = false;
  95. #region 申诉窗口事件
  96. private void HandleOk(MouseEventArgs e)
  97. {
  98. Console.WriteLine(e);
  99. _visible = false;
  100. }
  101. private void HandleCancel(MouseEventArgs e)
  102. {
  103. Console.WriteLine(e);
  104. _visible = false;
  105. }
  106. #endregion
  107. class shenshou
  108. {
  109. public string Type { get; set; }
  110. public int ReviewerId { get; set; }
  111. public string Reason { get; set; }
  112. public List<UploadFileItem> Files { get; set; }
  113. }
  114. private shenshou _shenshou = new shenshou()
  115. {
  116. Type = "专案点数分配申诉",
  117. };
  118. List<Staff> Reviewers = new List<Staff>()
  119. {
  120. new Staff(){Id =1,Name ="黄瑜"},
  121. new Staff(){Id =2,Name ="邢丽霞"},
  122. new Staff(){Id =3,Name ="李丽"},
  123. new Staff(){Id =4,Name ="贾凤涛"},
  124. };
  125. public AvatarMenuItem[] AvatarMenuItems { get; set; } = new AvatarMenuItem[]
  126. {
  127. new() { Key = "reviewer", IconType = "user", Option = "专案点数分配申诉"},
  128. };
  129. void OnShensu()
  130. {
  131. //添加保存代码
  132. _visible = true;
  133. }
  134. void OnOK()
  135. {
  136. _message.Info("完成确认!");
  137. }
  138. }
  139. }