mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
表单设计
This commit is contained in:
parent
ecb189d1a8
commit
4abf45e41a
@ -86,6 +86,7 @@
|
|||||||
<Compile Include="Extention\WF_Runtime.cs" />
|
<Compile Include="Extention\WF_Runtime.cs" />
|
||||||
<Compile Include="Extention\WF_RuntimeInitModel.cs" />
|
<Compile Include="Extention\WF_RuntimeInitModel.cs" />
|
||||||
<Compile Include="Extention\WF_RuntimeModel.cs" />
|
<Compile Include="Extention\WF_RuntimeModel.cs" />
|
||||||
|
<Compile Include="WFFormService.cs" />
|
||||||
<Compile Include="WFProcessInstanceService.cs" />
|
<Compile Include="WFProcessInstanceService.cs" />
|
||||||
<Compile Include="WFRuntimeService.cs" />
|
<Compile Include="WFRuntimeService.cs" />
|
||||||
<Compile Include="WFSchemeService.cs" />
|
<Compile Include="WFSchemeService.cs" />
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenAuth.App.ViewModel;
|
||||||
|
using OpenAuth.Domain;
|
||||||
using OpenAuth.Domain.Interface;
|
using OpenAuth.Domain.Interface;
|
||||||
|
|
||||||
namespace OpenAuth.Domain.Service
|
namespace OpenAuth.App
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表单服务
|
/// 表单服务
|
||||||
@ -32,5 +34,19 @@ namespace OpenAuth.Domain.Service
|
|||||||
{
|
{
|
||||||
_unitWork.Delete<WFFrmMain>(u =>keyValue.Contains(u.Id));
|
_unitWork.Delete<WFFrmMain>(u =>keyValue.Contains(u.Id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GridData Load(int pageCurrent, int pageSize)
|
||||||
|
{
|
||||||
|
var result = new GridData
|
||||||
|
{
|
||||||
|
page = pageCurrent
|
||||||
|
};
|
||||||
|
|
||||||
|
int cnt = _unitWork.Find<WFFrmMain>(null).Count();
|
||||||
|
result.total = cnt % pageSize == 0 ? cnt / pageSize : cnt / pageSize + 1;
|
||||||
|
result.rows = _unitWork.Find<WFFrmMain>(pageCurrent, pageSize, "ModifyDate descending", null).ToList();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -71,7 +71,6 @@
|
|||||||
<Compile Include="Service\ModuleManService.cs" />
|
<Compile Include="Service\ModuleManService.cs" />
|
||||||
<Compile Include="Service\ResManagerService.cs" />
|
<Compile Include="Service\ResManagerService.cs" />
|
||||||
<Compile Include="Service\StockManagerService.cs" />
|
<Compile Include="Service\StockManagerService.cs" />
|
||||||
<Compile Include="Service\WFFormService.cs" />
|
|
||||||
<Compile Include="Core\Stock.cs" />
|
<Compile Include="Core\Stock.cs" />
|
||||||
<Compile Include="Core\User.cs" />
|
<Compile Include="Core\User.cs" />
|
||||||
<Compile Include="Core\WFFrmMain.cs" />
|
<Compile Include="Core\WFFrmMain.cs" />
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using LeaRun.Util.WebControl;
|
using LeaRun.Util.WebControl;
|
||||||
|
using OpenAuth.App;
|
||||||
using OpenAuth.Domain.Service;
|
using OpenAuth.Domain.Service;
|
||||||
using OpenAuth.Mvc.Controllers;
|
using OpenAuth.Mvc.Controllers;
|
||||||
|
|
||||||
@ -54,10 +55,15 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
|||||||
public ActionResult FrmBuider()
|
public ActionResult FrmBuider()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取数据
|
#region 获取数据
|
||||||
|
|
||||||
|
public string Load(int pageCurrent = 1, int pageSize = 30)
|
||||||
|
{
|
||||||
|
return JsonHelper.Instance.Serialize(_wfFrmMainBll.Load(pageCurrent, pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表单树
|
/// 表单树
|
||||||
|
41
OpenAuth.Mvc/Areas/FlowManage/Views/FormDesign/Index.cshtml
Normal file
41
OpenAuth.Mvc/Areas/FlowManage/Views/FormDesign/Index.cshtml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
@{
|
||||||
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
<!-- #section:basics/content.breadcrumbs -->
|
||||||
|
<div class="breadcrumbs" id="breadcrumbs">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li>
|
||||||
|
<i class="ace-icon fa fa-home home-icon"></i>
|
||||||
|
<a href="#">表单设计</a>
|
||||||
|
</li>
|
||||||
|
<li class="active">列表</li>
|
||||||
|
</ul><!-- /.breadcrumb -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="widget-box widget-color-blue">
|
||||||
|
<div class="widget-header">
|
||||||
|
@Html.Action("MenuHeader", "Home", new {area=""})
|
||||||
|
</div>
|
||||||
|
<div class="widget-body gridwidth">
|
||||||
|
<div class="widget-main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<table id="maingrid"></table>
|
||||||
|
<div id="grid-pager"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.page-content -->
|
||||||
|
|
||||||
|
<script src="~/BllScripts/grid.js"></script>
|
||||||
|
<script src="~/BllScripts/formDesign.js"></script>
|
||||||
|
<script src="~/BllScripts/jqEvent.js"></script>
|
||||||
|
|
120
OpenAuth.Mvc/BllScripts/formDesign.js
Normal file
120
OpenAuth.Mvc/BllScripts/formDesign.js
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
//grid列表模块
|
||||||
|
function MainGrid() {
|
||||||
|
var url = '/FormDesign/Load';
|
||||||
|
this.maingrid = $('#maingrid')
|
||||||
|
.jqGrid({
|
||||||
|
colModel: [
|
||||||
|
{ label: '主键', name: 'Id', hidden: true },
|
||||||
|
{ label: '表单编号', name: 'FrmCode', index: 'FrmCode', width: 100, align: 'left' },
|
||||||
|
{ label: '表单名称', name: 'FrmName', index: 'FrmName', width: 150, align: 'left' },
|
||||||
|
|
||||||
|
{ label: '状态', name: 'EnabledMark', index: 'EnabledMark', hidden: true },
|
||||||
|
{
|
||||||
|
label: "状态", name: "EnabledMarklabel", index: "EnabledMarklabel", width: 50, align: "center",
|
||||||
|
formatter: function (cellvalue, options, rowObject) {
|
||||||
|
if (rowObject.enabledmark == 1) {
|
||||||
|
return '<span class=\"label label-success\">启用</span>';
|
||||||
|
} else if (rowObject.enabledmark == 0) {
|
||||||
|
return '<span class=\"label label-danger\">停用</span>';
|
||||||
|
} else {
|
||||||
|
return '<span class=\"label label-info\">草稿</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ label: "最近编辑用户", name: "ModifyUserName", index: "ModifyUserName", width: 90, align: "left" },
|
||||||
|
{label: "最近编辑时间", name: "ModifyDate", index: "ModifyDate", width: 150, align: "left"},
|
||||||
|
|
||||||
|
{ label: "备注", name: "Description", index: "Description", width: 200, align: "left" }
|
||||||
|
|
||||||
|
],
|
||||||
|
url: url,
|
||||||
|
datatype: "json",
|
||||||
|
|
||||||
|
viewrecords: true,
|
||||||
|
rowNum: 18,
|
||||||
|
pager: "#grid-pager",
|
||||||
|
altRows: true,
|
||||||
|
height: 'auto',
|
||||||
|
multiselect: true,
|
||||||
|
multiboxonly: true,
|
||||||
|
|
||||||
|
loadComplete: function () {
|
||||||
|
var table = this;
|
||||||
|
setTimeout(function () {
|
||||||
|
updatePagerIcons(table);
|
||||||
|
},
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
}).jqGrid('navGrid', "#grid-pager", {
|
||||||
|
edit: false, add: false, del: false, refresh: false, search: false
|
||||||
|
});
|
||||||
|
|
||||||
|
this.reload = function (id) {
|
||||||
|
this.maingrid.jqGrid("setGridParam", { url: url })
|
||||||
|
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
MainGrid.prototype = new Grid();
|
||||||
|
var list = new MainGrid();
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function del() {
|
||||||
|
list.del("Id", "/FlowManage/FormDesign/RemoveForm", function () {
|
||||||
|
list.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//自定义的编辑按钮
|
||||||
|
function edit() {
|
||||||
|
var selected = list.getSelectedObj();
|
||||||
|
if (selected == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title:selected.Code,
|
||||||
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
area: ['1200px', '700px'], //宽高
|
||||||
|
maxmin: true, //开启最大化最小化按钮
|
||||||
|
content: '/FlowManage/FormDesign/FlowFrmBuider?keyValue=' + selected.Id
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建表单模版
|
||||||
|
function add() {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
area: ['1200px', '700px'], //宽高
|
||||||
|
maxmin: true, //开启最大化最小化按钮
|
||||||
|
content: '/FlowManage/FormDesign/FlowFrmBuider',
|
||||||
|
end: function() {
|
||||||
|
list.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//预览
|
||||||
|
function preview() {
|
||||||
|
var selected = list.getSelectedObj();
|
||||||
|
if (selected == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
area: ['1200px', '700px'], //宽高
|
||||||
|
maxmin: true, //开启最大化最小化按钮
|
||||||
|
content: '/FlowManage/FormDesign/PreviewIndex?keyValue=' + selected.Id + "&FrmVersion=" + selected.FrmVersion,
|
||||||
|
end: function () {
|
||||||
|
list.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -179,6 +179,7 @@
|
|||||||
<Content Include="BllScripts\assignModule.js" />
|
<Content Include="BllScripts\assignModule.js" />
|
||||||
<Content Include="BllScripts\assignModuleElement.js" />
|
<Content Include="BllScripts\assignModuleElement.js" />
|
||||||
<Content Include="BllScripts\categoryManager.js" />
|
<Content Include="BllScripts\categoryManager.js" />
|
||||||
|
<Content Include="BllScripts\formDesign.js" />
|
||||||
<Content Include="BllScripts\jqEvent.js" />
|
<Content Include="BllScripts\jqEvent.js" />
|
||||||
<Content Include="BllScripts\login.js" />
|
<Content Include="BllScripts\login.js" />
|
||||||
<Content Include="BllScripts\parentTreeMultiple.js" />
|
<Content Include="BllScripts\parentTreeMultiple.js" />
|
||||||
@ -1470,6 +1471,7 @@
|
|||||||
<Content Include="Areas\FlowManage\Views\FlowLaunch\Index.cshtml" />
|
<Content Include="Areas\FlowManage\Views\FlowLaunch\Index.cshtml" />
|
||||||
<Content Include="Areas\FlowManage\Views\FlowDesign\PreviewIndex.cshtml" />
|
<Content Include="Areas\FlowManage\Views\FlowDesign\PreviewIndex.cshtml" />
|
||||||
<Content Include="Areas\FlowManage\Views\FlowInstances\VerificationForm.cshtml" />
|
<Content Include="Areas\FlowManage\Views\FlowInstances\VerificationForm.cshtml" />
|
||||||
|
<Content Include="Areas\FlowManage\Views\FormDesign\Index.cshtml" />
|
||||||
<None Include="Properties\PublishProfiles\default.pubxml" />
|
<None Include="Properties\PublishProfiles\default.pubxml" />
|
||||||
<None Include="Views\Error\NoAccess.cshtml" />
|
<None Include="Views\Error\NoAccess.cshtml" />
|
||||||
<Content Include="Views\Home\git.cshtml" />
|
<Content Include="Views\Home\git.cshtml" />
|
||||||
|
20320
数据库设计关系图/OpenAuthDB.pdm
20320
数据库设计关系图/OpenAuthDB.pdm
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user