65 lines
1.7 KiB
C#
65 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Furion;
|
|
using Furion.DatabaseAccessor;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using Waste.Application;
|
|
using Waste.Domain;
|
|
|
|
|
|
namespace Waste.Web.Entry.Pages.Result
|
|
{
|
|
/// <summary>
|
|
/// ͳ¼Æ±¨±í
|
|
/// </summary>
|
|
public class IndexModel : BaseModel
|
|
{
|
|
public string defaulttime = "";
|
|
|
|
private readonly ResultColumnConfigService columnConfigService;
|
|
|
|
public IndexModel(ResultColumnConfigService columnConfigService)
|
|
{
|
|
|
|
this.columnConfigService = columnConfigService;
|
|
}
|
|
|
|
public async Task OnGetAsync()
|
|
{
|
|
defaulttime = $"{DateTime.Now.Date} ~ {DateTime.Now.Date.AddDays(1).AddSeconds(-1)}";
|
|
|
|
|
|
//var value = await service.GetAccountConfig(Baseuser.UserId);
|
|
Column = await columnConfigService.GetAccountColumn();
|
|
|
|
DefaultColumn = await columnConfigService.GetAccountDefaultColumn();
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<IActionResult> OnPostUpdateAccountConfigAsync([FromBody] List<ColumnConfig> input)
|
|
{
|
|
await columnConfigService.WriteAccountConfig(input);
|
|
//await service.UpdateAccountConfig(Baseuser.UserId, config);
|
|
return Content("ok");
|
|
}
|
|
|
|
public Dictionary<string, string> Column { get; set; }
|
|
//private static Dictionary<string, string> EmptyColumn = new Dictionary<string, string>();
|
|
|
|
public Dictionary<string, string> DefaultColumn = new Dictionary<string, string>();
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|