123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- @page "/gatherdatas"
- @using aipmgr.Models
- @inject IJSRuntime JS
- <Table @ref="GatherDataTable" TItem="GatherDataModel" AllowResizing="true"
- IsPagination="true" PageItemsSource="@PageItemsSource" IsStriped="true" IsBordered="true" IsMultipleSelect="true"
- ShowToolbar="true" ShowSearch="true" ShowExtendButtons="true" ShowEmpty="true" ShowLoading="true"
- ShowDefaultButtons="false" EditDialogSize="Size.Large" ShowExtendEditButton="false" ShowExtendDeleteButton="false"
- ExtendButtonColumnWidth="200" SearchModel="@SearchModel" SearchMode="SearchMode.Top" ShowDeleteButton="false" ShowAddButton="false" ShowEditButton="false"
- OnQueryAsync="@OnSearchModelQueryAsync" OnResetSearchAsync="@OnResetSearchAsync">
- <TableToolbarTemplate>
- <TableToolbarButton TItem="GatherDataModel" Color="BootstrapBlazor.Components.Color.Success" Icon="fa fa-plus" Text="新建" TooltipText="新建采集分类" OnClick="@OnAddAsync" />
- </TableToolbarTemplate>
- <TableColumns>
- <TableColumn @bind-Field="@context.CategoryName" TextWrap="false" TextEllipsis="true" Width="130" />
- <TableColumn @bind-Field="@context.OrganizationName" TextWrap="false" Width="50" TextEllipsis="true" />
- <TableColumn @bind-Field="@context.GathererName" Width="120" TextWrap="false" TextEllipsis="true" />
- <TableColumn @bind-Field="@context.ModelType" TextWrap="false" Width="50" TextEllipsis="true" />
- <TableColumn @bind-Field="@context.Source" Width="120" TextWrap="false" TextEllipsis="true" />
- <TableColumn @bind-Field="@context.CollectionQuantity" Width="120" TextWrap="false" TextEllipsis="true" />
- <TableColumn @bind-Field="@context.GatherTime" Width="200" TextWrap="false" TextEllipsis="true">
- <Template Context="value">
- @if (value != null)
- {
- <span>@(value.Value.StartTimeString) — @(value.Value.EndTimeString)</span>
- }
- </Template>
- </TableColumn>
- <TableColumn @bind-Field="@context.SettlementTime" TextWrap="false" Width="175" TextEllipsis="true" FormatString="yyyy-MM-dd" />
- </TableColumns>
- <SearchTemplate>
- <div class="row g-3 form-inline">
- <div class="col-12 col-sm-4">
- <Select @bind-Value="@context.OrganizationId" Items="@_organizationItems" ShowLabel="true" />
- </div>
- <div class="col-12 col-sm-4">
- <BootstrapInput TValue="string" @bind-Value="@context.CategoryName" ShowLabel="true" PlaceHolder="请输入..." />
- </div>
- <div class="col-12 col-sm-4">
- <BootstrapInput TValue="string" @bind-Value="@context.GathererName" ShowLabel="true" PlaceHolder="请输入..." />
- </div>
- <div class="col-12 col-sm-4">
- <BootstrapInput TValue="string" @bind-Value="@context.ModelType" ShowLabel="true" PlaceHolder="请输入..." />
- </div>
- <div class="col-12 col-sm-4">
- <BootstrapInput TValue="string" @bind-Value="@context.Source" ShowLabel="true" PlaceHolder="请输入..." />
- </div>
- <div class="col-12 col-sm-4">
- <DateTimeRange DisplayText="结算时间" ShowLabel="true" ShowSidebar="true" @bind-Value="@SettlementTimeRange" />
- </div>
- </div>
- </SearchTemplate>
- <RowButtonTemplate Context="value">
- <Button Size="Size.ExtraSmall" Color="BootstrapBlazor.Components.Color.Primary" Icon="fa fa-edit" Text="编辑" OnClickWithoutRender="@(()=>OnEditAsync(value) )" />
- </RowButtonTemplate>
- </Table>
- <Modal @ref="_createOrEditModal" OnCloseAsync="OnCloseAsync">
- <ModalDialog ShowCloseButton="true" IsCentered="true" Size="Size.Medium" Title="@_title">
- <BodyTemplate>
- <ValidateForm Model="_currentGatherData">
- <div class="row g-3 form-inline">
- <div class="col-12 col-sm-12">
- <Select Items="@_organizationItems" @bind-Value="@_currentGatherData.OrganizationId" OnSelectedItemChanged="OnOrganizationChanged" />
- </div>
- <div class="col-12 col-sm-12">
- <Select Items="@_categoryItems" @bind-Value="@_currentGatherData.CategoryId" OnSelectedItemChanged="OnGatherCategoryChanged" />
- </div>
- <div class="col-12 col-sm-12">
- <Select Items="@_gathererItems" @bind-Value="@_currentGatherData.GathererId" OnSelectedItemChanged="OnGatherChanged" />
- </div>
- <div class="col-12 col-sm-12">
- <BootstrapInput @bind-Value="@_currentGatherData.ModelType" />
- </div>
- <div class="col-12 col-sm-12">
- <BootstrapInput @bind-Value="@_currentGatherData.Source" />
- </div>
- <div class="col-12 col-sm-12">
- <BootstrapInput @bind-Value="@_currentGatherData.CollectionQuantity" />
- </div>
- <div class="col-12 col-sm-12">
- <DateTimeRange DisplayText="采集日期" ShowLabel="true" ShowSidebar="true" @bind-Value="@GatherTimeRange" />
- </div>
- <div class="col-12 col-sm-12">
- <DateTimePicker @bind-Value="@_currentGatherData.SettlementTime" />
- </div>
- </div>
- </ValidateForm>
- </BodyTemplate>
- <FooterTemplate>
- <Button Text="确定" Icon="fa fa-check" OnClick="@OnConfirmAsync" />
- </FooterTemplate>
- </ModalDialog>
- </Modal>
- <MessageBase @ref="_messageBaseRef"></MessageBase>
|