TANG JIANG 2 سال پیش
والد
کامیت
c9eb07dfa1

+ 21 - 1
src/Hotline.Api/Controllers/KnowledgeApplyController.cs

@@ -10,6 +10,7 @@ using MapsterMapper;
 using Microsoft.AspNetCore.Mvc;
 using XF.Domain.Authentications;
 using XF.Domain.Exceptions;
+using XF.Utility.EnumExtensions;
 
 namespace Hotline.Api.Controllers
 {
@@ -47,7 +48,7 @@ namespace Hotline.Api.Controllers
             _knowApplication = knowApplication;
             _userRepository = userRepository;
             _systemOrganizeRepository = systemOrganizeRepository;
-        } 
+        }
         #endregion
 
         #region 知识申请基础
@@ -215,6 +216,25 @@ namespace Hotline.Api.Controllers
         #endregion
 
         #region 我的知识申请
+        /// <summary>
+        /// 知识申请页面枚举值
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("apply-base-data")]
+        public async Task<object> ApplyBaseData()
+        {
+            var rsp = new
+            {
+                EKnowledgeApplyStatus = EnumExts.GetDescriptions<EKnowledgeApplyStatus>(),
+                EKnowledgeApplyType = new List<KeyValuePair<int, string>>
+                    {
+                        new KeyValuePair<int, string>(0, "新增"),
+                        new KeyValuePair<int, string>(1, "修改")
+                    }
+            };
+            return rsp;
+        }
+
         /// <summary>
         /// 我的知识申请--全部
         /// </summary>

+ 25 - 1
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -367,6 +367,16 @@ namespace Hotline.Api.Controllers
         #endregion
 
         #region 知识列表
+        /// <summary>
+        /// 知识库列表页面枚举值
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("knowledge-status-data")]
+        public async Task<object> KnowledgeStatus()
+        {
+            return EnumExts.GetDescriptions<EKnowledgeStatus>();
+        }
+
         /// <summary>
         /// 知识查询
         /// </summary>
@@ -427,6 +437,16 @@ namespace Hotline.Api.Controllers
         #endregion
 
         #region 我的知识删除列表
+        /// <summary>
+        /// 我的知识删除列表页面枚举值
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet("delete-status-data")]
+        public async Task<object> DeleteApplyStatus()
+        {
+            return EnumExts.GetDescriptions<EKnowledgeWorkFlowStatus>();
+        }
+
         /// <summary>
         /// 我的知识删除列表
         /// </summary>
@@ -471,8 +491,12 @@ namespace Hotline.Api.Controllers
         {
             var rsp = new
             {
-                EKnowledgeApplyType = EnumExts.GetDescriptions<EKnowledgeApplyType>(),
                 EKnowledgeWorkFlowStatus = EnumExts.GetDescriptions<EKnowledgeWorkFlowStatus>(),
+                EKnowledgeApplyType = new List<KeyValuePair<int, string>>
+                    {
+                        new KeyValuePair<int, string>(0, "发布知识"),
+                        new KeyValuePair<int, string>(2, "删除知识")
+                    }
             };
             return rsp;
         }

+ 0 - 6
src/Hotline.Share/Enums/KnowledgeBase/EKnowledgeApplyStatus.cs

@@ -30,10 +30,4 @@ public enum EKnowledgeApplyStatus
     /// </summary>
     [Description("撤回")]
     Revert = 3,
-
-    /// <summary>
-    /// 逾期
-    /// </summary>
-    [Description("逾期")]
-    Overtime = 4,
 }

+ 5 - 5
src/Hotline.Share/Enums/KnowledgeBase/EKnowledgeApplyType.cs

@@ -13,11 +13,11 @@ public enum EKnowledgeApplyType
     [Description("发布知识")]
     Add = 0,
 
-    ///// <summary>
-    ///// 修改
-    ///// </summary>
-    //[Description("修改")]
-    //Update = 1,
+    /// <summary>
+    /// 修改
+    /// </summary>
+    [Description("修改")]
+    Update = 1,
 
     /// <summary>
     /// 删除