diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03ec6d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,339 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.bin +*.Debug +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser +*.dll +*.pdb +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +/.semantic-kernel/results/src/ISS.IPSA.AiAgent.Api/plugins/BasePlugin/YesNo +**/bin/ +**/obj/ +**/.vs/ + +/Xzy.KnowledgeBase/appsettings.Development.json +/Xzy.KnowledgeBase/XzyAgent.db diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2edbe17 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +WORKDIR /service +EXPOSE 5000 + +WORKDIR /app +COPY ["Xzy.KnowledgeBase/bin/Release/net8.0/publish", "publish"] + +WORKDIR /app/publish + +FROM base AS final +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN echo 'Asia/Shanghai' >/etc/timezone +ENTRYPOINT ["dotnet", "Xzy.KnowledgeBase.dll"] \ No newline at end of file diff --git a/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/DependencyInjection.cs b/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/DependencyInjection.cs new file mode 100644 index 0000000..fb26651 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/DependencyInjection.cs @@ -0,0 +1,57 @@ +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Common.DependencyInjection +{ + /// + /// 容器扩展 + /// + public static class ServiceCollectionExtensions + { + /// + /// 从程序集中加载类型并添加到容器中 + /// + /// 容器 + /// 程序集集合 + /// + public static IServiceCollection AddServicesFromAssemblies(this IServiceCollection services, params string[] assemblies) + { + Type attributeType = typeof(ServiceDescriptionAttribute); + //var refAssembyNames = Assembly.GetExecutingAssembly().GetReferencedAssemblies(); + foreach (var item in assemblies) + { + Assembly assembly = Assembly.Load(item); + + var types = assembly.GetTypes(); + + foreach (var classType in types) + { + if (!classType.IsAbstract && classType.IsClass && classType.IsDefined(attributeType, false)) + { + ServiceDescriptionAttribute serviceAttribute = classType.GetCustomAttribute(attributeType) as ServiceDescriptionAttribute; + switch (serviceAttribute.Lifetime) + { + case ServiceLifetime.Scoped: + services.AddScoped(serviceAttribute.ServiceType, classType); + break; + + case ServiceLifetime.Singleton: + services.AddSingleton(serviceAttribute.ServiceType, classType); + break; + + case ServiceLifetime.Transient: + services.AddTransient(serviceAttribute.ServiceType, classType); + break; + } + } + } + } + return services; + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/ServiceDescriptionAttribute.cs b/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/ServiceDescriptionAttribute.cs new file mode 100644 index 0000000..5bd29ad --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Common/DependencyInjection/ServiceDescriptionAttribute.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Common.DependencyInjection +{ + public class ServiceDescriptionAttribute : Attribute + { + public ServiceDescriptionAttribute(Type serviceType, ServiceLifetime lifetime) + { + ServiceType = serviceType; + Lifetime = lifetime; + } + + public Type ServiceType { get; set; } + + public ServiceLifetime Lifetime { get; set; } + } + + public enum ServiceLifetime + { + /// + /// 作用域 + /// + Scoped, + /// + /// 单例 + /// + Singleton, + /// + /// 瞬时 + /// + Transient + } +} diff --git a/Xzy.KnowledgeBase.Domain/Map/AutoMapProfile.cs b/Xzy.KnowledgeBase.Domain/Map/AutoMapProfile.cs new file mode 100644 index 0000000..6db55be --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Map/AutoMapProfile.cs @@ -0,0 +1,18 @@ +using AutoMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Map +{ + public class AutoMapProfile : Profile + { + public AutoMapProfile() + { + + + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Map/MapperExtend.cs b/Xzy.KnowledgeBase.Domain/Map/MapperExtend.cs new file mode 100644 index 0000000..ba6090f --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Map/MapperExtend.cs @@ -0,0 +1,53 @@ +using AutoMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Map +{ + public static class MapperExtend + { + /// + /// Entity集合转DTO集合 + /// + /// + /// + /// + public static List ToDTOList(this object value) + { + if (value == null) + return new List(); + + return Mapper.Map>(value); + } + /// + /// Entity转DTO + /// + /// + /// + /// + public static T ToDTO(this object value) + { + if (value == null) + return default(T); + + return Mapper.Map(value); + } + + /// + /// 给已有对象map,适合update场景,如需过滤空值需要在AutoMapProfile 设置 + /// + /// + /// + /// + /// + public static T MapTo(this object self, T result) + { + if (self == null) + return default(T); + return (T)Mapper.Map(self, result, self.GetType(), typeof(T)); + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Map/MapperRegister.cs b/Xzy.KnowledgeBase.Domain/Map/MapperRegister.cs new file mode 100644 index 0000000..3ac60f2 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Map/MapperRegister.cs @@ -0,0 +1,35 @@ +using AutoMapper; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Map +{ + public static class MapperRegister + { + public static void AddMapper(this IServiceCollection services) + { + var config = new MapperConfiguration(cfg => + { + cfg.CreateMissingTypeMaps = true; + cfg.ValidateInlineMaps = false; + cfg.ShouldMapMethod = m => false; + cfg.AddProfile(); + }); + + IMapper mapper = config.CreateMapper(); + + //启动实体映射 + Mapper.Initialize(cfg => + { + cfg.CreateMissingTypeMaps = true; + cfg.ValidateInlineMaps = false; + cfg.ShouldMapMethod = m => false; + cfg.AddProfile(); + }); + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Model/PageList.cs b/Xzy.KnowledgeBase.Domain/Model/PageList.cs new file mode 100644 index 0000000..4b5982a --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Model/PageList.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Model +{ + public class PageList + { + //查询结果 + public List List { get; set; } + /// + /// 当前页,从1开始 + /// + public int PageIndex { get; set; } + /// + /// 每页数量 + /// + public int PageSize { get; set; } + /// + /// 总数 + /// + public int TotalCount { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Options/AIModelOption.cs b/Xzy.KnowledgeBase.Domain/Options/AIModelOption.cs new file mode 100644 index 0000000..915e6be --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Options/AIModelOption.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Options +{ + public class AIModelOption + { + public static string KmsChatModel { get; set; } + + public static string KmsEmbeddingModel { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Options/ConnectionOption.cs b/Xzy.KnowledgeBase.Domain/Options/ConnectionOption.cs new file mode 100644 index 0000000..df33a8e --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Options/ConnectionOption.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Options +{ + public class ConnectionOption + { + /// + /// sqlite连接字符串 + /// + public static string Sqlite { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps.cs new file mode 100644 index 0000000..3b16284 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps.cs @@ -0,0 +1,26 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [SugarTable("Apps")] + public partial class Apps + { + [SugarColumn(IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + + /// + /// 描述 + /// + public string Describe { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps_Repositories.cs new file mode 100644 index 0000000..230c127 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/Apps_Repositories.cs @@ -0,0 +1,16 @@ + +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Common.DependencyInjection; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [ServiceDescription(typeof(IApps_Repositories), ServiceLifetime.Scoped)] + public class Apps_Repositories : Repository, IApps_Repositories + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/App/IApps_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/IApps_Repositories.cs new file mode 100644 index 0000000..c69fd44 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/App/IApps_Repositories.cs @@ -0,0 +1,13 @@ +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + public interface IApps_Repositories : IRepository + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/IKmss_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/IKmss_Repositories.cs new file mode 100644 index 0000000..2d3d281 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/IKmss_Repositories.cs @@ -0,0 +1,13 @@ +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + public interface IKmss_Repositories : IRepository + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss.cs new file mode 100644 index 0000000..eb7a4d3 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss.cs @@ -0,0 +1,29 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [SugarTable("Kms")] + public partial class Kmss + { + [SugarColumn(IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 会话模型 + /// + public string ChatModel { get; set; } + /// + /// 向量模型 + /// + public string EmbeddingModel { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss_Repositories.cs new file mode 100644 index 0000000..af2f89a --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/Kms/Kmss_Repositories.cs @@ -0,0 +1,16 @@ + +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Common.DependencyInjection; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [ServiceDescription(typeof(IKmss_Repositories), ServiceLifetime.Scoped)] + public class Kmss_Repositories : Repository, IKmss_Repositories + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/IKmsDetails_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/IKmsDetails_Repositories.cs new file mode 100644 index 0000000..c777d0b --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/IKmsDetails_Repositories.cs @@ -0,0 +1,13 @@ +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + public interface IKmsDetails_Repositories : IRepository + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails.cs new file mode 100644 index 0000000..16cb41e --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails.cs @@ -0,0 +1,34 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [SugarTable("KmsDetails")] + public partial class KmsDetails + { + [SugarColumn(IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 文件名称 + /// + public string FileName { get; set; } + /// + /// 数据数量 + /// + public int DataCount { get; set; } + /// + /// 状态 + /// + public string Status { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails_Repositories.cs b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails_Repositories.cs new file mode 100644 index 0000000..6f047a1 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/AI/KmsDetail/KmsDetails_Repositories.cs @@ -0,0 +1,16 @@ + +using Xzy.KnowledgeBase.Domain.Repositories.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Common.DependencyInjection; + +namespace Xzy.KnowledgeBase.Domain.Repositories +{ + [ServiceDescription(typeof(IKmsDetails_Repositories), ServiceLifetime.Scoped)] + public class KmsDetails_Repositories : Repository, IKmsDetails_Repositories + { + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/Base/IRepository.cs b/Xzy.KnowledgeBase.Domain/Repositories/Base/IRepository.cs new file mode 100644 index 0000000..1917daa --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/Base/IRepository.cs @@ -0,0 +1,62 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Model; + +namespace Xzy.KnowledgeBase.Domain.Repositories.Base +{ + public interface IRepository + { + SqlSugarScope GetDB(); + List GetList(); + Task> GetListAsync(); + List GetList(Expression> whereExpression); + Task> GetListAsync(Expression> whereExpression); + int Count(Expression> whereExpression); + Task CountAsync(Expression> whereExpression); + PageList GetPageList(Expression> whereExpression, PageModel page); + PageList

GetPageList

(Expression> whereExpression, PageModel page); + Task> GetPageListAsync(Expression> whereExpression, PageModel page); + Task> GetPageListAsync

(Expression> whereExpression, PageModel page); + PageList GetPageList(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + Task> GetPageListAsync(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + PageList

GetPageList

(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + Task> GetPageListAsync

(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + PageList GetPageList(List conditionalList, PageModel page); + Task> GetPageListAsync(List conditionalList, PageModel page); + PageList GetPageList(List conditionalList, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + Task> GetPageListAsync(List conditionalList, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc); + T GetById(dynamic id); + Task GetByIdAsync(dynamic id); + T GetSingle(Expression> whereExpression); + Task GetSingleAsync(Expression> whereExpression); + T GetFirst(Expression> whereExpression); + Task GetFirstAsync(Expression> whereExpression); + bool Insert(T obj); + Task InsertAsync(T obj); + bool InsertRange(List objs); + Task InsertRangeAsync(List objs); + int InsertReturnIdentity(T obj); + Task InsertReturnIdentityAsync(T obj); + long InsertReturnBigIdentity(T obj); + Task InsertReturnBigIdentityAsync(T obj); + bool DeleteByIds(dynamic[] ids); + Task DeleteByIdsAsync(dynamic[] ids); + bool Delete(dynamic id); + Task DeleteAsync(dynamic id); + bool Delete(T obj); + Task DeleteAsync(T obj); + bool Delete(Expression> whereExpression); + Task DeleteAsync(Expression> whereExpression); + bool Update(T obj); + Task UpdateAsync(T obj); + bool UpdateRange(List objs); + Task UpdateRangeAsync(List objs); + bool IsAny(Expression> whereExpression); + Task IsAnyAsync(Expression> whereExpression); + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/Base/Repository.cs b/Xzy.KnowledgeBase.Domain/Repositories/Base/Repository.cs new file mode 100644 index 0000000..a8f3523 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/Base/Repository.cs @@ -0,0 +1,521 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Map; +using Xzy.KnowledgeBase.Domain.Model; + +namespace Xzy.KnowledgeBase.Domain.Repositories.Base +{ + public class Repository : SimpleClient where T : class, new() + { + public Repository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null + { + if (context == null) + { + } + //Sqlite.DbMaintenance.CreateDatabase(); + //Sqlite.CodeFirst.InitTables(typeof(CodeFirstTable1)); + } + + //注意:如果使用Client不能写成静态的,Scope并发更高 + public static SqlSugarScope Sqlite = SqlSugarHelper.Sqlite; + + public SimpleClient CurrentDb + { get { return new SimpleClient(Sqlite); } }//用来处理T表的常用操作 + + #region 通用方法 + + public virtual SqlSugarScope GetDB() + { + return Sqlite; + } + + ///

+ /// 获取所有list + /// + /// + public virtual List GetList() + { + return CurrentDb.GetList(); + } + + /// + /// 获取所有list-异步 + /// + /// + public virtual async Task> GetListAsync() + { + return await CurrentDb.GetListAsync(); + } + + /// + /// 根据lambda查询 + /// + /// + /// + public virtual List GetList(Expression> whereExpression) + { + return CurrentDb.GetList(whereExpression); + } + + /// + /// 根据lambda查询-异步 + /// + /// + /// + public virtual async Task> GetListAsync(Expression> whereExpression) + { + return await CurrentDb.GetListAsync(whereExpression); + } + + /// + /// 根据lambda表达式获取数量 + /// + /// + /// + public virtual int Count(Expression> whereExpression) + { + return CurrentDb.Count(whereExpression); + } + + /// + /// 根据lambda表达式获取数量-异步 + /// + /// + /// + public virtual async Task CountAsync(Expression> whereExpression) + { + return await CurrentDb.CountAsync(whereExpression); + } + + /// + /// 获取分页 + /// + /// + /// + /// + public virtual PageList GetPageList(Expression> whereExpression, PageModel page) + { + PageList list = new PageList(); + list.List = CurrentDb.GetPageList(whereExpression, page); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual PageList

GetPageList

(Expression> whereExpression, PageModel page) + { + var result = CurrentDb.GetPageList(whereExpression, page); + var pageData = new PageList

+ { + TotalCount = page.TotalCount, + PageIndex = page.PageIndex, + PageSize = page.PageSize, + List = result.ToDTOList

() + }; + return pageData; + } + + ///

+ /// 获取分页-异步 + /// + /// + /// + /// + public virtual async Task> GetPageListAsync(Expression> whereExpression, PageModel page) + { + PageList list = new PageList(); + list.List = await CurrentDb.GetPageListAsync(whereExpression, page); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual async Task> GetPageListAsync

(Expression> whereExpression, PageModel page) + { + var result = await CurrentDb.GetPageListAsync(whereExpression, page); + var pageData = new PageList

+ { + TotalCount = page.TotalCount, + PageIndex = page.PageIndex, + PageSize = page.PageSize, + List = result.ToDTOList

() + }; + return pageData; + } + + public virtual PageList GetPageList(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + PageList list = new PageList(); + list.List = CurrentDb.GetPageList(whereExpression, page, orderByExpression, orderByType); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual async Task> GetPageListAsync(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + PageList list = new PageList(); + list.List = await CurrentDb.GetPageListAsync(whereExpression, page, orderByExpression, orderByType); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual PageList

GetPageList

(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + var result = CurrentDb.GetPageList(whereExpression, page, orderByExpression, orderByType); + var pageData = new PageList

+ { + TotalCount = page.TotalCount, + PageIndex = page.PageIndex, + PageSize = page.PageSize, + List = result.ToDTOList

() + }; + return pageData; + } + + public virtual async Task> GetPageListAsync

(Expression> whereExpression, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + var result = await CurrentDb.GetPageListAsync(whereExpression, page, orderByExpression, orderByType); + var pageData = new PageList

+ { + TotalCount = page.TotalCount, + PageIndex = page.PageIndex, + PageSize = page.PageSize, + List = result.ToDTOList

() + }; + return pageData; + } + + public virtual PageList GetPageList(List conditionalList, PageModel page) + { + PageList list = new PageList(); + list.List = CurrentDb.GetPageList(conditionalList, page); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual async Task> GetPageListAsync(List conditionalList, PageModel page) + { + PageList list = new PageList(); + list.List = await CurrentDb.GetPageListAsync(conditionalList, page); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual PageList GetPageList(List conditionalList, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + PageList list = new PageList(); + list.List = CurrentDb.GetPageList(conditionalList, page, orderByExpression, orderByType); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + public virtual async Task> GetPageListAsync(List conditionalList, PageModel page, Expression> orderByExpression = null, OrderByType orderByType = OrderByType.Asc) + { + PageList list = new PageList(); + list.List = await CurrentDb.GetPageListAsync(conditionalList, page, orderByExpression, orderByType); + list.PageIndex = page.PageIndex; + list.PageSize = page.PageSize; + list.TotalCount = page.TotalCount; + return list; + } + + ///

+ /// 根据id获取实体 + /// + /// + /// + public virtual T GetById(dynamic id) + { + return CurrentDb.GetById(id); + } + + /// + /// 根据id获取实体-异步 + /// + /// + /// + public virtual async Task GetByIdAsync(dynamic id) + { + return await CurrentDb.GetByIdAsync(id); + } + + /// + /// 根据lambda获取单个对象 (注意,需要确保唯一,如果获取到2个会报错,这种场景需要使用GetFirst) + /// + /// + /// + public virtual T GetSingle(Expression> whereExpression) + { + return CurrentDb.GetSingle(whereExpression); //Db.Queryable().First(whereExpression); + } + + /// + /// 根据lambda获取单个对象-异步 (注意,需要确保唯一,如果获取到2个会报错,这种场景需要使用GetFirst) + /// + /// + /// + public virtual async Task GetSingleAsync(Expression> whereExpression) + { + return await CurrentDb.GetSingleAsync(whereExpression); //await Db.Queryable().FirstAsync(whereExpression); + } + + /// + /// 根据lambda获取单个对象 + /// + /// + /// + public virtual T GetFirst(Expression> whereExpression) + { + return GetDB().Queryable().First(whereExpression); + } + + /// + /// 根据lambda获取单个对象 --异步 + /// + /// + /// + public virtual async Task GetFirstAsync(Expression> whereExpression) + { + return await GetDB().Queryable().FirstAsync(whereExpression); + } + + /// + /// 实体插入 + /// + /// + /// + public virtual bool Insert(T obj) + { + return CurrentDb.Insert(obj); + } + + /// + /// 实体插入-异步 + /// + /// + /// + public virtual async Task InsertAsync(T obj) + { + return await CurrentDb.InsertAsync(obj); + } + + /// + /// 批量插入 + /// + /// + /// + public virtual bool InsertRange(List objs) + { + return CurrentDb.InsertRange(objs); + } + + /// + /// 批量插入-异步 + /// + /// + /// + public virtual async Task InsertRangeAsync(List objs) + { + return await CurrentDb.InsertRangeAsync(objs); + } + + /// + /// 插入返回自增列 + /// + /// + /// + public virtual int InsertReturnIdentity(T obj) + { + return CurrentDb.InsertReturnIdentity(obj); + } + + /// + /// 插入返回自增列-异步 + /// + /// + /// + public virtual async Task InsertReturnIdentityAsync(T obj) + { + return await CurrentDb.InsertReturnIdentityAsync(obj); + } + + /// + /// 插入返回longid + /// + /// + /// + public virtual long InsertReturnBigIdentity(T obj) + { + return CurrentDb.InsertReturnBigIdentity(obj); + } + + /// + /// 插入返回longid-异步 + /// + /// + /// + public virtual async Task InsertReturnBigIdentityAsync(T obj) + { + return await CurrentDb.InsertReturnBigIdentityAsync(obj); + } + + /// + /// 批量删除 + /// + /// + /// + public virtual bool DeleteByIds(dynamic[] ids) + { + return CurrentDb.DeleteByIds(ids); + } + + /// + /// 批量删除-异步 + /// + /// + /// + public virtual async Task DeleteByIdsAsync(dynamic[] ids) + { + return await CurrentDb.DeleteByIdsAsync(ids); + } + + /// + /// 根据主键删除 + /// + /// + /// + public virtual bool Delete(dynamic id) + { + return CurrentDb.DeleteById(id); + } + + /// + /// 根据主键删除-异步 + /// + /// + /// + public virtual async Task DeleteAsync(dynamic id) + { + return await CurrentDb.DeleteByIdAsync(id); + } + + /// + /// 根据实体删除 + /// + /// + /// + public virtual bool Delete(T obj) + { + return CurrentDb.Delete(obj); + } + + /// + /// 根据实体删除-异步 + /// + /// + /// + public virtual async Task DeleteAsync(T obj) + { + return await CurrentDb.DeleteAsync(obj); + } + + /// + /// 根据表达式删除 + /// + /// + /// + public virtual bool Delete(Expression> whereExpression) + { + return CurrentDb.Delete(whereExpression); + } + + /// + /// 根据表达式删除-异步 + /// + /// + /// + public virtual async Task DeleteAsync(Expression> whereExpression) + { + return await CurrentDb.DeleteAsync(whereExpression); + } + + /// + /// 更新 + /// + /// + /// + public virtual bool Update(T obj) + { + return CurrentDb.Update(obj); + } + + /// + /// 更新-异步 + /// + /// + /// + public virtual async Task UpdateAsync(T obj) + { + return await CurrentDb.UpdateAsync(obj); + } + + /// + /// 批量更新 + /// + /// + /// + public virtual bool UpdateRange(List objs) + { + return CurrentDb.UpdateRange(objs); + } + + /// + /// 批量更新-异步 + /// + /// + /// + public virtual async Task UpdateRangeAsync(List objs) + { + return await CurrentDb.UpdateRangeAsync(objs); + } + + /// + /// 是否包含元素 + /// + /// + /// + public virtual bool IsAny(Expression> whereExpression) + { + return CurrentDb.IsAny(whereExpression); + } + + /// + /// 是否包含元素-异步 + /// + /// + /// + public virtual async Task IsAnyAsync(Expression> whereExpression) + { + return await CurrentDb.IsAnyAsync(whereExpression); + } + + #endregion 通用方法 + } +} diff --git a/Xzy.KnowledgeBase.Domain/Repositories/Base/SqlSugarHelper.cs b/Xzy.KnowledgeBase.Domain/Repositories/Base/SqlSugarHelper.cs new file mode 100644 index 0000000..51ca3ea --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Repositories/Base/SqlSugarHelper.cs @@ -0,0 +1,36 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Domain.Options; +using Xzy.KnowledgeBase.Domain.Utils; + +namespace Xzy.KnowledgeBase.Domain.Repositories.Base +{ + public class SqlSugarHelper + { + /// + /// sqlserver连接 + /// + public static SqlSugarScope Sqlite = new SqlSugarScope(new ConnectionConfig() + { + ConnectionString = ConnectionOption.Sqlite, + DbType = DbType.Sqlite, + InitKeyType = InitKeyType.Attribute,//从特性读取主键和自增列信息 + IsAutoCloseConnection = true + }, Db => + { + Db.Aop.OnLogExecuting = (sql, pars) => + { + if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT").ConvertToString() == "Development") + { + Console.WriteLine(sql + "\r\n" + + Sqlite.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value))); + Console.WriteLine(); + } + }; + }); + } +} diff --git a/Xzy.KnowledgeBase.Domain/Utils/ConvertUtils.cs b/Xzy.KnowledgeBase.Domain/Utils/ConvertUtils.cs new file mode 100644 index 0000000..b8313cd --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Utils/ConvertUtils.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Utils +{ + public static class ConvertUtils + { + /// + /// 判断是否为空,为空返回true + /// + /// + /// + public static bool IsNull(this object data) + { + //如果为null + if (data == null) + { + return true; + } + + //如果为"" + if (data.GetType() == typeof(String)) + { + if (string.IsNullOrEmpty(data.ToString().Trim())) + { + return true; + } + } + return false; + } + + /// + /// 判断是否为空,为空返回true + /// + /// + /// + public static bool IsNotNull(this object data) + { + //如果为null + if (data == null) + { + return false; + } + + //如果为"" + if (data.GetType() == typeof(String)) + { + if (string.IsNullOrEmpty(data.ToString().Trim())) + { + return false; + } + } + return true; + } + + /// + /// 判断是否为空,为空返回true + /// + /// + /// + public static bool IsNull(string data) + { + //如果为null + if (data == null) + { + return true; + } + + //如果为"" + if (data.GetType() == typeof(String)) + { + if (string.IsNullOrEmpty(data.ToString().Trim())) + { + return true; + } + } + return false; + } + + /// + /// 将obj类型转换为string + /// + /// + /// + public static string ConvertToString(this object s) + { + if (s == null) + { + return ""; + } + else + { + return Convert.ToString(s); + } + } + + /// + /// object 转int32 + /// + /// + /// + public static Int32 ConvertToInt32(this object s) + { + int i = 0; + if (s == null) + { + return 0; + } + else + { + int.TryParse(s.ToString(), out i); + } + return i; + } + + /// + /// object 转int32 + /// + /// + /// + public static Int64 ConvertToInt64(this object s) + { + long i = 0; + if (s == null) + { + return 0; + } + else + { + long.TryParse(s.ToString(), out i); + } + return i; + } + + /// + /// 将字符串转double + /// + /// + /// + public static double ConvertToDouble(this object s) + { + double i = 0; + if (s == null) + { + return 0; + } + else + { + double.TryParse(s.ToString(), out i); + } + return i; + } + + /// + /// 转换为datetime类型 + /// + /// + /// + public static DateTime ConvertToDateTime(this string s) + { + DateTime dt = new DateTime(); + if (s == null || s == "") + { + return DateTime.Now; + } + DateTime.TryParse(s, out dt); + return dt; + } + + /// + /// 转换为datetime类型的格式字符串 + /// + /// 要转换的对象 + /// 格式化字符串 + /// + public static string ConvertToDateTime(this string s, string y) + { + DateTime dt = new DateTime(); + DateTime.TryParse(s, out dt); + return dt.ToString(y); + } + + /// + /// 将字符串转换成decimal + /// + /// + /// + public static decimal ConvertToDecimal(this object s) + { + decimal d = 0; + if (s == null || s == "") + { + return 0; + } + + Decimal.TryParse(s.ToString(), out d); + + return d; + } + + /// + /// decimal保留2位小数 + /// + public static decimal DecimalFraction(this decimal num) + { + return Convert.ToDecimal(num.ToString("f2")); + } + + /// + /// 替换html种的特殊字符 + /// + /// + /// + public static string ReplaceHtml(this string s) + { + return s.Replace("<", "<").Replace(">", ">").Replace("&", "&").Replace(""", "\""); + } + + /// + /// 流转byte + /// + /// + /// + public static byte[] StreamToByte(this Stream stream) + { + byte[] bytes = new byte[stream.Length]; + stream.Read(bytes, 0, bytes.Length); + // 设置当前流的位置为流的开始 + stream.Seek(0, SeekOrigin.Begin); + return bytes; + } + + public static string JsonToMarkDown(this string s) + { + return $"{Environment.NewLine}```json{Environment.NewLine}{s}{Environment.NewLine}```{Environment.NewLine}"; + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Utils/DateTimeConverter.cs b/Xzy.KnowledgeBase.Domain/Utils/DateTimeConverter.cs new file mode 100644 index 0000000..24fc535 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Utils/DateTimeConverter.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace Xzy.KnowledgeBase.Domain.Utils +{ + public class DateTimeConverter : JsonConverter + { + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return DateTime.TryParse(reader.GetString(), out var dateTime) ? dateTime : default(DateTime); + } + + public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) + { + writer.WriteStringValue(value.ToString("yyyy-MM-dd HH:mm:ss")); + } + } + public class DateTimeNullableConvert : JsonConverter + { + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return DateTime.TryParse(reader.GetString(), out var dateTime) ? dateTime : default(DateTime?); + } + + public override void Write(Utf8JsonWriter writer, DateTime? value, JsonSerializerOptions options) + { + writer.WriteStringValue(value?.ToString("yyyy-MM-dd HH:mm:ss")); + } + } +} diff --git a/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.csproj b/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.csproj new file mode 100644 index 0000000..8a96d93 --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + Xzy.KnowledgeBase.Domain.xml + + + + + + + + + + + + + + + + diff --git a/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.xml b/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.xml new file mode 100644 index 0000000..48848cc --- /dev/null +++ b/Xzy.KnowledgeBase.Domain/Xzy.KnowledgeBase.Domain.xml @@ -0,0 +1,473 @@ + + + + Xzy.KnowledgeBase.Domain + + + + + 容器扩展 + + + + + 从程序集中加载类型并添加到容器中 + + 容器 + 程序集集合 + + + + + 作用域 + + + + + 单例 + + + + + 瞬时 + + + + + Entity集合转DTO集合 + + + + + + + + Entity转DTO + + + + + + + + 给已有对象map,适合update场景,如需过滤空值需要在AutoMapProfile 设置 + + + + + + + + + 当前页,从1开始 + + + + + 每页数量 + + + + + 总数 + + + + + sqlite连接字符串 + + + + + 名称 + + + + + 描述 + + + + + 文件名称 + + + + + 数据数量 + + + + + 状态 + + + + + 创建时间 + + + + + 名称 + + + + + 会话模型 + + + + + 向量模型 + + + + + 获取所有list + + + + + + 获取所有list-异步 + + + + + + 根据lambda查询 + + + + + + + 根据lambda查询-异步 + + + + + + + 根据lambda表达式获取数量 + + + + + + + 根据lambda表达式获取数量-异步 + + + + + + + 获取分页 + + + + + + + + 获取分页-异步 + + + + + + + + 根据id获取实体 + + + + + + + 根据id获取实体-异步 + + + + + + + 根据lambda获取单个对象 (注意,需要确保唯一,如果获取到2个会报错,这种场景需要使用GetFirst) + + + + + + + 根据lambda获取单个对象-异步 (注意,需要确保唯一,如果获取到2个会报错,这种场景需要使用GetFirst) + + + + + + + 根据lambda获取单个对象 + + + + + + + 根据lambda获取单个对象 --异步 + + + + + + + 实体插入 + + + + + + + 实体插入-异步 + + + + + + + 批量插入 + + + + + + + 批量插入-异步 + + + + + + + 插入返回自增列 + + + + + + + 插入返回自增列-异步 + + + + + + + 插入返回longid + + + + + + + 插入返回longid-异步 + + + + + + + 批量删除 + + + + + + + 批量删除-异步 + + + + + + + 根据主键删除 + + + + + + + 根据主键删除-异步 + + + + + + + 根据实体删除 + + + + + + + 根据实体删除-异步 + + + + + + + 根据表达式删除 + + + + + + + 根据表达式删除-异步 + + + + + + + 更新 + + + + + + + 更新-异步 + + + + + + + 批量更新 + + + + + + + 批量更新-异步 + + + + + + + 是否包含元素 + + + + + + + 是否包含元素-异步 + + + + + + + sqlserver连接 + + + + + 判断是否为空,为空返回true + + + + + + + 判断是否为空,为空返回true + + + + + + + 判断是否为空,为空返回true + + + + + + + 将obj类型转换为string + + + + + + + object 转int32 + + + + + + + object 转int32 + + + + + + + 将字符串转double + + + + + + + 转换为datetime类型 + + + + + + + 转换为datetime类型的格式字符串 + + 要转换的对象 + 格式化字符串 + + + + + 将字符串转换成decimal + + + + + + + decimal保留2位小数 + + + + + 替换html种的特殊字符 + + + + + + + 流转byte + + + + + + diff --git a/Xzy.KnowledgeBase.sln b/Xzy.KnowledgeBase.sln new file mode 100644 index 0000000..852bf3f --- /dev/null +++ b/Xzy.KnowledgeBase.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xzy.KnowledgeBase", "Xzy.KnowledgeBase\Xzy.KnowledgeBase.csproj", "{9AA5A735-8FB1-4CC5-AB3E-D02B3A3B6682}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xzy.KnowledgeBase.Domain", "Xzy.KnowledgeBase.Domain\Xzy.KnowledgeBase.Domain.csproj", "{64F17C9A-97C2-46FA-9345-86C5289288AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docker", "Docker", "{9F2E193A-5F9D-4C82-B591-CB133EEB59F0}" + ProjectSection(SolutionItems) = preProject + Dockerfile = Dockerfile + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9AA5A735-8FB1-4CC5-AB3E-D02B3A3B6682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AA5A735-8FB1-4CC5-AB3E-D02B3A3B6682}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AA5A735-8FB1-4CC5-AB3E-D02B3A3B6682}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AA5A735-8FB1-4CC5-AB3E-D02B3A3B6682}.Release|Any CPU.Build.0 = Release|Any CPU + {64F17C9A-97C2-46FA-9345-86C5289288AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64F17C9A-97C2-46FA-9345-86C5289288AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64F17C9A-97C2-46FA-9345-86C5289288AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64F17C9A-97C2-46FA-9345-86C5289288AD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2076B7C9-2E5B-4580-9712-03F0D56BC1AF} + EndGlobalSection +EndGlobal diff --git a/Xzy.KnowledgeBase/App.razor b/Xzy.KnowledgeBase/App.razor new file mode 100644 index 0000000..fc45f6e --- /dev/null +++ b/Xzy.KnowledgeBase/App.razor @@ -0,0 +1,13 @@ + + + + + + + + +

Sorry, there's nothing at this address.

+
+
+
+ \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor b/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor new file mode 100644 index 0000000..96b9b4e --- /dev/null +++ b/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor @@ -0,0 +1,52 @@ +@namespace Xzy.KnowledgeBase.Components +@inherits AntDomComponentBase + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor.cs b/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor.cs new file mode 100644 index 0000000..8ce89c3 --- /dev/null +++ b/Xzy.KnowledgeBase/Components/GlobalHeader/RightContent.razor.cs @@ -0,0 +1,114 @@ +using AntDesign; +using AntDesign.ProLayout; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Components +{ + public partial class RightContent + { + private CurrentUser _currentUser = new CurrentUser(); + private NoticeIconData[] _notifications = { }; + private NoticeIconData[] _messages = { }; + private NoticeIconData[] _events = { }; + private int _count = 0; + + private List> DefaultOptions { get; set; } = new List> + { + new AutoCompleteDataItem + { + Label = "umi ui", + Value = "umi ui" + }, + new AutoCompleteDataItem + { + Label = "Pro Table", + Value = "Pro Table" + }, + new AutoCompleteDataItem + { + Label = "Pro Layout", + Value = "Pro Layout" + } + }; + + public AvatarMenuItem[] AvatarMenuItems { get; set; } = new AvatarMenuItem[] + { + new() { Key = "center", IconType = "user", Option = "个人中心"}, + new() { Key = "setting", IconType = "setting", Option = "个人设置"}, + new() { IsDivider = true }, + new() { Key = "logout", IconType = "logout", Option = "退出登录"} + }; + + [Inject] protected NavigationManager NavigationManager { get; set; } + + [Inject] protected IUserService UserService { get; set; } + [Inject] protected IProjectService ProjectService { get; set; } + [Inject] protected MessageService MessageService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + SetClassMap(); + _currentUser = await UserService.GetCurrentUserAsync(); + var notices = await ProjectService.GetNoticesAsync(); + _notifications = notices.Where(x => x.Type == "notification").Cast().ToArray(); + _messages = notices.Where(x => x.Type == "message").Cast().ToArray(); + _events = notices.Where(x => x.Type == "event").Cast().ToArray(); + _count = notices.Length; + } + + protected void SetClassMap() + { + ClassMapper + .Clear() + .Add("right"); + } + + public void HandleSelectUser(MenuItem item) + { + switch (item.Key) + { + case "center": + NavigationManager.NavigateTo("/account/center"); + break; + case "setting": + NavigationManager.NavigateTo("/account/settings"); + break; + case "logout": + NavigationManager.NavigateTo("/user/login"); + break; + } + } + + public void HandleSelectLang(MenuItem item) + { + } + + public async Task HandleClear(string key) + { + switch (key) + { + case "notification": + _notifications = new NoticeIconData[] { }; + break; + case "message": + _messages = new NoticeIconData[] { }; + break; + case "event": + _events = new NoticeIconData[] { }; + break; + } + await MessageService.Success($"清空了{key}"); + } + + public async Task HandleViewMore(string key) + { + await MessageService.Info("Click on view more"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Controllers/InitController.cs b/Xzy.KnowledgeBase/Controllers/InitController.cs new file mode 100644 index 0000000..7e25f91 --- /dev/null +++ b/Xzy.KnowledgeBase/Controllers/InitController.cs @@ -0,0 +1,31 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Xzy.KnowledgeBase.Domain.Repositories; + +namespace Xzy.KnowledgeBase.Controllers +{ + [Route("api/[controller]/[action]")] + [ApiController] + public class InitController : ControllerBase + { + private readonly IApps_Repositories _repository; + + public InitController(IApps_Repositories repository) + { + _repository = repository; + } + /// + /// 初始化DB 和表 + /// + /// + [HttpPost] + public IActionResult InitTable() + { + _repository.GetDB().DbMaintenance.CreateDatabase(); + _repository.GetDB().CodeFirst.InitTables(typeof(Apps)); + _repository.GetDB().CodeFirst.InitTables(typeof(Kmss)); + _repository.GetDB().CodeFirst.InitTables(typeof(KmsDetails)); + return Ok(); + } + } +} diff --git a/Xzy.KnowledgeBase/Extensions/DateTimeExtension.cs b/Xzy.KnowledgeBase/Extensions/DateTimeExtension.cs new file mode 100644 index 0000000..71af978 --- /dev/null +++ b/Xzy.KnowledgeBase/Extensions/DateTimeExtension.cs @@ -0,0 +1,62 @@ +using System; + +namespace Xzy.KnowledgeBase +{ + public static class DateTimeExtension + { + private const int Second = 1; + private const int Minute = 60 * Second; + private const int Hour = 60 * Minute; + private const int Day = 24 * Hour; + private const int Month = 30 * Day; + + // todo: Need to be localized + public static string ToFriendlyDisplay(this DateTime dateTime) + { + var ts = DateTime.Now - dateTime; + var delta = ts.TotalSeconds; + if (delta < 0) + { + return "not yet"; + } + if (delta < 1 * Minute) + { + return ts.Seconds == 1 ? "1 second ago" : ts.Seconds + " seconds ago"; + } + if (delta < 2 * Minute) + { + return "1 minute ago"; + } + if (delta < 45 * Minute) + { + return ts.Minutes + "minute"; + } + if (delta < 90 * Minute) + { + return "1 hour ago"; + } + if (delta < 24 * Hour) + { + return ts.Hours + " hours ago"; + } + if (delta < 48 * Hour) + { + return "yesterday"; + } + if (delta < 30 * Day) + { + return ts.Days + " days ago"; + } + if (delta < 12 * Month) + { + var months = Convert.ToInt32(Math.Floor((double)ts.Days / 30)); + return months <= 1 ? "A month ago" : months + " months ago"; + } + else + { + var years = Convert.ToInt32(Math.Floor((double)ts.Days / 365)); + return years <= 1 ? "a year ago" : years + " years ago"; + } + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Layouts/BasicLayout.razor b/Xzy.KnowledgeBase/Layouts/BasicLayout.razor new file mode 100644 index 0000000..5964b4e --- /dev/null +++ b/Xzy.KnowledgeBase/Layouts/BasicLayout.razor @@ -0,0 +1,56 @@ +@namespace Xzy.KnowledgeBase +@inherits LayoutComponentBase + + + + + + + @Body + + + + + + + +@code +{ + private MenuDataItem[] _menuData = { }; + + [Inject] public HttpClient HttpClient { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _menuData = await HttpClient.GetFromJsonAsync("data/menu.json"); + } + + + public LinkItem[] Links { get; set; } = + { + new LinkItem + { + Key = "Ant Design Blazor", + Title = "Ant Design Blazor", + Href = "https://antblazor.com", + BlankTarget = true, + }, + new LinkItem + { + Key = "github", + Title = (RenderFragment)(@), + Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor", + BlankTarget = true, + }, + new LinkItem + { + Key = "Blazor", + Title = "Blazor", + Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987", + BlankTarget = true, + } + }; +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Layouts/UserLayout.razor b/Xzy.KnowledgeBase/Layouts/UserLayout.razor new file mode 100644 index 0000000..913e242 --- /dev/null +++ b/Xzy.KnowledgeBase/Layouts/UserLayout.razor @@ -0,0 +1,50 @@ +@namespace Xzy.KnowledgeBase +@using OneOf +@inherits LayoutComponentBase + +
+
+ +
+
+
+ +
Ant Design Blazor
+
+ @Body +
+ +
+ +@code +{ + public LinkItem[] Links { get; set; } = + { + new LinkItem + { + Key = "Ant Design Blazor", + Title = "Ant Design Blazor", + Href = "https://antblazor.com", + BlankTarget = true, + }, + new LinkItem + { + Key = "github", + Title = (RenderFragment)(@), + Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor", + BlankTarget = true, + }, + new LinkItem + { + Key = "Blazor", + Title = "Blazor", + Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987", + BlankTarget = true, + } + }; +} diff --git a/Xzy.KnowledgeBase/Layouts/UserLayout.razor.css b/Xzy.KnowledgeBase/Layouts/UserLayout.razor.css new file mode 100644 index 0000000..1dcd3a6 --- /dev/null +++ b/Xzy.KnowledgeBase/Layouts/UserLayout.razor.css @@ -0,0 +1,64 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.container__b__0 { + display: flex; + flex-direction: column; + height: 100vh; + overflow: auto; + background: #f0f2f5; +} +.container__b__0 .lang { + width: 100%; + height: 40px; + line-height: 44px; + text-align: right; +} +.container__b__0 .lang :global(.ant-dropdown-trigger) { + margin-right: 24px; +} +.container__b__0 .content { + flex: 1; + padding: 32px 0; +} +.container__b__0 .top { + text-align: center; +} +.container__b__0 .header { + height: 44px; + line-height: 44px; +} +.container__b__0 .header a { + text-decoration: none; +} +.container__b__0 .logo { + height: 44px; + margin-right: 16px; + vertical-align: top; +} +.container__b__0 .title { + position: relative; + top: 2px; + color: rgba(0, 0, 0, 0.85); + font-weight: 600; + font-size: 33px; + font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif; +} +.container__b__0 .desc { + margin-top: 12px; + margin-bottom: 40px; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; +} +@media (min-width: 768px) { + .container__b__0 { + background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg'); + background-repeat: no-repeat; + background-position: center 110px; + background-size: 100%; + } + .container__b__0 .content { + padding: 32px 0 24px; + } +} diff --git a/Xzy.KnowledgeBase/Models/ActivitiesType.cs b/Xzy.KnowledgeBase/Models/ActivitiesType.cs new file mode 100644 index 0000000..b377f8d --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ActivitiesType.cs @@ -0,0 +1,14 @@ +using System; + +namespace Xzy.KnowledgeBase.Models +{ + public class ActivitiesType + { + public string Id { get; set; } + public DateTime UpdatedAt { get; set; } + public ActivityUser User { get; set; } + public ActivityGroup Group { get; set; } + public ActivityProject Project { get; set; } + public string Template { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ActivityGroup.cs b/Xzy.KnowledgeBase/Models/ActivityGroup.cs new file mode 100644 index 0000000..25cfec1 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ActivityGroup.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ActivityGroup + { + public string Name { get; set; } + public string Link { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ActivityProject.cs b/Xzy.KnowledgeBase/Models/ActivityProject.cs new file mode 100644 index 0000000..7fc6b9f --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ActivityProject.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ActivityProject + { + public string Name { get; set; } + public string Link { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ActivityUser.cs b/Xzy.KnowledgeBase/Models/ActivityUser.cs new file mode 100644 index 0000000..c608466 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ActivityUser.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ActivityUser + { + public string Name { get; set; } + public string Avatar { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/AdvancedOperation.cs b/Xzy.KnowledgeBase/Models/AdvancedOperation.cs new file mode 100644 index 0000000..ed1cdd1 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/AdvancedOperation.cs @@ -0,0 +1,12 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class AdvancedOperation + { + public string Key { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public string Status { get; set; } + public string UpdatedAt { get; set; } + public string Memo { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/AdvancedProfileData.cs b/Xzy.KnowledgeBase/Models/AdvancedProfileData.cs new file mode 100644 index 0000000..5dbbe02 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/AdvancedProfileData.cs @@ -0,0 +1,9 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class AdvancedProfileData + { + public AdvancedOperation[] AdvancedOperation1 { get; set; } + public AdvancedOperation[] AdvancedOperation2 { get; set; } + public AdvancedOperation[] AdvancedOperation3 { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/BasicGood.cs b/Xzy.KnowledgeBase/Models/BasicGood.cs new file mode 100644 index 0000000..634b9d1 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/BasicGood.cs @@ -0,0 +1,12 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class BasicGood + { + public string Id { get; set; } + public string Name { get; set; } + public string Barcode { get; set; } + public string Price { get; set; } + public string Num { get; set; } + public string Amount { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/BasicProfileDataType.cs b/Xzy.KnowledgeBase/Models/BasicProfileDataType.cs new file mode 100644 index 0000000..6226f6a --- /dev/null +++ b/Xzy.KnowledgeBase/Models/BasicProfileDataType.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class BasicProfileDataType + { + public BasicGood[] BasicGoods { get; set; } + public BasicProgress[] BasicProgress { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/BasicProgress.cs b/Xzy.KnowledgeBase/Models/BasicProgress.cs new file mode 100644 index 0000000..877afdd --- /dev/null +++ b/Xzy.KnowledgeBase/Models/BasicProgress.cs @@ -0,0 +1,12 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class BasicProgress + { + public string Key { get; set; } + public string Time { get; set; } + public string Rate { get; set; } + public string Status { get; set; } + public string Operator { get; set; } + public string Cost { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ChartData.cs b/Xzy.KnowledgeBase/Models/ChartData.cs new file mode 100644 index 0000000..0c66d1b --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ChartData.cs @@ -0,0 +1,16 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ChartData + { + public ChartDataItem[] VisitData { get; set; } + public ChartDataItem[] VisitData2 { get; set; } + public ChartDataItem[] SalesData { get; set; } + public SearchDataItem[] SearchData { get; set; } + public OfflineDataItem[] OfflineData { get; set; } + public OfflineChartDataItem[] OfflineChartData { get; set; } + public ChartDataItem[] SalesTypeData { get; set; } + public ChartDataItem[] SalesTypeDataOnline { get; set; } + public ChartDataItem[] SalesTypeDataOffline { get; set; } + public RadarDataItem[] RadarData { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ChartDataItem.cs b/Xzy.KnowledgeBase/Models/ChartDataItem.cs new file mode 100644 index 0000000..a5fbf5e --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ChartDataItem.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ChartDataItem + { + public string X { get; set; } + public int Y { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/CurrentUser.cs b/Xzy.KnowledgeBase/Models/CurrentUser.cs new file mode 100644 index 0000000..f7cb404 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/CurrentUser.cs @@ -0,0 +1,40 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class TagType + { + public string Key { get; set; } + public string Label { get; set; } + } + + public class GeographicType + { + public TagType Province { get; set; } + public TagType City { get; set; } + } + + public class CurrentUser + { + public string Name { get; set; } + public string Avatar { get; set; } + public string Userid { get; set; } + public NoticeType[] Notice { get; set; } = { }; + public string Email { get; set; } + public string Signature { get; set; } + public string Title { get; set; } + public string Group { get; set; } + public TagType[] Tags { get; set; } = { }; + public int NotifyCount { get; set; } + public int UnreadCount { get; set; } + public string Country { get; set; } + public GeographicType Geographic { get; set; } + public string Address { get; set; } + public string Phone { get; set; } + } + + public class UserLiteItem + { + public string Avater { get; set; } + public string Title { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/FormModel.cs b/Xzy.KnowledgeBase/Models/FormModel.cs new file mode 100644 index 0000000..852ed3c --- /dev/null +++ b/Xzy.KnowledgeBase/Models/FormModel.cs @@ -0,0 +1,48 @@ +using System; + +namespace Xzy.KnowledgeBase.Models +{ + public class StepFormModel + { + public string ReceiverAccountType { get; set; } = "ant-design@alipay.com"; + public string ReceiverAccount { get; set; } = "test@example.com"; + public string ReceiverName { get; set; } = "Alex"; + public string PayAccount { get; set; } + public string Password { get; set; } = "500"; + public string Amount { get; set; } = "12345678"; + } + + public class AdvancedFormModel + { + public string Name { get; set; } + public string Url { get; set; } + public string Owner { get; set; } + public string Approver { get; set; } + public DateTime?[] DateRange { get; set; } + public string Type { get; set; } + public string Name2 { get; set; } + public string Url2 { get; set; } + public string Owner2 { get; set; } + public string Approver2 { get; set; } + public DateTime? DateRange2 { get; set; } + public string Type2 { get; set; } + } + + public class BasicFormModel + { + public string Title { get; set; } + public string Client { get; set; } + public string Invites { get; set; } + public int Disclosure { get; set; } + public int Weight { get; set; } + public string Standard { get; set; } + public string Goal { get; set; } + public DateTime?[] DateRange { get; set; } + } + + public class Owner + { + public string Id { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ListFormModel.cs b/Xzy.KnowledgeBase/Models/ListFormModel.cs new file mode 100644 index 0000000..a573570 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ListFormModel.cs @@ -0,0 +1,17 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class ListFormModel + { + public string Owner { get; set; } = "wzj"; + + public string ActiveUser { get; set; } + + public string Satisfaction { get; set; } + } + + public class BasicListFormModel + { + public string Status { get; set; } = "all"; + public string SearchKeyword { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/ListItemDataType.cs b/Xzy.KnowledgeBase/Models/ListItemDataType.cs new file mode 100644 index 0000000..d6654b5 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/ListItemDataType.cs @@ -0,0 +1,42 @@ +using System; +using System.Text.Json.Serialization; +using Xzy.KnowledgeBase.Utils; + +namespace Xzy.KnowledgeBase.Models +{ + public class Member + { + public string Avatar { get; set; } + public string Name { get; set; } + public string Id { get; set; } + } + + public class ListItemDataType + { + public string Id { get; set; } + public string Owner { get; set; } + public string Title { get; set; } + public string Avatar { get; set; } + public string Cover { get; set; } + public string Status { get; set; } + public int Percent { get; set; } + public string Logo { get; set; } + public string Href { get; set; } + public string Body { get; set; } + public string SubDescription { get; set; } + public string Description { get; set; } + public int ActiveUser { get; set; } + public int NewUser { get; set; } + public int Star { get; set; } + public int Like { get; set; } + public int Message { get; set; } + public string Content { get; set; } + public Member[] Members { get; set; } + + [JsonConverter(typeof(LongToDateTimeConverter))] + public DateTime UpdatedAt { get; set; } + + [JsonConverter(typeof(LongToDateTimeConverter))] + public DateTime CreatedAt { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/LoginParamsType.cs b/Xzy.KnowledgeBase/Models/LoginParamsType.cs new file mode 100644 index 0000000..a01ace3 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/LoginParamsType.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.DataAnnotations; + +namespace Xzy.KnowledgeBase.Models +{ + public class LoginParamsType + { + [Required] public string UserName { get; set; } + + [Required] public string Password { get; set; } + + public string Mobile { get; set; } + + public string Captcha { get; set; } + + public string LoginType { get; set; } + + public bool AutoLogin { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/NoticeItem.cs b/Xzy.KnowledgeBase/Models/NoticeItem.cs new file mode 100644 index 0000000..8e89765 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/NoticeItem.cs @@ -0,0 +1,11 @@ +using AntDesign.ProLayout; + +namespace Xzy.KnowledgeBase.Models +{ + public class NoticeItem : NoticeIconData + { + public string Id { get; set; } + public string Type { get; set; } + public string Status { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/NoticeType.cs b/Xzy.KnowledgeBase/Models/NoticeType.cs new file mode 100644 index 0000000..5121617 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/NoticeType.cs @@ -0,0 +1,14 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class NoticeType + { + public string Id { get; set; } + public string Title { get; set; } + public string Logo { get; set; } + public string Description { get; set; } + public string UpdatedAt { get; set; } + public string Member { get; set; } + public string Href { get; set; } + public string MemberLink { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/OfflineChartDataItem.cs b/Xzy.KnowledgeBase/Models/OfflineChartDataItem.cs new file mode 100644 index 0000000..630bb1b --- /dev/null +++ b/Xzy.KnowledgeBase/Models/OfflineChartDataItem.cs @@ -0,0 +1,9 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class OfflineChartDataItem + { + public long X { get; set; } + public int Y1 { get; set; } + public int Y2 { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/OfflineDataItem.cs b/Xzy.KnowledgeBase/Models/OfflineDataItem.cs new file mode 100644 index 0000000..ef4dc87 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/OfflineDataItem.cs @@ -0,0 +1,8 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class OfflineDataItem + { + public string Name { get; set; } + public float Cvr { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/RadarDataItem.cs b/Xzy.KnowledgeBase/Models/RadarDataItem.cs new file mode 100644 index 0000000..9972373 --- /dev/null +++ b/Xzy.KnowledgeBase/Models/RadarDataItem.cs @@ -0,0 +1,9 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class RadarDataItem + { + public string Name { get; set; } + public string Label { get; set; } + public int Value { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Models/SearchDataItem.cs b/Xzy.KnowledgeBase/Models/SearchDataItem.cs new file mode 100644 index 0000000..cffd21c --- /dev/null +++ b/Xzy.KnowledgeBase/Models/SearchDataItem.cs @@ -0,0 +1,11 @@ +namespace Xzy.KnowledgeBase.Models +{ + public class SearchDataItem + { + public int Index { get; set; } + public string Keywod { get; set; } + public int Count { get; set; } + public int Range { get; set; } + public int Status { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor new file mode 100644 index 0000000..2fa2280 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor @@ -0,0 +1,59 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center + + + + + + + + + @context.Title + +
+
+
+

Active User

+

@FormatWan(context.ActiveUser)

+
+
+

New Users

+

@context.NewUser.ToString("0,0")

+
+
+
+
+
+
+ +@code +{ + + private static readonly RenderFragment Download =@ + +; + +private static readonly IList Actions = new List +{ + Download, +@, +@, +@ + }; + + private static RenderFragment FormatWan(int val) { + if (val > 10000) { + val = (int) Math.Floor((double) val / 10000); + } + + return @ + @val + + ; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.cs new file mode 100644 index 0000000..5c105a8 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.cs @@ -0,0 +1,18 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class Applications + { + private readonly ListGridType _listGridType = new ListGridType + { + Gutter = 24, + Column = 4 + }; + + [Parameter] public IList List { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.css new file mode 100644 index 0000000..fc2feff --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Applications/Applications.razor.css @@ -0,0 +1,49 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.filterCardList { + margin-bottom: -24px; +} +.filterCardList :global .ant-card-meta-content { + margin-top: 0; +} +.filterCardList :global .ant-card-meta-avatar { + font-size: 0; +} +.filterCardList :global .ant-list .ant-list-item-content-single { + max-width: 100%; +} +.filterCardList .cardInfo { + margin-top: 16px; + margin-left: 40px; + zoom: 1; +} +.filterCardList .cardInfo::before, +.filterCardList .cardInfo::after { + display: table; + content: ' '; +} +.filterCardList .cardInfo::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; +} +.filterCardList .cardInfo > div { + position: relative; + float: left; + width: 50%; + text-align: left; +} +.filterCardList .cardInfo > div p { + margin: 0; + font-size: 24px; + line-height: 32px; +} +.filterCardList .cardInfo > div p:first-child { + margin-bottom: 4px; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; + line-height: 20px; +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor new file mode 100644 index 0000000..a34b706 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor @@ -0,0 +1,16 @@ +@using Xzy.KnowledgeBase.Models +@namespace Xzy.KnowledgeBase.Pages.Account.Center + +
+
@Data.Content
+
+ + @Data.Owner Posted on @Data.Href + @Data.UpdatedAt.ToString("yyyy-MM-dd HH:mm:ss") +
+
+ +@code +{ + [Parameter] public ListItemDataType Data { get; set; } +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor.css new file mode 100644 index 0000000..5fe424a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/ArticleListContent/ArticleListContent.razor.css @@ -0,0 +1,33 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.listContent .description { + max-width: 720px; + line-height: 22px; +} +.listContent .extra { + margin-top: 16px; + color: rgba(0, 0, 0, 0.45); + line-height: 22px; +} +.listContent .extra > :global(.ant-avatar) { + position: relative; + top: 1px; + width: 20px; + height: 20px; + margin-right: 8px; + vertical-align: top; +} +.listContent .extra > em { + margin-left: 16px; + color: rgba(0, 0, 0, 0.25); + font-style: normal; +} +@media screen and (max-width: 480px) { + .listContent .extra > em { + display: block; + margin-top: 8px; + margin-left: 0; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor new file mode 100644 index 0000000..be88e03 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor @@ -0,0 +1,16 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center + + + + + + @context.Title + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.cs new file mode 100644 index 0000000..0202c37 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class Articles + { + [Parameter] public IList List { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.css new file mode 100644 index 0000000..edf8be9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Articles/Articles.razor.css @@ -0,0 +1,10 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.articleList :global .ant-list-item:first-child { + padding-top: 0; +} +a.listItemMetaTitle { + color: rgba(0, 0, 0, 0.85); +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor new file mode 100644 index 0000000..a39481d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor @@ -0,0 +1,7 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center + +
+
    + @ChildContent +
+
\ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.cs new file mode 100644 index 0000000..c7ad051 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.cs @@ -0,0 +1,9 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class AvatarList + { + [Parameter] public RenderFragment ChildContent { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.css new file mode 100644 index 0000000..c43a5e7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarList.razor.css @@ -0,0 +1,43 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.avatarList { + display: inline-block; +} +.avatarList ul { + display: inline-block; + margin-left: 8px; + font-size: 0; +} +.avatarItem { + display: inline-block; + width: 32px; + height: 32px; + margin-left: -8px; + font-size: 14px; +} +.avatarItem :global .ant-avatar { + border: 1px solid #d9d9d9; +} +.avatarItemLarge { + width: 40px; + height: 40px; +} +.avatarItemSmall { + width: 24px; + height: 24px; +} +.avatarItemMini { + width: 20px; + height: 20px; +} +.avatarItemMini :global .ant-avatar { + width: 20px; + height: 20px; + line-height: 20px; +} +.avatarItemMini :global .ant-avatar .ant-avatar-string { + font-size: 12px; + line-height: 18px; +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor new file mode 100644 index 0000000..0b5cb07 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor @@ -0,0 +1,17 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center +@inherits AntDomComponentBase + +
  • + @if (string.IsNullOrEmpty(Tips)) + { + + + + + + } + else + { + + } +
  • \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor.cs new file mode 100644 index 0000000..fcb3611 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/AvatarList/AvatarListItem.razor.cs @@ -0,0 +1,28 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class AvatarListItem + { + [Parameter] public string Size { get; set; } + [Parameter] public string Tips { get; set; } + [Parameter] public string Src { get; set; } + [Parameter] public EventCallback OnClick { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + SetClassMap(); + } + + protected void SetClassMap() + { + ClassMapper + .Clear() + .Add("avatarItem") + .If("avatarItemLarge", () => Size == "large") + .If("avatarItemSmall", () => Size == "small") + .If("avatarItemMini", () => Size == "mini"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor new file mode 100644 index 0000000..b0352d9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor @@ -0,0 +1,35 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center + + + + + + @context.Title + + + + @context.SubDescription + @context.Title + +
    + @context.UpdatedAt.ToFriendlyDisplay() +
    + + @foreach (var member in context.Members) + { + + } + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.cs new file mode 100644 index 0000000..1ddb4a6 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.cs @@ -0,0 +1,19 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class Projects + { + private readonly ListGridType _listGridType = new ListGridType + { + Gutter = 24, + Column = 4 + }; + + [Parameter] + public IList List { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.css new file mode 100644 index 0000000..68cd496 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Components/Projects/Projects.razor.css @@ -0,0 +1,41 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.coverCardList .card .ant-card-meta-title { + margin-bottom: 4px; +} +.coverCardList .card .ant-card-meta-title > a { + display: inline-block; + max-width: 100%; + color: rgba(0, 0, 0, 0.85); +} +.coverCardList .card .ant-card-meta-description { + height: 44px; + overflow: hidden; + line-height: 22px; +} +.coverCardList .card:hover .ant-card-meta-title > a { + color: #1890ff; +} +.coverCardList .cardItemContent { + display: flex; + height: 20px; + margin-top: 16px; + margin-bottom: -4px; + line-height: 20px; +} +.coverCardList .cardItemContent > span { + flex: 1; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; +} +.coverCardList .cardItemContent .avatarList { + flex: 0 1 auto; +} +.coverCardList .cardList { + margin-top: 24px; +} +.coverCardList .ant-list .ant-list-item-content-single { + max-width: 100%; +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor new file mode 100644 index 0000000..5f5314b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor @@ -0,0 +1,88 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Center +@page "/account/center" + + + + + +
    + +
    @_currentUser.Name
    +
    @_currentUser.Signature
    +
    + +
    +

    + + @_currentUser.Title +

    +

    + + @_currentUser.Group +

    +

    + + + @_currentUser.Geographic.Province.Label + @_currentUser.Geographic.City.Label +

    +
    + + + +
    +
    Tags
    + @foreach (var tag in _currentUser.Tags) { + @tag.Label + } + + @if (_inputVisible) { + + } + else { + + + + } +
    + + + +
    +
    Team
    + +
    +
    +
    + + + + + + Articles (@_fakeList.Count) + + + + + + Applications (@_fakeList.Count) + + + + + + Projects (@_fakeList.Count) + + + + + + + + +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.cs new file mode 100644 index 0000000..c35735c --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.cs @@ -0,0 +1,40 @@ +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Account.Center +{ + public partial class Index + { + private CurrentUser _currentUser = new CurrentUser + { + Geographic = new GeographicType { City = new TagType(), Province = new TagType() } + }; + + private IList _fakeList = new List(); + private bool _inputVisible; + public string InputValue { get; set; } + + [Inject] public IProjectService ProjectService { get; set; } + [Inject] public IUserService UserService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _currentUser = await UserService.GetCurrentUserAsync(); + _fakeList = await ProjectService.GetFakeListAsync(); + } + + protected void ShowInput() + { + _inputVisible = true; + } + + protected void HandleInputConfirm() + { + _inputVisible = false; + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.css b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.css new file mode 100644 index 0000000..b4db3b4 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Center/Index.razor.css @@ -0,0 +1,63 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.avatarHolder { + margin-bottom: 24px; + text-align: center; +} +.avatarHolder > img { + width: 104px; + height: 104px; + margin-bottom: 20px; +} +.avatarHolder .name { + margin-bottom: 4px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 20px; + line-height: 28px; +} +.detail p { + position: relative; + margin-bottom: 8px; + padding-left: 26px; +} +.detail p:last-child { + margin-bottom: 0; +} +.detail i { + position: absolute; + top: 4px; + left: 0; + width: 14px; + height: 14px; +} +.tagsTitle, +.teamTitle { + margin-bottom: 12px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; +} +.tags .ant-tag { + margin-bottom: 8px; +} +.team .ant-avatar { + margin-right: 12px; +} +.team a { + display: block; + margin-bottom: 24px; + overflow: hidden; + color: rgba(0, 0, 0, 0.85); + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; + transition: color 0.3s; +} +.team a:hover { + color: #1890ff; +} +.tabsCard .ant-card-head { + padding: 0 16px; +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor new file mode 100644 index 0000000..a43aeec --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor @@ -0,0 +1,60 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + Avatar +
    +
    + avatar +
    + +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.cs new file mode 100644 index 0000000..a3fa03a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.cs @@ -0,0 +1,24 @@ +using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Account.Settings +{ + public partial class BaseView + { + private CurrentUser _currentUser = new CurrentUser(); + + [Inject] protected IUserService UserService { get; set; } + + private void HandleFinish() + { + } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _currentUser = await UserService.GetCurrentUserAsync(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.css b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.css new file mode 100644 index 0000000..9c630d1 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BaseView.razor.css @@ -0,0 +1,54 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.baseView { + display: flex; + padding-top: 12px; +} +.baseView :global .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { + width: 100%; +} +.baseView .left { + min-width: 224px; + max-width: 448px; +} +.baseView .right__b__1 { + flex: 1; + padding-left: 104px; +} +.baseView .right__b__1 .avatar_title { + height: 22px; + margin-bottom: 8px; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + line-height: 22px; +} +.baseView .right__b__1 .avatar { + width: 144px; + height: 144px; + margin-bottom: 12px; + overflow: hidden; +} +.baseView .right__b__1 .avatar img { + width: 100%; +} +.baseView .right__b__1 .button_view { + width: 144px; + text-align: center; +} +@media screen and (max-width: 1200px) { + .baseView { + flex-direction: column-reverse; + } + .baseView .right__b__1 { + display: flex; + flex-direction: column; + align-items: center; + max-width: 448px; + padding: 20px; + } + .baseView .right__b__1 .avatar_title { + display: none; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor new file mode 100644 index 0000000..6564c75 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor @@ -0,0 +1,21 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + + + + + + + + + + + +@code +{ + private static RenderFragment _modify = @Bind; + + private readonly RenderFragment[] _actions = {_modify}; +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor.cs new file mode 100644 index 0000000..7a0d9bf --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/BindingView.razor.cs @@ -0,0 +1,29 @@ +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Settings +{ + public partial class BindingView + { + private readonly UserLiteItem[] _data = + { + new UserLiteItem + { + Avater = "taobao", + Title = "Binding Taobao", + Description = "Currently unbound Taobao account" + }, + new UserLiteItem + { + Avater = "alipay", + Title = "Binding Alipay", + Description = "Currently unbound Alipay account" + }, + new UserLiteItem + { + Avater = "dingding", + Title = "Binding DingTalk", + Description = "Currently unbound DingTalk account" + } + }; + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor new file mode 100644 index 0000000..c55aab5 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor @@ -0,0 +1,5 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + +

    + GeographicView +

    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor.css b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor.css new file mode 100644 index 0000000..20905af --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/GeographicView.razor.css @@ -0,0 +1,18 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.row .item { + width: 50%; + max-width: 220px; +} +.row .item:first-child { + width: calc(50% - 8px); + margin-right: 8px; +} +@media screen and (max-width: 576px) { + .item:first-child { + margin: 0; + margin-bottom: 8px; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor new file mode 100644 index 0000000..02a9fcb --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor @@ -0,0 +1,18 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + + + + + @context.Title + + + + +@code +{ + private static RenderFragment _switch = @; + private readonly RenderFragment[] _actions = {_switch}; +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor.cs new file mode 100644 index 0000000..d193ac2 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/NotificationView.razor.cs @@ -0,0 +1,26 @@ +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Settings +{ + public partial class NotificationView + { + private readonly UserLiteItem[] _data = + { + new UserLiteItem + { + Title = "Account Password", + Description = "Messages from other users will be notified in the form of a station letter" + }, + new UserLiteItem + { + Title = "System Messages", + Description = "System messages will be notified in the form of a station letter" + }, + new UserLiteItem + { + Title = "To-do Notification", + Description = "The to-do list will be notified in the form of a letter from the station" + } + }; + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor new file mode 100644 index 0000000..d4ee5b4 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor @@ -0,0 +1,5 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + +

    + PhoneView +

    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor.css b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor.css new file mode 100644 index 0000000..a3dce2a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/PhoneView.razor.css @@ -0,0 +1,13 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.area_code { + width: 30%; + max-width: 128px; + margin-right: 8px; +} +.phone_number { + width: calc(70% - 8px); + max-width: 312px; +} diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor new file mode 100644 index 0000000..6e41b14 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor @@ -0,0 +1,18 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings + + + + + @context.Title + + + + +@code +{ + private static RenderFragment _modify = @Modify; + private readonly RenderFragment[] _actions = {_modify}; +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor.cs new file mode 100644 index 0000000..bc611e1 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Components/SecurityView.razor.cs @@ -0,0 +1,37 @@ +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Account.Settings +{ + public partial class SecurityView + { + private readonly UserLiteItem[] _data = + { + new UserLiteItem + { + Title = "Account Password", + Description = "Current password strength: : Strong" + }, + new UserLiteItem + { + Title = "Security Phone", + Description = "Bound phone: : 138****8293" + }, + new UserLiteItem + { + Title = "Security Question", + Description = + "The security question is not set, and the security policy can effectively protect the account security" + }, + new UserLiteItem + { + Title = "Backup Email", + Description = "Bound Email: : ant***sign.com" + }, + new UserLiteItem + { + Title = "MFA Device", + Description = "Unbound MFA device, after binding, can be confirmed twice" + } + }; + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor new file mode 100644 index 0000000..f025bbd --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor @@ -0,0 +1,36 @@ +@namespace Xzy.KnowledgeBase.Pages.Account.Settings +@page "/account/settings" + + +
    +
    + + @foreach (var item in _menuMap) + { + @item.Value + } + +
    +
    +
    @_menuMap[_selectKey]
    + @switch (_selectKey) + { + case "base": + + break; + case "security": + + break; + case "binding": + + break; + case "notification": + + break; + } +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.cs b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.cs new file mode 100644 index 0000000..b3729f9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.cs @@ -0,0 +1,23 @@ +using AntDesign; +using System.Collections.Generic; + +namespace Xzy.KnowledgeBase.Pages.Account.Settings +{ + public partial class Index + { + private readonly Dictionary _menuMap = new Dictionary + { + {"base", "Basic Settings"}, + {"security", "Security Settings"}, + {"binding", "Account Binding"}, + {"notification", "New Message Notification"}, + }; + + private string _selectKey = "base"; + + private void SelectKey(MenuItem item) + { + _selectKey = item.Key; + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.css b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.css new file mode 100644 index 0000000..88eeddc --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Account/Settings/Index.razor.css @@ -0,0 +1,87 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.main__b__2 { + display: flex; + width: 100%; + height: 100%; + padding-top: 16px; + padding-bottom: 16px; + overflow: auto; + background-color: #fff; +} +.main__b__2 .leftMenu { + width: 224px; + border-right: 1px solid #f0f0f0; +} +.main__b__2 .leftMenu :global .ant-menu-inline { + border: none; +} +.main__b__2 .leftMenu :global .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { + font-weight: bold; +} +.main__b__2 .right__b__0 { + flex: 1; + padding-top: 8px; + padding-right: 40px; + padding-bottom: 8px; + padding-left: 40px; +} +.main__b__2 .right__b__0 .title { + margin-bottom: 12px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 20px; + line-height: 28px; +} +.main__b__2 .ant-list-split .ant-list-item:last-child { + border-bottom: 1px solid #f0f0f0; +} +.main__b__2 .ant-list-item { + padding-top: 14px; + padding-bottom: 14px; +} +.ant-list-item-meta .taobao { + display: block; + color: #ff4000; + font-size: 48px; + line-height: 48px; + border-radius: 2px; +} +.ant-list-item-meta .dingding { + margin: 2px; + padding: 6px; + color: #fff; + font-size: 32px; + line-height: 32px; + background-color: #2eabff; + border-radius: 2px; +} +.ant-list-item-meta .alipay { + color: #2eabff; + font-size: 48px; + line-height: 48px; + border-radius: 2px; +} +font.strong { + color: #52c41a; +} +font.medium { + color: #faad14; +} +font.weak { + color: #ff4d4f; +} +@media screen and (max-width: 768px) { + .main__b__2 { + flex-direction: column; + } + .main__b__2 .leftMenu { + width: 100%; + border: none; + } + .main__b__2 .right__b__0 { + padding: 40px; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Bar/Bar.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Bar/Bar.razor new file mode 100644 index 0000000..414d58b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Bar/Bar.razor @@ -0,0 +1 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis.Bar \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor new file mode 100644 index 0000000..a2aeb19 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor @@ -0,0 +1,26 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inherits AntDomComponentBase + + +
    +
    +
    @Avatar
    +
    +
    + @Title + +
    +
    + @Total +
    +
    +
    +
    +
    @ChildContent
    +
    + +
    +
    + diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.cs new file mode 100644 index 0000000..b8a0da3 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.cs @@ -0,0 +1,28 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +{ + public partial class ChartCard + { + [Parameter] + public string Avatar { get; set; } + + [Parameter] + public string Title { get; set; } + + [Parameter] + public RenderFragment Action { get; set; } + + [Parameter] + public string Total { get; set; } + + [Parameter] + public RenderFragment ChildContent { get; set; } + + [Parameter] + public RenderFragment Footer { get; set; } + + [Parameter] + public string ContentHeight { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.css new file mode 100644 index 0000000..33bfd50 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/ChartCard/ChartCard.razor.css @@ -0,0 +1,77 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.chartCard { + position: relative; +} +.chartCard .chartTop { + position: relative; + width: 100%; + overflow: hidden; +} +.chartCard .chartTopMargin { + margin-bottom: 12px; +} +.chartCard .chartTopHasMargin { + margin-bottom: 20px; +} +.chartCard .metaWrap { + float: left; +} +.chartCard .avatar { + position: relative; + top: 4px; + float: left; + margin-right: 20px; +} +.chartCard .avatar img { + border-radius: 100%; +} +.chartCard .meta { + height: 22px; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.chartCard .action { + position: absolute; + top: 4px; + right: 0; + line-height: 1; + cursor: pointer; +} +.chartCard .total { + height: 38px; + margin-top: 4px; + margin-bottom: 0; + overflow: hidden; + color: rgba(0, 0, 0, 0.85); + font-size: 30px; + line-height: 38px; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.chartCard .content { + position: relative; + width: 100%; + margin-bottom: 12px; +} +.chartCard .contentFixed { + position: absolute; + bottom: 0; + left: 0; + width: 100%; +} +.chartCard .footer { + margin-top: 8px; + padding-top: 9px; + border-top: 1px solid #f0f0f0; +} +.chartCard .footer > * { + position: relative; +} +.chartCard .footerMargin { + margin-top: 20px; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor new file mode 100644 index 0000000..17002d1 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor @@ -0,0 +1,7 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inherits AntDomComponentBase + +
    + @Label + @Value +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.cs new file mode 100644 index 0000000..ab1b03c --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +{ + public partial class Field + { + [Parameter] + public string Label { get; set; } + + [Parameter] + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.css new file mode 100644 index 0000000..b19a6e5 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Field/Field.razor.css @@ -0,0 +1,19 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.field { + margin: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.field .label, +.field .number { + font-size: 14px; + line-height: 22px; +} +.field .number { + margin-left: 8px; + color: rgba(0, 0, 0, 0.85); +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Gauge/Gauge.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Gauge/Gauge.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor new file mode 100644 index 0000000..a518ae1 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor @@ -0,0 +1,34 @@ +@using Xzy.KnowledgeBase.Services +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inject IChartService ChartService + + + +@code +{ + private IChartComponent _visitChart; + + private readonly AreaConfig _visitChartConfig = new AreaConfig + { + XField = "x", + YField = "y", + Height = 45, + Padding = new[] { 8, 8, 8, 8 }, + AutoFit = true, + XAxis = new ValueCatTimeAxis + { + Visible = false + }, + YAxis = new ValueAxis + { + Visible = false + } + }; + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + var data = await ChartService.GetVisitDataAsync(); + await _visitChart.ChangeData(data); + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniArea/MiniArea.razor.cs new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniBar/MiniBar.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniBar/MiniBar.razor new file mode 100644 index 0000000..53f68d7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniBar/MiniBar.razor @@ -0,0 +1,32 @@ +@using Xzy.KnowledgeBase.Services +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inject IChartService ChartService + + +@code +{ + private IChartComponent _chart; + private ColumnConfig _chartConfig = new ColumnConfig + { + XField = "x", + YField = "y", + Height = 45, + Padding = new[] { 8, 8, 8, 8 }, + AutoFit = true, + XAxis = new CatAxis + { + Visible = false + }, + YAxis = new ValueAxis + { + Visible = false + } + }; + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + var data = await ChartService.GetVisitDataAsync(); + await _chart.ChangeData(data); + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor new file mode 100644 index 0000000..df59afa --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor @@ -0,0 +1,38 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inherits AntDomComponentBase + +
    + + +
    + + +
    +
    +
    +
    +
    +
    +
    + +@code +{ + [Parameter] + public int? Target { get; set; } + + [Parameter] + public string TargetLabel { get; set; } + + [Parameter] + public string Color { get; set; } + + [Parameter] + public int? StrokeWidth { get; set; } + + [Parameter] + public int? Percent { get; set; } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor.css new file mode 100644 index 0000000..c76f705 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/MiniProgress/MiniProgress.razor.css @@ -0,0 +1,39 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.miniProgress { + position: relative; + width: 100%; + padding: 5px 0; +} +.miniProgress .progressWrap { + position: relative; + background-color: #f5f5f5; +} +.miniProgress .progress { + width: 0; + height: 100%; + background-color: #1890ff; + border-radius: 1px 0 0 1px; + transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s; +} +.miniProgress .target { + position: absolute; + top: 0; + bottom: 0; + z-index: 9; + width: 20px; +} +.miniProgress .target span { + position: absolute; + top: 0; + left: 0; + width: 2px; + height: 4px; + border-radius: 100px; +} +.miniProgress .target span:last-child { + top: auto; + bottom: 0; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor.css new file mode 100644 index 0000000..6080e1f --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/Pie/Pie.razor.css @@ -0,0 +1,93 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.pie { + position: relative; +} +.pie .chart { + position: relative; +} +.pie.hasLegend .chart { + width: calc(100% - 240px); +} +.pie .legend { + position: absolute; + top: 50%; + right: 0; + min-width: 200px; + margin: 0 20px; + padding: 0; + list-style: none; + transform: translateY(-50%); +} +.pie .legend li { + height: 22px; + margin-bottom: 16px; + line-height: 22px; + cursor: pointer; +} +.pie .legend li:last-child { + margin-bottom: 0; +} +.pie .dot { + position: relative; + top: -1px; + display: inline-block; + width: 8px; + height: 8px; + margin-right: 8px; + border-radius: 8px; +} +.pie .line { + display: inline-block; + width: 1px; + height: 16px; + margin-right: 8px; + background-color: #f0f0f0; +} +.pie .legendTitle { + color: rgba(0, 0, 0, 0.85); +} +.pie .percent { + color: rgba(0, 0, 0, 0.45); +} +.pie .value { + position: absolute; + right: 0; +} +.pie .title { + margin-bottom: 8px; +} +.pie .total { + position: absolute; + top: 50%; + left: 50%; + max-height: 62px; + text-align: center; + transform: translate(-50%, -50%); +} +.pie .total > h4 { + height: 22px; + margin-bottom: 8px; + color: rgba(0, 0, 0, 0.45); + font-weight: normal; + font-size: 14px; + line-height: 22px; +} +.pie .total > p { + display: block; + height: 32px; + color: rgba(0, 0, 0, 0.85); + font-size: 1.2em; + line-height: 32px; + white-space: nowrap; +} +.legendBlock.hasLegend .chart { + width: 100%; + margin: 0 0 32px 0; +} +.legendBlock .legend { + position: relative; + transform: none; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor.css new file mode 100644 index 0000000..38aad10 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TagCloud/TagCloud.razor.css @@ -0,0 +1,6 @@ +.tagCloud { + overflow: hidden; +} +.tagCloud canvas { + transform-origin: 0 0; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor.css new file mode 100644 index 0000000..aace13b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/TimelineChart/TimelineChart.razor.css @@ -0,0 +1,7 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.timelineChart { + background: #fff; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor.css new file mode 100644 index 0000000..0a10643 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/WaterWave/WaterWave.razor.css @@ -0,0 +1,30 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.waterWave { + position: relative; + display: inline-block; + transform-origin: left; +} +.waterWave .text { + position: absolute; + top: 32px; + left: 0; + width: 100%; + text-align: center; +} +.waterWave .text span { + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.waterWave .text h4 { + color: rgba(0, 0, 0, 0.85); + font-size: 24px; + line-height: 32px; +} +.waterWave .waterWaveCanvasWrapper { + transform: scale(0.5); + transform-origin: 0 0; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/index.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/index.css new file mode 100644 index 0000000..222cd26 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Charts/index.css @@ -0,0 +1,19 @@ +.miniChart { + position: relative; + width: 100%; +} +.miniChart .chartContent { + position: absolute; + bottom: -28px; + width: 100%; +} +.miniChart .chartContent > div { + margin: 0 -5px; + overflow: hidden; +} +.miniChart .chartLoading { + position: absolute; + top: 16px; + left: 50%; + margin-left: -7px; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor.css new file mode 100644 index 0000000..85146bc --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/NumberInfo/NumberInfo.razor.css @@ -0,0 +1,62 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.numberInfo .suffix { + margin-left: 4px; + color: rgba(0, 0, 0, 0.85); + font-size: 16px; + font-style: normal; +} +.numberInfo .numberInfoTitle { + margin-bottom: 16px; + color: rgba(0, 0, 0, 0.85); + font-size: 16px; + transition: all 0.3s; +} +.numberInfo .numberInfoSubTitle { + height: 22px; + overflow: hidden; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.numberInfo .numberInfoValue { + margin-top: 4px; + overflow: hidden; + font-size: 0; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.numberInfo .numberInfoValue > span { + display: inline-block; + height: 32px; + margin-right: 32px; + color: rgba(0, 0, 0, 0.85); + font-size: 24px; + line-height: 32px; +} +.numberInfo .numberInfoValue .subTotal { + margin-right: 0; + color: rgba(0, 0, 0, 0.45); + font-size: 16px; + vertical-align: top; +} +.numberInfo .numberInfoValue .subTotal .anticon { + margin-left: 4px; + font-size: 12px; + transform: scale(0.82); +} +.numberInfo .numberInfoValue .subTotal :global .anticon-caret-up { + color: #f5222d; +} +.numberInfo .numberInfoValue .subTotal :global .anticon-caret-down { + color: #52c41a; +} +.numberInfolight .numberInfoValue > span { + color: rgba(0, 0, 0, 0.85); +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/PageLoading/PageLoading.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/PageLoading/PageLoading.razor new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SaleItem.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SaleItem.cs new file mode 100644 index 0000000..65c6a6d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SaleItem.cs @@ -0,0 +1,12 @@ +namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +{ + public partial class SalesCard + { + public class SaleItem + { + public int Id { get; set; } + public string Title { get; set; } + public string Total { get; set; } + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor new file mode 100644 index 0000000..2f0ea87 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor @@ -0,0 +1,71 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inherits AntDomComponentBase + + + +
    + + + + + + + +
    +

    + Sales Ranking +

    +
      + @foreach (var item in Items) + { +
    • + + @item.Id + + + @item.Title + + + @item.Total + +
    • + } +
    +
    +
    +
    +
    + + + + + + +
    +

    + Visits Ranking +

    +
      + @foreach (var item in Items) + { +
    • + + @item.Id + + + @item.Title + + + @item.Total + +
    • + } +
    +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor.cs new file mode 100644 index 0000000..82b1333 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/SalesCard.razor.cs @@ -0,0 +1,61 @@ +using AntDesign.Charts; +using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +{ + public partial class SalesCard + { + private readonly ColumnConfig _saleChartConfig = new ColumnConfig + { + AutoFit = true, + Padding = "auto", + XField = "x", + YField = "y" + }; + + private readonly ColumnConfig _visitChartConfig = new ColumnConfig + { + AutoFit = true, + Padding = "auto", + XField = "x", + YField = "y" + }; + + private IChartComponent _saleChart; + private IChartComponent _visitChart; + + [Parameter] + public SaleItem[] Items { get; set; } = + { + new SaleItem {Id = 1, Title = "Gongzhuan No.0 shop", Total = "323,234"}, + new SaleItem {Id = 2, Title = "Gongzhuan No.1 shop", Total = "323,234"}, + new SaleItem {Id = 3, Title = "Gongzhuan No.2 shop", Total = "323,234"}, + new SaleItem {Id = 4, Title = "Gongzhuan No.3 shop", Total = "323,234"}, + new SaleItem {Id = 5, Title = "Gongzhuan No.4 shop", Total = "323,234"}, + new SaleItem {Id = 6, Title = "Gongzhuan No.5 shop", Total = "323,234"}, + new SaleItem {Id = 7, Title = "Gongzhuan No.6 shop", Total = "323,234"} + }; + + [Inject] public IChartService ChartService { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + if (firstRender) + { + await OnTabChanged("1"); + } + } + + private async Task OnTabChanged(string activeKey) + { + var data = await ChartService.GetSalesDataAsync(); + if (activeKey == "1") + await _saleChart.ChangeData(data); + else + await _visitChart.ChangeData(data); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor new file mode 100644 index 0000000..74a3bd8 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor @@ -0,0 +1,13 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@inherits AntDomComponentBase + +
    + @ChildContent + + @if(Flag == "up"){ + + } else { + + } + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.cs new file mode 100644 index 0000000..11f5275 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +{ + public partial class Trend + { + [Parameter] + public RenderFragment ChildContent { get; set; } + + [Parameter] + public string Flag { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.css new file mode 100644 index 0000000..d7f31be --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Components/Trend/Trend.razor.css @@ -0,0 +1,37 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.trendItem { + display: inline-block; + font-size: 14px; + line-height: 22px; +} +.trendItem .up, +.trendItem .down { + position: relative; + top: 1px; + margin-left: 4px; +} +.trendItem .up span, +.trendItem .down span { + font-size: 12px; + transform: scale(0.83); +} +.trendItem .up { + color: #f5222d; +} +.trendItem .down { + top: -1px; + color: #52c41a; +} +.trendItem.trendItemGrey .up, +.trendItem.trendItemGrey .down { + color: rgba(0, 0, 0, 0.85); +} +.trendItem.reverseColor .up { + color: #52c41a; +} +.trendItem.reverseColor .down { + color: #f5222d; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor new file mode 100644 index 0000000..bfe4ecd --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor @@ -0,0 +1,69 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Analysis +@page "/" +@attribute [ReuseTabsPage(Title ="Home", Pin =true, Closable =false, Order =0)] + + + + + + + + WoW Change + 12% + + + DoD Change + 11% + + +
    + +
    +
    +
    + + + + + +
    + +
    +
    +
    + + + + + +
    + +
    +
    +
    + + + + + +
    + +
    +
    +
    +
    + + +
    diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor.css new file mode 100644 index 0000000..bd422fa --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Analysis/Index.razor.css @@ -0,0 +1,161 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.iconGroup span.anticon { + margin-left: 16px; + color: rgba(0, 0, 0, 0.45); + cursor: pointer; + transition: color 0.32s; +} +.iconGroup span.anticon:hover { + color: rgba(0, 0, 0, 0.85); +} +.rankingList { + margin: 25px 0 0; + padding: 0; + list-style: none; +} +.rankingList li { + display: flex; + align-items: center; + margin-top: 16px; + zoom: 1; +} +.rankingList li::before, +.rankingList li::after { + display: table; + content: ' '; +} +.rankingList li::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; +} +.rankingList li span { + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + line-height: 22px; +} +.rankingList li .rankingItemNumber { + display: inline-block; + width: 20px; + height: 20px; + margin-top: 1.5px; + margin-right: 16px; + font-weight: 600; + font-size: 12px; + line-height: 20px; + text-align: center; + background-color: #fafafa; + border-radius: 20px; +} +.rankingList li .rankingItemNumber.active { + color: #fff; + background-color: #314659; +} +.rankingList li .rankingItemTitle { + flex: 1; + margin-right: 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.salesExtra { + display: inline-block; + margin-right: 24px; +} +.salesExtra a { + margin-left: 24px; + color: rgba(0, 0, 0, 0.85); +} +.salesExtra a:hover { + color: #1890ff; +} +.salesExtra a.currentDate { + color: #1890ff; +} +.salesCard .salesBar { + padding: 0 0 32px 32px; +} +.salesCard .salesRank { + padding: 0 32px 32px 72px; +} +.salesCard :global .ant-tabs-bar, +.salesCard :global .ant-tabs-nav-wrap { + padding-left: 16px; +} +.salesCard :global .ant-tabs-bar .ant-tabs-nav .ant-tabs-tab, +.salesCard :global .ant-tabs-nav-wrap .ant-tabs-nav .ant-tabs-tab { + padding-top: 16px; + padding-bottom: 14px; + line-height: 24px; +} +.salesCard :global .ant-tabs-extra-content { + padding-right: 24px; + line-height: 55px; +} +.salesCard :global .ant-card-head { + position: relative; +} +.salesCard :global .ant-card-head-title { + align-items: normal; +} +.salesCardExtra { + height: inherit; +} +.salesTypeRadio { + position: absolute; + right: 54px; + bottom: 12px; +} +.offlineCard :global .ant-tabs-ink-bar { + bottom: auto; +} +.offlineCard :global .ant-tabs-bar { + border-bottom: none; +} +.offlineCard :global .ant-tabs-nav-container-scrolling { + padding-right: 40px; + padding-left: 40px; +} +.offlineCard :global .ant-tabs-tab-prev-icon::before { + position: relative; + left: 6px; +} +.offlineCard :global .ant-tabs-tab-next-icon::before { + position: relative; + right: 6px; +} +.offlineCard :global .ant-tabs-tab-active h4 { + color: #1890ff; +} +.trendText { + margin-left: 8px; + color: rgba(0, 0, 0, 0.85); +} +@media screen and (max-width: 992px) { + .salesExtra { + display: none; + } + .rankingList li span:first-child { + margin-right: 8px; + } +} +@media screen and (max-width: 768px) { + .rankingTitle { + margin-top: 16px; + } + .salesCard .salesBar { + padding: 16px; + } +} +@media screen and (max-width: 576px) { + .salesExtraWrap { + display: none; + } + .salesCard :global .ant-tabs-content { + padding-top: 30px; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor new file mode 100644 index 0000000..adc8186 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor @@ -0,0 +1,53 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +@using Xzy.KnowledgeBase.Models +@inherits AntDomComponentBase + +
    + +
    + +
    + @if (ActiveData != null) { +
    +
    +

    @(ActiveData.OrderBy(x => x.Y).Last().Y + 200) Billion

    +

    @(ActiveData.OrderBy(x=>x.Y).ToArray()[ActiveData.Length/2].Y) Billion

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + 00:00 + @ActiveData[ActiveData.Length / 2].X + @ActiveData.Last().X +
    + } + +
    + +@code +{ + public ChartDataItem[] ActiveData { get; set; } + + protected override void OnInitialized() { + base.OnInitializedAsync(); + ActiveData = GetActiveData(); + } + + private ChartDataItem[] GetActiveData() { + var activeData = new ChartDataItem[24]; + var random = new Random(); + for (var i = 0; i < 24; i++) { + activeData[i] = new ChartDataItem { + X = $"{i.ToString().PadRight(2, '0')}: 00", + Y = (int) (Math.Floor(random.NextDouble() * 200) + i * 50) + }; + } + return activeData; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor.css new file mode 100644 index 0000000..f6db831 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/ActiveChart/ActiveChart.razor.css @@ -0,0 +1,47 @@ +.activeChart { + position: relative; +} +.activeChartGrid p { + position: absolute; + top: 80px; +} +.activeChartGrid p:last-child { + top: 115px; +} +.activeChartLegend { + position: relative; + height: 20px; + margin-top: 8px; + font-size: 0; + line-height: 20px; +} +.activeChartLegend span { + display: inline-block; + width: 33.33%; + font-size: 12px; + text-align: center; +} +.activeChartLegend span:first-child { + text-align: left; +} +.activeChartLegend span:last-child { + text-align: right; +} +.dashedLine { + position: relative; + top: -70px; + left: -3px; + height: 1px; +} +.dashedLine .line { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: linear-gradient(to right, transparent 50%, #e9e9e9 50%); + background-size: 6px; +} +.dashedLine:last-child { + top: -36px; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor new file mode 100644 index 0000000..6640c53 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor @@ -0,0 +1,4 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +@inherits AntDomComponentBase + +
    diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor.cs new file mode 100644 index 0000000..643c577 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Gauge/Gauge.razor.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +{ + public partial class Gauge + { + [Parameter] + public string Title { get; set; } + + [Parameter] + public string Color { get; set; } + + [Parameter] + public int? Height { get; set; } + + [Parameter] + public int? BgColor { get; set; } + + [Parameter] + public int Percent { get; set; } + + [Parameter] + public bool? ForceFit { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/Map.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/Map.razor new file mode 100644 index 0000000..2c35124 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/Map.razor @@ -0,0 +1,9 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +@inherits AntDomComponentBase + +
    + +@code +{ + +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/MiniArea.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/MiniArea.razor new file mode 100644 index 0000000..c68c31a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Map/MiniArea.razor @@ -0,0 +1,29 @@ +@using Xzy.KnowledgeBase.Models +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor + + + +@code +{ + private IChartComponent _chart; + + private readonly AreaConfig _chartConfig = new AreaConfig + { + XField = "x", + YField = "y", + Height = 84, + Padding = new[] { 8, 8, 8, 8 }, + AutoFit = true, + XAxis = new ValueCatTimeAxis + { + Visible = false + }, + YAxis = new ValueAxis + { + Visible = false + } + }; + + [Parameter] + public ChartDataItem[] Data { get; set; } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor new file mode 100644 index 0000000..9555f1d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor @@ -0,0 +1,3 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor.cs new file mode 100644 index 0000000..af827e7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/Pie/Pie.razor.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +{ + public partial class Pie + { + [Parameter] + public bool? Animate { get; set; } + + [Parameter] + public int? LineWidth { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor new file mode 100644 index 0000000..dadad28 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor @@ -0,0 +1 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor.cs new file mode 100644 index 0000000..db5ed34 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/TagCloud/TagCloud.razor.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +{ + public partial class TagCloud + { + [Parameter] + public object[] Data { get; set; } + + [Parameter] + public int? Height { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor new file mode 100644 index 0000000..f52cd99 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor @@ -0,0 +1,3 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor.cs new file mode 100644 index 0000000..325c274 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Components/Charts/WaterWave/WaterWave.razor.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +{ + public partial class WaterWave + { + [Parameter] + public string Title { get; set; } + + [Parameter] + public int Percent { get; set; } + + [Parameter] + public int? Height { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor new file mode 100644 index 0000000..f712475 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor @@ -0,0 +1,69 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Monitor +@page "/dashboard/monitor" + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    + + + + + + @* *@ + + +
    + + + + + + + @* *@ + + + @* *@ + + + @* *@ + + + + + + + @* *@ + + + + + @* *@ + + + +
    + +@code +{ + private readonly DateTime _deadline = DateTime.Now.AddMilliseconds(1000 * 60 * 60 * 24 * 2 + 1000 * 30); +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor.css new file mode 100644 index 0000000..c7ad894 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Monitor/Index.razor.css @@ -0,0 +1,21 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.mapChart { + height: 452px; + padding-top: 24px; +} +.mapChart img { + display: inline-block; + max-width: 100%; + max-height: 437px; +} +.pieCard :global(.pie-stat) { + font-size: 24px !important; +} +@media screen and (max-width: 992px) { + .mapChart { + height: auto; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor new file mode 100644 index 0000000..96d649e --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor @@ -0,0 +1,12 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace + +
    + @foreach (var link in Links) + { + @link.Title + } + + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.cs new file mode 100644 index 0000000..9b6e64e --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace +{ + public class EditableLink + { + public string Title { get; set; } + public string Href { get; set; } + public string Id { get; set; } + } + + public partial class EditableLinkGroup + { + [Parameter] public EditableLink[] Links { get; set; } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.css new file mode 100644 index 0000000..df3886a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/EditableLinkGroup/EditableLinkGroup.razor.css @@ -0,0 +1,18 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.linkGroup { + padding: 20px 0 8px 24px; + font-size: 0; +} +.linkGroup > a { + display: inline-block; + width: 25%; + margin-bottom: 13px; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; +} +.linkGroup > a:hover { + color: #1890ff; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/AutoHeight.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/AutoHeight.razor new file mode 100644 index 0000000..4869797 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/AutoHeight.razor @@ -0,0 +1 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor new file mode 100644 index 0000000..0bd4f6f --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor @@ -0,0 +1,58 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace + + + +@if (HasLegend) +{ + + +
    +

    + + +

    +
    +
    +
    +
    +} + +@inject IChartService ChartService +@code +{ + [Parameter] public bool HasLegend { get; set; } + + [Parameter] public int Height { get; set; } = 343; + + private IChartComponent _chart; + + private readonly RadarConfig _chartConfig = new RadarConfig + { + Height = 343, + AutoFit = true, + XField="label", + YField="value", + RadiusAxis = new ValueAxis + { + Grid = new BaseAxisGrid + { + AlternateColor = new[] { "rgba(0, 0, 0, 0.04)", null } + } + }, + Area = new RadarViewConfigArea + { + Visible = false + }, + Point = new RadarViewConfigPoint + { + Visible = true + } + }; + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + var data = await ChartService.GetRadarDataAsync(); + await _chart.ChangeData(data); + } +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor.css new file mode 100644 index 0000000..10e4c11 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Components/Radar/Radar.razor.css @@ -0,0 +1,46 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.radar .legend { + margin-top: 16px; +} +.radar .legend .legendItem { + position: relative; + color: rgba(0, 0, 0, 0.45); + line-height: 22px; + text-align: center; + cursor: pointer; +} +.radar .legend .legendItem p { + margin: 0; +} +.radar .legend .legendItem h6 { + margin-top: 4px; + margin-bottom: 0; + padding-left: 16px; + color: rgba(0, 0, 0, 0.85); + font-size: 24px; + line-height: 32px; +} +.radar .legend .legendItem::after { + position: absolute; + top: 8px; + right: 0; + width: 1px; + height: 40px; + background-color: #f0f0f0; + content: ''; +} +.radar .legend > :last-child .legendItem::after { + display: none; +} +.radar .legend .dot { + position: relative; + top: -1px; + display: inline-block; + width: 6px; + height: 6px; + margin-right: 6px; + border-radius: 6px; +} diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor new file mode 100644 index 0000000..d723248 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor @@ -0,0 +1,153 @@ +@namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace +@using System.Text.RegularExpressions +@page "/dashboard/workplace" + + + + + Home + Dashboard + Workplace + + + +
    +
    + +
    +
    +
    + Good Morning, Serati Ma. Have a great day! +
    +
    + Interaction Expert | Ant Financial Service-XX Business Group-XX Platform Department-XX Technology Department-UED +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + + + All items + + + @foreach (var item in _projectNotice) { + + + + +
    + + @item.Title +
    +
    + + +
    + @item.Description +
    +
    +
    +
    + @item.Member + @if (!string.IsNullOrEmpty(item.UpdatedAt)) { + + + + } +
    +
    +
    + } +
    +
    + + + + + + + + @context.User.Name +   + + @foreach (var str in Regex.Split(context.Template, @"@\{([^{}]*)\}")) { + if (str == "group") { + + @context.Group.Name + + } + else if (str == "project") { + + @context.Project.Name + + } + else { + @str + } + } + + + + + + + +
    + + + + + + +
    + +
    +
    + + +
    + + @foreach (var item in _projectNotice) { + + + + @item.Member + + + } + +
    +
    +
    +
    +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.cs b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.cs new file mode 100644 index 0000000..7fdd6a2 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Dashboard.Workplace +{ + public partial class Index + { + private readonly EditableLink[] _links = + { + new EditableLink {Title = "Operation 1", Href = ""}, + new EditableLink {Title = "Operation 2", Href = ""}, + new EditableLink {Title = "Operation 3", Href = ""}, + new EditableLink {Title = "Operation 4", Href = ""}, + new EditableLink {Title = "Operation 5", Href = ""}, + new EditableLink {Title = "Operation 6", Href = ""} + }; + + private ActivitiesType[] _activities = { }; + private NoticeType[] _projectNotice = { }; + + [Inject] public IProjectService ProjectService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _projectNotice = await ProjectService.GetProjectNoticeAsync(); + _activities = await ProjectService.GetActivitiesAsync(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.css b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.css new file mode 100644 index 0000000..a88e752 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Dashboard/Workplace/Index.razor.css @@ -0,0 +1,224 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.activitiesList { + padding: 0 24px 8px 24px; +} +.activitiesList .username { + color: rgba(0, 0, 0, 0.85); +} +.activitiesList .event { + font-weight: normal; +} +.pageHeaderContent__b__0 { + display: flex; +} +.pageHeaderContent__b__0 .avatar { + flex: 0 1 72px; +} +.pageHeaderContent__b__0 .avatar > span { + display: block; + width: 72px; + height: 72px; + border-radius: 72px; +} +.pageHeaderContent__b__0 .content { + position: relative; + top: 4px; + flex: 1 1 auto; + margin-left: 24px; + color: rgba(0, 0, 0, 0.45); + line-height: 22px; +} +.pageHeaderContent__b__0 .content .contentTitle { + margin-bottom: 12px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 20px; + line-height: 28px; +} +.extraContent { + zoom: 1; + float: right; + white-space: nowrap; +} +.extraContent::before, +.extraContent::after { + display: table; + content: ' '; +} +.extraContent::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; +} +.extraContent .statItem { + position: relative; + display: inline-block; + padding: 0 32px; +} +.extraContent .statItem > p:first-child { + margin-bottom: 4px; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.extraContent .statItem > p { + margin: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 30px; + line-height: 38px; +} +.extraContent .statItem > p > span { + color: rgba(0, 0, 0, 0.45); + font-size: 20px; +} +.extraContent .statItem::after { + position: absolute; + top: 8px; + right: 0; + width: 1px; + height: 40px; + background-color: #f0f0f0; + content: ''; +} +.extraContent .statItem:last-child { + padding-right: 0; +} +.extraContent .statItem:last-child::after { + display: none; +} +.members a { + display: block; + height: 24px; + margin: 12px 0; + color: rgba(0, 0, 0, 0.85); + transition: all 0.3s; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.members a .member { + margin-left: 12px; + font-size: 14px; + line-height: 24px; + vertical-align: top; +} +.members a:hover { + color: #1890ff; +} +.projectList .ant-card-meta-description { + height: 44px; + overflow: hidden; + color: rgba(0, 0, 0, 0.45); + line-height: 22px; +} +.projectList .cardTitle { + font-size: 0; +} +.projectList .cardTitle a { + display: inline-block; + height: 24px; + margin-left: 12px; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + line-height: 24px; + vertical-align: top; +} +.projectList .cardTitle a:hover { + color: #1890ff; +} +.projectList .projectGrid { + width: 33.33%; +} +.projectList .projectItemContent { + display: flex; + height: 20px; + margin-top: 8px; + font-size: 12px; + line-height: 20px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.projectList .projectItemContent a { + display: inline-block; + flex: 1 1 0; + color: rgba(0, 0, 0, 0.45); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + word-break: break-all; +} +.projectList .projectItemContent a:hover { + color: #1890ff; +} +.projectList .projectItemContent .datetime { + flex: 0 0 auto; + float: right; + color: rgba(0, 0, 0, 0.25); +} +.datetime { + color: rgba(0, 0, 0, 0.25); +} +@media screen and (max-width: 1200px) and (min-width: 992px) { + .activeCard { + margin-bottom: 24px; + } + .members { + margin-bottom: 0; + } + .extraContent { + margin-left: -44px; + } + .extraContent .statItem { + padding: 0 16px; + } +} +@media screen and (max-width: 992px) { + .activeCard { + margin-bottom: 24px; + } + .members { + margin-bottom: 0; + } + .extraContent { + float: none; + margin-right: 0; + } + .extraContent .statItem { + padding: 0 16px; + text-align: left; + } + .extraContent .statItem::after { + display: none; + } +} +@media screen and (max-width: 768px) { + .extraContent { + margin-left: -16px; + } + .projectList .projectGrid { + width: 50%; + } +} +@media screen and (max-width: 576px) { + .pageHeaderContent { + display: block; + } + .pageHeaderContent .content { + margin-left: 0; + } + .extraContent .statItem { + float: none; + } +} +@media screen and (max-width: 480px) { + .projectList .projectGrid { + width: 100%; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Exception/403/403.razor b/Xzy.KnowledgeBase/Pages/Exception/403/403.razor new file mode 100644 index 0000000..f8b011b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Exception/403/403.razor @@ -0,0 +1,10 @@ +@namespace Xzy.KnowledgeBase.Pages.Exception +@page "/exception/403" + + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Exception/404/404.razor b/Xzy.KnowledgeBase/Pages/Exception/404/404.razor new file mode 100644 index 0000000..14dbd8b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Exception/404/404.razor @@ -0,0 +1,10 @@ +@namespace Xzy.KnowledgeBase.Pages.Exception +@page "/exception/404" + + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Exception/500/500.razor b/Xzy.KnowledgeBase/Pages/Exception/500/500.razor new file mode 100644 index 0000000..ff693ef --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Exception/500/500.razor @@ -0,0 +1,10 @@ +@namespace Xzy.KnowledgeBase.Pages.Exception +@page "/exception/500" + + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor new file mode 100644 index 0000000..e40dc24 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor @@ -0,0 +1,166 @@ +@namespace Xzy.KnowledgeBase.Pages.Form +@page "/form/advanced-form" +@using OneOf + +
    + + Advanced forms are commonly used in scenarios where large quantities of data are entered and submitted at once. + + + + + + + + + + + + http:// + .com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.cs b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.cs new file mode 100644 index 0000000..f4a40ca --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.cs @@ -0,0 +1,9 @@ +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Form +{ + public partial class AdvancedForm + { + private readonly AdvancedFormModel _model = new AdvancedFormModel(); + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.css b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.css new file mode 100644 index 0000000..34b97eb --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/AdvancedForm/AdvancedForm.razor.css @@ -0,0 +1,53 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.card { + margin-bottom: 24px; +} +.card :global .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { + width: 100%; +} +.errorIcon { + margin-right: 24px; + color: #ff4d4f; + cursor: pointer; +} +.errorIcon span.anticon { + margin-right: 4px; +} +.errorPopover :global .ant-popover-inner-content { + min-width: 256px; + max-height: 290px; + padding: 0; + overflow: auto; +} +.errorListItem { + padding: 8px 16px; + list-style: none; + border-bottom: 1px solid #f0f0f0; + cursor: pointer; + transition: all 0.3s; +} +.errorListItem:hover { + background: #e6f7ff; +} +.errorListItem:last-child { + border: 0; +} +.errorListItem .errorIcon { + float: left; + margin-top: 4px; + margin-right: 12px; + padding-bottom: 22px; + color: #ff4d4f; +} +.errorListItem .errorField { + margin-top: 2px; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; +} +.editable td { + padding-top: 13px !important; + padding-bottom: 12.5px !important; +} diff --git a/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor new file mode 100644 index 0000000..8ff6afc --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor @@ -0,0 +1,61 @@ +@namespace Xzy.KnowledgeBase.Pages.Form +@page "/form/basic-form" + + + + + Home + Form + Basic Form + + + + Form pages are used to collect or verify information to users, and basic forms are common in scenarios where there are fewer data items. + + + +
    + + + + + + + + + + + + + + + + + + + + + % + + + + Public + Partially public + Private + + + + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.cs b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.cs new file mode 100644 index 0000000..9ab3a36 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.cs @@ -0,0 +1,45 @@ +using AntDesign; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Form +{ + public class FormItemLayout + { + public ColLayoutParam LabelCol { get; set; } + public ColLayoutParam WrapperCol { get; set; } + } + + public partial class BasicForm + { + private readonly BasicFormModel _model = new BasicFormModel(); + + private readonly FormItemLayout _formItemLayout = new FormItemLayout + { + LabelCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24 }, + Sm = new EmbeddedProperty { Span = 7 }, + }, + + WrapperCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24 }, + Sm = new EmbeddedProperty { Span = 12 }, + Md = new EmbeddedProperty { Span = 10 }, + } + }; + + private readonly FormItemLayout _submitFormLayout = new FormItemLayout + { + WrapperCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24, Offset = 0 }, + Sm = new EmbeddedProperty { Span = 10, Offset = 7 }, + } + }; + + private void HandleSubmit() + { + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.css b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.css new file mode 100644 index 0000000..34b97eb --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/BasicForm/BasicForm.razor.css @@ -0,0 +1,53 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.card { + margin-bottom: 24px; +} +.card :global .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { + width: 100%; +} +.errorIcon { + margin-right: 24px; + color: #ff4d4f; + cursor: pointer; +} +.errorIcon span.anticon { + margin-right: 4px; +} +.errorPopover :global .ant-popover-inner-content { + min-width: 256px; + max-height: 290px; + padding: 0; + overflow: auto; +} +.errorListItem { + padding: 8px 16px; + list-style: none; + border-bottom: 1px solid #f0f0f0; + cursor: pointer; + transition: all 0.3s; +} +.errorListItem:hover { + background: #e6f7ff; +} +.errorListItem:last-child { + border: 0; +} +.errorListItem .errorIcon { + float: left; + margin-top: 4px; + margin-right: 12px; + padding-bottom: 22px; + color: #ff4d4f; +} +.errorListItem .errorField { + margin-top: 2px; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; +} +.editable td { + padding-top: 13px !important; + padding-bottom: 12.5px !important; +} diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor new file mode 100644 index 0000000..0639ca7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor @@ -0,0 +1,56 @@ +@namespace Xzy.KnowledgeBase.Pages.Form + +
    + + + + + + + + + + + + + + + + + + +
    + +
    +

    Description

    +

    Transfer to Alipay account

    +

    + If necessary, some common questions about the product can be put here.If necessary, some common questions about the product can be put here.If necessary, some common questions about the product can be put here. +

    +

    Transfer To Bank Card

    +

    + If necessary, some common questions about the product can be put here.If necessary, some common questions about the product can be put here.If necessary, some common questions about the product can be put here. +

    +
    diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.cs b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.cs new file mode 100644 index 0000000..f2e839b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.cs @@ -0,0 +1,26 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Form +{ + public partial class Step1 + { + private readonly StepFormModel _model = new StepFormModel(); + private readonly FormItemLayout _formLayout = new FormItemLayout + { + WrapperCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24, Offset = 0 }, + Sm = new EmbeddedProperty { Span = 19, Offset = 5 }, + } + }; + + [CascadingParameter] public StepForm StepForm { get; set; } + + public void OnValidateForm() + { + StepForm.Next(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.css b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.css new file mode 100644 index 0000000..36e72ce --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step1/Step1.razor.css @@ -0,0 +1,71 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.stepForm { + max-width: 500px; + margin: 40px auto 0; +} +.stepFormText { + margin-bottom: 24px; +} +.stepFormText :global .ant-form-item-label, +.stepFormText :global .ant-form-item-control { + line-height: 22px; +} +.result { + max-width: 560px; + margin: 0 auto; + padding: 24px 0 8px; +} +.desc { + padding: 0 56px; + color: rgba(0, 0, 0, 0.45); +} +.desc h3 { + margin: 0 0 12px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 16px; + line-height: 32px; +} +.desc h4 { + margin: 0 0 4px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.desc p { + margin-top: 0; + margin-bottom: 12px; + line-height: 22px; +} +@media screen and (max-width: 768px) { + .desc { + padding: 0; + } +} +.information { + line-height: 22px; +} +.information :global .ant-row:not(:last-child) { + margin-bottom: 24px; +} +.information .label { + padding-right: 8px; + color: rgba(0, 0, 0, 0.85); + text-align: right; +} +@media screen and (max-width: 576px) { + .information .label { + text-align: left; + } +} +.money { + font-weight: 500; + font-size: 20px; + font-family: 'Helvetica Neue', sans-serif; + line-height: 14px; +} +.uppercase { + font-size: 12px; +} diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor new file mode 100644 index 0000000..1303007 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor @@ -0,0 +1,28 @@ +@namespace Xzy.KnowledgeBase.Pages.Form + +
    + + + @_model.PayAccount + @_model.ReceiverAccount + @_model.ReceiverName + + + + + + + + + + + + + diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.cs b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.cs new file mode 100644 index 0000000..692c7b3 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.cs @@ -0,0 +1,31 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Form +{ + public partial class Step2 + { + private readonly StepFormModel _model = new StepFormModel(); + private readonly FormItemLayout _formLayout = new FormItemLayout + { + WrapperCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24, Offset = 0 }, + Sm = new EmbeddedProperty { Span = 19, Offset = 5 }, + } + }; + + [CascadingParameter] public StepForm StepForm { get; set; } + + public void OnValidateForm() + { + StepForm.Next(); + } + + public void Preview() + { + StepForm.Prev(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.css b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.css new file mode 100644 index 0000000..36e72ce --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step2/Step2.razor.css @@ -0,0 +1,71 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.stepForm { + max-width: 500px; + margin: 40px auto 0; +} +.stepFormText { + margin-bottom: 24px; +} +.stepFormText :global .ant-form-item-label, +.stepFormText :global .ant-form-item-control { + line-height: 22px; +} +.result { + max-width: 560px; + margin: 0 auto; + padding: 24px 0 8px; +} +.desc { + padding: 0 56px; + color: rgba(0, 0, 0, 0.45); +} +.desc h3 { + margin: 0 0 12px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 16px; + line-height: 32px; +} +.desc h4 { + margin: 0 0 4px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.desc p { + margin-top: 0; + margin-bottom: 12px; + line-height: 22px; +} +@media screen and (max-width: 768px) { + .desc { + padding: 0; + } +} +.information { + line-height: 22px; +} +.information :global .ant-row:not(:last-child) { + margin-bottom: 24px; +} +.information .label { + padding-right: 8px; + color: rgba(0, 0, 0, 0.85); + text-align: right; +} +@media screen and (max-width: 576px) { + .information .label { + text-align: left; + } +} +.money { + font-weight: 500; + font-size: 20px; + font-family: 'Helvetica Neue', sans-serif; + line-height: 14px; +} +.uppercase { + font-size: 12px; +} diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor new file mode 100644 index 0000000..539318f --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor @@ -0,0 +1,25 @@ +@namespace Xzy.KnowledgeBase.Pages.Form + + + + + + + +
    + + @_model.PayAccount + @_model.ReceiverAccount + @_model.ReceiverName + + + + +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.cs b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.cs new file mode 100644 index 0000000..37b1780 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.cs @@ -0,0 +1,13 @@ +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Pages.Form +{ + public partial class Step3 + { + private readonly StepFormModel _model = new StepFormModel(); + + public void OnFinish() + { + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.css b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.css new file mode 100644 index 0000000..ae2c51d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/Components/Step3/Step3.razor.css @@ -0,0 +1,65 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.stepForm { + max-width: 500px; + margin: 40px auto 0; +} +.stepFormText { + margin-bottom: 24px; +} +.stepFormText :global .ant-form-item-label, +.stepFormText :global .ant-form-item-control { + line-height: 22px; +} +.result { + max-width: 560px; + margin: 0 auto; + padding: 24px 0 8px; +} +.desc { + padding: 0 56px; + color: rgba(0, 0, 0, 0.45); +} +.desc h3 { + margin: 0 0 12px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 16px; + line-height: 32px; +} +.desc h4 { + margin: 0 0 4px 0; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.desc p { + margin-top: 0; + margin-bottom: 12px; + line-height: 22px; +} +@media screen and (max-width: 768px) { + .desc { + padding: 0; + } +} +.information { + line-height: 22px; +} +.information :global .ant-row:not(:last-child) { + margin-bottom: 24px; +} +.information .label { + padding-right: 8px; + color: rgba(0, 0, 0, 0.85); + text-align: right; +} +@media screen and (max-width: 576px) { + .information .label { + text-align: left; + } +} +.uppercase { + font-size: 12px; +} diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor new file mode 100644 index 0000000..16a4b87 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor @@ -0,0 +1,37 @@ +@namespace Xzy.KnowledgeBase.Pages.Form +@page "/form/step-form" + + + + + Home + Form + Step Form + + + + Divide a lengthy or unfamiliar form task into multiple steps to guide users through. + + + + + + + + + + @switch (_current) { + case 0: + + break; + case 1: + + break; + case 2: + + break; + } + + + + diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.cs b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.cs new file mode 100644 index 0000000..eea114d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.cs @@ -0,0 +1,22 @@ +namespace Xzy.KnowledgeBase.Pages.Form +{ + public partial class StepForm + { + private int _current; + + public void Next() + { + // todo: Not re-rendered + _current += 1; + StateHasChanged(); + } + + public void Prev() + { + // todo: Not re-rendered + if (_current <= 0) return; + _current -= 1; + StateHasChanged(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.css b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.css new file mode 100644 index 0000000..a71fe66 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Form/StepForm/StepForm.razor.css @@ -0,0 +1,72 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.card { + margin-bottom: 24px; +} +.heading { + margin: 0 0 16px 0; + font-size: 14px; + line-height: 22px; +} +.steps.ant-steps { + max-width: 750px; + margin: 16px auto; +} +.errorIcon { + margin-right: 24px; + color: #ff4d4f; + cursor: pointer; +} +.errorIcon span.anticon { + margin-right: 4px; +} +.errorPopover :global .ant-popover-inner-content { + min-width: 256px; + max-height: 290px; + padding: 0; + overflow: auto; +} +.errorListItem { + padding: 8px 16px; + list-style: none; + border-bottom: 1px solid #f0f0f0; + cursor: pointer; + transition: all 0.3s; +} +.errorListItem:hover { + background: #e6f7ff; +} +.errorListItem:last-child { + border: 0; +} +.errorListItem .errorIcon { + float: left; + margin-top: 4px; + margin-right: 12px; + padding-bottom: 22px; + color: #ff4d4f; +} +.errorListItem .errorField { + margin-top: 2px; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; +} +.editable td { + padding-top: 13px !important; + padding-bottom: 12.5px !important; +} +.advancedForm + div { + padding-bottom: 64px; +} +.advancedForm :global .ant-form .ant-row:last-child .ant-form-item { + margin-bottom: 24px; +} +.advancedForm :global .ant-table td { + transition: none !important; +} +.optional { + color: rgba(0, 0, 0, 0.45); + font-style: normal; +} diff --git a/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor new file mode 100644 index 0000000..04ca24d --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor @@ -0,0 +1,105 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@page "/list/basic-list" + +
    + + + + Home + List + Basic List + + + +
    + + + + @Info("My to do", "8 tasks", true) + + + @Info("Average task processing time this week", "32 minutes", true) + + + @Info("Number of tasks completed this week", "24 tasks") + + + + + + +
    + + All + Processing + Waiting + + +
    +
    + + + + + + + + @context.Title + + +
    +
    + Owner +

    @context.Owner

    +
    +
    + Starting time +

    @context.CreatedAt.ToString("yyyy-MM-dd HH:mm")

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +@code +{ + private static readonly RenderFragment Edit = @ + Edit +; + +private readonly RenderFragment[] _actions = +{ + Edit + }; + +private RenderFragment Info(string title, string value, bool bordered = false) { +return @
    + @title +

    @value

    + @if (bordered) { + + } +
    ; +} +} diff --git a/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.cs b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.cs new file mode 100644 index 0000000..2722acd --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.cs @@ -0,0 +1,36 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class BasicList + { + private readonly BasicListFormModel _model = new BasicListFormModel(); + + private readonly IDictionary _pStatus = new Dictionary + { + {"active", ProgressStatus.Active}, + {"exception", ProgressStatus.Exception}, + {"normal", ProgressStatus.Normal}, + {"success", ProgressStatus.Success} + }; + + private ListItemDataType[] _data = { }; + + [Inject] protected IProjectService ProjectService { get; set; } + + private void ShowModal() + { + } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _data = await ProjectService.GetFakeListAsync(5); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.css b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.css new file mode 100644 index 0000000..749d74a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/BasicList/BasicList.razor.css @@ -0,0 +1,152 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.standardList .ant-card-head { + border-bottom: none; +} +.standardList .ant-card-head-title { + padding: 24px 0; + line-height: 32px; +} +.standardList .ant-card-extra { + padding: 24px 0; +} +.standardList .ant-list-pagination { + margin-top: 24px; + text-align: right; +} +.standardList .ant-avatar-lg { + width: 48px; + height: 48px; + line-height: 48px; +} +.standardList .headerInfo { + position: relative; + text-align: center; +} +.standardList .headerInfo > span { + display: inline-block; + margin-bottom: 4px; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + line-height: 22px; +} +.standardList .headerInfo > p { + margin: 0; + color: rgba(0, 0, 0, 0.85); + font-size: 24px; + line-height: 32px; +} +.standardList .headerInfo > em { + position: absolute; + top: 0; + right: 0; + width: 1px; + height: 56px; + background-color: #f0f0f0; +} +.standardList .listContent { + font-size: 0; +} +.standardList .listContent .listContentItem { + display: inline-block; + margin-left: 40px; + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + vertical-align: middle; +} +.standardList .listContent .listContentItem > span { + line-height: 20px; +} +.standardList .listContent .listContentItem > p { + margin-top: 4px; + margin-bottom: 0; + line-height: 22px; +} +.standardList .extraContentSearch { + width: 272px; + margin-left: 16px; +} +@media screen and (max-width: 480px) { + .standardList .ant-list-item-content { + display: block; + flex: none; + width: 100%; + } + .standardList .ant-list-item-action { + margin-left: 0; + } + .standardList .listContent { + margin-left: 0; + } + .standardList .listContent > div { + margin-left: 0; + } + .standardList .listCard .ant-card-head-title { + overflow: visible; + } +} +@media screen and (max-width: 576px) { + .standardList .extraContentSearch { + width: 100%; + margin-left: 0; + } + .standardList .headerInfo { + margin-bottom: 16px; + } + .standardList .headerInfo > em { + display: none; + } +} +@media screen and (max-width: 768px) { + .standardList .listContent > div { + display: block; + } + .standardList .listContent > div:last-child { + top: 0; + width: 100%; + } + .listCard .ant-radio-group { + display: block; + margin-bottom: 8px; + } +} +@media screen and (max-width: 992px) and (min-width: 768px) { + .standardList .listContent > div { + display: block; + } + .standardList .listContent > div:last-child { + top: 0; + width: 100%; + } +} +@media screen and (max-width: 1200px) { + .standardList .listContent > div { + margin-left: 24px; + } + .standardList .listContent > div:last-child { + top: 0; + } +} +@media screen and (max-width: 1400px) { + .standardList .listContent { + text-align: right; + } + .standardList .listContent > div:last-child { + top: 0; + } +} +.standardListForm .ant-form-item { + margin-bottom: 12px; +} +.standardListForm .ant-form-item:last-child { + margin-bottom: 32px; + padding-top: 4px; +} +.formResult { + width: 100%; +} +.formResult [class^='title'] { + margin-bottom: 8px; +} diff --git a/Xzy.KnowledgeBase/Pages/List/BasicList/utils/utils.css b/Xzy.KnowledgeBase/Pages/List/BasicList/utils/utils.css new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor new file mode 100644 index 0000000..290c83e --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor @@ -0,0 +1,85 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@page "/list/card-list" + + + + + Home + List + Card List + + + +
    +

    + Paragraph: Ant.design, the service design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload. + Provide experience solutions that span design and development. +

    + +
    +
    + +
    + This is a title +
    +
    + +
    + + + @if (string.IsNullOrEmpty(context.Id)) { + + } + else { + + + + + + + @context.Title + + + + + @context.Description + + + + + } + + +
    +
    +
    + +@code +{ + private static readonly RenderFragment Operate = @Operation one; + +private readonly RenderFragment[] _actions = +{ + Operate, +@Operation two, + }; +} diff --git a/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.cs b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.cs new file mode 100644 index 0000000..ad02f51 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.cs @@ -0,0 +1,36 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class CardList + { + private readonly ListGridType _listGridType = new ListGridType + { + Gutter = 16, + Xs = 1, + Sm = 2, + Md = 3, + Lg = 3, + Xl = 4, + Xxl = 4 + }; + + private ListItemDataType[] _data = { }; + + [Inject] protected IProjectService ProjectService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + var list = new List { new ListItemDataType() }; + var data = await ProjectService.GetFakeListAsync(8); + list.AddRange(data); + _data = list.ToArray(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.css b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.css new file mode 100644 index 0000000..e18ff7c --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/CardList/CardList.razor.css @@ -0,0 +1,110 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.cardList .card .ant-card-meta-title { + margin-bottom: 12px; +} +.cardList .card .ant-card-meta-title > a { + display: inline-block; + max-width: 100%; + color: rgba(0, 0, 0, 0.85); +} +.cardList .card .ant-card-body:hover .ant-card-meta-title > a { + color: #1890ff; +} +.cardList .item { + height: 64px; +} +.cardList .ant-list .ant-list-item-content-single { + max-width: 100%; +} +.extraImg { + width: 155px; + margin-top: -20px; + text-align: center; +} +.extraImg img { + width: 100%; +} +.newButton { + width: 100%; + height: 201px; + color: rgba(0, 0, 0, 0.45); + background-color: #fff; + border-color: #d9d9d9; +} +.cardAvatar { + width: 48px; + height: 48px; + border-radius: 48px; +} +.cardDescription { + position: relative; + max-height: 4.5em; + margin-right: -1em; + padding-right: 1em; + overflow: hidden; + line-height: 1.5em; + text-align: justify; +} +.cardDescription::before { + position: absolute; + right: 14px; + bottom: 0; + padding: 0 1px; + background: #fff; + content: '...'; +} +.cardDescription::after { + position: absolute; + right: 14px; + width: 1em; + height: 1em; + margin-top: 0.2em; + background: white; + content: ''; +} +.pageHeaderContent__b__1 { + position: relative; +} +.contentLink { + margin-top: 16px; +} +.contentLink a { + margin-right: 32px; +} +.contentLink a img { + width: 24px; +} +.contentLink img { + margin-right: 8px; + vertical-align: middle; +} +@media screen and (max-width: 992px) { + .contentLink a { + margin-right: 16px; + } +} +@media screen and (max-width: 768px) { + .extraImg { + display: none; + } +} +@media screen and (max-width: 576px) { + .pageHeaderContent__b__1 { + padding-bottom: 30px; + } + .contentLink { + position: absolute; + bottom: -4px; + left: 0; + width: 1000px; + } + .contentLink a { + margin-right: 16px; + } + .contentLink img { + margin-right: 4px; + } +} diff --git a/Xzy.KnowledgeBase/Pages/List/CardList/utils/utils.css b/Xzy.KnowledgeBase/Pages/List/CardList/utils/utils.css new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor new file mode 100644 index 0000000..06c1082 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor @@ -0,0 +1,117 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@layout SearchList +@page "/list/search/applications" + +
    + +
    + + + + Category 1 + Category 2 + Category 3 + Category 4 + Category 5 + Category 6 + Category 7 + Category 8 + Category 9 + Category 10 + Category 11 + Category 12 + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + @context.Title + + + + + +
    +
    +
    +

    Active

    +

    @FormatWan(context.ActiveUser)

    +
    +
    +

    New

    +

    @context.NewUser.ToString("0,0")

    +
    +
    +
    +
    +
    +
    +
    + +@code +{ + private static readonly RenderFragment Download =@ + +; + +private static readonly IList Actions = new List +{ + Download, +@, +@, +@ + }; + + private static RenderFragment FormatWan(int val) { + if (val > 10000) { + val = (int) Math.Floor((double) val / 10000); + } + + return @ + @val + k + ; + } +} diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.cs new file mode 100644 index 0000000..edb4804 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.cs @@ -0,0 +1,37 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class Applications + { + private readonly ListGridType _listGridType = new ListGridType + { + Gutter = 16, + Xs = 1, + Sm = 2, + Md = 3, + Lg = 3, + Xl = 4, + Xxl = 4, + }; + + private readonly ListFormModel _model = new ListFormModel(); + private readonly IList _selectCategories = new List(); + + private IList _fakeList = new List(); + + + [Inject] public IProjectService ProjectService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _fakeList = await ProjectService.GetFakeListAsync(8); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.css b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.css new file mode 100644 index 0000000..9293eee --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Applications.razor.css @@ -0,0 +1,46 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.filterCardList .ant-card-meta-content { + margin-top: 0; +} +.filterCardList .ant-card-meta-avatar { + font-size: 0; +} +.filterCardList .ant-list .ant-list-item-content-single { + max-width: 100%; +} +.filterCardList .cardInfo { + margin-top: 16px; + margin-left: 40px; + zoom: 1; +} +.filterCardList .cardInfo::before, +.filterCardList .cardInfo::after { + display: table; + content: ' '; +} +.filterCardList .cardInfo::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; +} +.filterCardList .cardInfo > div { + position: relative; + float: left; + width: 50%; + text-align: left; +} +.filterCardList .cardInfo > div p { + margin: 0; + font-size: 24px; + line-height: 32px; +} +.filterCardList .cardInfo > div p:first-child { + margin-bottom: 4px; + color: rgba(0, 0, 0, 0.45); + font-size: 12px; + line-height: 20px; +} diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor new file mode 100644 index 0000000..0e11ac9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor @@ -0,0 +1,14 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@inherits AntDomComponentBase + +
    + @if (!string.IsNullOrEmpty(Title)) + { +
    + @Title +
    + } +
    + @ChildContent +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.cs new file mode 100644 index 0000000..db8d7b6 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class StandardFormRow + { + [Parameter] public string Title { get; set; } + + [Parameter] public bool Last { get; set; } + + [Parameter] public bool Block { get; set; } + + [Parameter] public bool Grid { get; set; } + + [Parameter] public RenderFragment ChildContent { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + SetClassMap(); + } + + protected void SetClassMap() + { + ClassMapper + .Clear() + .Add("standardFormRow") + .If("standardFormRowBlock", () => Block) + .If("standardFormRowLast", () => Last) + .If("standardFormRowGrid", () => Grid); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.css b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.css new file mode 100644 index 0000000..edc0bad --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/StandardFormRow/StandardFormRow.razor.css @@ -0,0 +1,71 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.standardFormRow { + display: flex; + width: 100%; + margin-bottom: 16px; + padding-bottom: 16px; + border-bottom: 1px dashed #f0f0f0; +} +.standardFormRow .ant-form-item, +.standardFormRow .ant-legacy-form-item { + margin-right: 24px; +} +.standardFormRow .ant-form-item-label label, +.standardFormRow .ant-legacy-form-item-label label { + margin-right: 0; + color: rgba(0, 0, 0, 0.85); +} +.standardFormRow .ant-form-item-label, +.standardFormRow .ant-legacy-form-item-label, +.standardFormRow .ant-form-item-control, +.standardFormRow .ant-legacy-form-item-control { + padding: 0; + line-height: 32px; +} +.standardFormRow .label { + flex: 0 0 auto; + margin-right: 24px; + color: rgba(0, 0, 0, 0.85); + font-size: 14px; + text-align: right; +} +.standardFormRow .label > span { + display: inline-block; + height: 32px; + line-height: 32px; +} +.standardFormRow .label > span::after { + content: ':'; +} +.standardFormRow .content { + flex: 1 1 0; +} +.standardFormRow .content :global .ant-form-item:last-child, +.standardFormRow .content :global .ant-legacy-form-item:last-child { + display: block; + margin-right: 0; +} +.standardFormRowLast { + margin-bottom: 0; + padding-bottom: 0; + border: none; +} +.standardFormRowBlock :global .ant-form-item, +.standardFormRowBlock :global .ant-legacy-form-item, +.standardFormRowBlock :global div.ant-form-item-control-wrapper, +.standardFormRowBlock :global div.ant-legacy-form-item-control-wrapper { + display: block; +} +.standardFormRowGrid .ant-form-item, +.standardFormRowGrid .ant-legacy-form-item, +.standardFormRowGrid div.ant-form-item-control-wrapper, +.standardFormRowGrid div.ant-legacy-form-item-control-wrapper { + display: block; +} +.standardFormRowGrid .ant-form-item-label, +.standardFormRowGrid .ant-legacy-form-item-label { + float: left; +} diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor new file mode 100644 index 0000000..a0691cd --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor @@ -0,0 +1,27 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@inherits AntDomComponentBase + +
    + @if (!HideCheckAll) + { + @SelectAllText + } + + + @ChildContent + + + @if (Expandable) + { + + @if (_expand) + { + @CollapseText + } + else + { + @ExpandText + } + + } +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.cs new file mode 100644 index 0000000..faf6bb7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.cs @@ -0,0 +1,67 @@ +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class TagSelect + { + private readonly IList _options = new List(); + private bool _checkedAll; + private bool _expand = false; + + [Parameter] public bool Expandable { get; set; } + + [Parameter] public bool HideCheckAll { get; set; } + + [Parameter] public string SelectAllText { get; set; } = "All"; + + [Parameter] public string CollapseText { get; set; } = "Collapse"; + + [Parameter] public string ExpandText { get; set; } = "Expand"; + + [Parameter] public IList Value { get; set; } + + [Parameter] public RenderFragment ChildContent { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + SetClassMap(); + } + + protected void SetClassMap() + { + ClassMapper + .Clear() + .Add("tagSelect") + .If("hasExpandTag", () => Expandable) + .If("expanded", () => _expand); + } + + private void HandleExpand() + { + _expand = !_expand; + } + + private void HandleCheckedChange(bool isChecked) + { + _checkedAll = isChecked; + foreach (var option in _options) option.Check(_checkedAll); + } + + public void AddOption(TagSelectOption option) + { + _options.Add(option); + } + + public void SelectItem(string value) + { + Value?.Add(value); + } + + public void UnSelectItem(string value) + { + Value?.Remove(value); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.css b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.css new file mode 100644 index 0000000..cdd9fd7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelect.razor.css @@ -0,0 +1,33 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.tagSelect { + position: relative; + max-height: 32px; + margin-left: -8px; + overflow: hidden; + line-height: 32px; + transition: all 0.3s; + user-select: none; +} +.tagSelect .ant-tag { + margin-right: 24px; + padding: 0 8px; + font-size: 14px; +} +.tagSelect.expanded { + max-height: 200px; + transition: all 0.3s; +} +.tagSelect .trigger { + position: absolute; + top: 0; + right: 0; +} +.tagSelect .trigger span.anticon { + font-size: 12px; +} +.tagSelect.hasExpandTag { + padding-right: 50px; +} diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor new file mode 100644 index 0000000..6456bac --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor @@ -0,0 +1,4 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@inherits AntDomComponentBase + +@ChildContent \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor.cs new file mode 100644 index 0000000..d4537c0 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Applications/Components/TagSelect/TagSelectOption.razor.cs @@ -0,0 +1,35 @@ +using Microsoft.AspNetCore.Components; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class TagSelectOption + { + [Parameter] public string Value { get; set; } + + [Parameter] public bool Checked { get; set; } + + [Parameter] public RenderFragment ChildContent { get; set; } + + [CascadingParameter] public TagSelect Parent { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + Parent.AddOption(this); + } + + protected void HandleCheckedChange(bool isChecked) + { + Checked = isChecked; + if (isChecked) + Parent.SelectItem(Value); + else + Parent.UnSelectItem(Value); + } + + public void Check(bool isChecked) + { + Checked = isChecked; + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Applications/utils/utils.css b/Xzy.KnowledgeBase/Pages/List/Search/Applications/utils/utils.css new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor new file mode 100644 index 0000000..8cf9b05 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor @@ -0,0 +1,90 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@layout SearchList +@page "/list/search/articles" + + +
    + + + Category 1 + Category 2 + Category 3 + Category 4 + Category 5 + Category 6 + Category 7 + Category 8 + Category 9 + Category 10 + Category 11 + Category 12 + + + + + + Only Me + + + + + + + + + + + + + + + + +
    +
    + + + + + + @context.Title + + + + + + diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.cs new file mode 100644 index 0000000..fa5a2c5 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.cs @@ -0,0 +1,37 @@ +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class Articles + { + private readonly string[] _defaultOwners = { "wzj", "wjh" }; + private readonly ListFormModel _model = new ListFormModel(); + + private readonly Owner[] _owners = + { + new Owner {Id = "wzj", Name = "Myself"}, + new Owner {Id = "wjh", Name = "Wu Jiahao"}, + new Owner {Id = "zxx", Name = "Zhou Xingxing"}, + new Owner {Id = "zly", Name = "Zhao Liying"}, + new Owner {Id = "ym", Name = "Yao Ming"} + }; + + private IList _fakeList = new List(); + + [Inject] public IProjectService ProjectService { get; set; } + + private void SetOwner() + { + } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _fakeList = await ProjectService.GetFakeListAsync(8); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.css b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.css new file mode 100644 index 0000000..851521f --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Articles/Articles.razor.css @@ -0,0 +1,32 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +a.listItemMetaTitle { + color: rgba(0, 0, 0, 0.85); +} +.listItemExtra { + width: 272px; + height: 1px; +} +.selfTrigger { + margin-left: 12px; +} +@media screen and (max-width: 480px) { + .selfTrigger { + display: block; + margin-left: 0; + } +} +@media screen and (max-width: 768px) { + .selfTrigger { + display: block; + margin-left: 0; + } +} +@media screen and (max-width: 992px) { + .listItemExtra { + width: 0; + height: 1px; + } +} diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor b/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor new file mode 100644 index 0000000..c2294f6 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor @@ -0,0 +1,91 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@layout SearchList +@page "/list/search/projects" + +
    + +
    + + + + Category 1 + Category 2 + Category 3 + Category 4 + Category 5 + Category 6 + Category 7 + Category 8 + Category 9 + Category 10 + Category 11 + Category 12 + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + @context.Title + + + + @context.SubDescription + @context.Title + +
    + @context.UpdatedAt.ToFriendlyDisplay() +
    + + @foreach (var member in context.Members) { + + } + +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor.cs new file mode 100644 index 0000000..be2da9c --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/Projects/Projects.razor.cs @@ -0,0 +1,45 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Pages.Form; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class Projects + { + private readonly ListGridType _listGridType = new ListGridType + { + Gutter = 16, + Xs = 1, + Sm = 2, + Md = 3, + Lg = 3, + Xl = 4, + Xxl = 4, + }; + + private readonly FormItemLayout _formItemLayout = new FormItemLayout + { + WrapperCol = new ColLayoutParam + { + Xs = new EmbeddedProperty { Span = 24 }, + Sm = new EmbeddedProperty { Span = 16 }, + } + }; + + private readonly ListFormModel _model = new ListFormModel(); + + private IList _fakeList = new List(); + + [Inject] public IProjectService ProjectService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _fakeList = await ProjectService.GetFakeListAsync(8); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor b/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor new file mode 100644 index 0000000..26c02c9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor @@ -0,0 +1,27 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@inherits LayoutComponentBase +@layout Xzy.KnowledgeBase.BasicLayout + + + + + Home + List + Search + + + +
    + +
    +
    + + @Body + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor.cs b/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor.cs new file mode 100644 index 0000000..68edd30 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/Search/SearchList.razor.cs @@ -0,0 +1,32 @@ +using AntDesign.ProLayout; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; + +namespace Xzy.KnowledgeBase.Pages.List +{ + public partial class SearchList + { + private readonly IList _tabList = new List + { + new TabPaneItem {Key = "articles", Tab = "Articles"}, + new TabPaneItem {Key = "projects", Tab = "Projects"}, + new TabPaneItem {Key = "applications", Tab = "Applications"} + }; + + [Inject] protected NavigationManager NavigationManager { get; set; } + + private string GetTabKey() + { + var url = NavigationManager.Uri.TrimEnd('/'); + var key = url.Substring(url.LastIndexOf('/') + 1); + return key; + } + + private void HandleTabChange(string key) + { + var url = NavigationManager.Uri.TrimEnd('/'); + url = url.Substring(0, url.LastIndexOf('/')); + NavigationManager.NavigateTo($"{url}/{key}"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/TableList/TableList.razor b/Xzy.KnowledgeBase/Pages/List/TableList/TableList.razor new file mode 100644 index 0000000..7c6b3c2 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/List/TableList/TableList.razor @@ -0,0 +1,6 @@ +@namespace Xzy.KnowledgeBase.Pages.List +@page "/list/table-list" + +

    + TODO: Next Version +

    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/List/TableList/TableList.razor.css b/Xzy.KnowledgeBase/Pages/List/TableList/TableList.razor.css new file mode 100644 index 0000000..e69de29 diff --git a/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor new file mode 100644 index 0000000..87abea9 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor @@ -0,0 +1,177 @@ +@namespace Xzy.KnowledgeBase.Pages.Profile +@page "/profile/advanced" + + + + + Home + Profile + Advanced Profile + + + + + + + + + + Option One + Option Two + Option Three + + + + + + + + + + +
    + + +
    +
    + + + Qu Lili + XX Service + 2017-07-07 + + 12421 + + 2017-07-07 ~ 2017-08-08 + Please confirm within two working days + + + +
    + + + + + + + + + + + + + + + Pay small + 32943898021309809423 + 3321944288191034921 + 18112345678 + + Qu Lili 18100000000 Intersection of Gongzhuan Road, Huanggushan Road, Xihu District, Hangzhou City, Zhejiang Province + + + + 725 + 2017-08-08 + + 725 + + 2017-08-08 + +

    Information Group

    + + + Lin Dongdong + 1234567 + XX Company-YY Department + 2017-08-08 + + This description is very long, very long, very long, very long, very long, very long, very long, very long, very long, very long, very long... + + + + + + Citrullus lanatus (Thunb.) Matsum. et + Nakai is an annual trailing vine; the stems and branches are strong, with distinct edges.The tendrils are thicker... + + + + + Fu Xiaoxiao + 1234568 + + +
    + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +@code +{ + private readonly RenderFragment _desc1 = + @
    + Qu Lili +
    + ; + private readonly RenderFragment _desc2 = + @
    + Zhou Maomao + +
    + Hurry Up +
    +
    + ; + + private readonly RenderFragment _title = + @ + Another Data + + + + + ; +} diff --git a/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.cs b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.cs new file mode 100644 index 0000000..afef03c --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.cs @@ -0,0 +1,28 @@ +using AntDesign.ProLayout; +using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Profile +{ + public partial class Advanced + { + private readonly IList _tabList = new List + { + new TabPaneItem {Key = "detail", Tab = "Details"}, + new TabPaneItem {Key = "rules", Tab = "Rules"} + }; + + private AdvancedProfileData _data = new AdvancedProfileData(); + + [Inject] protected IProfileService ProfileService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _data = await ProfileService.GetAdvancedAsync(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.css b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.css new file mode 100644 index 0000000..1f1b3d2 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Advanced/Advanced.razor.css @@ -0,0 +1,43 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.main__b__3 .ant-descriptions-row > td { + padding-bottom: 8px; +} +.main__b__3 .ant-page-header-heading-extra { + flex-direction: column; +} +.headerList { + margin-bottom: 4px; +} +.headerList .ant-descriptions-row > td { + padding-bottom: 8px; +} +.headerList .stepDescription { + position: relative; + left: 38px; + padding-top: 8px; + font-size: 14px; + text-align: left; +} +.headerList .stepDescription > div { + margin-top: 8px; + margin-bottom: 4px; +} +.pageHeader .ant-page-header-heading-extra > * + * { + margin-left: 8px; +} +.pageHeader .moreInfo { + display: flex; + justify-content: space-between; + width: 200px; +} +@media screen and (max-width: 576px) { + .stepDescription { + left: 8px; + } + .pageHeader .ant-pro-page-header-wrap-row { + flex-direction: column; + } +} diff --git a/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor new file mode 100644 index 0000000..c0a796e --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor @@ -0,0 +1,53 @@ +@namespace Xzy.KnowledgeBase.Pages.Profile +@page "/profile/basic" + + + + + Home + Profile + Basic Profile + + + + + + 1000000000 + Picked Up + 1234123421 + 3214321432 + + + + Fu Xiaoxiao + 18100000000 + Cainiao Warehouse + No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China + N/A + + +
    Returned Goods
    + + + + + + + + +
    +
    Progress
    + + + + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.cs b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.cs new file mode 100644 index 0000000..85475f5 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.Profile +{ + public partial class Basic + { + private BasicProfileDataType _data = new BasicProfileDataType(); + + [Inject] protected IProfileService ProfileService { get; set; } + + protected override async Task OnInitializedAsync() + { + await base.OnInitializedAsync(); + _data = await ProfileService.GetBasicAsync(); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.css b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.css new file mode 100644 index 0000000..418cfa6 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Profile/Basic/Basic.razor.css @@ -0,0 +1,10 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.title { + margin-bottom: 16px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 16px; +} diff --git a/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor b/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor new file mode 100644 index 0000000..d7939f6 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor @@ -0,0 +1,35 @@ +@namespace Xzy.KnowledgeBase.Pages.Result +@page "/result/fail" + + + + + + + + +
    + The content you submitted has the following error: +
    +
    + + Your account has been blocked + + Unblock account + + +
    +
    + + Your account is not valid for use + + Upgrade account + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor.css b/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor.css new file mode 100644 index 0000000..786c9f7 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Result/Fail/Fail.razor.css @@ -0,0 +1,13 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.error_icon { + color: #ff4d4f; +} +.title__b__0 { + margin-bottom: 16px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 16px; +} diff --git a/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor b/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor new file mode 100644 index 0000000..7f040f2 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor @@ -0,0 +1,69 @@ +@namespace Xzy.KnowledgeBase.Pages.Result +@page "/result/success" + + + + + + + + + + + + + + 23421 + Qu Lili + 2016-12-12 ~ 2017-12-12 + +
    + + + + Create project + + +
    +
    + Qu Lili + +
    +
    2016-12-12 12:32
    +
    +
    +
    + + + Departmental preliminary review + + +
    +
    + Zhou Maomao + + + Urge + +
    +
    +
    +
    + + + Financial review + + + + + Finish + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor.css b/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor.css new file mode 100644 index 0000000..e40ed96 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/Result/Success/Success.razor.css @@ -0,0 +1,16 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.title__b__1 { + position: relative; + color: rgba(0, 0, 0, 0.85); + font-size: 12px; + text-align: center; +} +.head-title { + margin-bottom: 20px; + color: rgba(0, 0, 0, 0.85); + font-weight: 500px; + font-size: 16px; +} diff --git a/Xzy.KnowledgeBase/Pages/User/Login/Login.razor b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor new file mode 100644 index 0000000..59bf2c8 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor @@ -0,0 +1,59 @@ +@namespace Xzy.KnowledgeBase.Pages.User +@layout UserLayout +@page "/user/login" + +
    + +
    \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.cs b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.cs new file mode 100644 index 0000000..eac23c3 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.cs @@ -0,0 +1,36 @@ +using AntDesign; +using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; +using Xzy.KnowledgeBase.Services; + +namespace Xzy.KnowledgeBase.Pages.User +{ + public partial class Login + { + private readonly LoginParamsType _model = new LoginParamsType(); + + [Inject] public NavigationManager NavigationManager { get; set; } + + [Inject] public IAccountService AccountService { get; set; } + + [Inject] public MessageService Message { get; set; } + + public void HandleSubmit() + { + if (_model.UserName == "admin" && _model.Password == "ant.design") + { + NavigationManager.NavigateTo("/"); + return; + } + + if (_model.UserName == "user" && _model.Password == "ant.design") NavigationManager.NavigateTo("/"); + } + + public async Task GetCaptcha() + { + var captcha = await AccountService.GetCaptchaAsync(_model.Mobile); + await Message.Success($"Verification code validated successfully! The verification code is: {captcha}"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.css b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.css new file mode 100644 index 0000000..d8e4a8a --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Login/Login.razor.css @@ -0,0 +1,53 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +/*此处为了解决样式冲突, 在pro样式的基础上包了一层main, 原始样式从.login开始*/ +.main__b__0 ::deep { + width: 368px; + margin: 0 auto; +} +@media screen and (max-width: 576px) { + .main__b__0 ::deep { + width: 95%; + } +} +.main__b__0 ::deep .login :global .ant-tabs .ant-tabs-nav { + margin-bottom: 24px; + text-align: center; + border-bottom: 0; +} +.main__b__0 ::deep .login .getCaptcha { + display: block; + width: 100%; +} +.main__b__0 ::deep .login .icon { + color: #1890ff; +} +.main__b__0 ::deep .login .other { + margin-top: 24px; + line-height: 22px; + text-align: left; +} +.main__b__0 ::deep .login .other .icon { + margin-left: 16px; + color: rgba(0, 0, 0, 0.45); + font-size: 24px; + vertical-align: middle; + cursor: pointer; + transition: color 0.3s; +} +.main__b__0 ::deep .login .other .icon:hover { + color: #1890ff; +} +.main__b__0 ::deep .login .other .register { + float: right; +} +.main__b__0 ::deep .login .prefixIcon { + color: rgba(0, 0, 0, 0.25); + font-size: 14px; +} +.main__b__0 ::deep .login .submit { + width: 100%; + margin-top: 24px; +} diff --git a/Xzy.KnowledgeBase/Pages/User/Register/Register.razor b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor new file mode 100644 index 0000000..004e21b --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor @@ -0,0 +1,56 @@ +@namespace Xzy.KnowledgeBase.Pages.User +@layout UserLayout +@page "/user/register" + +
    +
    +

    Registration

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    diff --git a/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.cs b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.cs new file mode 100644 index 0000000..5b2ad08 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.cs @@ -0,0 +1,31 @@ +using System.ComponentModel.DataAnnotations; + +namespace Xzy.KnowledgeBase.Pages.User +{ + public class RegisterModel + { + [Required] + public string UserName { get; set; } + + [Required] + public string Password { get; set; } + + [Required] + public string ConfirmPassword { get; set; } + + [Required] + public string Phone { get; set; } + + [Required] + public string Captcha { get; set; } + } + + public partial class Register + { + private readonly RegisterModel _user = new RegisterModel(); + + public void Reg() + { + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.css b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.css new file mode 100644 index 0000000..14c2878 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/Register/Register.razor.css @@ -0,0 +1,46 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +.main__b__1 { + width: 368px; + margin: 0 auto; +} +.main__b__1 h3 { + margin-bottom: 20px; + font-size: 16px; +} +.main__b__1 .password { + margin-bottom: 24px; +} +.main__b__1 .password :global .ant-form-item-explain { + display: none; +} +.main__b__1 .getCaptcha { + display: block; + width: 100%; +} +.main__b__1 .submit { + width: 50%; +} +.main__b__1 .login { + float: right; + line-height: 40px; +} +.success, +.warning, +.error { + transition: color 0.3s; +} +.success { + color: #52c41a; +} +.warning { + color: #faad14; +} +.error { + color: #ff4d4f; +} +.progress-pass > .progress :global .ant-progress-bg { + background-color: #faad14; +} diff --git a/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor b/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor new file mode 100644 index 0000000..f548c26 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor @@ -0,0 +1,8 @@ +@namespace Xzy.KnowledgeBase.Pages.User +@page "/user/register-result" + +

    RegisterResult

    + +@code { + +} diff --git a/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor.css b/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor.css new file mode 100644 index 0000000..d212883 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/User/RegisterResult/RegisterResult.razor.css @@ -0,0 +1,21 @@ +.registerResult { + width: 800px; + min-height: 400px; + margin: auto; + padding: 80px; + background: none; +} +.registerResult :global .anticon { + font-size: 64px; +} +.registerResult .title { + margin-top: 32px; + font-size: 20px; + line-height: 28px; +} +.registerResult .actions { + margin-top: 40px; +} +.registerResult .actions a + a { + margin-left: 8px; +} diff --git a/Xzy.KnowledgeBase/Pages/_Host.cshtml b/Xzy.KnowledgeBase/Pages/_Host.cshtml new file mode 100644 index 0000000..97e3278 --- /dev/null +++ b/Xzy.KnowledgeBase/Pages/_Host.cshtml @@ -0,0 +1,30 @@ +@page "/" +@namespace Xzy.KnowledgeBase.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@{ + Layout = null; +} + + + + + + + Xzy.KnowledgeBase + + + + + + + + + + + + + + + + + diff --git a/Xzy.KnowledgeBase/Program.cs b/Xzy.KnowledgeBase/Program.cs new file mode 100644 index 0000000..6f57c6d --- /dev/null +++ b/Xzy.KnowledgeBase/Program.cs @@ -0,0 +1,97 @@ +using AntDesign.ProLayout; +using Microsoft.AspNetCore.Components; +using System.Text.Encodings.Web; +using System.Text.Unicode; +using Xzy.KnowledgeBase.Domain.Utils; +using Xzy.KnowledgeBase.Services; +using Xzy.KnowledgeBase.Domain.Common.DependencyInjection; +using Microsoft.AspNetCore.Mvc; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Reflection; +using Xzy.KnowledgeBase.Domain.Options; + +var builder = WebApplication.CreateBuilder(args); +// Add services to the container. +builder.Services.AddControllers().AddJsonOptions(config => +{ + //此设定解决JsonResult中文被编码的问题 + config.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All); + + config.JsonSerializerOptions.Converters.Add(new DateTimeConverter()); + config.JsonSerializerOptions.Converters.Add(new DateTimeNullableConvert()); +}); +// Add services to the container. +builder.Services.AddRazorPages(); +builder.Services.AddServerSideBlazor(); +builder.Services.AddAntDesign(); +builder.Services.AddScoped(sp => new HttpClient +{ + BaseAddress = new Uri(sp.GetService()!.BaseUri) +}); +builder.Services.Configure(builder.Configuration.GetSection("ProSettings")); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddServicesFromAssemblies("Xzy.KnowledgeBase.Domain"); +builder.Services.AddSwaggerGen(c => +{ + c.SwaggerDoc("v1", new() { Title = "Xzy.KnowledgeBase.Api", Version = "v1" }); + //添加Api层注释(true表示显示控制器注释) + var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; + var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); + c.IncludeXmlComments(xmlPath, true); + //添加Domain层注释(true表示显示控制器注释) + var xmlFile1 = $"{Assembly.GetExecutingAssembly().GetName().Name.Replace("Api", "Domain")}.xml"; + var xmlPath1 = Path.Combine(AppContext.BaseDirectory, xmlFile1); + c.IncludeXmlComments(xmlPath1, true); + c.DocInclusionPredicate((docName, apiDes) => + { + if (!apiDes.TryGetMethodInfo(out MethodInfo method)) + return false; + var version = method.DeclaringType.GetCustomAttributes(true).OfType().Select(m => m.GroupName); + if (docName == "v1" && !version.Any()) + return true; + var actionVersion = method.GetCustomAttributes(true).OfType().Select(m => m.GroupName); + if (actionVersion.Any()) + return actionVersion.Any(v => v == docName); + return version.Any(v => v == docName); + }); +}); + +// 读取连接字符串配置 +{ + builder.Configuration.GetSection("ConnectionStrings").Get(); + builder.Configuration.GetSection("AIModelList").Get(); +} +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); + +app.UseStaticFiles(); + +app.UseRouting(); + +app.MapBlazorHub(); +app.MapFallbackToPage("/_Host"); +app.UseSwagger(); +//配置Swagger UI +app.UseSwaggerUI(c => +{ + c.SwaggerEndpoint("/swagger/v1/swagger.json", "Xzy.KnowledgeBase API"); //注意中间段v1要和上面SwaggerDoc定义的名字保持一致 +}); +app.UseEndpoints(endpoints => +{ + endpoints.MapControllers(); +}); + +app.Run(); \ No newline at end of file diff --git a/Xzy.KnowledgeBase/README.md b/Xzy.KnowledgeBase/README.md new file mode 100644 index 0000000..fc2057b --- /dev/null +++ b/Xzy.KnowledgeBase/README.md @@ -0,0 +1 @@ +# Xzy.KnowledgeBase \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Services/AccountService.cs b/Xzy.KnowledgeBase/Services/AccountService.cs new file mode 100644 index 0000000..3f9ce49 --- /dev/null +++ b/Xzy.KnowledgeBase/Services/AccountService.cs @@ -0,0 +1,29 @@ +using System; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Services +{ + public interface IAccountService + { + Task LoginAsync(LoginParamsType model); + Task GetCaptchaAsync(string modile); + } + + public class AccountService : IAccountService + { + private readonly Random _random = new Random(); + + public Task LoginAsync(LoginParamsType model) + { + // todo: login logic + return Task.CompletedTask; + } + + public Task GetCaptchaAsync(string modile) + { + var captcha = _random.Next(0, 9999).ToString().PadLeft(4, '0'); + return Task.FromResult(captcha); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Services/ChartService.cs b/Xzy.KnowledgeBase/Services/ChartService.cs new file mode 100644 index 0000000..f1e606a --- /dev/null +++ b/Xzy.KnowledgeBase/Services/ChartService.cs @@ -0,0 +1,50 @@ +using System.Net.Http; +using System.Net.Http.Json; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Services +{ + public interface IChartService + { + Task GetVisitDataAsync(); + Task GetVisitData2Async(); + Task GetSalesDataAsync(); + Task GetRadarDataAsync(); + } + + public class ChartService : IChartService + { + private readonly HttpClient _httpClient; + + public ChartService(HttpClient httpClient) + { + _httpClient = httpClient; + } + + public async Task GetVisitDataAsync() + { + return (await GetChartDataAsync()).VisitData; + } + + public async Task GetVisitData2Async() + { + return (await GetChartDataAsync()).VisitData2; + } + + public async Task GetSalesDataAsync() + { + return (await GetChartDataAsync()).SalesData; + } + + public async Task GetRadarDataAsync() + { + return (await GetChartDataAsync()).RadarData; + } + + private async Task GetChartDataAsync() + { + return await _httpClient.GetFromJsonAsync("data/fake_chart_data.json"); + } + } +} diff --git a/Xzy.KnowledgeBase/Services/ProfileService.cs b/Xzy.KnowledgeBase/Services/ProfileService.cs new file mode 100644 index 0000000..7200397 --- /dev/null +++ b/Xzy.KnowledgeBase/Services/ProfileService.cs @@ -0,0 +1,33 @@ +using System.Net.Http; +using System.Net.Http.Json; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Services +{ + public interface IProfileService + { + Task GetBasicAsync(); + Task GetAdvancedAsync(); + } + + public class ProfileService : IProfileService + { + private readonly HttpClient _httpClient; + + public ProfileService(HttpClient httpClient) + { + _httpClient = httpClient; + } + + public async Task GetBasicAsync() + { + return await _httpClient.GetFromJsonAsync("data/basic.json"); + } + + public async Task GetAdvancedAsync() + { + return await _httpClient.GetFromJsonAsync("data/advanced.json"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Services/ProjectService.cs b/Xzy.KnowledgeBase/Services/ProjectService.cs new file mode 100644 index 0000000..1bbfbda --- /dev/null +++ b/Xzy.KnowledgeBase/Services/ProjectService.cs @@ -0,0 +1,47 @@ +using System.Linq; +using System.Net.Http; +using System.Net.Http.Json; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Services +{ + public interface IProjectService + { + Task GetProjectNoticeAsync(); + Task GetActivitiesAsync(); + Task GetFakeListAsync(int count = 0); + Task GetNoticesAsync(); + } + + public class ProjectService : IProjectService + { + private readonly HttpClient _httpClient; + + public ProjectService(HttpClient httpClient) + { + _httpClient = httpClient; + } + + public async Task GetProjectNoticeAsync() + { + return await _httpClient.GetFromJsonAsync("data/notice.json"); + } + + public async Task GetNoticesAsync() + { + return await _httpClient.GetFromJsonAsync("data/notices.json"); + } + + public async Task GetActivitiesAsync() + { + return await _httpClient.GetFromJsonAsync("data/activities.json"); + } + + public async Task GetFakeListAsync(int count = 0) + { + var data = await _httpClient.GetFromJsonAsync("data/fake_list.json"); + return count > 0 ? data.Take(count).ToArray() : data; + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Services/UserService.cs b/Xzy.KnowledgeBase/Services/UserService.cs new file mode 100644 index 0000000..c036820 --- /dev/null +++ b/Xzy.KnowledgeBase/Services/UserService.cs @@ -0,0 +1,27 @@ +using System.Net.Http; +using System.Net.Http.Json; +using System.Threading.Tasks; +using Xzy.KnowledgeBase.Models; + +namespace Xzy.KnowledgeBase.Services +{ + public interface IUserService + { + Task GetCurrentUserAsync(); + } + + public class UserService : IUserService + { + private readonly HttpClient _httpClient; + + public UserService(HttpClient httpClient) + { + _httpClient = httpClient; + } + + public async Task GetCurrentUserAsync() + { + return await _httpClient.GetFromJsonAsync("data/current_user.json"); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Utils/LongToDateTimeConverter.cs b/Xzy.KnowledgeBase/Utils/LongToDateTimeConverter.cs new file mode 100644 index 0000000..1a025d9 --- /dev/null +++ b/Xzy.KnowledgeBase/Utils/LongToDateTimeConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Buffers.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Xzy.KnowledgeBase.Utils +{ + public class LongToDateTimeConverter : JsonConverter + { + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (Utf8Parser.TryParse(reader.ValueSpan, out long value, out _)) + return DateTime.UnixEpoch.AddMilliseconds(value); + + throw new FormatException(); + } + + public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) + { + writer.WriteStringValue( + JsonEncodedText.Encode(((long)(value - DateTime.UnixEpoch).TotalMilliseconds).ToString())); + } + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/Xzy.KnowledgeBase.csproj b/Xzy.KnowledgeBase/Xzy.KnowledgeBase.csproj new file mode 100644 index 0000000..5c8e854 --- /dev/null +++ b/Xzy.KnowledgeBase/Xzy.KnowledgeBase.csproj @@ -0,0 +1,21 @@ + + + + net8.0 + enable + enable + Xzy.KnowledgeBase.xml + + + + + + + + + + + + + + diff --git a/Xzy.KnowledgeBase/Xzy.KnowledgeBase.xml b/Xzy.KnowledgeBase/Xzy.KnowledgeBase.xml new file mode 100644 index 0000000..f637327 --- /dev/null +++ b/Xzy.KnowledgeBase/Xzy.KnowledgeBase.xml @@ -0,0 +1,14 @@ + + + + Xzy.KnowledgeBase + + + + + 初始化DB 和表 + + + + + diff --git a/Xzy.KnowledgeBase/_Imports.razor b/Xzy.KnowledgeBase/_Imports.razor new file mode 100644 index 0000000..ad28a2e --- /dev/null +++ b/Xzy.KnowledgeBase/_Imports.razor @@ -0,0 +1,12 @@ +@using AntDesign +@using AntDesign.Charts +@using AntDesign.ProLayout +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.JSInterop +@using Xzy.KnowledgeBase +@using Xzy.KnowledgeBase.Models +@using Xzy.KnowledgeBase.Services diff --git a/Xzy.KnowledgeBase/appsettings.json b/Xzy.KnowledgeBase/appsettings.json new file mode 100644 index 0000000..a484ee4 --- /dev/null +++ b/Xzy.KnowledgeBase/appsettings.json @@ -0,0 +1,26 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "ProSettings": { + "NavTheme": "dark", + "Layout": "side", + "ContentWidth": "Fluid", + "FixedHeader": false, + "FixSiderbar": true, + "Title": "Ant Design Pro", + "PrimaryColor": "daybreak", + "ColorWeak": false, + "SplitMenus": false, + "HeaderRender": true, + "FooterRender": true, + "MenuRender": true, + "MenuHeaderRender": true, + "HeaderHeight": 48 + } +} diff --git a/Xzy.KnowledgeBase/wwwroot/appsettings.json b/Xzy.KnowledgeBase/wwwroot/appsettings.json new file mode 100644 index 0000000..e1b2d03 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/appsettings.json @@ -0,0 +1,18 @@ +{ + "ProSettings": { + "NavTheme": "dark", + "Layout": "side", + "ContentWidth": "Fluid", + "FixedHeader": false, + "FixSiderbar": true, + "Title": "Ant Design Pro", + "PrimaryColor": "daybreak", + "ColorWeak": false, + "SplitMenus": false, + "HeaderRender": true, + "FooterRender": true, + "MenuRender": true, + "MenuHeaderRender": true, + "HeaderHeight": 48 + } +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/assets/403.svg b/Xzy.KnowledgeBase/wwwroot/assets/403.svg new file mode 100644 index 0000000..610f136 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/assets/403.svg @@ -0,0 +1,508 @@ + + + + Group 9 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/assets/logo.svg b/Xzy.KnowledgeBase/wwwroot/assets/logo.svg new file mode 100644 index 0000000..239bf69 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/assets/logo.svg @@ -0,0 +1 @@ +Group 28 Copy 5Created with Sketch. \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/css/site.css b/Xzy.KnowledgeBase/wwwroot/css/site.css new file mode 100644 index 0000000..91b95ad --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/css/site.css @@ -0,0 +1,55 @@ +/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ +/* stylelint-disable no-duplicate-selectors */ +/* stylelint-disable */ +/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ +html, +body, +#root, +#app, +app { + height: 100%; +} +.colorWeak { + filter: invert(80%); +} +.ant-layout { + min-height: 100vh; +} +canvas { + display: block; +} +body { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +ul, +ol { + list-style: none; +} +.action { + cursor: pointer; +} +@media (max-width: 480px) { + .ant-table { + width: 100%; + overflow-x: auto; + } + .ant-table-thead > tr > th, + .ant-table-tbody > tr > th, + .ant-table-thead > tr > td, + .ant-table-tbody > tr > td { + white-space: pre; + } + .ant-table-thead > tr > th > span, + .ant-table-tbody > tr > th > span, + .ant-table-thead > tr > td > span, + .ant-table-tbody > tr > td > span { + display: block; + } +} +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + body .ant-design-pro > .ant-layout { + min-height: 100vh; + } +} diff --git a/Xzy.KnowledgeBase/wwwroot/data/activities.json b/Xzy.KnowledgeBase/wwwroot/data/activities.json new file mode 100644 index 0000000..e8282eb --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/activities.json @@ -0,0 +1,100 @@ +[ + { + "id": "trend-1", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Qu Lili", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png" + }, + "group": { + "name": "Highly Compelling Design Team", + "link": "http://github.com/" + }, + "project": { + "name": "June Version", + "link": "http://github.com/" + }, + "template": "created a new project in @{group} @{project}" + }, + { + "id": "trend-2", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Fu Xiaoxiao", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/cnrhVkzwxjPwAaCfPbdc.png" + }, + "group": { + "name": "Highly Compelling Design Team", + "link": "http://github.com/" + }, + "project": { + "name": "June Version", + "link": "http://github.com/" + }, + "template": "created a new project in @{group} @{project}" + }, + { + "id": "trend-3", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Lin Dongdong", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/gaOngJwsRYRaVAuXXcmB.png" + }, + "group": { + "name": "Second Girls Group", + "link": "http://github.com/" + }, + "project": { + "name": "June Version", + "link": "http://github.com/" + }, + "template": "created a new project in @{group} @{project}" + }, + { + "id": "trend-4", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Zhou Xingxing", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/WhxKECPNujWoWEFNdnJE.png" + }, + "project": { + "name": "Daily iteration in May", + "link": "http://github.com/" + }, + "template": "updated @{project} to the published state" + }, + { + "id": "trend-5", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Zhu", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ubnKSIfAJTxIgXOKlciN.png" + }, + "project": { + "name": "Engineering Efficiency", + "link": "http://github.com/" + }, + "comment": { + "name": "Leave a message", + "link": "http://github.com/" + }, + "template": "posted a @{comment} on @{project}" + }, + { + "id": "trend-6", + "updatedAt": "2020-08-26T10:21:19.719Z", + "user": { + "name": "Le Brother", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png" + }, + "group": { + "name": "Programmers Daily", + "link": "http://github.com/" + }, + "project": { + "name": "Brand Iteration", + "link": "http://github.com/" + }, + "template": "created a new project in @{group} @{project}" + } +] \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/advanced.json b/Xzy.KnowledgeBase/wwwroot/data/advanced.json new file mode 100644 index 0000000..382a918 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/advanced.json @@ -0,0 +1,64 @@ +{ + "advancedOperation1": [ + { + "key": "op1", + "type": "Ordering relationship takes effect", + "name": "Qu Lili", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "-" + }, + { + "key": "op2", + "type": "Financial Review", + "name": "Fu Xiaoxiao", + "status": "reject", + "updatedAt": "2017-10-03 19:23:12", + "memo": "Not passing the reason" + }, + { + "key": "op3", + "type": "Departmental preliminary review", + "name": "Zhou Maomao", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "-" + }, + { + "key": "op4", + "type": "Submit Order", + "name": "Lin Dongdong", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "很棒" + }, + { + "key": "op5", + "type": "Create Order", + "name": "Sweaty", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "-" + } + ], + "advancedOperation2": [ + { + "key": "op1", + "type": "Order relationship takes effect", + "name": "Qu Lili", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "-" + } + ], + "advancedOperation3": [ + { + "key": "op1", + "type": "Create Order", + "name": "Sweat tooth", + "status": "agree", + "updatedAt": "2017-10-03 19:23:12", + "memo": "-" + } + ] +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/basic.json b/Xzy.KnowledgeBase/wwwroot/data/basic.json new file mode 100644 index 0000000..7d2aa3b --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/basic.json @@ -0,0 +1,78 @@ +{ + "basicGoods": [ + { + "id": "1234561", + "name": "Mineral Water 550ml", + "barcode": "12421432143214321", + "price": "2.00", + "num": "1", + "amount": "2.00" + }, + { + "id": "1234562", + "name": "Herbal tea 300ml", + "barcode": "12421432143214322", + "price": "3.00", + "num": "2", + "amount": "6.00" + }, + { + "id": "1234563", + "name": "Delicious potato chips", + "barcode": "12421432143214323", + "price": "7.00", + "num": "4", + "amount": "28.00" + }, + { + "id": "1234564", + "name": "Specially delicious egg rolls", + "barcode": "12421432143214324", + "price": "8.50", + "num": "3", + "amount": "25.50" + } + ], + "basicProgress": [ + { + "key": "1", + "time": "2017-10-01 14:10", + "rate": "Contact Clients", + "status": "Processing", + "operator": "Pickup Assistant ID1234", + "cost": "5mins" + }, + { + "key": "2", + "time": "2017-10-01 14:05", + "rate": "Pickup Guy Departs", + "status": "Success", + "operator": "Pickup Assistant ID1234", + "cost": "1h" + }, + { + "key": "3", + "time": "2017-10-01 13:05", + "rate": "Pick-up person takes orders", + "status": "Success", + "operator": "Pickup Assistant ID1234", + "cost": "5mins" + }, + { + "key": "4", + "time": "2017-10-01 13:00", + "rate": "Apply For Approval", + "status": "Success", + "operator": "system", + "cost": "1h" + }, + { + "key": "5", + "time": "2017-10-01 12:00", + "rate": "Initiated a Return Request", + "status": "Success", + "operator": "user", + "cost": "5mins" + } + ] +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/current_user.json b/Xzy.KnowledgeBase/wwwroot/data/current_user.json new file mode 100644 index 0000000..6a0949d --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/current_user.json @@ -0,0 +1,50 @@ +{ + "name": "Serati Ma", + "avatar": "https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png", + "userid": "00000001", + "email": "antdesign@alipay.com", + "signature": "Be tolerant to diversity, tolerance is a virtue", + "title": "Interaction Expert", + "group": "Ant Financial Services-XX Business Group-XX Platform Department-XX Technology Department-UED", + "tags": [ + { + "key": "0", + "label": "Very thoughtful" + }, + { + "key": "1", + "label": "Focus on Design" + }, + { + "key": "2", + "label": "Spicy ~" + }, + { + "key": "3", + "label": "Long legs" + }, + { + "key": "4", + "label": "Chuan Meizi" + }, + { + "key": "5", + "label": "Have inclusive of all rivers" + } + ], + "notifyCount": 12, + "unreadCount": 11, + "country": "China", + "geographic": { + "province": { + "label": "Zhejiang Province", + "key": "330000" + }, + "city": { + "label": "Hangzhou City", + "key": "330100" + } + }, + "address": "77 Gongzhuan Road, Xihu District", + "phone": "0752-268888888" +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/fake_chart_data.json b/Xzy.KnowledgeBase/wwwroot/data/fake_chart_data.json new file mode 100644 index 0000000..5c3214d --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/fake_chart_data.json @@ -0,0 +1,799 @@ +{ + "visitData": [ + { + "x": "2020-08-25", + "y": 7 + }, + { + "x": "2020-08-26", + "y": 5 + }, + { + "x": "2020-08-27", + "y": 4 + }, + { + "x": "2020-08-28", + "y": 2 + }, + { + "x": "2020-08-29", + "y": 4 + }, + { + "x": "2020-08-30", + "y": 7 + }, + { + "x": "2020-08-31", + "y": 5 + }, + { + "x": "2020-09-01", + "y": 6 + }, + { + "x": "2020-09-02", + "y": 5 + }, + { + "x": "2020-09-03", + "y": 9 + }, + { + "x": "2020-09-04", + "y": 6 + }, + { + "x": "2020-09-05", + "y": 3 + }, + { + "x": "2020-09-06", + "y": 1 + }, + { + "x": "2020-09-07", + "y": 5 + }, + { + "x": "2020-09-08", + "y": 3 + }, + { + "x": "2020-09-09", + "y": 6 + }, + { + "x": "2020-09-10", + "y": 5 + } + ], + "visitData2": [ + { + "x": "2020-08-25", + "y": 1 + }, + { + "x": "2020-08-26", + "y": 6 + }, + { + "x": "2020-08-27", + "y": 4 + }, + { + "x": "2020-08-28", + "y": 8 + }, + { + "x": "2020-08-29", + "y": 3 + }, + { + "x": "2020-08-30", + "y": 7 + }, + { + "x": "2020-08-31", + "y": 2 + } + ], + "salesData": [ + { + "x": "January", + "y": 1003 + }, + { + "x": "February", + "y": 878 + }, + { + "x": "March", + "y": 408 + }, + { + "x": "April", + "y": 426 + }, + { + "x": "May", + "y": 357 + }, + { + "x": "June", + "y": 1056 + }, + { + "x": "July", + "y": 369 + }, + { + "x": "August", + "y": 284 + }, + { + "x": "September", + "y": 1173 + }, + { + "x": "October", + "y": 639 + }, + { + "x": "November", + "y": 1117 + }, + { + "x": "December", + "y": 512 + } + ], + "searchData": [ + { + "index": 1, + "keyword": "Search Keyword-0", + "count": 190, + "range": 64, + "status": 1 + }, + { + "index": 2, + "keyword": "Search Keyword-1", + "count": 347, + "range": 19, + "status": 0 + }, + { + "index": 3, + "keyword": "Search Keyword-2", + "count": 314, + "range": 35, + "status": 1 + }, + { + "index": 4, + "keyword": "Search Keyword-3", + "count": 81, + "range": 59, + "status": 1 + }, + { + "index": 5, + "keyword": "Search Keyword-4", + "count": 235, + "range": 16, + "status": 1 + }, + { + "index": 6, + "keyword": "Search Keyword-5", + "count": 834, + "range": 46, + "status": 0 + }, + { + "index": 7, + "keyword": "Search Keyword-6", + "count": 806, + "range": 45, + "status": 1 + }, + { + "index": 8, + "keyword": "Search Keywords-7", + "count": 116, + "range": 96, + "status": 1 + }, + { + "index": 9, + "keyword": "Search Keyword-8", + "count": 355, + "range": 44, + "status": 1 + }, + { + "index": 10, + "keyword": "Search keyword-9", + "count": 903, + "range": 91, + "status": 0 + }, + { + "index": 11, + "keyword": "Search Keyword-10", + "count": 411, + "range": 64, + "status": 0 + }, + { + "index": 12, + "keyword": "Search Keyword-11", + "count": 266, + "range": 15, + "status": 1 + }, + { + "index": 13, + "keyword": "Search Keywords-12", + "count": 163, + "range": 59, + "status": 1 + }, + { + "index": 14, + "keyword": "Search Keyword-13", + "count": 815, + "range": 30, + "status": 1 + }, + { + "index": 15, + "keyword": "Search keyword-14", + "count": 130, + "range": 35, + "status": 1 + }, + { + "index": 16, + "keyword": "Search Keyword-15", + "count": 342, + "range": 8, + "status": 1 + }, + { + "index": 17, + "keyword": "Search Keyword-16", + "count": 970, + "range": 90, + "status": 1 + }, + { + "index": 18, + "keyword": "Search Keyword-17", + "count": 613, + "range": 24, + "status": 0 + }, + { + "index": 19, + "keyword": "Search Keyword-18", + "count": 807, + "range": 23, + "status": 1 + }, + { + "index": 20, + "keyword": "Search Keyword-19", + "count": 480, + "range": 21, + "status": 1 + }, + { + "index": 21, + "keyword": "Search Keyword-20", + "count": 57, + "range": 82, + "status": 0 + }, + { + "index": 22, + "keyword": "Search Keyword-21", + "count": 513, + "range": 89, + "status": 0 + }, + { + "index": 23, + "keyword": "Search Keyword-22", + "count": 733, + "range": 62, + "status": 1 + }, + { + "index": 24, + "keyword": "Search Keyword-23", + "count": 887, + "range": 82, + "status": 1 + }, + { + "index": 25, + "keyword": "Search Keyword-24", + "count": 668, + "range": 9, + "status": 0 + }, + { + "index": 26, + "keyword": "Search Keyword-25", + "count": 398, + "range": 99, + "status": 1 + }, + { + "index": 27, + "keyword": "Search Keyword-26", + "count": 73, + "range": 48, + "status": 1 + }, + { + "index": 28, + "keyword": "Search Keyword-27", + "count": 63, + "range": 53, + "status": 1 + }, + { + "index": 29, + "keyword": "Search Keywords-28", + "count": 23, + "range": 32, + "status": 1 + }, + { + "index": 30, + "keyword": "Search Keywords-29", + "count": 650, + "range": 48, + "status": 0 + }, + { + "index": 31, + "keyword": "Search Keyword-30", + "count": 752, + "range": 13, + "status": 1 + }, + { + "index": 32, + "keyword": "Search Keyword-31", + "count": 571, + "range": 0, + "status": 0 + }, + { + "index": 33, + "keyword": "Search Keyword-32", + "count": 778, + "range": 33, + "status": 1 + }, + { + "index": 34, + "keyword": "Search Keyword-33", + "count": 537, + "range": 1, + "status": 1 + }, + { + "index": 35, + "keyword": "Search keyword -34", + "count": 467, + "range": 17, + "status": 0 + }, + { + "index": 36, + "keyword": "Search keyword -35", + "count": 106, + "range": 72, + "status": 0 + }, + { + "index": 37, + "keyword": "Search keyword -36", + "count": 984, + "range": 67, + "status": 0 + }, + { + "index": 38, + "keyword": "Search key word -37", + "count": 850, + "range": 7, + "status": 1 + }, + { + "index": 39, + "keyword": "Search Keyword-38", + "count": 475, + "range": 46, + "status": 1 + }, + { + "index": 40, + "keyword": "Search Keyword-39", + "count": 943, + "range": 38, + "status": 0 + }, + { + "index": 41, + "keyword": "Search Keyword-40", + "count": 915, + "range": 37, + "status": 1 + }, + { + "index": 42, + "keyword": "Search Keyword-41", + "count": 852, + "range": 67, + "status": 0 + }, + { + "index": 43, + "keyword": "Search Keyword-42", + "count": 21, + "range": 29, + "status": 1 + }, + { + "index": 44, + "keyword": "Search Keyword-43", + "count": 224, + "range": 25, + "status": 0 + }, + { + "index": 45, + "keyword": "Search Keyword-44", + "count": 904, + "range": 23, + "status": 0 + }, + { + "index": 46, + "keyword": "Search Keyword-45", + "count": 240, + "range": 39, + "status": 0 + }, + { + "index": 47, + "keyword": "Search Keyword-46", + "count": 735, + "range": 33, + "status": 0 + }, + { + "index": 48, + "keyword": "Search Keyword-47", + "count": 612, + "range": 15, + "status": 1 + }, + { + "index": 49, + "keyword": "Search Keyword-48", + "count": 877, + "range": 62, + "status": 1 + }, + { + "index": 50, + "keyword": "Search Keyword-49", + "count": 146, + "range": 48, + "status": 1 + } + ], + "offlineData": [ + { + "name": "Stores 0", + "cvr": 0.8 + }, + { + "name": "Stores 1", + "cvr": 0.7 + }, + { + "name": "Stores 2", + "cvr": 0.4 + }, + { + "name": "Stores 3", + "cvr": 0.3 + }, + { + "name": "Stores 4", + "cvr": 0.1 + }, + { + "name": "Stores 5", + "cvr": 0.1 + }, + { + "name": "Stores 6", + "cvr": 0.6 + }, + { + "name": "Stores 7", + "cvr": 0.9 + }, + { + "name": "Stores 8", + "cvr": 0.3 + }, + { + "name": "Stores 9", + "cvr": 0.9 + } + ], + "offlineChartData": [ + { + "x": 1598358002462, + "y1": 63, + "y2": 21 + }, + { + "x": 1598359802462, + "y1": 50, + "y2": 73 + }, + { + "x": 1598361602462, + "y1": 35, + "y2": 99 + }, + { + "x": 1598363402462, + "y1": 105, + "y2": 105 + }, + { + "x": 1598365202462, + "y1": 86, + "y2": 22 + }, + { + "x": 1598367002462, + "y1": 90, + "y2": 47 + }, + { + "x": 1598368802462, + "y1": 41, + "y2": 44 + }, + { + "x": 1598370602462, + "y1": 71, + "y2": 16 + }, + { + "x": 1598372402462, + "y1": 63, + "y2": 72 + }, + { + "x": 1598374202462, + "y1": 95, + "y2": 35 + }, + { + "x": 1598376002462, + "y1": 14, + "y2": 54 + }, + { + "x": 1598377802462, + "y1": 48, + "y2": 65 + }, + { + "x": 1598379602462, + "y1": 84, + "y2": 28 + }, + { + "x": 1598381402462, + "y1": 41, + "y2": 74 + }, + { + "x": 1598383202462, + "y1": 37, + "y2": 38 + }, + { + "x": 1598385002462, + "y1": 106, + "y2": 94 + }, + { + "x": 1598386802462, + "y1": 70, + "y2": 53 + }, + { + "x": 1598388602462, + "y1": 48, + "y2": 89 + }, + { + "x": 1598390402462, + "y1": 60, + "y2": 12 + }, + { + "x": 1598392202462, + "y1": 48, + "y2": 52 + } + ], + "salesTypeData": [ + { + "x": "Household Appliance", + "y": 4544 + }, + { + "x": "Food and Drink", + "y": 3321 + }, + { + "x": "Personal Health", + "y": 3113 + }, + { + "x": "Clothing bags", + "y": 2341 + }, + { + "x": "Maternal and Child Products", + "y": 1231 + }, + { + "x": "other", + "y": 1231 + } + ], + "salesTypeDataOnline": [ + { + "x": "Household Appliances", + "y": 244 + }, + { + "x": "Eating wine", + "y": 321 + }, + { + "x": "Note Health", + "y": 311 + }, + { + "x": "Clothing Bags", + "y": 41 + }, + { + "x": "Mother and Baby Products", + "y": 121 + }, + { + "x": "other", + "y": 111 + } + ], + "salesTypeDataOffline": [ + { + "x": "Household Appliances", + "y": 99 + }, + { + "x": "Food and Drink", + "y": 188 + }, + { + "x": "Personal Health", + "y": 344 + }, + { + "x": "Clothing Bags", + "y": 255 + }, + { + "x": "other", + "y": 65 + } + ], + "radarData": [ + { + "name": "personal", + "label": "Quote", + "value": 10 + }, + { + "name": "personal", + "label": "Word of mouth", + "value": 8 + }, + { + "name": "personal", + "label": "Yield", + "value": 4 + }, + { + "name": "personal", + "label": "contribution", + "value": 5 + }, + { + "name": "personal", + "label": "heat", + "value": 7 + }, + { + "name": "team", + "label": "Quote", + "value": 3 + }, + { + "name": "team", + "label": "Word of mouth", + "value": 9 + }, + { + "name": "team", + "label": "Yield", + "value": 6 + }, + { + "name": "team", + "label": "contribution", + "value": 3 + }, + { + "name": "team", + "label": "heat", + "value": 1 + }, + { + "name": "department", + "label": "Quote", + "value": 4 + }, + { + "name": "department", + "label": "Word of mouth", + "value": 1 + }, + { + "name": "department", + "label": "Yield", + "value": 6 + }, + { + "name": "department", + "label": "contribution", + "value": 5 + }, + { + "name": "department", + "label": "heat", + "value": 7 + } + ] +} \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/fake_list.json b/Xzy.KnowledgeBase/wwwroot/data/fake_list.json new file mode 100644 index 0000000..c7c44b4 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/fake_list.json @@ -0,0 +1,762 @@ +[ + { + "id": "fake-list-0", + "owner": "Fu Xiaoxiao", + "title": "Alipay", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png", + "status": "active", + "percent": 61, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "href": "https://ant.design", + "updatedAt": 1599562134333, + "createdAt": 1599562134333, + "subDescription": "It's an inner thing, which they can't reach and can't reach", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 194692, + "newUser": 1107, + "star": 168, + "like": 166, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-1", + "owner": "Qu Lili", + "title": "Angular", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png", + "status": "exception", + "percent": 67, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "href": "https://ant.design", + "updatedAt": 1599554934333, + "createdAt": 1599554934333, + "subDescription": "Hope is a good thing, maybe the best, good things will not die out", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 187530, + "newUser": 1662, + "star": 184, + "like": 134, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-2", + "owner": "Lin Dongdong", + "title": "Ant Design", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png", + "status": "normal", + "percent": 88, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "href": "https://ant.design", + "updatedAt": 1599547734333, + "createdAt": 1599547734333, + "subDescription": "Life is like a box of chocolates, the results are often unexpected", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 150552, + "newUser": 1281, + "star": 114, + "like": 124, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-3", + "owner": "Zhou Xingxing", + "title": "Ant Design Pro", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png", + "status": "active", + "percent": 59, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "href": "https://ant.design", + "updatedAt": 1599540534333, + "createdAt": 1599540534333, + "subDescription": "There are so many pubs in the town, but she just walked into my pub", + "description": "In the development process of middle and Taiwan products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 180730, + "newUser": 1941, + "star": 109, + "like": 120, + "message": 13, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-4", + "owner": "Wu Jiahao", + "title": "Bootstrap", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png", + "status": "exception", + "percent": 83, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png", + "href": "https://ant.design", + "updatedAt": 1599533334333, + "createdAt": 1599533334333, + "subDescription": "At that time I only thought about what I wanted, never wanted what I had", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 159357, + "newUser": 1067, + "star": 139, + "like": 179, + "message": 14, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-5", + "owner": "Zhu Fang You", + "title": "React", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png", + "status": "normal", + "percent": 92, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png", + "href": "https://ant.design", + "updatedAt": 1599526134333, + "createdAt": 1599526134333, + "subDescription": "It's an inner thing, which they can't reach and can't reach", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 126480, + "newUser": 1467, + "star": 151, + "like": 171, + "message": 11, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-6", + "owner": "Fish Sauce", + "title": "Vue", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png", + "status": "active", + "percent": 62, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png", + "href": "https://ant.design", + "updatedAt": 1599518934333, + "createdAt": 1599518934333, + "subDescription": "Hope is a good thing, maybe the best, good things will not die out", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 132662, + "newUser": 1788, + "star": 114, + "like": 115, + "message": 14, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-7", + "owner": "Le Brother", + "title": "Webpack", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png", + "status": "exception", + "percent": 98, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png", + "href": "https://ant.design", + "updatedAt": 1599511734333, + "createdAt": 1599511734333, + "subDescription": "Life is like a box of chocolates, the results are often unexpected", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 190515, + "newUser": 1329, + "star": 105, + "like": 192, + "message": 11, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-8", + "owner": "Tan Xiaoyi", + "title": "Alipay", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png", + "status": "normal", + "percent": 73, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "href": "https://ant.design", + "updatedAt": 1599504534333, + "createdAt": 1599504534333, + "subDescription": "There are so many pubs in the town, but she just walked into my pub", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 146120, + "newUser": 1375, + "star": 144, + "like": 114, + "message": 14, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-9", + "owner": "Zhong Ni", + "title": "Angular", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png", + "status": "active", + "percent": 86, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "href": "https://ant.design", + "updatedAt": 1599497334333, + "createdAt": 1599497334333, + "subDescription": "At that time I only thought about what I wanted, never wanted what I had", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 150379, + "newUser": 1405, + "star": 174, + "like": 123, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-10", + "owner": "Fu Xiaoxiao", + "title": "Ant Design", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png", + "status": "exception", + "percent": 99, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "href": "https://ant.design", + "updatedAt": 1599490134333, + "createdAt": 1599490134333, + "subDescription": "It's an inner thing, which they can't reach and can't reach", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 192197, + "newUser": 1748, + "star": 200, + "like": 141, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-11", + "owner": "Qu Lili", + "title": "Ant Design Pro", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png", + "status": "normal", + "percent": 55, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "href": "https://ant.design", + "updatedAt": 1599482934333, + "createdAt": 1599482934333, + "subDescription": "Hope is a good thing, maybe the best, good things will not die out", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 125408, + "newUser": 1937, + "star": 158, + "like": 183, + "message": 17, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-12", + "owner": "Lin Dongdong", + "title": "Bootstrap", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png", + "status": "active", + "percent": 62, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png", + "href": "https://ant.design", + "updatedAt": 1599475734333, + "createdAt": 1599475734333, + "subDescription": "Life is like a box of chocolates, the results are often unexpected", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 150702, + "newUser": 1303, + "star": 143, + "like": 101, + "message": 20, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-13", + "owner": "Zhou Xingxing", + "title": "React", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png", + "status": "exception", + "percent": 87, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png", + "href": "https://ant.design", + "updatedAt": 1599468534333, + "createdAt": 1599468534333, + "subDescription": "There are so many pubs in the town, but she just walked into my pub", + "description": "In the development process of middle and Taiwan products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 106681, + "newUser": 1051, + "star": 124, + "like": 194, + "message": 17, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-14", + "owner": "Wu Jiahao", + "title": "Vue", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png", + "status": "normal", + "percent": 74, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png", + "href": "https://ant.design", + "updatedAt": 1599461334333, + "createdAt": 1599461334333, + "subDescription": "At that time I only thought about what I wanted, never wanted what I had", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 192810, + "newUser": 1574, + "star": 188, + "like": 124, + "message": 16, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-15", + "owner": "Zhu Fang You", + "title": "Webpack", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png", + "status": "active", + "percent": 58, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png", + "href": "https://ant.design", + "updatedAt": 1599454134333, + "createdAt": 1599454134333, + "subDescription": "It's an inner thing, which they can't reach and can't reach", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 129396, + "newUser": 1837, + "star": 106, + "like": 160, + "message": 13, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-16", + "owner": "Fish sauce", + "title": "Alipay", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png", + "status": "exception", + "percent": 77, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "href": "https://ant.design", + "updatedAt": 1599446934333, + "createdAt": 1599446934333, + "subDescription": "Hope is a good thing, maybe the best, good things will not die out", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 101826, + "newUser": 1050, + "star": 124, + "like": 111, + "message": 12, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-17", + "owner": "Le brother", + "title": "Angular", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png", + "status": "normal", + "percent": 79, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "href": "https://ant.design", + "updatedAt": 1599439734333, + "createdAt": 1599439734333, + "subDescription": "Life is like a box of chocolates, the results are often unexpected", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 156853, + "newUser": 1826, + "star": 118, + "like": 136, + "message": 19, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Na", + "id": "member3" + } + ] + }, + { + "id": "fake-list-18", + "owner": "Tan Xiaoyi", + "title": "Ant Design", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png", + "status": "active", + "percent": 77, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "href": "https://ant.design", + "updatedAt": 1599432534333, + "createdAt": 1599432534333, + "subDescription": "There are so many pubs in the town, but she just walked into my pub", + "description": "In the development process of Zhongtai products, different design specifications and implementation methods will appear, but there are often many similar pages and components, and these similar components will be separated into a set of standard specifications.", + "activeUser": 101902, + "newUser": 1352, + "star": 131, + "like": 118, + "message": 12, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + }, + { + "id": "fake-list-19", + "owner": "Zoni", + "title": "Ant Design Pro", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "cover": "https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png", + "status": "exception", + "percent": 75, + "logo": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "href": "https://ant.design", + "updatedAt": 1599425334333, + "createdAt": 1599425334333, + "subDescription": "At that time I only thought about what I wanted, never wanted what I had", + "description": "Different design specifications and implementations in the research and development of the MTD product, but there are often many similar pages and components, which will be detached into a standard specification.", + "activeUser": 125791, + "newUser": 1504, + "star": 174, + "like": 195, + "message": 17, + "content": "Paragraph: Ant.design, the design platform of Ant Financial, seamlessly connects to the ecosystem of Ant Financial with minimal workload, and provides experience solutions that span design and development. Ant.design, the design platform of Ant Financial, uses the smallestWorkload, seamless access to Ant Financial's ecology, providing experience solutions that span design and development.", + "members": [ + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png", + "name": "Qu Lili", + "id": "member1" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png", + "name": "Wang Zhaojun", + "id": "member2" + }, + { + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png", + "name": "Dong Nana", + "id": "member3" + } + ] + } +] \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/menu.json b/Xzy.KnowledgeBase/wwwroot/data/menu.json new file mode 100644 index 0000000..0d84d05 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/menu.json @@ -0,0 +1,170 @@ +[ + { + "path": "/dashboard", + "name": "Dashboard", + "key": "dashboard", + "icon": "dashboard", + "children": [ + { + "path": "/", + "name": "Analysis Page", + "key": "dashboard.analysis" + }, + { + "path": "/dashboard/monitor", + "name": "Monitoring Page", + "key": "dashboard.monitor" + }, + { + "path": "/dashboard/workplace", + "name": "Workbench", + "key": "dashboard.workplace" + } + ] + }, + { + "path": "/form", + "name": "Form page", + "key": "form", + "icon": "form", + "children": [ + { + "path": "/form/basic-form", + "name": "Basic Form", + "key": "form.basic-form" + }, + { + "path": "/form/step-form", + "name": "Step Form", + "key": "form.step-form" + }, + { + "path": "/form/advanced-form", + "name": "Advanced Form", + "key": "form.advanced-form" + } + ] + }, + { + "path": "/list", + "name": "List", + "key": "list", + "icon": "table", + "children": [ + { + "path": "/list/search", + "name": "Search List", + "key": "list.search", + "children": [ + { + "path": "/list/search/articles", + "name": "Search List (Article)", + "key": "list.search.articles" + }, + { + "path": "/list/search/projects", + "name": "Search List (Items)", + "key": "list.search.projects" + }, + { + "path": "/list/search/applications", + "name": "Search List (Application)", + "key": "list.search.applications" + } + ] + }, + { + "path": "/list/table-list", + "name": "Inquiry Form", + "key": "list.table-list" + }, + { + "path": "/list/basic-list", + "name": "Basic List", + "key": "list.basic-list" + }, + { + "path": "/list/card-list", + "name": "Card List", + "key": "list.card-list" + } + ] + }, + { + "path": "/profile", + "name": "Profile", + "key": "profile", + "icon": "profile", + "children": [ + { + "path": "/profile/basic", + "name": "Basic Profile", + "key": "profile.basic" + }, + { + "path": "/profile/advanced", + "name": "Advanced Profile", + "key": "profile.advanced" + } + ] + }, + { + "path": "/result", + "name": "Result Pages", + "key": "result", + "icon": "check-circle", + "children": [ + { + "path": "/result/success", + "name": "Success Page", + "key": "result.success" + }, + { + "path": "/result/fail", + "name": "Failed page", + "key": "result.fail" + } + ] + }, + { + "path": "/exception", + "name": "Error Pages", + "key": "exception", + "icon": "exception", + "children": [ + { + "path": "/exception/403", + "name": "403", + "key": "exception.403" + }, + { + "path": "/exception/404", + "name": "404", + "key": "exception.404" + }, + { + "path": "/exception/500", + "name": "500", + "key": "exception.500" + } + ] + }, + { + "path": "/account", + "name": "Account", + "key": "account", + "icon": "user", + "children": [ + { + "path": "/account/center", + "name": "Account Center", + "key": "account.center" + }, + { + "path": "/account/settings", + "name": "Personal settings", + "key": "account.settings" + } + ] + } +] \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/notice.json b/Xzy.KnowledgeBase/wwwroot/data/notice.json new file mode 100644 index 0000000..8fd7b4a --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/notice.json @@ -0,0 +1,62 @@ +[ + { + "id": "xxx1", + "title": "Alipay", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png", + "description": "It's an inner thing, which they can't reach and can't reach", + "updatedAt": "2020-08-26T10:21:19.719Z", + "member": "Scientific Moving Brick Group", + "href": "", + "memberLink": "" + }, + { + "id": "xxx2", + "title": "Angular", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png", + "description": "Hope is a good thing, maybe the best, good things will not die out", + "updatedAt": "2017-07-24T00:00:00.000Z", + "member": "The whole group is Wu Yanzu", + "href": "", + "memberLink": "" + }, + { + "id": "xxx3", + "title": "Ant Design", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png", + "description": "There are so many pubs in the town, but she just walked into my pub", + "updatedAt": "2020-08-26T10:21:19.719Z", + "member": "Second Girl Group", + "href": "", + "memberLink": "" + }, + { + "id": "xxx4", + "title": "Ant Design Pro", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png", + "description": "At that time I only thought about what I wanted, never wanted what I had", + "updatedAt": "2017-07-23T00:00:00.000Z", + "member": "Programmer's Daily", + "href": "", + "memberLink": "" + }, + { + "id": "xxx5", + "title": "Bootstrap", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png", + "description": "Shiver", + "updatedAt": "2017-07-23T00:00:00.000Z", + "member": "Highly Compelling Design Sky Mission", + "href": "", + "memberLink": "" + }, + { + "id": "xxx6", + "title": "React", + "logo": "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png", + "description": "Life is like a box of chocolates, the results are often unexpected", + "updatedAt": "2017-07-23T00:00:00.000Z", + "member": "Lie to you to learn computer", + "href": "", + "memberLink": "" + } +] \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/data/notices.json b/Xzy.KnowledgeBase/wwwroot/data/notices.json new file mode 100644 index 0000000..8f8efe3 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/data/notices.json @@ -0,0 +1,97 @@ +[ + { + "id": "000000001", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "You have received 14 new weekly reports", + "datetime": "2017-08-09", + "type": "notification" + }, + { + "id": "000000002", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png", + "title":"The Qu Nini you recommended has passed the third round of interview", + "datetime": "2017-08-08", + "type": "notification" + }, + { + "id": "000000003", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png", + "title": "This template can distinguish multiple notification types", + "datetime": "2017-08-07", + "read": true, + "type": "notification" + }, + { + "id": "000000004", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png", + "title": "The icon on the left is used to distinguish different types", + "datetime": "2017-08-07", + "type": "notification" + }, + { + "id": "000000005", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "The content should not exceed two lines, and it will be automatically truncated when exceeded", + "datetime": "2017-08-07", + "type": "notification" + }, + { + "id": "000000006", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg", + "title": "Qu Lili commented on you", + "description": "Description information description information description information", + "datetime": "2017-08-07", + "type": "message", + "clickClose": true + }, + { + "id": "000000007", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg", + "title": "Zhu Fangyou replied to you", + "description": "This template is used to remind who has interacted with you, put the avatar of 'who' on the left", + "datetime": "2017-08-07", + "type": "message", + "clickClose": true + }, + { + "id": "000000008", + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg", + "title": "Title", + "description": "This template is used to remind who has interacted with you, put the avatar of 'who' on the left", + "datetime": "2017-08-07", + "type": "message", + "clickClose": true + }, + { + "id": "000000009", + "title": "Task Name", + "description": "The task needs to be started before 20:00 on 2017-01-12", + "extra": "has not started", + "status": "todo", + "type": "event" + }, + { + "id": "000000010", + "title": "Emergency third-party code changes", + "description": "Guan Lin is submitted to 2017-01-06, you need to complete the code change task before 2017-01-07", + "extra": "Expiring soon", + "status": "urgent", + "type": "event" + }, + { + "id": "000000011", + "title": "Information Security Exam", + "description": "Assign Zhuer to complete the update and release before 2017-01-09", + "extra": "It took 8 days", + "status": "doing", + "type": "event" + }, + { + "id": "000000012", + "title": "ABCD Version release", + "description": "Guanlin submitted on 2017-01-06, the code change task must be completed before 2017-01-07", + "extra": "processing", + "status": "processing", + "type": "event" + } +] \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/favicon.ico b/Xzy.KnowledgeBase/wwwroot/favicon.ico new file mode 100644 index 0000000..60a4278 Binary files /dev/null and b/Xzy.KnowledgeBase/wwwroot/favicon.ico differ diff --git a/Xzy.KnowledgeBase/wwwroot/index.html b/Xzy.KnowledgeBase/wwwroot/index.html new file mode 100644 index 0000000..4f49b71 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + + Ant Design Pro Blazor + + + + + + + + + + +
    + +
    + logo +
    +
    + +
    +
    +
    + + Ant Design Blazor
    +
    +
    +
    + + + + + + + + \ No newline at end of file diff --git a/Xzy.KnowledgeBase/wwwroot/pro_icon.svg b/Xzy.KnowledgeBase/wwwroot/pro_icon.svg new file mode 100644 index 0000000..e075b78 --- /dev/null +++ b/Xzy.KnowledgeBase/wwwroot/pro_icon.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file