routine update
@@ -214,6 +214,7 @@ namespace OpenAuth.App.Extention
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private string SqlBuider(dynamic schemeContentJson, string frmData, string keyValue)
|
private string SqlBuider(dynamic schemeContentJson, string frmData, string keyValue)
|
||||||
{
|
{
|
||||||
|
return "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (schemeContentJson.Frm.isSystemTable.Value == 1)
|
if (schemeContentJson.Frm.isSystemTable.Value == 1)
|
||||||
|
@@ -84,14 +84,15 @@ namespace OpenAuth.Domain.Service
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WFSchemeInfo GetEntity(string keyValue)
|
public WFSchemeInfo GetEntity(Guid keyValue)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _unitWork.FindSingle<WFSchemeInfo>(u => u.Id == keyValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WFSchemeContent GetSchemeEntity(Guid schemeinfoId, string schemeinfoSchemeVersion)
|
public WFSchemeContent GetSchemeEntity(Guid schemeinfoId, string schemeinfoSchemeVersion)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return _unitWork.FindSingle<WFSchemeContent>(u =>
|
||||||
|
u.SchemeInfoId == schemeinfoId && u.SchemeVersion == schemeinfoSchemeVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateState(string keyValue, int state)
|
public void UpdateState(string keyValue, int state)
|
||||||
|
@@ -14,17 +14,24 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
|||||||
public class CommonAppliesController : Controller
|
public class CommonAppliesController : Controller
|
||||||
{
|
{
|
||||||
private WFProcessInstanceService _app;
|
private WFProcessInstanceService _app;
|
||||||
|
|
||||||
public CommonAppliesController()
|
public CommonAppliesController()
|
||||||
{
|
{
|
||||||
_app = AutofacExt.GetFromFac<WFProcessInstanceService>();
|
_app = AutofacExt.GetFromFac<WFProcessInstanceService>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 视图
|
||||||
|
|
||||||
|
public ActionResult Add()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public string Load(string type, int pageCurrent = 1, int pageSize = 30)
|
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));
|
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetCurrentUser().User.Id.ToString(), type, pageCurrent, pageSize));
|
||||||
|
@@ -84,7 +84,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
|||||||
/// <param name="keyValue">主键</param>
|
/// <param name="keyValue">主键</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult GetFormJson(string keyValue)
|
public ActionResult GetFormJson(Guid keyValue)
|
||||||
{
|
{
|
||||||
var schemeinfo = wfFlowInfoBLL.GetEntity(keyValue);
|
var schemeinfo = wfFlowInfoBLL.GetEntity(keyValue);
|
||||||
var schemecontent = wfFlowInfoBLL.GetSchemeEntity(schemeinfo.Id, schemeinfo.SchemeVersion);
|
var schemecontent = wfFlowInfoBLL.GetSchemeEntity(schemeinfo.Id, schemeinfo.SchemeVersion);
|
||||||
|
@@ -3,16 +3,13 @@ using System.Web.Mvc;
|
|||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using OpenAuth.App;
|
using OpenAuth.App;
|
||||||
using OpenAuth.Domain;
|
using OpenAuth.Domain;
|
||||||
using OpenAuth.Mvc;
|
|
||||||
|
|
||||||
namespace LeaRun.Application.Web.Areas.FlowManage.Controllers
|
namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版 本 6.1
|
/// 流程执行
|
||||||
/// Copyright (c) 2013-2016 上海力软信息技术有限公司
|
/// <para>李玉宝新增于2017-01-23 9:21:39</para>
|
||||||
/// 创建人:陈彬彬
|
|
||||||
/// 日 期:2016.03.19 14:27
|
|
||||||
/// 描 述:流程发起
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class FlowLaunchController : Controller
|
public class FlowLaunchController : Controller
|
||||||
{
|
{
|
||||||
@@ -44,7 +41,7 @@ namespace LeaRun.Application.Web.Areas.FlowManage.Controllers
|
|||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建流程实例
|
/// 创建流程实例视图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
@@ -48,34 +48,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.page-content -->
|
</div><!-- /.page-content -->
|
||||||
<!--编辑对话框-->
|
|
||||||
<div id="editDlg" style="display: none">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<form class="form-horizontal" id="editForm">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label no-padding-right" for=""> 申请名称 </label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input type="text" id="Name" check-type="required" v-model="Name" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label no-padding-right" for=""> 申请描述 </label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input type="text" id="Comment" check-type="required" v-model="Comment" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label no-padding-right" for=""> 流程模板 </label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<select id="WorkflowName" name="WorkflowName" v-model ="WorkflowName"></select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="~/BllScripts/grid.js"></script>
|
<script src="~/BllScripts/grid.js"></script>
|
||||||
<script src="~/BllScripts/commonApply.js"></script>
|
<script src="~/BllScripts/commonApply.js"></script>
|
||||||
|
@@ -260,16 +260,26 @@
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
dialogOpen({
|
|
||||||
id: "FlowLineForm",
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
area: ['800px', '450px'], //宽高
|
||||||
|
maxmin: true, //开启最大化最小化按钮
|
||||||
title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
|
title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
|
||||||
url: '/FlowManage/FlowDesign/FlowNodeForm',
|
content: '/FlowManage/FlowDesign/FlowNodeForm'
|
||||||
width: "750px",
|
|
||||||
height: "430px",
|
|
||||||
callBack: function (iframeId) {
|
|
||||||
top.frames[iframeId].AcceptClick();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//dialogOpen({
|
||||||
|
// id: "FlowLineForm",
|
||||||
|
// title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
|
||||||
|
// url: '/FlowManage/FlowDesign/FlowNodeForm',
|
||||||
|
// width: "750px",
|
||||||
|
// height: "430px",
|
||||||
|
// callBack: function (iframeId) {
|
||||||
|
// top.frames[iframeId].AcceptClick();
|
||||||
|
// }
|
||||||
|
//});
|
||||||
},
|
},
|
||||||
OpenLine: function (id, object) {
|
OpenLine: function (id, object) {
|
||||||
FlowDesignObject = object;
|
FlowDesignObject = object;
|
||||||
|
@@ -0,0 +1,151 @@
|
|||||||
|
@{
|
||||||
|
ViewBag.Title = "发起流程";
|
||||||
|
Layout = "~/Views/Shared/_FlowForm.cshtml";
|
||||||
|
}
|
||||||
|
<script>
|
||||||
|
var keyValue = request('keyValue');
|
||||||
|
$(function () {
|
||||||
|
var schemeContent;
|
||||||
|
$('.FlowPanelall').height($.windowHeight() - 40);
|
||||||
|
$('#Description').height($.windowHeight() - 280);
|
||||||
|
$.SetForm({
|
||||||
|
url: "../../FlowManage/FlowDesign/GetFormJson",
|
||||||
|
param: { keyValue: keyValue },
|
||||||
|
success: function (data) {
|
||||||
|
schemeContent = JSON.parse(data.schemecontent.SchemeContent);
|
||||||
|
$('#frmpreview').frmPreview({
|
||||||
|
tablecotent: schemeContent.Frm.FrmContent
|
||||||
|
});
|
||||||
|
$('#Code').val(data.schemeinfo.SchemeName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//保存为草稿
|
||||||
|
function btn_Roughdraft() {
|
||||||
|
var _postData = $("#ProcessInfo").GetWebControls();
|
||||||
|
_postData["EnabledMark"] = 3;
|
||||||
|
_postData["wfLevel"] = $('input[name="wfLevel"]:checked').val();
|
||||||
|
var _data = $("#frmpreview").frmGetData();
|
||||||
|
$.SaveForm({
|
||||||
|
url: "../../FlowManage/FlowLaunch/CreateProcess",
|
||||||
|
param: { "wfSchemeInfoId": keyValue, "frmData": JSON.stringify(_data), "wfProcessInstanceJson": JSON.stringify(_postData) },
|
||||||
|
loading: "正在保存数据...",
|
||||||
|
success: function () { }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//提交表单
|
||||||
|
function btn_Finish() {
|
||||||
|
if (!$('#ProcessInfo').Validform()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var _postData = $("#ProcessInfo").GetWebControls(keyValue);
|
||||||
|
_postData["EnabledMark"] = 1;
|
||||||
|
_postData["wfLevel"] = $('input[name="wfLevel"]:checked').val();
|
||||||
|
var _data = $("#frmpreview").frmGetData();
|
||||||
|
$.SaveForm({
|
||||||
|
url: "../../FlowManage/FlowLaunch/CreateProcess",
|
||||||
|
param: { "wfSchemeInfoId": keyValue, "frmData": JSON.stringify(_data), "wfProcessInstanceJson": JSON.stringify(_postData) },
|
||||||
|
loading: "正在保存数据...",
|
||||||
|
success: function () { }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="FlowPanelall">
|
||||||
|
<div id="frmpreview" class="tab-pane app_layout app_preview active">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="FlowInfoPanel" id="ProcessInfo">
|
||||||
|
<div style="color:#9f9f9f;padding-bottom:15px;padding-left:5px;"><i style="padding-right:5px;" class="fa fa-info-circle"></i><span>填写左侧表单和实例信息,提交创建</span></div>
|
||||||
|
<table class="form">
|
||||||
|
<tr>
|
||||||
|
<td class="formTitle">流程实例编号<font face="宋体">*</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formValue">
|
||||||
|
<input id="Code" disabled type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formTitle">自定义标题<font face="宋体">*</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formValue">
|
||||||
|
<input id="CustomName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formTitle">重要等级<font face="宋体">*</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formValue">
|
||||||
|
<div class="rdio rdio-color_c"><input name="wfLevel" id="wfLevel1" value="1" type="radio" /><label for="wfLevel1">重要</label></div>
|
||||||
|
<div class="rdio rdio-color_f"><input name="wfLevel" id="wfLevel2" value="2" type="radio" checked /><label for="wfLevel2">普通</label></div>
|
||||||
|
<div class="rdio rdio-color_a"><input name="wfLevel" id="wfLevel3" value="3" type="radio" /><label for="wfLevel3">一般</label></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formTitle">备注</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="formValue">
|
||||||
|
<textarea id="Description" class="form-control" style="height: 383px;"></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-button" >
|
||||||
|
|
||||||
|
<a id="btn_caogao" class="btn btn-info " onclick="btn_Roughdraft();">保存草稿</a>
|
||||||
|
<a id="btn_finish" class="btn btn-success" onclick="btn_Finish();">完成提交</a>
|
||||||
|
</div>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.app_preview .item_field_value {
|
||||||
|
width: 664px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app_preview .item_row {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app_layout .item_field_label {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FlowPanelall {
|
||||||
|
width: 800px;
|
||||||
|
float: left;
|
||||||
|
overflow-y:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FlowInfoPanel {
|
||||||
|
float: right;
|
||||||
|
width: 300px;
|
||||||
|
height: 659px;
|
||||||
|
z-index: 1000;
|
||||||
|
background: rgba(0,0,0,0.01);
|
||||||
|
padding: 10px;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form .formTitle {
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .formTitle font {
|
||||||
|
right: auto !important;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formValue input, .formValue textarea {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, textarea {
|
||||||
|
background: #fff !important;
|
||||||
|
}
|
||||||
|
</style>
|
151
OpenAuth.Mvc/Areas/FlowManage/Views/FlowLaunch/Index.cshtml
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
@{
|
||||||
|
ViewBag.Title = "发起流程";
|
||||||
|
Layout = "~/Views/Shared/_Index.cshtml";
|
||||||
|
}
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
InitialPage();
|
||||||
|
GetSchemeType();
|
||||||
|
GetGrid();
|
||||||
|
GetList();
|
||||||
|
|
||||||
|
});
|
||||||
|
//初始化页面
|
||||||
|
function InitialPage() {
|
||||||
|
//resize重设(表格、树形)宽高
|
||||||
|
$(window).resize(function (e) {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
$("#taskblock").height($(window).height() - 83);
|
||||||
|
$("#itemTree").height($(window).height() - 52);
|
||||||
|
}, 200);
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//加载树
|
||||||
|
function GetSchemeType() {
|
||||||
|
$.SetForm({
|
||||||
|
url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
|
||||||
|
param: { EnCode: "FlowSort" },
|
||||||
|
success: function (data) {
|
||||||
|
$.each(data, function (id,item) {
|
||||||
|
var row = '<li><a data-value="' + item.id + '">' + item.text + '</a></li>';
|
||||||
|
$('#SchemeType').find('ul').append(row);
|
||||||
|
});
|
||||||
|
$('#SchemeType').find('li>a').click(function () {
|
||||||
|
var id = $(this).attr('data-value');
|
||||||
|
var text = $(this).html();
|
||||||
|
var queryJson = { SchemeType: id };
|
||||||
|
GetList({ queryJson: JSON.stringify(queryJson) });
|
||||||
|
$('#SchemeType').find('.dropdown-text').html(text);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//加载模板列表
|
||||||
|
function GetList(param) {
|
||||||
|
$.SetForm({
|
||||||
|
url: "../../FlowManage/FlowDesign/GetListJson",
|
||||||
|
param: param,
|
||||||
|
success: function (data) {
|
||||||
|
var $flowlist = $("#flowlist");
|
||||||
|
$flowlist.html("");
|
||||||
|
if (data.length > 0) {
|
||||||
|
$('.no-data').hide();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.no-data').show();
|
||||||
|
}
|
||||||
|
$.each(data, function (i,item) {
|
||||||
|
var _listhtml = '<li><div style="width: 160px; line-height: 38px;margin-top:11px; float: right;"><a class="btn btn-success createmodel" style="margin-right:4px;">快速新建</a><a class="btn btn-warning previewmodel">模板预览</a></div>';
|
||||||
|
_listhtml += '<div style="float: left;">';
|
||||||
|
_listhtml += '<span class="item-text">' + item.schemecode + '/' + item.schemename + '</span>';
|
||||||
|
_listhtml += '<div><span class=\"label label-success-learun\" data-toggle="tooltip" data-placement="top" title="流程分类" >' + item.schemetypename + '</span>';
|
||||||
|
_listhtml += '<span style="margin-left:5px;" class=\"label label-inverse-learun\" data-toggle="tooltip" data-placement="top" title="版本" >' + item.schemeversion + '</span>';
|
||||||
|
_listhtml += '</div><p>By.' + (item.modifyusername == null ? item.createusername : item.modifyusername) + '-' + (item.modifydate == null ? item.createdate : item.modifydate) + (item.description == null ? '' : (' | 备注:' + item.description)) + '</p>';
|
||||||
|
_listhtml += '</div></li>';
|
||||||
|
var $_listhtml = $(_listhtml);
|
||||||
|
$_listhtml.find('.previewmodel')[0].wfschemeInfoId = item.id;
|
||||||
|
$_listhtml.find('.previewmodel')[0].schemeVersion = item.schemeversion;
|
||||||
|
$_listhtml.find('.previewmodel')[0].schemename = item.schemecode + '/' + item.schemename;
|
||||||
|
|
||||||
|
$_listhtml.find('.createmodel')[0].wfschemeInfoId = item.id;
|
||||||
|
$_listhtml.find('.createmodel')[0].schemename = item.schemecode + '/' + item.schemename;
|
||||||
|
|
||||||
|
$flowlist.append($_listhtml);
|
||||||
|
});
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
//快速新建
|
||||||
|
$('.createmodel').click(function () {
|
||||||
|
var $_btn = $(this).context;
|
||||||
|
var _wfschemeInfoId = $_btn.wfschemeInfoId;
|
||||||
|
var _schemename = $_btn.schemename;
|
||||||
|
dialogOpen({
|
||||||
|
id: "FlowProcessBuider",
|
||||||
|
title: '快速新建【' + _schemename + '】',
|
||||||
|
url: '/FlowManage/FlowLaunch/FlowProcessNewForm?keyValue=' + _wfschemeInfoId,
|
||||||
|
width: "1100px",
|
||||||
|
height: "700px",
|
||||||
|
btn: null,
|
||||||
|
callBack: function (iframeId) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//模板预览
|
||||||
|
$('.previewmodel').click(function () {
|
||||||
|
var $_btn = $(this).context;
|
||||||
|
var _wfschemeInfoId = $_btn.wfschemeInfoId;
|
||||||
|
var _schemeVersion = $_btn.schemeVersion;
|
||||||
|
var _schemename = $_btn.schemename;
|
||||||
|
|
||||||
|
top.tablist.newTab({ id: _wfschemeInfoId + _schemeVersion, title: '流程预览【' + _schemename + '】', closed: true, icon: "fa fa fa-eye", url: top.contentPath + '/FlowManage/FlowLaunch/PreviewIndex?keyValue=' + _wfschemeInfoId + "&schemeVersion=" + _schemeVersion });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//加载表格
|
||||||
|
function GetGrid() {
|
||||||
|
$("#taskblock").height($(window).height() - 83);
|
||||||
|
|
||||||
|
//查询事件
|
||||||
|
$("#btn_Search").click(function () {
|
||||||
|
var queryJson = { Keyword: $("#txt_Keyword").val() };
|
||||||
|
GetList({ queryJson: JSON.stringify(queryJson) });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="titlePanel">
|
||||||
|
<div class="title-search">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div id="SchemeType" class="btn-group">
|
||||||
|
<a class="btn btn-default dropdown-text" data-toggle="dropdown">选择流程分类</a>
|
||||||
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
|
||||||
|
<ul class="dropdown-menu"></ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="padding-left: 5px;">
|
||||||
|
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" style="width: 200px;" />
|
||||||
|
</td>
|
||||||
|
<td style="padding-left: 5px;">
|
||||||
|
<a id="btn_Search" class="btn btn-primary"><i class="fa fa-search"></i> 查询</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="toolbar">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a id="lr-replace" class="btn btn-default" onclick="reload();"><i class="fa fa-refresh"></i> 刷新</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="taskblockPanel">
|
||||||
|
<div id="taskblock" class="taskblock">
|
||||||
|
<ul id="flowlist"></ul>
|
||||||
|
</div>
|
||||||
|
<div class="no-data"></div>
|
||||||
|
</div>
|
||||||
|
|
@@ -0,0 +1,112 @@
|
|||||||
|
@{
|
||||||
|
ViewBag.Title = "流程预览";
|
||||||
|
Layout = "~/Views/Shared/_FlowForm.cshtml";
|
||||||
|
}
|
||||||
|
<link href="~/Content/styles/learun-flow.css" rel="stylesheet" />
|
||||||
|
<script>
|
||||||
|
var keyValue = request('keyValue');
|
||||||
|
var schemeVersion = request('schemeVersion');
|
||||||
|
var processSchemeId = request('processSchemeId');
|
||||||
|
$(function () {
|
||||||
|
var schemeContent;
|
||||||
|
var _width = $(window).width() * 0.9 - 20;
|
||||||
|
if (_width > 1000)
|
||||||
|
{
|
||||||
|
_width = 1000;
|
||||||
|
}
|
||||||
|
if (keyValue) {
|
||||||
|
$.SetForm({
|
||||||
|
url: "../../FlowManage/FlowDesign/GetSchemeContentJson",
|
||||||
|
param: { keyValue: keyValue, SchemeVersion: schemeVersion },
|
||||||
|
success: function (data) {
|
||||||
|
schemeContent = JSON.parse(data.SchemeContent);
|
||||||
|
$('#frmpreview').frmPreview({
|
||||||
|
tablecotent: schemeContent.Frm.FrmContent,
|
||||||
|
width: _width
|
||||||
|
});
|
||||||
|
$('#frmname').html(schemeContent.Frm.FrmName);
|
||||||
|
console.log(schemeContent);
|
||||||
|
$('#FlowPanel').flowdesign({
|
||||||
|
height: $(window).height() - 18,
|
||||||
|
width: $(window).width() - 20,
|
||||||
|
flowcontent: schemeContent.Flow,
|
||||||
|
frmData: JSON.parse(schemeContent.Frm == "" ?"[]":schemeContent.Frm.FrmContent),
|
||||||
|
haveTool: false,
|
||||||
|
preview:1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.SetForm({
|
||||||
|
url: "../../FlowManage/FlowProcess/GetProcessSchemeJson",
|
||||||
|
param: { keyValue: processSchemeId },
|
||||||
|
success: function (data) {
|
||||||
|
schemeContent = JSON.parse(JSON.parse(data.SchemeContent).SchemeContent);
|
||||||
|
$('#frmpreview').frmPreview({
|
||||||
|
tablecotent: schemeContent.Frm.FrmContent,
|
||||||
|
width: _width,
|
||||||
|
});
|
||||||
|
$('#frmname').html(schemeContent.Frm.FrmName);
|
||||||
|
$('#FlowPanel').flowdesign({
|
||||||
|
height: $(window).height() - 18,
|
||||||
|
width: $(window).width() - 20,
|
||||||
|
flowcontent: schemeContent.Flow,
|
||||||
|
frmData: JSON.parse(schemeContent.Frm == "" ? "[]" : schemeContent.Frm.FrmContent),
|
||||||
|
haveTool: false,
|
||||||
|
preview: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//resize重设(表格、树形)宽高
|
||||||
|
$(window).resize(function (e) {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
$('#previewpage').css("height", e.currentTarget.innerHeight-20);
|
||||||
|
$('#formAreas').css("width", e.currentTarget.innerWidth * 0.9-20);
|
||||||
|
if (schemeContent != undefined)
|
||||||
|
{
|
||||||
|
$('#FlowPanel').flowdesign({
|
||||||
|
height: e.currentTarget.innerHeight - 18,
|
||||||
|
width: e.currentTarget.innerWidth - 20,
|
||||||
|
flowcontent: schemeContent.Flow,
|
||||||
|
haveTool: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
$('#formAreas').css("width", $(window).width() * 0.9-20);
|
||||||
|
$('#previewpage').css("height", $(window).height()-20);
|
||||||
|
});
|
||||||
|
function flowshow()
|
||||||
|
{
|
||||||
|
$('#previewpage').hide();
|
||||||
|
$('#FlowPanel').show();
|
||||||
|
}
|
||||||
|
function frmshow() {
|
||||||
|
$('#FlowPanel').hide();
|
||||||
|
$('#previewpage').show();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div style="position:absolute;top:0; right:100px;z-index:1000;background:rgba(0, 0, 0, 0.1);padding:10px;border-radius:0px 0px 5px 5px;">
|
||||||
|
<a class="btn btn-success" onclick="flowshow()"> 流程预览</a>
|
||||||
|
<a class="btn btn-default" onclick="frmshow()"> 表单预览</a>
|
||||||
|
</div>
|
||||||
|
<div class="panels">
|
||||||
|
<div id="previewpage" style="overflow-y:auto;background-color:#fff;display:none;border: 1px solid #ccc;">
|
||||||
|
<div id="formAreas" style="margin: 30px auto;max-width: 1000px;">
|
||||||
|
<div style="border-bottom:1px solid #ccc;text-align:center"><span id="frmname"></span></div>
|
||||||
|
<div class="app_layout app_preview" id="frmpreview"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="FlowPanel" style="margin: 0px;border: 1px solid #ccc;"></div>
|
||||||
|
</div>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.panels {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
@@ -125,52 +125,6 @@ var vm = new Vue({
|
|||||||
el: "#editDlg"
|
el: "#editDlg"
|
||||||
});
|
});
|
||||||
|
|
||||||
//添加(编辑)对话框
|
|
||||||
var editDlg = function() {
|
|
||||||
var update = false;
|
|
||||||
var show = function() {
|
|
||||||
layer.open({
|
|
||||||
type: 1,
|
|
||||||
skin: "layui-layer-rim", //加上边框
|
|
||||||
title: "申请管理", //不显示标题
|
|
||||||
area: ["400px", "300px"], //宽高
|
|
||||||
content: $("#editDlg"), //捕获的元素
|
|
||||||
btn: ["保存", "关闭"],
|
|
||||||
yes: function(index, layero) {
|
|
||||||
$.post("/CommonApplies/Edit",
|
|
||||||
vm.$data,
|
|
||||||
function(data) {
|
|
||||||
layer.msg(data.Message);
|
|
||||||
if (data.Status) {
|
|
||||||
list.reload();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"json");
|
|
||||||
},
|
|
||||||
cancel: function(index) {
|
|
||||||
layer.close(index);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
add: function() { //弹出添加
|
|
||||||
update = false;
|
|
||||||
selectScheme();
|
|
||||||
show();
|
|
||||||
vm.$set("$data",
|
|
||||||
{
|
|
||||||
Id: "00000000-0000-0000-0000-000000000000",
|
|
||||||
WorkflowName:"SimpleWF"
|
|
||||||
});
|
|
||||||
},
|
|
||||||
update: function(ret) { //弹出编辑框
|
|
||||||
update = true;
|
|
||||||
show();
|
|
||||||
vm.$set("$data", ret);
|
|
||||||
selectScheme(vm.WorkflowName);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
function del() {
|
function del() {
|
||||||
|
@@ -4,7 +4,7 @@ function MainGrid() {
|
|||||||
this.maingrid = $('#maingrid')
|
this.maingrid = $('#maingrid')
|
||||||
.jqGrid({
|
.jqGrid({
|
||||||
colModel: [
|
colModel: [
|
||||||
{ label: '主键', name: 'id', hidden: true },
|
{ label: '主键', name: 'Id', hidden: true },
|
||||||
{ label: '流程编号', name: 'SchemeCode', index: 'SchemeCode', width: 100, align: 'left' },
|
{ label: '流程编号', name: 'SchemeCode', index: 'SchemeCode', width: 100, align: 'left' },
|
||||||
{ label: '流程名称', name: 'SchemeName', index: 'SchemeName', width: 150, align: 'left' },
|
{ label: '流程名称', name: 'SchemeName', index: 'SchemeName', width: 150, align: 'left' },
|
||||||
|
|
||||||
@@ -59,9 +59,6 @@ function MainGrid() {
|
|||||||
};
|
};
|
||||||
MainGrid.prototype = new Grid();
|
MainGrid.prototype = new Grid();
|
||||||
var list = new MainGrid();
|
var list = new MainGrid();
|
||||||
var vm = new Vue({
|
|
||||||
el: '#editDlg'
|
|
||||||
});
|
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
function del() {
|
function del() {
|
||||||
@@ -81,20 +78,21 @@ function edit() {
|
|||||||
type: 2,
|
type: 2,
|
||||||
title:selected.Code,
|
title:selected.Code,
|
||||||
skin: 'layui-layer-rim', //加上边框
|
skin: 'layui-layer-rim', //加上边框
|
||||||
area: ['800px', '600px'], //宽高
|
area: ['1200px', '700px'], //宽高
|
||||||
maxmin: true, //开启最大化最小化按钮
|
maxmin: true, //开启最大化最小化按钮
|
||||||
content: '/designer/index?schemeName=' + selected.Code
|
content: '/FlowManage/FlowDesign/FlowSchemeBuider?keyValue=' + selected.Id
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//创建流程模版
|
||||||
function add() {
|
function add() {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
skin: 'layui-layer-rim', //加上边框
|
skin: 'layui-layer-rim', //加上边框
|
||||||
area: ['800px', '600px'], //宽高
|
area: ['1200px', '700px'], //宽高
|
||||||
maxmin: true, //开启最大化最小化按钮
|
maxmin: true, //开启最大化最小化按钮
|
||||||
content: '/designer/index?schemeName=',
|
content: '/FlowManage/FlowDesign/FlowSchemeBuider',
|
||||||
end: function() {
|
end: function() {
|
||||||
list.reload();
|
list.reload();
|
||||||
}
|
}
|
||||||
@@ -102,4 +100,24 @@ function add() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//创建新实例
|
||||||
|
function addInstance() {
|
||||||
|
var selected = list.getSelectedObj();
|
||||||
|
if (selected == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
skin: 'layui-layer-rim', //加上边框
|
||||||
|
area: ['1200px', '700px'], //宽高
|
||||||
|
maxmin: true, //开启最大化最小化按钮
|
||||||
|
content: '/FlowManage/FlowLaunch/FlowProcessNewForm?keyValue=' + selected.Id,
|
||||||
|
end: function () {
|
||||||
|
list.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BIN
OpenAuth.Mvc/Content/Images/a2.png
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 686 B |
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 710 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 810 B |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 831 B After Width: | Height: | Size: 831 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 617 B |
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 600 B |