Ver código fonte

知识库调整

田爽 5 meses atrás
pai
commit
7570145235

+ 19 - 3
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -670,13 +670,29 @@ namespace Hotline.Api.Controllers
                 new KeyValuePair<int, string>(3, "已上架"),
                 new KeyValuePair<int, string>(4, "已下架"),
                 new KeyValuePair<int, string>(1, "审核中"),
-                new KeyValuePair<int, string>(5, "审核不通过")
+                new KeyValuePair<int, string>(8, "草稿")
             };
 
-            return _baseDataApplication
+            var tabNewDraftsNames = new List<KeyValuePair<int, string>>
+            {
+	            new KeyValuePair<int, string>(0, "待提交"),
+	            new KeyValuePair<int, string>(5, "审核不通过"),
+            };
+
+            var tabAuditingNames = new List<KeyValuePair<string, string>>
+            {
+	            new KeyValuePair<string, string>("知识新增", "新增审核"),
+	            new KeyValuePair<string, string>("知识更新", "修改审核"),
+	            new KeyValuePair<string, string>("知识删除", "删除审核"),
+	            new KeyValuePair<string, string>("知识下架", "下架审核"),
+			};
+
+			return _baseDataApplication
                 .FileType(EFileType.excel | EFileType.pdf)
                 .Add("tabNames", tabNames)
-                .Build();
+                .Add("tabNewDraftsNames", tabNewDraftsNames)
+                .Add("tabAuditingNames", tabAuditingNames)
+				.Build();
         }
 
         /// <summary>

+ 1 - 0
src/Hotline.Application/Knowledge/KnowApplication.cs

@@ -95,6 +95,7 @@ namespace Hotline.Application.Knowledge
                 .WhereIF(!string.IsNullOrEmpty(hotspotHotSpotFullName), x => x.HotspotType.HotSpotFullName.EndsWith(hotspotHotSpotFullName!))
                 .WhereIF(!string.IsNullOrEmpty(pagedDto.CreateOrgId), x => x.SourceOrganizeId != null && x.SourceOrganizeId.EndsWith(pagedDto.CreateOrgId!))
                 .WhereIF(!string.IsNullOrEmpty(pagedDto.ModuleCode), x => x.Workflow.ModuleCode == pagedDto.ModuleCode)
+                .WhereIF(pagedDto.Status ==  EKnowledgeStatus.NewDrafts ,x=>x.Status == EKnowledgeStatus.Drafts || x.Status == EKnowledgeStatus.Revert)
                 .OrderByDescending(d => d.CreationTime)
                 .ToPagedListAsync(pagedDto.PageIndex, pagedDto.PageSize, cancellationToken);
             //返回数据

+ 7 - 1
src/Hotline.Application/Systems/BaseDataApplication.cs

@@ -170,7 +170,13 @@ public class BaseDataApplication : IScopeDependency
         return this;
     }
 
-    public BaseDataApplication SourceChannel()
+    public BaseDataApplication Add(string name, List<KeyValuePair<string, string>> items)
+    {
+	    _baseData.TryAdd(name, items);
+	    return this;
+    }
+
+	public BaseDataApplication SourceChannel()
     {
         Add(SysDicTypeConsts.SourceChannel);
         return this;

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

@@ -54,4 +54,10 @@ public enum EKnowledgeStatus
 	/// </summary>
 	[Description("下架审批中")]
 	OffShelfAudit = 7,
+
+	/// <summary>
+	/// 草稿
+	/// </summary>
+	[Description("草稿")]
+	NewDrafts = 8,
 }