优化 登录流程
This commit is contained in:
parent
dcc3664b0c
commit
f3932cfaef
|
|
@ -17,6 +17,9 @@
|
||||||
<SpaceItem>
|
<SpaceItem>
|
||||||
<Icon Class="action" Type="reload" Theme="outline" OnClick="Reload" />
|
<Icon Class="action" Type="reload" Theme="outline" OnClick="Reload" />
|
||||||
</SpaceItem>
|
</SpaceItem>
|
||||||
|
<SpaceItem>
|
||||||
|
<Icon Type="api" Theme="outline" OnClick="ToSwagger" />
|
||||||
|
</SpaceItem>
|
||||||
</Space>
|
</Space>
|
||||||
</HeaderContentRender>
|
</HeaderContentRender>
|
||||||
<RightContentRender>
|
<RightContentRender>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using AntDesign.ProLayout;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||||
using Microsoft.Identity.Client.Extensions.Msal;
|
using Microsoft.Identity.Client.Extensions.Msal;
|
||||||
|
using Microsoft.JSInterop;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ namespace VideoAnalysisRazor.Layouts
|
||||||
|
|
||||||
[Inject] IHttpContextAccessor HttpContextAccessor { get; set; } = default!;
|
[Inject] IHttpContextAccessor HttpContextAccessor { get; set; } = default!;
|
||||||
[Inject] private ReuseTabsService TabService { get; set; }
|
[Inject] private ReuseTabsService TabService { get; set; }
|
||||||
|
[Inject] private IJSRuntime JSRuntime { get; set; }
|
||||||
[Inject] private ProtectedSessionStorage session { get; set; } = default!;
|
[Inject] private ProtectedSessionStorage session { get; set; } = default!;
|
||||||
|
|
||||||
bool collapsed;
|
bool collapsed;
|
||||||
|
|
@ -34,6 +36,13 @@ namespace VideoAnalysisRazor.Layouts
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
_menuData = [
|
_menuData = [
|
||||||
|
new MenuDataItem
|
||||||
|
{
|
||||||
|
Path = "/",
|
||||||
|
Name = "任务队列",
|
||||||
|
Key = "VideoTaskPage",
|
||||||
|
Icon = "unordered-list",
|
||||||
|
},
|
||||||
new MenuDataItem
|
new MenuDataItem
|
||||||
{
|
{
|
||||||
Path = "/Project",
|
Path = "/Project",
|
||||||
|
|
@ -43,10 +52,10 @@ namespace VideoAnalysisRazor.Layouts
|
||||||
},
|
},
|
||||||
new MenuDataItem
|
new MenuDataItem
|
||||||
{
|
{
|
||||||
Path = "/",
|
Path = "/Login",
|
||||||
Name = "任务队列",
|
Name = "登录页",
|
||||||
Key = "VideoTaskPage",
|
Key = "Login",
|
||||||
Icon = "unordered-list",
|
HideInMenu = true,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -59,6 +68,10 @@ namespace VideoAnalysisRazor.Layouts
|
||||||
{
|
{
|
||||||
TabService.ReloadPage();
|
TabService.ReloadPage();
|
||||||
}
|
}
|
||||||
|
async Task ToSwagger()
|
||||||
|
{
|
||||||
|
await JSRuntime.InvokeVoidAsync("open", "/swagger/index.html", "_blank");
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
@using SqlSugar
|
@using SqlSugar
|
||||||
@using VideoAnalysisCore.Model
|
@using VideoAnalysisCore.Model
|
||||||
@using VideoAnalysisCore.Model.Dto
|
@using VideoAnalysisCore.Model.Dto
|
||||||
|
@attribute [ReuseTabsPage(Ignore = true)]
|
||||||
|
|
||||||
<section style="width:100%;height:100%">
|
<section style="width:100%;height:100%">
|
||||||
<!-- 背景颜色 -->
|
<!-- 背景颜色 -->
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace Learn.VideoAnalysis.Controllers
|
||||||
/// <param name="tagId">×Ô¶¨Òåid</param>
|
/// <param name="tagId">×Ô¶¨Òåid</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet(Name = "TaskInfo")]
|
[HttpGet(Name = "TaskInfo")]
|
||||||
public async Task<IActionResult> TaskInfo(long taskId,string tagId)
|
public async Task<IActionResult> TaskInfo(long taskId,string? tagId)
|
||||||
{
|
{
|
||||||
var task = await videoTaskDB.AsQueryable()
|
var task = await videoTaskDB.AsQueryable()
|
||||||
.WhereIF(taskId!=0, s => s.Id == taskId)
|
.WhereIF(taskId!=0, s => s.Id == taskId)
|
||||||
|
|
|
||||||
|
|
@ -50,21 +50,16 @@ namespace VideoAnalysisCore.Model.Dto
|
||||||
[DisplayName("媒体路径")]
|
[DisplayName("媒体路径")]
|
||||||
public string MediaUrl { get; set; } = string.Empty;
|
public string MediaUrl { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义值 任务完成后附带通知
|
/// 自定义ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("自定义值")]
|
[DisplayName("自定义ID")]
|
||||||
public string? Tag { get; set; }
|
public string? TagId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 消耗token
|
/// 消耗token
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("消耗Token")]
|
[DisplayName("消耗Token")]
|
||||||
public int TotalTokens { get; set; }
|
public int TotalTokens { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///回调Api地址
|
|
||||||
/// </summary>
|
|
||||||
[DisplayName("回调地址")]
|
|
||||||
public string? CallBackUrl { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("创建时间")]
|
[DisplayName("创建时间")]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue