Browse Source

添加我的绩效清单页面

luocaiyang 4 years ago
parent
commit
f61583cc5e

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

@@ -106,11 +106,6 @@ namespace wispro.sp.api.Controllers
 
         public ListApiResponse<PerformanceItem> Query(int pageIndex,int pageSize)
         {
-            if (!User.Identity.IsAuthenticated)
-            {
-               
-            }
-
             ListApiResponse<PerformanceItem> ret = new ListApiResponse<PerformanceItem>();
             var results = Context.PerformanceItems
                 .Where<PerformanceItem>(s => s.ItemStaffs

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

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

+ 4 - 0
wispro.sp.share/wispro.sp.share.csproj

@@ -6,6 +6,10 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <PackageReference Include="AntDesign.ProLayout" Version="0.1.4" />
+  </ItemGroup>
+
+  <ItemGroup>
     <ProjectReference Include="..\wospro.sp.entity\wispro.sp.entity.csproj" />
   </ItemGroup>
 

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

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

+ 43 - 23
wispro.sp.web/Pages/PerformanceList.razor

@@ -1,4 +1,4 @@
-@page "/PerformanceList"
+@page "/MyCaseList"
 @using wispro.sp.web.Components
 
 <PageContainer>
@@ -17,23 +17,36 @@
         @*<Button Type="primary" Icon="plus" OnClick="AddNew" Style="float:right">添加</Button>*@
     </Content>
     <ChildContent>
-        <Pagination @bind-Current="@_pageIndex" @bind-Total="@_total" ShowSizeChanger OnChange="OnChange" />
-        @if (_Datas == null)
-        {
-            <center><Spin /></center>
-        }
-        else
-        {
+        <div class="card-container">
+            <Tabs Type="@TabType.Card">
+                <TabPane Key="1" Tab="待确认绩效清单">
+                    <ChildContent>
+                        <Card>
+                            <Pagination @bind-Current="@_pageIndex" @bind-Total="@_total" ShowSizeChanger OnChange="OnChange" />
+                            @if (_Datas == null)
+                            {
+                                <center><Spin /></center>
+                            }
+                            else
+                            {
 
-            <AntList TItem="PerformanceItem"
-                     DataSource="@_Datas"
-                     Class="activitiesList"
-                     Size="large"
-                     ItemLayout="ListItemLayout.Horizontal">
-                <PerformanceItemDescriptionItem EditingItem="context" OnSubmitShenSu="OnsubShensu" OnSWJXSF="OnJXCal"></PerformanceItemDescriptionItem>
-            </AntList>
-            @*<Pagination @bind-Current="_pageIndex"  @bind-Total="@_total"  ShowSizeChanger  OnChange="OnChange"/>*@
-        }
+                                <AntList TItem="PerformanceItem"
+                                         DataSource="@_Datas"
+                                         Class="activitiesList"
+                                         Size="large"
+                                         ItemLayout="ListItemLayout.Horizontal">
+                                    <PerformanceItemDescriptionItem EditingItem="context" OnSubmitShenSu="OnsubShensu" OnSWJXSF="OnJXCal"></PerformanceItemDescriptionItem>
+                                </AntList>
+                                @*<Pagination @bind-Current="_pageIndex"  @bind-Total="@_total"  ShowSizeChanger  OnChange="OnChange"/>*@
+                            }
+                        </Card>
+                    </ChildContent>
+                </TabPane>
+                <TabPane Key="2" Tab="历史绩效清单">
+                    <ChildContent>Tab 2</ChildContent>
+                </TabPane>
+            </Tabs>
+        </div>
     </ChildContent>
 </PageContainer>
 
@@ -62,8 +75,8 @@
     <Form Model="_calType" LabelColSpan="6" WrapperColSpan="16">
         <FormItem Label="绩效计算方式">
             <RadioGroup @bind-Value="@context.Type">
-                <Radio  Value="@("按照字数计算绩效")">按照字数计算绩效</Radio>
-                <Radio  Value="@("按照件数计算绩效")">按照件数计算绩效</Radio>
+                <Radio Value="@("按照字数计算绩效")">按照字数计算绩效</Radio>
+                <Radio Value="@("按照件数计算绩效")">按照件数计算绩效</Radio>
             </RadioGroup>
         </FormItem>
         <FormItem Label="请谁确认">
@@ -87,7 +100,7 @@
 <Modal Title="申诉窗口" Visible="@_visible"
        OnOk="@HandleOk"
        OnCancel="@HandleCancel"
-       MaskClosable ="false"
+       MaskClosable="false"
        Width="600">
     <Card Style="width:100%" Bordered>
         <div>
@@ -110,13 +123,14 @@
         <FormItem Label="类型">
             <Select DataSource="@AvatarMenuItems"
                     @bind-Value="@context.Type"
-                    LabelName="@nameof(AvatarMenuItem.Option)"
-                    ValueName="@nameof(AvatarMenuItem.Key)"
+                    LabelName="@nameof(shensuType.Name)"
+                    ValueName="@nameof(shensuType.Name)"
                     Placeholder="请选择申诉类型"
                     Style="width:100%"
                     AllowClear
                     DefaultActiveFirstItem="false"
-                    EnableSearch>
+                    EnableSearch
+                    OnSelectedItemChanged="OnSelectedItemChangedHandler">
             </Select>
         </FormItem>
         <FormItem Label="向谁申诉">
@@ -131,6 +145,12 @@
                     EnableSearch>
             </Select>
         </FormItem>
+        @if (_SelectedItem != null && !string.IsNullOrEmpty(_SelectedItem.ChangeField))
+        {
+            <FormItem Label=@($"{_SelectedItem.ChangeField}变更为")>
+                <Input @bind-Value="@context.ChangeTo" />
+            </FormItem>
+        }
         <FormItem Label="申诉理由">
             <TextArea @bind-Value="@context.Reason" Rows="6" Style="width: 100%" />
         </FormItem>

+ 26 - 35
wispro.sp.web/Pages/PerformanceList.razor.cs

@@ -10,11 +10,10 @@ using wispro.sp.entity;
 using wispro.sp.web.Services;
 
 
-namespace wispro.sp.web.Pages
+namespace wispro.sp.web.Pages.AppCase
 {
-    public partial class PerformanceList
+    public partial class MyCaselist
     {
-
         private List<PerformanceItem> _Datas;
         IEnumerable<PerformanceItem> selectedItems;
 
@@ -30,7 +29,7 @@ namespace wispro.sp.web.Pages
         [Inject] public MessageService _message { get; set; }
         [Inject] protected NavigationManager NavigationManager { get; set; }
 
-        
+
 
         public void HandleSelectUser(MenuItem item)
         {
@@ -63,13 +62,13 @@ namespace wispro.sp.web.Pages
 
             var data = await _ItemService.GetItems(_pageIndex, _pageSize);
 
-            
+
             _Datas = data.Results;
             _total = data.TotalCount;
             _loading = false;
         }
 
-        
+
         private void OnsubShensu(PerformanceItem Item)
         {
             EditingItem = Item;
@@ -112,16 +111,24 @@ namespace wispro.sp.web.Pages
         }
         #endregion
 
-        public AvatarMenuItem[] AvatarMenuItems { get; set; } = new AvatarMenuItem[]
-        {
-            new() { Key = "reviewer", IconType = "user", Option = "核稿人申诉"},
-            new() { Key = "doPerson", IconType = "user", Option = "处理人申诉"},
-            new() { Key = "caseCoe", IconType = "logout", Option = "案件系数申诉"},
-            new() { Key = "itemCoe", IconType = "logout", Option = "处理事项系数申诉"},
-            new() { Key = "milPerson", IconType = "logout", Option = "多人处理分配比率申诉"},
-            new() { Key = "logout", IconType = "logout", Option = "严重超期说明"},
-            new() { Key = "logout", IconType = "logout", Option = "涉外新申请绩效计算备注"}
+        
+        public shensuType[] AvatarMenuItems { get; set; } = new shensuType[]
+        {
+            new() { ChangeField = "核稿人", Name = "核稿人申诉"},
+            new() { ChangeField = "处理人", Name =  "处理人申诉"},
+            new() { ChangeField = "案件系数", Name =  "案件系数申诉"},
+            new() { ChangeField = "处理事项系数", Name =  "处理事项系数申诉"},
+            new() { Name =  "多人处理分配比率申诉"},
+            new() { Name =  "严重超期说明"},
+            //new() { Key = "logout", IconType = "logout", Option = "涉外新申请绩效计算备注"}
         };
+
+        private shensuType _SelectedItem;
+        private void OnSelectedItemChangedHandler(shensuType value)
+        {
+            _SelectedItem = value;
+            //StaffGradeIdChanged.InvokeAsync(_SelectedItem.Id);
+        }
         #region 文件上传控件设定
         List<UploadFileItem> fileList = new List<UploadFileItem>
             {
@@ -179,33 +186,17 @@ namespace wispro.sp.web.Pages
         }
         #endregion
 
-        class shenshou
-        {
-            public string Type { get; set; }
-
-            public int ReviewerId { get; set; }
-            public string Reason { get; set; }
-
-            public List<UploadFileItem> Files { get; set; }
-        }
-
-        class CalType
-        {
-            public string Type { get; set; } = "按照字数计算绩效";
-
-            public int ReviewerId { get; set; }
+        
 
-            public int wordCount { get; set; }
-        }
 
         CalType _calType = new CalType();
         shenshou _shenshou = new shenshou();
         List<Staff> Reviewers = new List<Staff>()
         {
             new Staff(){Id =1,Name ="钟子敏"},
-            new Staff(){Id =1,Name ="邢丽霞"},
-            new Staff(){Id =1,Name ="李丽"},
-            new Staff(){Id =1,Name ="贾凤涛"},
+            new Staff(){Id =2,Name ="邢丽霞"},
+            new Staff(){Id =3,Name ="李丽"},
+            new Staff(){Id =4,Name ="贾凤涛"},
         };
 
         private async Task OnChange(PaginationEventArgs args)

+ 31 - 0
wispro.sp.web/Pages/AppCase/MyCaselist.razor.css

@@ -0,0 +1,31 @@
+
+[data-theme='compact'] .card-container .ant-tabs-card .ant-tabs-content,
+.card-container .ant-tabs-card .ant-tabs-content {
+    height: 120px;
+    margin-top: -16px;
+}
+
+    [data-theme='compact'] .card-container .ant-tabs-card .ant-tabs-content .ant-tabs-tabpane,
+    .card-container .ant-tabs-card .ant-tabs-content .ant-tabs-tabpane {
+        background: #fff;
+        padding: 16px;
+    }
+
+[data-theme='compact'] .card-container .ant-tabs-card .ant-tabs-bar,
+.card-container .ant-tabs-card .ant-tabs-bar {
+    border-color: #fff;
+}
+
+    [data-theme='compact'] .card-container .ant-tabs-card .ant-tabs-bar .ant-tabs-tab,
+    .card-container .ant-tabs-card .ant-tabs-bar .ant-tabs-tab {
+        border-color: transparent;
+        background: transparent;
+    }
+
+    [data-theme='compact'] .card-container .ant-tabs-card .ant-tabs-bar .ant-tabs-tab-active,
+    .card-container .ant-tabs-card .ant-tabs-bar .ant-tabs-tab-active {
+        border-color: #fff;
+        background: #fff;
+    }
+
+

+ 0 - 4
wispro.sp.web/wispro.sp.web.csproj

@@ -62,8 +62,4 @@
     </Content>
   </ItemGroup>
 
-  <ItemGroup>
-    <Folder Include="Pages\AppCase\" />
-  </ItemGroup>
-
 </Project>