diff --git a/OpenAuth.Mvc/App_Start/BundleConfig.cs b/OpenAuth.Mvc/App_Start/BundleConfig.cs index 0c29829a..f7afaad9 100644 --- a/OpenAuth.Mvc/App_Start/BundleConfig.cs +++ b/OpenAuth.Mvc/App_Start/BundleConfig.cs @@ -32,25 +32,25 @@ namespace OpenAuth.Mvc "~/Content/scripts/plugins/wizard/wizard.css")); bundles.Add(new ScriptBundle("~/Content/scripts/plugins/wizard/js").Include( "~/Content/scripts/plugins/wizard/wizard.js")); - //learun - bundles.Add(new StyleBundle("~/Content/styles/learun-ui.css").Include( - "~/Content/styles/learun-ui.css")); + // + bundles.Add(new StyleBundle("~/Content/styles/ui.css").Include( + "~/Content/styles/ui.css")); bundles.Add(new ScriptBundle("~/Content/scripts/utils/js").Include( - "~/Content/scripts/utils/learun-ui.js", - "~/Content/scripts/utils/learun-form.js")); - //learun Order + "~/Content/scripts/utils/ui.js", + "~/Content/scripts/utils/form.js")); + // Order bundles.Add(new ScriptBundle("~/Content/scripts/plugins/printTable/js").Include( "~/Content/scripts/plugins/printTable/jquery.printTable.js")); //工作流 - bundles.Add(new StyleBundle("~/Content/styles/learun-flowall.css").Include( - "~/Content/styles/learun-ckbox-radio.css", - "~/Content/styles/learun-applayout.css", - "~/Content/styles/learun-flow.css")); + bundles.Add(new StyleBundle("~/Content/styles/flowall.css").Include( + "~/Content/styles/ckbox-radio.css", + "~/Content/styles/applayout.css", + "~/Content/styles/flow.css")); bundles.Add(new ScriptBundle("~/Content/scripts/flow/js").Include( - "~/Content/scripts/utils/learun-applayout.js", + "~/Content/scripts/utils/applayout.js", "~/Content/scripts/plugins/flow-ui/flow.js", - "~/Content/scripts/utils/learun-flowlayout.js")); + "~/Content/scripts/utils/flowlayout.js")); } } } diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs index aa48cf9d..668f65b0 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs @@ -1,10 +1,10 @@ -using System; -using System.Web.Mvc; -using Infrastructure; +using Infrastructure; using OpenAuth.App; using OpenAuth.App.SSO; using OpenAuth.Domain; using OpenAuth.Mvc.Controllers; +using System; +using System.Web.Mvc; namespace OpenAuth.Mvc.Areas.FlowManage.Controllers { @@ -15,6 +15,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers public class FlowInstancesController : BaseController { private WFProcessInstanceService _app; + public FlowInstancesController() { _app = AutofacExt.GetFromFac(); @@ -27,6 +28,16 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers return View(); } + /// + /// 进度查看 + /// + /// + [HttpGet] + public ActionResult ProcessLookForm() + { + return View(); + } + /// /// 审核流程 /// @@ -37,23 +48,97 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers return View(); } - #endregion - - public string Load(string type, int pageCurrent = 1, int pageSize = 30) - { - return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetCurrentUser().User.Id.ToString(), type, pageCurrent, pageSize)); - } - /// - /// 进度查看 + /// 创建流程实例视图 /// /// [HttpGet] - public ActionResult ProcessLookForm() + public ActionResult FlowProcessNewForm() { return View(); } + /// + /// 流程监控 + /// + /// + [HttpGet] + public ActionResult MonitoringIndex() + { + return View(); + } + + /// + /// 流程指派 + /// + /// + [HttpGet] + public ActionResult DesignationIndex() + { + return View(); + } + + /// + /// 流程进度查看 + /// + /// \ + [HttpGet] + public ActionResult ProcessLookFrom() + { + return View(); + } + + /// + /// 流程指派 + /// + /// + [HttpGet] + public ActionResult ProcessDesignate() + { + return View(); + } + + #endregion 视图 + + #region 提交数据 + + /// + /// 创建流程实例 + /// + /// 流程模板信息Id + /// 表单数据 + /// 0发起,3草稿 + /// + [HttpPost] + public string CreateProcess(Guid wfSchemeInfoId, string wfProcessInstanceJson, string frmData) + { + WFProcessInstance wfProcessInstanceEntity = wfProcessInstanceJson.ToObject(); + wfProcessInstanceEntity.Id = Guid.Empty; + if (wfProcessInstanceEntity.EnabledMark == 1)//发起流程 + { + _app.CreateInstance(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); + } + else if (wfProcessInstanceEntity.EnabledMark == 3)//草稿 + { + _app.CreateRoughdraft(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); + } + + return Result.ToJson(); + } + + /// + /// 审核流程 + /// + /// 工作流实例主键Id + /// 审核数据 + /// + [HttpPost] + public string VerificationProcess(Guid processId, string verificationData) + { + _app.VerificationProcess(processId, verificationData); + return Result.ToJson(); + } + /// /// 删除申请 /// @@ -64,7 +149,6 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers foreach (var id in ids) { _app.DeleteProcess(id); - } return Result.ToJson(); } @@ -76,84 +160,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers } } - /// - /// 创建流程实例视图 - /// - /// - [HttpGet] - public ActionResult FlowProcessNewForm() - { - return View(); - } - - - #region 提交数据 - /// - /// 创建流程实例 - /// - /// 流程模板信息Id - /// 表单数据 - /// 0发起,3草稿 - /// - [HttpPost] - public ActionResult CreateProcess(Guid wfSchemeInfoId, string wfProcessInstanceJson, string frmData) - { - WFProcessInstance wfProcessInstanceEntity = wfProcessInstanceJson.ToObject(); - wfProcessInstanceEntity.Id = Guid.Empty; - string text = "创建成功"; - if (wfProcessInstanceEntity.EnabledMark == 1)//发起流程 - { - _app.CreateInstance(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); - } - else if (wfProcessInstanceEntity.EnabledMark == 3)//草稿 - { - _app.CreateRoughdraft(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); - text = "草稿保存成功"; - } - - return Content(text); - } - #endregion - - - #region 视图功能 - /// - /// 流程监控 - /// - /// - [HttpGet] - public ActionResult MonitoringIndex() - { - return View(); - } - /// - /// 流程指派 - /// - /// - [HttpGet] - public ActionResult DesignationIndex() - { - return View(); - } - /// - /// 流程进度查看 - /// - /// \ - [HttpGet] - public ActionResult ProcessLookFrom() - { - return View(); - } - /// - /// 流程指派 - /// - /// - [HttpGet] - public ActionResult ProcessDesignate() - { - return View(); - } - #endregion + #endregion 提交数据 #region 获取数据(公用) @@ -168,6 +175,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers var data = _app.GetProcessSchemeEntity(keyValue); return Content(data.ToJson()); } + /// /// 已办流程进度查看,根据当前访问人的权限查看表单内容 /// @@ -179,6 +187,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers var data = _app.GetProcessSchemeByUserId(keyValue); return Content(data.ToJson()); } + /// /// 已办流程进度查看,根据当前节点的权限查看表单内容 /// @@ -191,6 +200,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers var data = _app.GetProcessSchemeEntityByNodeId(keyValue, nodeId); return Content(data.ToJson()); } + /// /// 获取进程信息 /// @@ -208,6 +218,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers }; return Content(JsonData.ToJson()); } + /// /// 获取进程实例 /// @@ -219,34 +230,12 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers var processInstance = _app.GetProcessInstanceEntity(keyValue); return Content(processInstance.ToJson()); } - #endregion - #region 提交数据 - /// - /// 删除工作流实例进程 - /// - /// 主键值 - /// - [HttpPost] - public ActionResult DeleteProcess(Guid keyValue) + public string Load(string type, int pageCurrent = 1, int pageSize = 30) { - _app.DeleteProcess(keyValue); - return Content("删除成功。"); + return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetCurrentUser().User.Id.ToString(), type, pageCurrent, pageSize)); } - /// - /// 审核流程 - /// - /// 工作流实例主键Id - /// 审核数据 - /// - [HttpPost] - public ActionResult VerificationProcess(Guid processId, string verificationData) - { - _app.VerificationProcess(processId, verificationData); - return Content("审核成功。"); - } - - #endregion + #endregion 获取数据(公用) } } \ No newline at end of file diff --git a/OpenAuth.Mvc/Areas/FlowManage/Views/FlowDesign/FlowNodeForm.cshtml b/OpenAuth.Mvc/Areas/FlowManage/Views/FlowDesign/FlowNodeForm.cshtml index 59809366..9b20686e 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Views/FlowDesign/FlowNodeForm.cshtml +++ b/OpenAuth.Mvc/Areas/FlowManage/Views/FlowDesign/FlowNodeForm.cshtml @@ -2,8 +2,8 @@ ViewBag.Title = "工作流节点设置"; Layout = "~/Views/Shared/_Form.cshtml"; } - - + + - @System.Web.Optimization.Styles.Render("~/Content/styles/learun-flowall.css") + @System.Web.Optimization.Styles.Render("~/Content/styles/flowall.css") @System.Web.Optimization.Scripts.Render("~/Content/scripts/flow/js") diff --git a/OpenAuth.Mvc/Views/Shared/_Form.cshtml b/OpenAuth.Mvc/Views/Shared/_Form.cshtml index 6ee82a55..c0a27aac 100644 --- a/OpenAuth.Mvc/Views/Shared/_Form.cshtml +++ b/OpenAuth.Mvc/Views/Shared/_Form.cshtml @@ -32,14 +32,14 @@ - - - *@ + + + *@ @System.Web.Optimization.Styles.Render("~/Content/scripts/plugins/tree/css", "~/Content/scripts/plugins/datetime/css", "~/Content/scripts/plugins/wizard/css", - "~/Content/styles/learun-ui.css") + "~/Content/styles/ui.css") @System.Web.Optimization.Scripts.Render("~/Content/scripts/plugins/tree/js", "~/Content/scripts/plugins/validator/js", "~/Content/scripts/plugins/wizard/js",