routine update

This commit is contained in:
yubaolee 2017-01-23 18:25:24 +08:00
parent 550c511be1
commit 2900d52bc3
5 changed files with 99 additions and 93 deletions

View File

@ -79,9 +79,10 @@ namespace OpenAuth.Domain.Service
} }
} }
public void RemoveForm(string keyValue) public void RemoveForm(Guid keyValue)
{ {
throw new NotImplementedException(); _unitWork.Delete<WFSchemeInfo>(u => u.Id == keyValue);
_unitWork.Delete<WFSchemeContent>(u =>u.SchemeInfoId == keyValue);
} }
public WFSchemeInfo GetEntity(Guid keyValue) public WFSchemeInfo GetEntity(Guid keyValue)

View File

@ -117,7 +117,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult RemoveForm(string keyValue) public ActionResult RemoveForm(Guid keyValue)
{ {
wfFlowInfoBLL.RemoveForm(keyValue); wfFlowInfoBLL.RemoveForm(keyValue);
return Content("删除成功。"); return Content("删除成功。");

View File

@ -100,6 +100,17 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
var data = wfFrmMainBLL.GetForm(keyValue); var data = wfFrmMainBLL.GetForm(keyValue);
return Content(data.ToJson()); return Content(data.ToJson());
} }
/// <summary>
/// 获取表单数据all
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult GetAllListJson()
{
var data = wfFrmMainBLL.GetAllList();
return Content(data.ToJson());
}
#endregion #endregion
#region #region

View File

@ -12,29 +12,21 @@
}) })
function initLoadPageData() function initLoadPageData()
{ {
frmType = top.FlowSchemeBuider.postData["FrmType"]; var _FlowDesignObject = parent.FlowDesignObject;
var _FlowDesignObject = top.FlowSchemeBuider.FlowDesignObject;
node = _FlowDesignObject.$nodeData[_FlowDesignObject.$focus]; node = _FlowDesignObject.$nodeData[_FlowDesignObject.$focus];
node.id = _FlowDesignObject.$focus; node.id = _FlowDesignObject.$focus;
for (var i in _FlowDesignObject.$nodeData) { for (var i in _FlowDesignObject.$nodeData) {
_FlowDesignObject.$nodeData[i]["id"] = i; _FlowDesignObject.$nodeData[i]["id"] = i;
nodelist.push(_FlowDesignObject.$nodeData[i]); nodelist.push(_FlowDesignObject.$nodeData[i]);
} }
if (frmType != 1)
{ frmContentJson = JSON.parse(parent.frmData["FrmContent"]);
frmContentJson = JSON.parse(top.FlowSchemeBuider.frmData["FrmContent"]);
initFrmCotent(frmContentJson); initFrmCotent(frmContentJson);
} }
}
//初始化控件 //初始化控件
function initControl() { function initControl() {
GetDesignateMemberTree(); GetDesignateMemberTree();
if (frmType == 0) {//自定义表单
$('.systemdatabase').hide(); $('.systemdatabase').hide();
}
else {//系统表单(需要绑定数据表)
initLoadSysTemTable();
}
if (node.type != "confluencenode")//是否会签节点 if (node.type != "confluencenode")//是否会签节点
{ {
$('#confluencenode').hide(); $('#confluencenode').hide();
@ -95,12 +87,8 @@
$("#Treebackground").show(); $("#Treebackground").show();
} }
}); });
$("#NodeDataBaseToSQL").ComboBoxTree({
description: "==请选择执行SQL语句的数据库==",
height: "230px",
url: "../../SystemManage/DataBaseLink/GetTreeJson",
allowSearch: true
})
if (node.setInfo != undefined) if (node.setInfo != undefined)
{ {
var _NodeCode = $('#NodeCode').val(); var _NodeCode = $('#NodeCode').val();
@ -198,58 +186,58 @@
} }
function GetDesignateMemberTree() function GetDesignateMemberTree()
{ {
GetTree('Role'); //GetTree('Role');
GetTree('Post'); //GetTree('Post');
GetTree('UserGroup'); //GetTree('UserGroup');
GetTree('User'); //GetTree('User');
function GetTree(type) { //function GetTree(type) {
var item = { // var item = {
height: 262, // height: 262,
showcheck: true, // showcheck: true,
data: $.arrayClone(top.FlowSchemeBuider.AllAuthorizeCheckData[type]), // data: $.arrayClone(parent.AllAuthorizeCheckData[type]),
oncheckboxclick: function (item, et, s) { // oncheckboxclick: function (item, et, s) {
var $item = $("#" + item.mytype + "Div"); // var $item = $("#" + item.mytype + "Div");
if (et == 1) { // if (et == 1) {
var mytype = ""; // var mytype = "";
var _html = ""; // var _html = "";
var _title = ''; // var _title = '';
switch (item.mytype) { // switch (item.mytype) {
case "Role": // case "Role":
mytype = 'label-success'; // mytype = 'label-success';
break; // break;
case "Post": // case "Post":
mytype = 'label-info'; // mytype = 'label-info';
break; // break;
case "UserGroup": // case "UserGroup":
mytype = 'label-warning'; // mytype = 'label-warning';
break; // break;
case "User": // case "User":
mytype = 'label-danger'; // mytype = 'label-danger';
break; // break;
} // }
_html += '<span id="' + item.id + '" data-value="' + item.mytype + '" class="flow-card-box label ' + mytype + ' ">' + item.text + '<i class="fa fa-close"></i></span>'; // _html += '<span id="' + item.id + '" data-value="' + item.mytype + '" class="flow-card-box label ' + mytype + ' ">' + item.text + '<i class="fa fa-close"></i></span>';
$item.append(_html); // $item.append(_html);
$item.show(); // $item.show();
$(".flow-card-box").click(function () { // $(".flow-card-box").click(function () {
$(this).remove(); // $(this).remove();
$('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id')); // $('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id'));
if ($item.find('.flow-card-box').length == 0) { // if ($item.find('.flow-card-box').length == 0) {
$item.hide(); // $item.hide();
} // }
}) // })
} // }
else if (et == 0) { // else if (et == 0) {
$item.find('#' + item.id).remove(); // $item.find('#' + item.id).remove();
if ($item.find('.flow-card-box').length == 0) { // if ($item.find('.flow-card-box').length == 0) {
$item.hide(); // $item.hide();
} // }
} // }
} // }
}; // };
$("#" + type).treeview(item); // $("#" + type).treeview(item);
} //}
} }
function initFrmCotent(data) function initFrmCotent(data)
{ {
@ -301,15 +289,14 @@
baseinfo["frmPermissionInfo"] = _PermissionInfo; baseinfo["frmPermissionInfo"] = _PermissionInfo;
var sqlinfo = $("#SQLInfo").GetWebControls(); var sqlinfo = $("#SQLInfo").GetWebControls();
baseinfo = $.extend(baseinfo, sqlinfo); baseinfo = $.extend(baseinfo, sqlinfo);
top.FlowSchemeBuider.callBackNode(node.id, baseinfo, NodePramData); parent.callBackNode(node.id, baseinfo, NodePramData);
dialogClose();
} }
</script> </script>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#BaseInfo" data-toggle="tab">基本配置</a></li> <li class="active"><a href="#BaseInfo" data-toggle="tab">基本配置</a></li>
<li><a href="#MakerInfo" data-toggle="tab">审核者</a></li> <li><a href="#MakerInfo" data-toggle="tab">审核者</a></li>
<li><a href="#PermissionInfo" data-toggle="tab">权限分配</a></li> <li><a href="#PermissionInfo" data-toggle="tab">权限分配</a></li>
<li><a href="#SQLInfo" data-toggle="tab">节点通过后执行SQL</a></li> @*<li><a href="#SQLInfo" data-toggle="tab">节点通过后执行SQL</a></li>*@
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div id="BaseInfo" class="tab-pane active" style="padding-top:15px;padding-right:30px;"> <div id="BaseInfo" class="tab-pane active" style="padding-top:15px;padding-right:30px;">

View File

@ -267,19 +267,17 @@
area: ['800px', '450px'], //宽高 area: ['800px', '450px'], //宽高
maxmin: true, //开启最大化最小化按钮 maxmin: true, //开启最大化最小化按钮
title: '节点设置【' + object.$nodeData[object.$focus].name + '】', title: '节点设置【' + object.$nodeData[object.$focus].name + '】',
content: '/FlowManage/FlowDesign/FlowNodeForm' content: '/FlowManage/FlowDesign/FlowNodeForm',
btn: ['保存', '关闭'],
yes: function (index, layero) {
var body = layer.getChildFrame('body', index);
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象执行iframe页的方法iframeWin.method();
iframeWin.AcceptClick();
},
cancel: function (index) {
layer.close(index);
}
}); });
//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;
@ -291,16 +289,25 @@
dialogTop("前一个节点是分流节点无法设置流转条件", "error"); dialogTop("前一个节点是分流节点无法设置流转条件", "error");
return false; return false;
} }
dialogOpen({
id: "FlowNodeForm", layer.open({
type: 2,
skin: 'layui-layer-rim', //加上边框
area: ['800px', '450px'], //宽高
maxmin: true, //开启最大化最小化按钮
title: '流转条件设置', title: '流转条件设置',
url: '/FlowManage/FlowDesign/FlowLineForm', content: '/FlowManage/FlowDesign/FlowLineForm',
width: "750px", btn: ['保存', '关闭'],
height: "430px", yes: function (index, layero) {
callBack: function (iframeId) { var body = layer.getChildFrame('body', index);
top.frames[iframeId].AcceptClick(); var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象执行iframe页的方法iframeWin.method();
iframeWin.AcceptClick();
},
cancel: function (index) {
layer.close(index);
} }
}); });
} }
}); });
} }