Ver Fonte

添加保存指定栏位数据
修改我的案件页面

luocaiyang há 3 anos atrás
pai
commit
ccc356727e

+ 1 - 0
wispro.sp.api/Controllers/AccountController.cs

@@ -105,6 +105,7 @@ namespace wispro.sp.api.Controllers
             userToken userToken = new userToken()
             {
                 StatusCode = System.Net.HttpStatusCode.OK,
+                UserId = staff.Id,
                 Name = staff.Name,
                 Token = jwtToken,
                 ExpireTime = expireTime

+ 126 - 0
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -131,6 +131,63 @@ namespace wispro.sp.api.Controllers
             return ret;
         }
 
+        /// <summary>
+        /// 更新绩效记录信息
+        /// </summary>
+        /// <param name="id">绩效记录编号</param>
+        /// <param name="field">栏位:0:代理人反馈信息;1:案件系数;2:处理事项系数;3:翻译字数;4:撤回的案号</param>
+        /// <param name="value">栏位值</param>
+        /// <returns></returns>
+        public ApiSaveResponse UpdateFieldValue(int id,string field,string value)
+        {
+            ApiSaveResponse ret = new ApiSaveResponse();
+
+            var item = Context.PerformanceItems.FirstOrDefault<PerformanceItem>(p => p.Id == id);
+
+            if(item!= null)
+            {
+                switch (field) {
+                    case "AgentFeedbackMemo":
+                        item.AgentFeedbackMemo = value;
+                        
+                        break;
+                    case "CaseCoefficient":
+                        item.CaseCoefficient = value;
+
+                        //此处添加保存到流程系统的代码
+                        break;
+                    case "DoItemCoefficient":
+                        item.DoItemCoefficient = value;
+
+                        //此处添加保存到流程系统的代码
+                        break;
+                    case "WordCount":
+                        int wordCount;
+                        if(int.TryParse(value,out wordCount))
+                        {
+                            item.WordCount = wordCount;
+                        }
+                        else
+                        {
+                            ret.Success = false;
+                            ret.ErrorMessage = "所给的栏位值不能转换成数字!";
+                            return ret;
+                        }
+                        break;
+                    case "ReturnCasseNo":
+                        item.ReturnCasseNo = value;
+                        break;
+                }
+
+                Context.SaveChanges();
+            }
+            else
+            {
+                ret.Success = false;
+                ret.ErrorMessage = $"不存在的{id}";
+            }
+            return ret;
+        }
         public ListApiResponse<PerformanceItem> Query(int pageIndex,int pageSize)
         {
             ListApiResponse<PerformanceItem> ret = new ListApiResponse<PerformanceItem>();
@@ -149,6 +206,74 @@ namespace wispro.sp.api.Controllers
                 .OrderByDescending(o=>o.Id)
                 .Skip<PerformanceItem>((pageIndex - 1) * pageSize).Take(pageSize).ToList<PerformanceItem>();
 
+            #region 将某些属性设为null,避免循环取值造成返回json过大
+            foreach (PerformanceItem item in retList)
+            {
+                foreach (ItemStaff itemStaff in item.ItemStaffs)
+                {
+                    itemStaff.DoPerson.ItemStaffs = null;
+                    itemStaff.DoPerson.ReviewerItems = null;
+                    itemStaff.Item = null;
+                }
+
+                item.Reviewer.ReviewerItems = null;
+                item.Reviewer.Customers = null;
+                item.Reviewer.ItemStaffs = null;
+
+                item.Customer.PerformanceItems = null;
+                item.CalMonth.PerformanceItems = null;
+            }
+            #endregion
+
+            ret.Results = retList;
+
+            return ret;
+        }
+
+        /// <summary>
+        /// 获取给定用户的绩效清单
+        /// </summary>
+        /// <param name="userid">用户id</param>
+        /// <param name="type">获取类型;0:处理中;1:所有;4:已归档</param>
+        /// <returns></returns>
+        public ListApiResponse<PerformanceItem> GetMyList(int userid, int type,int pageIndex=1,int pageSize = 5)
+        {
+            ListApiResponse<PerformanceItem> ret = new ListApiResponse<PerformanceItem>();
+            var results = Context.PerformanceItems
+                .Where<PerformanceItem>(s =>
+                    (s.ItemStaffs.Where<ItemStaff>(iStaff => iStaff.DoPerson.Id  == userid ).Count() > 0 || s.Reviewer.Id  == userid )
+                    && s.CalMonth.Status == type);
+
+            ret.TotalCount = results.Count();
+
+            List<PerformanceItem> retList = results
+                .Include(pi => pi.ItemStaffs).ThenInclude(iStaff => iStaff.DoPerson)
+                .Include(pi => pi.Reviewer)
+                .Include(pi => pi.Customer)
+                .Include(pi => pi.CalMonth)                
+                .OrderByDescending(o => o.Id)
+                .Skip<PerformanceItem>((pageIndex - 1) * pageSize).Take(pageSize)
+                .ToList<PerformanceItem>();
+
+            #region 将某些属性设为null,避免循环取值造成返回json过大
+            foreach (PerformanceItem item in retList)
+            {
+                foreach(ItemStaff itemStaff in item.ItemStaffs)
+                {
+                    itemStaff.DoPerson.ItemStaffs = null;
+                    itemStaff.DoPerson.ReviewerItems = null;
+                    itemStaff.Item = null;
+                }
+
+                item.Reviewer.ReviewerItems = null;
+                item.Reviewer.Customers = null;
+                item.Reviewer.ItemStaffs = null;
+
+                item.Customer.PerformanceItems = null;
+                item.CalMonth.PerformanceItems = null;
+            }
+            #endregion
+
             ret.Results = retList;
 
             return ret;
@@ -166,6 +291,7 @@ namespace wispro.sp.api.Controllers
                 .Include(pi => pi.ItemStaffs).ThenInclude(iStaff => iStaff.DoPerson)
                 .Include(pi => pi.Reviewer)
                 .Include(pi => pi.Customer)
+                
                 .OrderByDescending(o => o.Id)
                 .Skip<PerformanceItem>((queryFilter.pageIndex - 1) * queryFilter.pageSize).Take(queryFilter.pageSize).ToList<PerformanceItem>();
 

+ 5 - 5
wispro.sp.api/Properties/launchSettings.json

@@ -1,5 +1,4 @@
-{
-  "$schema": "http://json.schemastore.org/launchsettings.json",
+{
   "iisSettings": {
     "windowsAuthentication": false,
     "anonymousAuthentication": true,
@@ -8,6 +7,7 @@
       "sslPort": 44359
     }
   },
+  "$schema": "http://json.schemastore.org/launchsettings.json",
   "profiles": {
     "IIS Express": {
       "commandName": "IISExpress",
@@ -21,10 +21,10 @@
       "commandName": "Project",
       "launchBrowser": true,
       "launchUrl": "api/Staff/getAll",
-      "applicationUrl": "https://localhost:5001;http://localhost:5000",
       "environmentVariables": {
         "ASPNETCORE_ENVIRONMENT": "Development"
-      }
+      },
+      "applicationUrl": "https://localhost:44359;http://localhost:5000"
     }
   }
-}
+}

+ 9 - 0
wispro.sp.share/EnumType.cs

@@ -0,0 +1,9 @@
+namespace wispro.sp.share
+{
+    public enum jxType
+    {
+        doing =0,
+        all = 1,
+        finished = 4
+    }
+}

+ 20 - 18
wispro.sp.share/SharePackage.cs

@@ -1,29 +1,31 @@
 using AntDesign;
 using System.Collections.Generic;
-
-public class shenshou
+namespace wispro.sp.share
 {
-    public string Type { get; set; }
+    public class shenshou
+    {
+        public string Type { get; set; }
 
-    public int ReviewerId { get; set; }
-    public string Reason { get; set; }
+        public int ReviewerId { get; set; }
+        public string Reason { get; set; }
 
-    public string ChangeTo { get; set; }
+        public string ChangeTo { get; set; }
 
-    public List<UploadFileItem> Files { get; set; }
-}
+        public List<UploadFileItem> Files { get; set; }
+    }
 
-public class CalType
-{
-    public string Type { get; set; } = "按照字数计算绩效";
+    public class CalType
+    {
+        public string Type { get; set; } = "按照字数计算绩效";
 
-    public int ReviewerId { get; set; }
+        public int ReviewerId { get; set; }
 
-    public int wordCount { get; set; }
-}
+        public int wordCount { get; set; }
+    }
 
-public class shensuType
-{
-    public string Name { get; set; }
-    public string ChangeField { get; set; }
+    public class shensuType
+    {
+        public string Name { get; set; }
+        public string ChangeField { get; set; }
+    }
 }

+ 2 - 0
wispro.sp.share/webViewObject/userToken.cs

@@ -10,6 +10,8 @@ namespace wispro.sp.share.webViewObject
     public class userToken
     {
         public HttpStatusCode StatusCode { get; set; }
+
+        public int UserId { get; set; }
         public string Name { get; set; }
         public string Token { get; set; }
         

+ 53 - 16
wispro.sp.web/Components/PerformanceItemRow.razor

@@ -1,9 +1,58 @@
 <Selection Key="@(EditingItem.Id.ToString())" Width="50" Fixed="left"/>
 <AntDesign.Column Title="我方文号" @bind-Field="@EditingItem.CaseNo" Width="150" Sortable Filterable Fixed="left" />
 <AntDesign.Column Title="案件类型" @bind-Field="@EditingItem.CaseType" Width="120" Sortable Filterable />
-<AntDesign.Column Title="案件系数" @bind-Field="@EditingItem.CaseCoefficient" Width="120" Sortable Filterable />
+
+@*<AntDesign.Column Title="案件系数" Width="120" DataIndex="@nameof(EditingItem.CaseCoefficient)" TData="string">
+    @if (EditField  == "CaseCoefficient")
+    {
+        <Input Type="text" @bind-Value="EditingItem.CaseCoefficient" OnBlur="stopEdit" OnChange="InputChanged" AutoFocus />
+    }
+    else
+    {
+        <div class="editable-cell-value-wrap" style="padding-right:24px" @onclick="()=>startEdit(strCaseCoefficient)">
+            @EditingItem.CaseCoefficient
+        </div>
+    }
+</AntDesign.Column>*@
 <AntDesign.Column Title="处理事项" @bind-Field="@EditingItem.DoItem" Width="120" Sortable Filterable />
-<AntDesign.Column Title="处理事项系数" @bind-Field="@EditingItem.DoItemCoefficient" Width="150" Sortable Filterable />
+
+@*<AntDesign.Column Title="处理事项系数" Width="120" DataIndex="@nameof(EditingItem.CaseCoefficient)" TData="string">
+    @if (EditField == "DoItemCoefficient")
+    {
+        <Input Type="text" @bind-Value="EditingItem.DoItemCoefficient" OnBlur="stopEdit" OnChange="InputChanged" AutoFocus />
+    }
+    else
+    {
+        <div class="editable-cell-value-wrap" style="padding-right:24px" @onclick="()=>startEdit(strDoItemCoefficient)">
+            @EditingItem.CaseCoefficient
+        </div>
+    }
+</AntDesign.Column>*@
+<AntDesign.Column Title="绩效特殊字段" DataIndex="@nameof(EditingItem.AgentFeedbackMemo)" Width="300" TData="string">
+    @if (EditField == "AgentFeedbackMemo")
+    {
+        <Select DataSource="@_Reasons"
+                @bind-Value="@EditingItem.AgentFeedbackMemo"
+                LabelName="@nameof(Reason.Name)"
+                ValueName="@nameof(Reason.Value)"
+                Placeholder="请选项一项"
+                DefaultActiveFirstItem="false"
+                EnableSearch="true"
+                AllowClear="true"
+                Style="width:220px;"
+                OnBlur="@stopEdit" OnSelectedItemChanged="(value)=>SelectChanged(value)" AutoFocus>
+        </Select>
+        
+    }
+    else
+    {
+        <div class="editable-cell-value-wrap" style="padding-right:24px" @onclick="()=>startEdit(strAgentFeedbackMemo)">
+            @EditingItem.AgentFeedbackMemo
+        </div>
+    }
+
+</AntDesign.Column>
+
 <AntDesign.Column Title="处理人" TData="string" DataIndex="@nameof(EditingItem.ItemStaffs)" Width="150">
     @if (EditingItem.ItemStaffs != null)
     {
@@ -26,21 +75,9 @@
 <AntDesign.Column Title=" 申请人" @bind-Field="@EditingItem.ApplicationName" Width="200"></AntDesign.Column>
 <AntDesign.Column Title="备注" @bind-Field="@EditingItem.CaseMemo"></AntDesign.Column>
 
-<ActionColumn Fixed="right" Title="绩效特殊字段填写与操作" Width="350">
+<ActionColumn Fixed="right" Title="绩效特殊字段填写与操作" Width="50">
     <Space>
-        <SpaceItem>
-            <Select DataSource="@_Reasons"
-                    @bind-Value="@EditingItem.AgentFeedbackMemo"
-                    LabelName="@nameof(Reason.Name)"
-                    ValueName="@nameof(Reason.Value)"
-                    Placeholder="请选项一项"
-                    DefaultActiveFirstItem="false"
-                    EnableSearch ="true"
-                    AllowClear="true"
-                    Style="width:220px;">
-            </Select>
-        </SpaceItem>
-
+        
         @if ((!EditingItem.CaseNo.Contains("CN") || EditingItem.CaseNo.Contains("WO")) && EditingItem.DoItem == "新申请")
         {
             <SpaceItem>

+ 53 - 2
wispro.sp.web/Components/PerformanceItemRow.razor.cs

@@ -1,17 +1,28 @@
-using Microsoft.AspNetCore.Components;
+using AntDesign;
+using Microsoft.AspNetCore.Components;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using wispro.sp.entity;
+using wispro.sp.web.Services;
 
 namespace wispro.sp.web.Components
 {
     public partial class PerformanceItemRow
     {
+        const string strAgentFeedbackMemo = "AgentFeedbackMemo";
+        const string strDoItemCoefficient = "DoItemCoefficient";
+        const string strReturnCasseNo = "ReturnCasseNo";
+        const string strCaseCoefficient = "CaseCoefficient";
+        const string strWordCount = "WordCount";
+        
+        [Inject] public PerformanceItemServices _ItemService { get; set; }
+        [Inject] public MessageService _message { get; set; }
+
         [Parameter]
         public PerformanceItem EditingItem { get; set; }
-
+        
         [Parameter]
         public EventCallback<PerformanceItem> OnSubmitShenSu { get; set; }
 
@@ -61,6 +72,8 @@ namespace wispro.sp.web.Components
             if (OnSubmitShenSu.HasDelegate)
             {
                 OnSubmitShenSu.InvokeAsync(EditingItem);
+                
+
             }
         }
 
@@ -71,5 +84,43 @@ namespace wispro.sp.web.Components
                 OnSWJXSF.InvokeAsync(EditingItem);
             }
         }
+
+        private string EditField;
+        private bool isInputChanged = false;
+        void startEdit(string id)
+        {
+            EditField = id;
+            isInputChanged = false;
+        }
+
+        void stopEdit()
+        {
+            if (isInputChanged)
+            {
+                var respone =  _ItemService.SaveFieldChange(EditingItem.Id,EditField ,EditField.GetType().GetProperty(EditField).GetValue(EditField,null).ToString());
+
+                //while (!respone.GetAwaiter().IsCompleted)
+                //{
+                //    Task.Delay(50);
+                //}
+
+                //if (!respone.Result.Success)
+                //{
+                //    _message.Warn(respone.Result.ErrorMessage);
+                //}
+
+            }
+            EditField = null;
+        }
+
+        void SelectChanged(Reason value)
+        {
+            isInputChanged = true;
+        }
+
+        private void InputChanged(ChangeEventArgs args)
+        {
+            isInputChanged = true;
+        }
     }
 }

+ 2 - 2
wispro.sp.web/Components/UserGradeSelect.razor

@@ -16,11 +16,11 @@
     private StaffGrade _SelectedItem;
 
     [Parameter]
-    public int StaffGradeId{ get; set;}
+    public int? StaffGradeId{ get; set;}
 
 
     [Parameter]
-    public EventCallback<int> StaffGradeIdChanged { get; set; }
+    public EventCallback<int?> StaffGradeIdChanged { get; set; }
 
     protected override async System.Threading.Tasks.Task OnInitializedAsync()
     {

+ 1 - 1
wispro.sp.web/Layouts/BasicLayout.razor

@@ -68,7 +68,7 @@
             {
                 new MenuDataItem
                 {
-                    Path="/MyCaseList",
+                    Path="/MyCaselist",
                     Name = "案件确认",
                     Key = "app_confirm"
                 },

+ 1 - 1
wispro.sp.web/Models/CurrentUser.cs

@@ -21,7 +21,7 @@ namespace wispro.sp.web.Models
     {
         public string Name { get; set; }
         public string Avatar { get; set; }
-        public string Userid { get; set; }
+        public int? Userid { get; set; }
         public NoticeType[] Notice { get; set; } = { };
         public string Email { get; set; }
         public string Signature { get; set; }

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

@@ -1,5 +1,6 @@
 @page "/MyCaseList"
 @using wispro.sp.web.Components
+@using wispro.sp.share 
 
 <PageContainer>
     <Breadcrumb>
@@ -85,18 +86,37 @@
                                 
                                 <AntDesign.Table DataSource="_Datas" TItem="PerformanceItem"
                                                  @bind-PageIndex="_pageIndex"
-                                                 @bind-PageSize="_pageSize" 
+                                                 @bind-PageSize="_pageSize"
                                                  Total="_total"
                                                  ScrollX="3800" Size="TableSize.Small" Bordered
                                                  @bind-SelectedRows="selectedItems"
+                                                 OnRow="OnRow"
                                                  Loading="_loading"
                                                  RowClassName="@(x => x.Data.isDanger()?"danger":"")"
                                                  OnChange="HandleTableChange" RemoteDataSource>
-                                    @*<wispro.sp.web.Component.PerformanceItemRow EditingItem="context" OnSubmitShenSu="OnsubShensu" OnSWJXSF="OnJXCal"></wispro.sp.web.Component.PerformanceItemRow>*@
                                     <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="绩效特殊字段" DataIndex="@nameof(context.AgentFeedbackMemo)" TData="string" Width="280" Fixed="left">
+                                        
+                                        <Select DataSource="@_Reasons"
+                                                @bind-Value="@context.AgentFeedbackMemo"
+                                                LabelName="@nameof(Reason.Name)"
+                                                ValueName="@nameof(Reason.Value)"
+                                                Placeholder="请选项一项"
+                                                DefaultActiveFirstItem="false"
+                                                EnableSearch="true"
+                                                AllowClear="true"
+                                                Style="width:220px;"
+                                                OnSelectedItemChanged="SelectChanged"
+                                                OnFocus="()=>OnFocus(context)">
+                                        </Select>
+                                    </AntDesign.Column>
                                     <AntDesign.Column Title="我方文号" @bind-Field="@context.CaseNo" Width="150" Sortable Filterable Fixed="left" />
                                     <AntDesign.Column Title="案件类型" @bind-Field="@context.CaseType" Width="120" Sortable Filterable />
                                     <AntDesign.Column Title="案件系数" @bind-Field="@context.CaseCoefficient" Width="120" Sortable Filterable />
+
                                     <AntDesign.Column Title="处理事项" @bind-Field="@context.DoItem" Width="120" Sortable Filterable />
                                     <AntDesign.Column Title="处理事项系数" @bind-Field="@context.DoItemCoefficient" Width="150" Sortable Filterable />
                                     <AntDesign.Column Title="处理人" TData="string" DataIndex="@nameof(context.ItemStaffs)" Width="150">
@@ -121,21 +141,9 @@
                                     <AntDesign.Column Title="案件状态" @bind-Field="@context.CaseState" Width="100"></AntDesign.Column>
                                     <AntDesign.Column Title=" 申请人" @bind-Field="@context.ApplicationName" Width="200"></AntDesign.Column>
                                     <AntDesign.Column Title="备注" @bind-Field="@context.CaseMemo"></AntDesign.Column>
-                                    <ActionColumn Fixed="right" Title="绩效特殊字段填写与操作" Width="350">
+                                    <ActionColumn Fixed="right" Title="操作" Width="80">
                                         <Space>
-                                            <SpaceItem>
-                                                <Select DataSource="@_Reasons"
-                                                        @bind-Value="@context.AgentFeedbackMemo"
-                                                        LabelName="@nameof(Reason.Name)"
-                                                        ValueName="@nameof(Reason.Value)"
-                                                        Placeholder="请选项一项"
-                                                        DefaultActiveFirstItem="false"
-                                                        EnableSearch="true"
-                                                        AllowClear="true"
-                                                        Style="width:220px;">
-                                                </Select>
-                                            </SpaceItem>
-
+                                             
                                             @if ((!context.CaseNo.Contains("CN") || context.CaseNo.Contains("WO")) && context.DoItem == "新申请")
                                             {
                                                 <SpaceItem>

+ 94 - 10
wispro.sp.web/Pages/AppCase/MyCaselist.razor.cs

@@ -9,6 +9,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
 using wispro.sp.entity;
+using wispro.sp.share;
 using wispro.sp.web.Services;
 
 
@@ -17,6 +18,12 @@ namespace wispro.sp.web.Pages.AppCase
     [Authorize]
     public partial class MyCaselist
     {
+        const string strAgentFeedbackMemo = "AgentFeedbackMemo";
+        const string strDoItemCoefficient = "DoItemCoefficient";
+        const string strReturnCasseNo = "ReturnCasseNo";
+        const string strCaseCoefficient = "CaseCoefficient";
+        const string strWordCount = "WordCount";
+
         class Reason
         {
             public string Value { get; set; }
@@ -68,7 +75,7 @@ namespace wispro.sp.web.Pages.AppCase
         [Inject] public PerformanceItemServices _ItemService { get; set; }
         [Inject] public MessageService _message { get; set; }
         [Inject] protected NavigationManager NavigationManager { get; set; }
-
+        [Inject] protected IUserService _userService { get; set; }
 
 
         private bool isFirstInit = true;
@@ -78,7 +85,8 @@ namespace wispro.sp.web.Pages.AppCase
             {
                 _loading = true;
 
-                var data = await _ItemService.GetItems(_pageIndex, _pageSize);
+                //var data = await _ItemService.GetItems(_pageIndex, _pageSize);
+                var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value, jxType.doing,_pageIndex,_pageSize);
 
 
                 _Datas = data.Results;
@@ -91,21 +99,32 @@ namespace wispro.sp.web.Pages.AppCase
             Console.WriteLine($"OnInitializedAsync:[tota:{_total}\tPageIndex:{_pageIndex}\tPageSize:{_pageSize}]");
         }
 
-        private async Task HandleTableChange(QueryModel<PerformanceItem> queryModel)
+        private int serialNumber(int pageIndex, int pageSize, int id)
         {
-            _loading = true;
+            int iIndex = 0;
+            foreach (PerformanceItem sf in _Datas)
+            {
+                iIndex++;
 
-            var data = await _ItemService.GetItems(queryModel.PageIndex ,queryModel.PageSize);
+                if (sf.Id == id)
+                {
+                    break;
+                }
+            }
+            return (pageIndex - 1) * pageSize + iIndex;
+        }
 
+
+        private async Task HandleTableChange(QueryModel<PerformanceItem> queryModel)
+        {
+            _loading = true;
+            var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value, jxType.doing, _pageIndex, _pageSize);
             _Datas = data.Results;
-            //_pageIndex = queryModel.PageIndex;
-            //_pageSize = queryModel.PageSize;
             _total = data.TotalCount;
             _loading = false;
             StateHasChanged();
 
-            Console.WriteLine($"OnChange:[tota:{_total}\tPageIndex:{_pageIndex}\tPageSize:{_pageSize}]");
-            //_message.Info($"tota:{_total}\r\nPageIndex:{_pageIndex}\r\nPageSize:{_pageSize}");
+            
         }
 
         private void OnsubShensu(PerformanceItem Item)
@@ -247,7 +266,7 @@ namespace wispro.sp.web.Pages.AppCase
 
                 _loading = true;
                 _Datas = null;
-                var data = await _ItemService.GetItems(_pageIndex, _pageSize);
+                var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value, jxType.doing, _pageIndex, _pageSize);
                 //var  data = response.GetAwaiter().GetResult();
 
                 _Datas = data.Results;
@@ -256,5 +275,70 @@ namespace wispro.sp.web.Pages.AppCase
             }
         }
 
+        private string EditField;
+        
+        private bool isInputChanged = false;
+        void startEdit(string id)
+        {
+            EditField = id;
+            isInputChanged = false;
+        }
+
+        void stopEdit()
+        {
+            if (isInputChanged)
+            {
+                var respone = _ItemService.SaveFieldChange(EditingItem.Id, EditField, EditField.GetType().GetProperty(EditField).GetValue(EditField, null).ToString());
+
+                //while (!respone.GetAwaiter().IsCompleted)
+                //{
+                //    Task.Delay(50);
+                //}
+
+                //if (!respone.Result.Success)
+                //{
+                //    _message.Warn(respone.Result.ErrorMessage);
+                //}
+
+            }
+            EditField = null;
+        }
+
+        void SelectChanged(Reason  value)
+        {
+            if (!_loading && EditingItem != null)
+            {
+
+                Console.WriteLine($"SelectChanged:{EditingItem.CaseNo}\t{value.Value }\t{EditingItem.AgentFeedbackMemo}");
+                var respone = _ItemService.SaveFieldChange(EditingItem.Id, strAgentFeedbackMemo, EditingItem.AgentFeedbackMemo);
+                EditingItem = null;
+                isInputChanged = true;
+            }
+        }
+
+        private void InputChanged(ChangeEventArgs args)
+        {
+            isInputChanged = true;
+        }
+
+        Dictionary<string, object> OnRow(RowData<PerformanceItem> row)
+        {
+            Dictionary<string, object> ret = new Dictionary<string, object>();
+
+            
+            ret.Add("onclick", ((Action)delegate
+            {
+                EditingItem = row.Data;
+            }));
+
+
+            return ret;
+        }
+
+        void OnFocus(PerformanceItem item)
+        {
+            Console.WriteLine("OnFocus");
+            EditingItem = item;
+        }
     }
 }

+ 87 - 0
wispro.sp.web/Pages/AppCase/MyFistPage.razor

@@ -0,0 +1,87 @@
+@page "/MyFirstList"
+
+<PageContainer>
+    <Breadcrumb>
+        <Breadcrumb>
+            <BreadcrumbItem>
+                <a href="/Home"><Icon Type="home"></Icon></a>
+            </BreadcrumbItem>
+            <BreadcrumbItem>
+                <Icon Type="setting"></Icon><span>我的绩效清单</span>
+            </BreadcrumbItem>
+        </Breadcrumb>
+    </Breadcrumb>
+    <Content>
+        @*<Button Type="primary" Icon="plus" OnClick="AddNew" Style="float:right">添加</Button>*@
+    </Content>
+    <ChildContent>
+        <div style="width:1300px;  overflow:auto;">
+            @if (_Datas == null)
+            {
+                <Spin />
+            }
+            else
+            {
+                <table border="1" style="min-width:100%">
+                    <tr>
+                        <th>我方文号</th>
+                        <th>案件类型</th>
+                        <th>案件系数</th>
+                        <th>处理事项</th>
+                        <th>处理事项系数</th>
+                        <th>处理人</th>
+                        <th>核稿人</th>
+                        <th>基础点数</th>
+                        <th>完成时间</th>
+                        <th>返稿日</th>
+                        <th>客户期限</th>
+                        <th>初稿日</th>
+                        <th>内部期限</th>
+                        <th>案件阶段</th>
+                        <th>案件名称</th>
+                        <th>案件状态</th>
+                        <th>申请人</th>
+                        <th>备注</th>
+                    </tr>
+                    @foreach (var item in _Datas)
+                    {
+                        <tr>
+                            <td>@item.CaseNo</td>
+                            <td>@item.ApplicationType</td>
+                            <td>@item.CaseCoefficient</td>
+                            <td>@item.DoItem</td>
+                            <td>@item.DoItemCoefficient</td>
+                            <td>
+                                @if (item.ItemStaffs != null)
+                                {
+                                    foreach (ItemStaff itemStaff in item.ItemStaffs)
+                                    {
+                                        <span>@(itemStaff.DoPerson.Name)&nbsp;</span>
+                                    }
+                                }
+                            </td>
+                            <td>@(item.Reviewer ==null?"": item.Reviewer.Name)</td>
+                            <td>@(item.BasePoint ==null?"": item.BasePoint)</td>
+                            <td>@(item.FinishedDate.HasValue? item.FinishedDate.Value.ToString("yyyy-MM-dd"):"")</td>
+                            <td>@(item.ReturnDate.HasValue? item.ReturnDate.Value.ToString("yyyy-MM-dd"):"")</td>
+                            <td>@(item.CustomerLimitDate.HasValue? item.CustomerLimitDate.Value.ToString("yyyy-MM-dd"):"")</td>
+                            <td>@(item.FirstDraftDate.HasValue? item.FirstDraftDate.Value.ToString("yyyy-MM-dd"):"")</td>
+                            <td>@(item.InternalDate.HasValue? item.InternalDate.Value.ToString("yyyy-MM-dd"):"")</td>
+                            <td>@item.CaseStage</td>
+                            <td>@item.CaseState</td>
+                            <td>@item.CaseMemo</td>
+                        </tr>
+                    }
+                </table>
+            }
+        </div>
+
+    </ChildContent>
+</PageContainer>
+
+<style>
+    div table td{
+        min-width:50px;
+    }
+</style>
+

+ 41 - 0
wispro.sp.web/Pages/AppCase/MyFistPage.razor.cs

@@ -0,0 +1,41 @@
+using AntDesign;
+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 MyFistPage
+    {
+        private List<PerformanceItem> _Datas;
+        private bool _loading = false;
+        private int _total;
+
+        [Inject] public PerformanceItemServices _ItemService { get; set; }
+        [Inject] public MessageService _message { get; set; }
+        [Inject] protected NavigationManager NavigationManager { get; set; }
+        [Inject] protected  IUserService _userService { get; set; }
+
+        protected async override Task OnInitializedAsync()
+        {
+            
+            _loading = true;
+
+            //System.Diagnostics.Debug.WriteLine(_userService.CurrentUser.Userid);
+            var data = await _ItemService.GetMyList(_userService.CurrentUser.Userid.Value,jxType.doing);
+
+
+            _Datas = data.Results;
+            _total = data.TotalCount;
+            _loading = false;
+
+            //StateHasChanged();
+
+        }
+    }
+}

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

@@ -43,7 +43,7 @@ namespace wispro.sp.web.Services
 
                 httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", userToken.Token);
                 
-                UserService.CurrentUser = new Models.CurrentUser() { Name = userToken.Name};
+                UserService.CurrentUser = new Models.CurrentUser() { Name = userToken.Name,Userid = userToken.UserId};
                 
                 result = true;
             }

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

@@ -28,5 +28,17 @@ namespace wispro.sp.web.Services
             return data;
 
         }
+
+        public async Task<ApiSaveResponse> SaveFieldChange(int id,string Field,string value)
+        {
+            ApiSaveResponse data = await _httpClient.GetFromJsonAsync<ApiSaveResponse>($"http://localhost:39476/api/PerformanceItem/UpdateFieldValue?id={id}&field={Field}&value={value}");
+            return data;
+        }
+
+        public async Task<ListApiResponse<PerformanceItem>> GetMyList(int userid,jxType type,int pageIndex=1,int pageSize=5)
+        {
+            ListApiResponse<PerformanceItem> data = await _httpClient.GetFromJsonAsync<ListApiResponse<PerformanceItem>>($"http://localhost:39476/api/PerformanceItem/GetMyList?userid={userid}&Type={Convert.ToInt32(type)}&pageIndex={pageIndex}&pageSize={pageSize}");
+            return data;
+        }
     }
 }

+ 6 - 0
wospro.sp.entity/PerformanceItem.cs

@@ -178,6 +178,12 @@ namespace wispro.sp.entity
         /// </summary>
         public int? WordCount { get; set; }
 
+
+        /// <summary>
+        /// 撤回案件编号
+        /// </summary>
+        public string ReturnCasseNo { get; set; }
+
         /// <summary>
         /// 绩效类型
         /// </summary>