fix 修改加载效果

This commit is contained in:
zyxucp
2024-02-05 14:48:52 +08:00
parent fbcb0a40c1
commit f310e7ec3d
3 changed files with 22 additions and 4 deletions

View File

@@ -10,5 +10,12 @@
</summary>
<returns></returns>
</member>
<member name="M:AntSK.Pages.Kms.KmsDetail.GetDocumentByFileID(System.String)">
<summary>
根据文档ID获取文档
</summary>
<param name="fileid"></param>
<returns></returns>
</member>
</members>
</doc>

View File

@@ -77,9 +77,10 @@
</div>
<Modal Title="链接读取"
@bind-Visible="@_urlVisible"
Visible="@_urlVisible"
OnOk="@UrlHandleOk"
>
OnCancel="@UrlHandleCancel"
ConfirmLoading="@_urlConfirmLoading">
<Form Model="@urlModel"
LabelColSpan="8"
WrapperColSpan="16"

View File

@@ -4,6 +4,7 @@ using AntSK.Domain.Utils;
using AntSK.Models;
using AntSK.Services;
using DocumentFormat.OpenXml.Office2010.Excel;
using DocumentFormat.OpenXml.Vml.Spreadsheet;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.KernelMemory;
@@ -20,6 +21,7 @@ namespace AntSK.Pages.Kms
private readonly KmsDetails _model = new KmsDetails();
bool _urlVisible = false;
bool _urlConfirmLoading = false;
private Form<UrlModel> _urlForm;
private UrlModel urlModel = new UrlModel();
@@ -87,6 +89,7 @@ namespace AntSK.Pages.Kms
{
try
{
_urlConfirmLoading = true;
string fileid = Guid.NewGuid().ToString();
await _memory.ImportWebPageAsync(urlModel.Url, fileid, new TagCollection() { { "kmsid", KmsId } }
, index: "kms");
@@ -99,17 +102,24 @@ namespace AntSK.Pages.Kms
KmsId = KmsId,
Type = "url",
Url = urlModel.Url,
DataCount= docTextList.Count
DataCount= docTextList.Count,
CreateTime=DateTime.Now
};
await _kmsDetails_Repositories.InsertAsync(detial);
_data = await _kmsDetails_Repositories.GetListAsync(p => p.KmsId == KmsId);
_urlVisible = false;
_urlConfirmLoading = false;
}
catch (System.Exception ex)
{
Console.WriteLine(ex.Message+" ---- "+ex.StackTrace);
}
}
private void UrlHandleCancel(MouseEventArgs e)
{
_urlVisible = false;
}
private void ShowUrlModal()
{
_urlVisible = true;