添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
@@ -0,0 +1,76 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobListVM : BasePagedListVM<SysJob_View, SysJobSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "system", dialogWidth: 800).SetShowInRow(false).SetHideOnToolBar(false),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "system", dialogWidth: 800),
|
||||
//this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysJob", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "system"),
|
||||
this.MakeAction("SysJob","Execute",Localizer["SysJob.Execute"],null,GridActionParameterTypesEnum.SingleId).SetArea("system").SetShowInRow().SetHideOnToolBar(),
|
||||
this.MakeAction("SysJob","PauseOrResume",Localizer["SysJob.PauseOrResume"],null,GridActionParameterTypesEnum.SingleId).SetArea("system").SetShowInRow().SetHideOnToolBar(),
|
||||
};
|
||||
}
|
||||
|
||||
protected override IEnumerable<IGridColumn<SysJob_View>> InitGridHeader()
|
||||
{
|
||||
var AllJob = Wtm.CreateVM<SysJobVM>().AllJob;
|
||||
return new List<GridColumn<SysJob_View>>{
|
||||
this.MakeGridHeader(x => x.JobName)
|
||||
.SetFormat((entity,v) =>
|
||||
{
|
||||
return AllJob.FirstOrDefault(x => x.Value.ToString() == entity.JobName).Text;
|
||||
}),
|
||||
this.MakeGridHeader(x => x.JobGroup).SetHide(),
|
||||
this.MakeGridHeader(x => x.MethodName).SetHide(),
|
||||
this.MakeGridHeader(x => x.MethodParams).SetHide(),
|
||||
this.MakeGridHeader(x => x.CronExpression, 120),
|
||||
this.MakeGridHeader(x => x.LastFireTime, 150),
|
||||
this.MakeGridHeader(x => x.NextFireTime, 150),
|
||||
this.MakeGridHeader(x => x.MisfirePolicy).SetHide(),
|
||||
this.MakeGridHeader(x => x.Status),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeaderAction(width: 300)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<SysJob_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<SysJob>()
|
||||
.CheckContain(Searcher.JobName, x => x.JobName)
|
||||
.Select(x => new SysJob_View
|
||||
{
|
||||
ID = x.ID,
|
||||
JobName = x.JobName,
|
||||
JobGroup = x.JobGroup,
|
||||
MethodName = x.MethodName,
|
||||
MethodParams = x.MethodParams,
|
||||
CronExpression = x.CronExpression,
|
||||
LastFireTime = x.LastFireTime,
|
||||
NextFireTime = x.NextFireTime,
|
||||
MisfirePolicy = x.MisfirePolicy,
|
||||
Status = x.Status,
|
||||
Remark = x.Remark,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
public class SysJob_View : SysJob
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user