添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
@@ -0,0 +1,278 @@
|
||||
using HHWMS.Web.Models;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using HHWMS.Web;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
{
|
||||
[Area("system")]
|
||||
[ActionDescription("字典数据")]
|
||||
public partial class SysDictDataController : BaseController
|
||||
{
|
||||
#region Search
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Index()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataListVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
[HttpPost]
|
||||
public string Search(SysDictDataSearcher searcher)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataListVM>(passInit: true);
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
vm.Searcher = searcher;
|
||||
return vm.GetJson(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return vm.GetError();
|
||||
}
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
[HttpPost]
|
||||
public string Search2(SysDictDataListVM2 vm)
|
||||
{
|
||||
return vm.GetJson(false);
|
||||
}
|
||||
|
||||
#endregion Search
|
||||
|
||||
#region Create
|
||||
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create(SysDictDataVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoAdd();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create2(int id, string DictType)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>(passInit: true);
|
||||
vm.Entity.SysDictTypeId = id;
|
||||
vm.Entity.SysDictType = new SysDictType();
|
||||
vm.Entity.SysDictType.DictName = vm.DC.Set<SysDictType>().Find(id).DictName;
|
||||
vm.Entity.DictType = DictType;
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create2(SysDictDataVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoAdd();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid(index: 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Create
|
||||
|
||||
#region Edit
|
||||
|
||||
[ActionDescription("Sys.Edit")]
|
||||
public ActionResult Edit(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Edit")]
|
||||
[HttpPost]
|
||||
[ValidateFormItemOnly]
|
||||
public ActionResult Edit(SysDictDataVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoEdit();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Edit
|
||||
|
||||
#region Delete
|
||||
|
||||
[ActionDescription("Sys.Delete")]
|
||||
public ActionResult Delete(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Delete")]
|
||||
[HttpPost]
|
||||
public ActionResult Delete(string id, IFormCollection nouse)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>(id);
|
||||
vm.DoDelete();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Delete
|
||||
|
||||
#region Details
|
||||
|
||||
[ActionDescription("Sys.Details")]
|
||||
public ActionResult Details(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
#endregion Details
|
||||
|
||||
#region BatchEdit
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult BatchEdit(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult DoBatchEdit(SysDictDataBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
||||
{
|
||||
return PartialView("BatchEdit", vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion BatchEdit
|
||||
|
||||
#region BatchDelete
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult BatchDelete(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult DoBatchDelete(SysDictDataBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||
{
|
||||
return PartialView("BatchDelete", vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion BatchDelete
|
||||
|
||||
#region Import
|
||||
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictDataImportVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import(SysDictDataImportVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Import
|
||||
|
||||
#region Export
|
||||
|
||||
[ActionDescription("Sys.Export")]
|
||||
[HttpPost]
|
||||
public IActionResult ExportExcel(SysDictDataListVM vm)
|
||||
{
|
||||
return vm.GetExportData();
|
||||
}
|
||||
|
||||
#endregion Export
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
{
|
||||
[Area("system")]
|
||||
[ActionDescription("字典类型")]
|
||||
public partial class SysDictTypeController : BaseController
|
||||
{
|
||||
#region Search
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Index()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeListVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
[HttpPost]
|
||||
public string Search(SysDictTypeSearcher searcher)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeListVM>(passInit: true);
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
vm.Searcher = searcher;
|
||||
return vm.GetJson(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return vm.GetError();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Create
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create(SysDictTypeVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoAdd();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Edit
|
||||
[ActionDescription("Sys.Edit")]
|
||||
public ActionResult Edit(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Edit")]
|
||||
[HttpPost]
|
||||
[ValidateFormItemOnly]
|
||||
public ActionResult Edit(SysDictTypeVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoEdit();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Delete
|
||||
[ActionDescription("Sys.Delete")]
|
||||
public ActionResult Delete(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Delete")]
|
||||
[HttpPost]
|
||||
public ActionResult Delete(string id, IFormCollection nouse)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeVM>(id);
|
||||
vm.DoDelete();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Details
|
||||
[ActionDescription("Sys.Details")]
|
||||
public ActionResult Details(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchEdit
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult BatchEdit(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult DoBatchEdit(SysDictTypeBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
||||
{
|
||||
return PartialView("BatchEdit",vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BatchDelete
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult BatchDelete(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult DoBatchDelete(SysDictTypeBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||
{
|
||||
return PartialView("BatchDelete",vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Import
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysDictTypeImportVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import(SysDictTypeImportVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Export
|
||||
[ActionDescription("Sys.Export")]
|
||||
[HttpPost]
|
||||
public IActionResult ExportExcel(SysDictTypeListVM vm)
|
||||
{
|
||||
return vm.GetExportData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using HHWMS.Web.Models;
|
||||
using HHWMS.Web.Support;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Quartz;
|
||||
using Quartz.Impl;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
{
|
||||
[Area("system")]
|
||||
[ActionDescription("定时器")]
|
||||
public partial class SysJobController : BaseController
|
||||
{
|
||||
private readonly IServiceProvider _sp;
|
||||
private readonly GlobalData _gd;
|
||||
private IScheduler _scheduler;
|
||||
private readonly IDataContext _dc;
|
||||
private readonly IUnitWork _unitwork;
|
||||
|
||||
public SysJobController(IServiceProvider sp, GlobalData gd, IDataContext DC, IUnitWork unitwork)
|
||||
{
|
||||
_sp = sp;
|
||||
_gd = gd;
|
||||
_dc = DC;
|
||||
_unitwork = unitwork;
|
||||
}
|
||||
|
||||
#region Search
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Index()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobListVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
[HttpPost]
|
||||
public string Search(SysJobSearcher searcher)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobListVM>(passInit: true);
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
vm.Searcher = searcher;
|
||||
return vm.GetJson(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return vm.GetError();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Search
|
||||
|
||||
#region Create
|
||||
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create(SysJobVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_unitwork.IsExit<SysJob>(x => x.JobName == vm.Entity.JobName))
|
||||
{
|
||||
return FFResult().Alert($"定时器{vm.Entity.JobName}已存在!");
|
||||
}
|
||||
vm.Entity.JobGroup = vm.Entity.JobName;
|
||||
vm.DoAdd();
|
||||
new QuartzService(_sp, _gd, _dc).AddJob(vm.Entity).Wait();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Create
|
||||
|
||||
#region Edit
|
||||
|
||||
[ActionDescription("Sys.Edit")]
|
||||
public ActionResult Edit(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Edit")]
|
||||
[HttpPost]
|
||||
[ValidateFormItemOnly]
|
||||
public ActionResult Edit(SysJobVM vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.DoEdit();
|
||||
new QuartzService(_sp, _gd, _dc).ModJob(vm.Entity);
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Edit
|
||||
|
||||
#region Delete
|
||||
|
||||
[ActionDescription("Sys.Delete")]
|
||||
public ActionResult Delete(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Delete")]
|
||||
[HttpPost]
|
||||
public ActionResult Delete(string id, IFormCollection nouse)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobVM>(id);
|
||||
vm.DoDelete();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Delete
|
||||
|
||||
#region Details
|
||||
|
||||
[ActionDescription("Sys.Details")]
|
||||
public ActionResult Details(string id)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobVM>(id);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
#endregion Details
|
||||
|
||||
#region BatchEdit
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult BatchEdit(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchEdit")]
|
||||
public ActionResult DoBatchEdit(SysJobBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
||||
{
|
||||
return PartialView("BatchEdit", vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion BatchEdit
|
||||
|
||||
#region BatchDelete
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult BatchDelete(string[] IDs)
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobBatchVM>(Ids: IDs);
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.BatchDelete")]
|
||||
public ActionResult DoBatchDelete(SysJobBatchVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||
{
|
||||
return PartialView("BatchDelete", vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion BatchDelete
|
||||
|
||||
#region Import
|
||||
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import()
|
||||
{
|
||||
var vm = Wtm.CreateVM<SysJobImportVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Import")]
|
||||
public ActionResult Import(SysJobImportVM vm, IFormCollection nouse)
|
||||
{
|
||||
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Import
|
||||
|
||||
#region Export
|
||||
|
||||
[ActionDescription("Sys.Export")]
|
||||
[HttpPost]
|
||||
public IActionResult ExportExcel(SysJobListVM vm)
|
||||
{
|
||||
return vm.GetExportData();
|
||||
}
|
||||
|
||||
#endregion Export
|
||||
|
||||
/// <summary>
|
||||
/// 执行一次
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult Execute(int id)
|
||||
{
|
||||
var job = _unitwork.FindSingle<SysJob>(x => x.ID == id);
|
||||
new QuartzService(_sp, _gd, _dc).Execute(job);
|
||||
return FFResult().Message("succeed");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启用或暂停定时器
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IActionResult> PauseOrResume(int id)
|
||||
{
|
||||
var job = _unitwork.FindSingle<SysJob>(x => x.ID == id);
|
||||
ISchedulerFactory factory = new StdSchedulerFactory();
|
||||
_scheduler = await factory.GetScheduler();
|
||||
|
||||
if (job.Status == SysJobEnum.running)
|
||||
{
|
||||
job.Status = SysJobEnum.stoped;
|
||||
_unitwork.Update(job);
|
||||
_scheduler.PauseJob(new JobKey(job.JobName, job.JobGroup)).Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
job.Status = SysJobEnum.running;
|
||||
_unitwork.Update(job);
|
||||
_scheduler.ResumeJob(new JobKey(job.JobName, job.JobGroup)).Wait();
|
||||
}
|
||||
return FFResult().RefreshGrid().Message("succeed");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Quartz;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public class JwtRefreshJob : WtmJob
|
||||
{
|
||||
|
||||
public override Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
/*var _unitwork = new UnitWork(Wtm);
|
||||
var sql = $"DELETE FROM {this.Wtm.DC.GetTableName<PersistedGrant>()} WHERE Expiration<'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}'";
|
||||
this.Wtm.DC.RunSQL(sql);
|
||||
Wtm.DoLog("清理过期的refreshToken", ActionLogTypesEnum.Job, "JwtRefreshJob");
|
||||
|
||||
#region 更新时间
|
||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
||||
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
|
||||
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
|
||||
_unitwork.Update<SysJob>(job);
|
||||
#endregion*/
|
||||
}
|
||||
catch { }
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using HHWMS.Web.Models;
|
||||
using Quartz;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
//[QuartzRepeat(10,10, true, 30)]
|
||||
[PersistJobDataAfterExecution]
|
||||
[DisallowConcurrentExecution]
|
||||
public class TestJob : WtmJob
|
||||
{
|
||||
public override Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
//var sql = $"DELETE FROM {this.Wtm.DC.GetTableName<PersistedGrant>()} WHERE Expiration<'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}'";
|
||||
//this.Wtm.DC.RunSQL(sql);
|
||||
Wtm.DoLog("清理过期的token", ActionLogTypesEnum.Job, "TestJob");
|
||||
|
||||
#region 更新时间
|
||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
||||
if (job != null)
|
||||
{
|
||||
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
|
||||
// 只执行一次 没有下次执行时间
|
||||
if (context.NextFireTimeUtc != null)
|
||||
{
|
||||
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
|
||||
}
|
||||
_unitwork.Update<SysJob>(job);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch { }
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataBatchVM : BaseBatchVM<SysDictData, SysDictData_BatchEdit>
|
||||
{
|
||||
public SysDictDataBatchVM()
|
||||
{
|
||||
ListVM = new SysDictDataListVM();
|
||||
LinkedVM = new SysDictData_BatchEdit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class SysDictData_BatchEdit : BaseVM
|
||||
{
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataTemplateVM : BaseTemplateVM
|
||||
{
|
||||
public ExcelPropety SysDictType_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.SysDictTypeId);
|
||||
|
||||
[Display(Name = "SysDictData.DictSort")]
|
||||
public ExcelPropety DictSort_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.DictSort);
|
||||
|
||||
[Display(Name = "SysDictData.DictLabel")]
|
||||
public ExcelPropety DictLabel_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.DictLabel);
|
||||
|
||||
[Display(Name = "SysDictData.DictValue")]
|
||||
public ExcelPropety DictValue_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.DictValue);
|
||||
|
||||
[Display(Name = "SysDictType.DictType")]
|
||||
public ExcelPropety DictType_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.DictType);
|
||||
|
||||
[Display(Name = "SysDictData.CssClass")]
|
||||
public ExcelPropety CssClass_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.CssClass);
|
||||
|
||||
[Display(Name = "_Admin.Remark")]
|
||||
public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty<SysDictData>(x => x.Remark);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
SysDictType_Excel.DataType = ColumnDataType.ComboBox;
|
||||
SysDictType_Excel.ListItems = DC.Set<SysDictType>().GetSelectListItems(Wtm, y => y.DictName);
|
||||
}
|
||||
}
|
||||
|
||||
public class SysDictDataImportVM : BaseImportVM<SysDictDataTemplateVM, SysDictData>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataListVM : BasePagedListVM<SysDictData_View, SysDictDataSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "system"),
|
||||
};
|
||||
}
|
||||
|
||||
protected override IEnumerable<IGridColumn<SysDictData_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<SysDictData_View>>{
|
||||
this.MakeGridHeader(x => x.DictName_view),
|
||||
this.MakeGridHeader(x => x.DictSort),
|
||||
this.MakeGridHeader(x => x.DictLabel),
|
||||
this.MakeGridHeader(x => x.DictLabelUs),
|
||||
this.MakeGridHeader(x => x.DictValue),
|
||||
this.MakeGridHeader(x => x.DictType),
|
||||
this.MakeGridHeader(x => x.CssClass),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<SysDictData_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<SysDictData>()
|
||||
.CheckEqual(Searcher.SysDictTypeId, x => x.SysDictTypeId)
|
||||
.CheckContain(Searcher.DictLabel, x => x.DictLabel)
|
||||
.CheckContain(Searcher.DictValue, x => x.DictValue)
|
||||
.CheckContain(Searcher.DictType, x => x.DictType)
|
||||
.Select(x => new SysDictData_View
|
||||
{
|
||||
ID = x.ID,
|
||||
DictName_view = x.SysDictType.DictName,
|
||||
DictSort = x.DictSort,
|
||||
DictLabel = x.DictLabel,
|
||||
DictLabelUs = x.DictLabelUs,
|
||||
DictValue = x.DictValue,
|
||||
DictType = x.DictType,
|
||||
CssClass = x.CssClass,
|
||||
Remark = x.Remark,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
public class SysDictData_View : SysDictData
|
||||
{
|
||||
[Display(Name = "SysDictType.DictName")]
|
||||
public String DictName_view { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataListVM2 : BasePagedListVM<SysDictData_View, SysDictDataSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeAction("SysDictData","Create2",Localizer["Sys.Create"],Localizer["Sys.Create"],GridActionParameterTypesEnum.NoId,"system").SetOnClickScript("CreateDictData"),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictData", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "system", dialogWidth: 800),
|
||||
};
|
||||
}
|
||||
|
||||
protected override IEnumerable<IGridColumn<SysDictData_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<SysDictData_View>>{
|
||||
this.MakeGridHeader(x => x.DictName_view),
|
||||
this.MakeGridHeader(x => x.DictSort),
|
||||
this.MakeGridHeader(x => x.DictLabel),
|
||||
this.MakeGridHeader(x => x.DictLabelUs),
|
||||
this.MakeGridHeader(x => x.DictValue),
|
||||
this.MakeGridHeader(x => x.DictType),
|
||||
this.MakeGridHeader(x => x.CssClass),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<SysDictData_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<SysDictData>()
|
||||
.Where(x => x.SysDictTypeId == Searcher.SysDictTypeId)
|
||||
.Select(x => new SysDictData_View
|
||||
{
|
||||
ID = x.ID,
|
||||
DictName_view = x.SysDictType.DictName,
|
||||
DictSort = x.DictSort,
|
||||
DictLabel = x.DictLabel,
|
||||
DictLabelUs = x.DictLabelUs,
|
||||
DictValue = x.DictValue,
|
||||
DictType = x.DictType,
|
||||
CssClass = x.CssClass,
|
||||
Remark = x.Remark,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataSearcher : BaseSearcher
|
||||
{
|
||||
public List<ComboSelectListItem> AllSysDictTypes { get; set; }
|
||||
|
||||
[Display(Name = "SysDictType.DictName")]
|
||||
public int? SysDictTypeId { get; set; }
|
||||
|
||||
[Display(Name = "SysDictData.DictLabel")]
|
||||
public String DictLabel { get; set; }
|
||||
|
||||
[Display(Name = "SysDictData.DictLabelUs")]
|
||||
public String DictLabelUs { get; set; }
|
||||
|
||||
[Display(Name = "SysDictData.DictValue")]
|
||||
public String DictValue { get; set; }
|
||||
|
||||
[Display(Name = "SysDictType.DictType")]
|
||||
public String DictType { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
AllSysDictTypes = DC.Set<SysDictType>().GetSelectListItems(Wtm, y => y.DictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictDataVM : BaseCRUDVM<SysDictData>
|
||||
{
|
||||
public List<ComboSelectListItem> AllSysDictTypes { get; set; }
|
||||
|
||||
public SysDictDataVM()
|
||||
{
|
||||
SetInclude(x => x.SysDictType);
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
AllSysDictTypes = DC.Set<SysDictType>().GetSelectListItems(Wtm, y => y.DictName);
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictTypeBatchVM : BaseBatchVM<SysDictType, SysDictType_BatchEdit>
|
||||
{
|
||||
public SysDictTypeBatchVM()
|
||||
{
|
||||
ListVM = new SysDictTypeListVM();
|
||||
LinkedVM = new SysDictType_BatchEdit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class SysDictType_BatchEdit : BaseVM
|
||||
{
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictTypeTemplateVM : BaseTemplateVM
|
||||
{
|
||||
[Display(Name = "SysDictType.DictName")]
|
||||
public ExcelPropety DictName_Excel = ExcelPropety.CreateProperty<SysDictType>(x => x.DictName);
|
||||
|
||||
[Display(Name = "SysDictType.DictType")]
|
||||
public ExcelPropety DictType_Excel = ExcelPropety.CreateProperty<SysDictType>(x => x.DictType);
|
||||
|
||||
[Display(Name = "_Admin.Remark")]
|
||||
public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty<SysDictType>(x => x.Remark);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SysDictTypeImportVM : BaseImportVM<SysDictTypeTemplateVM, SysDictType>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictTypeListVM : BasePagedListVM<SysDictType_View, SysDictTypeSearcher>
|
||||
{
|
||||
public SysDictDataListVM2 SysDictDatas { get; set; } = new SysDictDataListVM2();
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
SysDictDatas.CopyContext(this);
|
||||
}
|
||||
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "system", dialogWidth: 800),
|
||||
this.MakeStandardAction("SysDictType", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "system"),
|
||||
};
|
||||
}
|
||||
|
||||
protected override IEnumerable<IGridColumn<SysDictType_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<SysDictType_View>>{
|
||||
this.MakeGridHeader(x => x.DictName)
|
||||
.SetFormat((a,b) =>
|
||||
{
|
||||
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.DictName,$"details('{a.ID}')");
|
||||
return rv;
|
||||
}),
|
||||
this.MakeGridHeader(x => x.DictType),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<SysDictType_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<SysDictType>()
|
||||
.CheckContain(Searcher.DictName, x => x.DictName)
|
||||
.CheckContain(Searcher.DictType, x => x.DictType)
|
||||
.CheckContain(Searcher.Remark, x => x.Remark)
|
||||
.Select(x => new SysDictType_View
|
||||
{
|
||||
ID = x.ID,
|
||||
DictName = x.DictName,
|
||||
DictType = x.DictType,
|
||||
Remark = x.Remark,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
public class SysDictType_View : SysDictType
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictTypeSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "SysDictType.DictName")]
|
||||
public String DictName { get; set; }
|
||||
[Display(Name = "SysDictType.DictType")]
|
||||
public String DictType { get; set; }
|
||||
[Display(Name = "_Admin.Remark")]
|
||||
public String Remark { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysDictTypeVM : BaseCRUDVM<SysDictType>
|
||||
{
|
||||
public SysDictTypeVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobBatchVM : BaseBatchVM<SysJob, SysJob_BatchEdit>
|
||||
{
|
||||
public SysJobBatchVM()
|
||||
{
|
||||
ListVM = new SysJobListVM();
|
||||
LinkedVM = new SysJob_BatchEdit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class SysJob_BatchEdit : BaseVM
|
||||
{
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobTemplateVM : BaseTemplateVM
|
||||
{
|
||||
[Display(Name = "SysJob.JobName")]
|
||||
public ExcelPropety JobName_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.JobName);
|
||||
|
||||
[Display(Name = "SysJob.JobGroup")]
|
||||
public ExcelPropety JobGroup_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.JobGroup);
|
||||
|
||||
[Display(Name = "SysJob.MethodName")]
|
||||
public ExcelPropety MethodName_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.MethodName);
|
||||
|
||||
[Display(Name = "SysJob.MethodParams")]
|
||||
public ExcelPropety MethodParams_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.MethodParams);
|
||||
|
||||
[Display(Name = "SysJob.CronExpression")]
|
||||
public ExcelPropety CronExpression_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.CronExpression);
|
||||
|
||||
[Display(Name = "SysJob.LastFireTime")]
|
||||
public ExcelPropety LastFireTime_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.LastFireTime);
|
||||
|
||||
[Display(Name = "SysJob.NextFireTime")]
|
||||
public ExcelPropety NextFireTime_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.NextFireTime);
|
||||
|
||||
[Display(Name = "SysJob.MisfirePolicy")]
|
||||
public ExcelPropety MisfirePolicy_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.MisfirePolicy);
|
||||
|
||||
[Display(Name = "SysJob.Status")]
|
||||
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.Status);
|
||||
|
||||
[Display(Name = "System.Remark")]
|
||||
public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty<SysJob>(x => x.Remark);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SysJobImportVM : BaseImportVM<SysJobTemplateVM, SysJob>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "SysJob.JobName")]
|
||||
public String JobName { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobVM : BaseCRUDVM<SysJob>
|
||||
{
|
||||
public List<ComboSelectListItem> AllJob { get; set; }
|
||||
|
||||
public SysJobVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
List<ComboSelectListItem> rv = new List<ComboSelectListItem>();
|
||||
|
||||
var test = Assembly.Load("HHWMS.Web").GetExportedTypes().Where(x => x.FullName.Contains("HHWMS.Web"));
|
||||
var t = test.Where(x => typeof(WtmJob).IsAssignableFrom(x) && x.Name != "WtmJob");
|
||||
foreach (var st in t)
|
||||
{
|
||||
var ci = st.GetConstructor(Type.EmptyTypes);
|
||||
var job = ci?.Invoke(null) as WtmJob;
|
||||
if (job != null)
|
||||
{
|
||||
string jobName = st.Name;
|
||||
rv.Add(new ComboSelectListItem { Text = jobName, Value = jobName });
|
||||
}
|
||||
}
|
||||
AllJob = rv;
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@model HHWMS.Web.SysDictDataBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysDictDataBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
</wt:row>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,19 @@
|
||||
@model HHWMS.Web.SysDictDataVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:combobox field="Entity.SysDictTypeId" items="AllSysDictTypes"/>
|
||||
<wt:textbox field="Entity.DictSort" />
|
||||
<wt:textbox field="Entity.DictLabel" />
|
||||
<wt:textbox field="Entity.DictLabelUs" />
|
||||
<wt:textbox field="Entity.DictValue" />
|
||||
<wt:textbox field="Entity.DictType" />
|
||||
<wt:textbox field="Entity.CssClass" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,20 @@
|
||||
@model HHWMS.Web.SysDictDataVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.SysDictType.DictName" />
|
||||
<wt:hidden field="Entity.DictType" />
|
||||
<wt:textbox field="Entity.DictSort" />
|
||||
<wt:textbox field="Entity.DictLabel" />
|
||||
<wt:textbox field="Entity.DictLabelUs" />
|
||||
<wt:textbox field="Entity.DictValue" />
|
||||
<wt:textbox field="Entity.CssClass" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.SysDictTypeId"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,20 @@
|
||||
@model HHWMS.Web.SysDictDataVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.SysDictType.DictName" />
|
||||
<wt:display field="Entity.DictSort" />
|
||||
<wt:display field="Entity.DictLabel" />
|
||||
<wt:display field="Entity.DictValue" />
|
||||
<wt:display field="Entity.DictType" />
|
||||
<wt:display field="Entity.CssClass" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,18 @@
|
||||
@model HHWMS.Web.SysDictDataVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.SysDictType.DictName" />
|
||||
<wt:display field="Entity.DictSort" />
|
||||
<wt:display field="Entity.DictLabel" />
|
||||
<wt:display field="Entity.DictLabelUs" />
|
||||
<wt:display field="Entity.DictValue" />
|
||||
<wt:display field="Entity.DictType" />
|
||||
<wt:display field="Entity.CssClass" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,20 @@
|
||||
@model HHWMS.Web.SysDictDataVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:combobox field="Entity.SysDictTypeId" items="AllSysDictTypes" disabled/>
|
||||
<wt:textbox field="Entity.DictSort" />
|
||||
<wt:textbox field="Entity.DictLabel" />
|
||||
<wt:textbox field="Entity.DictLabelUs" />
|
||||
<wt:textbox field="Entity.DictValue" />
|
||||
<wt:hidden field="Entity.DictType" />
|
||||
<wt:textbox field="Entity.CssClass" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysDictDataImportVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:downloadTemplateButton vm="@Model" />
|
||||
</wt:row>
|
||||
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,13 @@
|
||||
@model HHWMS.Web.SysDictDataListVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||
<wt:combobox field="Searcher.SysDictTypeId" items="Searcher.AllSysDictTypes" empty-text="@Localizer["Sys.All"]" />
|
||||
<wt:textbox field="Searcher.DictLabel" />
|
||||
<wt:textbox field="Searcher.DictLabelUs" />
|
||||
<wt:textbox field="Searcher.DictValue" />
|
||||
<wt:textbox field="Searcher.DictType" />
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:grid vm="@Model" url="/system/SysDictData/Search"/>
|
||||
@@ -0,0 +1,12 @@
|
||||
@model HHWMS.Web.SysDictTypeBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysDictTypeBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
</wt:row>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysDictTypeVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:textbox field="Entity.DictName" />
|
||||
<wt:textbox field="Entity.DictType" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,16 @@
|
||||
@model HHWMS.Web.SysDictTypeVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.DictName" />
|
||||
<wt:display field="Entity.DictType" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,13 @@
|
||||
@model HHWMS.Web.SysDictTypeVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.DictName" />
|
||||
<wt:display field="Entity.DictType" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,15 @@
|
||||
@model HHWMS.Web.SysDictTypeVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:textbox field="Entity.DictName" />
|
||||
<wt:textbox field="Entity.DictType" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysDictTypeImportVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:downloadTemplateButton vm="@Model" />
|
||||
</wt:row>
|
||||
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,37 @@
|
||||
@model HHWMS.Web.SysDictTypeListVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:searchpanel vm="@Model" reset-btn="true" grid-id="header">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||
<wt:textbox field="Searcher.DictName" />
|
||||
<wt:textbox field="Searcher.DictType" />
|
||||
<wt:textbox field="Searcher.Remark" />
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:grid vm="@Model" id="header" url="/system/SysDictType/Search"/>
|
||||
<wt:grid vm="@Model.SysDictDatas" id="detail" url="/system/SysDictData/Search2" limit="8" height="300" />
|
||||
|
||||
<script>
|
||||
var headerId = 0;
|
||||
var DictType = "";
|
||||
function details(id) {
|
||||
headerId = id;
|
||||
var loaddata = layui.table.cache['header'];
|
||||
loaddata.forEach(function (val, i) {
|
||||
if (val.ID == id) {
|
||||
DictType = val.DictType;
|
||||
}
|
||||
});
|
||||
layui.table.reload('detail', { where: { "Searcher.SysDictTypeId": id } });
|
||||
}
|
||||
|
||||
function CreateDictData() {
|
||||
if (headerId == 0) {
|
||||
layui.layer.alert('请选择一个字典类型');
|
||||
}
|
||||
else {
|
||||
|
||||
ff.OpenDialog('/system/SysDictData/Create2/' + headerId + "?DictType=" + DictType, '@Guid.NewGuid()', '添加字典明细', 600);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,12 @@
|
||||
@model HHWMS.Web.SysJobBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysJobBatchVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
</wt:row>
|
||||
<wt:hidden field="Ids" />
|
||||
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,16 @@
|
||||
@model HHWMS.Web.SysJobVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:combobox field="Entity.JobName" items="AllJob" />
|
||||
<wt:textbox field="Entity.MethodName" />
|
||||
<wt:textbox field="Entity.MethodParams" />
|
||||
<wt:textbox field="Entity.CronExpression" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,23 @@
|
||||
@model HHWMS.Web.SysJobVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.JobName" />
|
||||
<wt:display field="Entity.JobGroup" />
|
||||
<wt:display field="Entity.MethodName" />
|
||||
<wt:display field="Entity.MethodParams" />
|
||||
<wt:display field="Entity.CronExpression" />
|
||||
<wt:display field="Entity.LastFireTime" />
|
||||
<wt:display field="Entity.NextFireTime" />
|
||||
<wt:display field="Entity.MisfirePolicy" />
|
||||
<wt:display field="Entity.Status" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,20 @@
|
||||
@model HHWMS.Web.SysJobVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:display field="Entity.JobName" />
|
||||
<wt:display field="Entity.JobGroup" />
|
||||
<wt:display field="Entity.MethodName" />
|
||||
<wt:display field="Entity.MethodParams" />
|
||||
<wt:display field="Entity.CronExpression" />
|
||||
<wt:display field="Entity.LastFireTime" />
|
||||
<wt:display field="Entity.NextFireTime" />
|
||||
<wt:display field="Entity.MisfirePolicy" />
|
||||
<wt:display field="Entity.Status" />
|
||||
<wt:display field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,15 @@
|
||||
@model HHWMS.Web.SysJobVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:combobox field="Entity.JobName" disabled/>
|
||||
<wt:textbox field="Entity.CronExpression" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:hidden field="Entity.ID" />
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,14 @@
|
||||
@model HHWMS.Web.SysJobImportVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:downloadTemplateButton vm="@Model" />
|
||||
</wt:row>
|
||||
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
<wt:submitbutton />
|
||||
<wt:closebutton />
|
||||
</wt:row>
|
||||
</wt:form>
|
||||
@@ -0,0 +1,9 @@
|
||||
@model HHWMS.Web.SysJobListVM
|
||||
@inject IStringLocalizer<Program> Localizer;
|
||||
|
||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:textbox field="Searcher.JobName" />
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:grid vm="@Model" url="/system/SysJob/Search" hidden-grid-index="true" />
|
||||
Reference in new issue
Block a user