Learn.VideoAnalysis/VideoAnalysis/Components/Pages/NodeSubscriptionPage.razor

56 lines
2.0 KiB
Plaintext

@page "/NodeSubscriptionPage"
@using AntDesign
@using AntDesign.TableModels
@using System.ComponentModel.DataAnnotations
@using SqlSugar
@using VideoAnalysisCore.Model
@using UserCenter.Model.Enum
<Table @ref="_table" Loading="tableLoading" TItem="NodeSubscription" ScrollY="600px"
PageSize="20" Total="_total" DataSource="_dataSource" @bind-SelectedRows="_selectedRows" OnChange="OnChange">
<TitleTemplate>
<Flex Justify="end" Gap="10">
</Flex>
</TitleTemplate>
<ColumnDefinitions Context="row">
<ActionColumn Title="操作" Width="130px">
<Button Type="primary" @onclick="()=> StartEdit(row)">编辑</Button>
</ActionColumn>
<PropertyColumn Property="c=>c.Id" Width="130px" Filterable="true" Sortable="true" />
<PropertyColumn Property="c=>c.Subject" Filterable="true" Width="130px" />
<PropertyColumn Property="c=>c.TaskType" Width="230px" Filterable="true" />
<PropertyColumn Property="c=>c.NodeId" Width="130px" Filterable="true" />
<PropertyColumn Property="c=>c.Enable" Width="100px" Filterable="true" />
<PropertyColumn Property="c=>c.LastId" Width="200px" />
<PropertyColumn Property="c=>c.CreateTime" />
</ColumnDefinitions>
</Table>
@{
RenderFragment modelfooter = @<Template>
<Button OnClick="@EditOnOkAsync" @key="@( "submit" )"
Type="primary"
Loading="@modalBtnLoading">
提交
</Button>
<Button OnClick="()=>modalShow = false" @key="@( "back" )">取消</Button>
</Template>;
}
<Modal Title="@("编辑订阅节点")" Visible="modalShow" Width="650"
Footer="@modelfooter">
<Form @ref="form" Model="rowData" LabelAlign="AntLabelAlignType.Left">
<GridRow>
<GridCol Span="24">
<FormItem Label="是否启用">
<Switch Rows="1" @bind-Value="@context.Enable" />
</FormItem>
</GridCol>
</GridRow>
</Form>
</Modal>
@code
{
}