mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-10 23:58:02 +08:00
routine update
This commit is contained in:
parent
550c511be1
commit
2900d52bc3
@ -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)
|
||||
|
@ -117,7 +117,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public ActionResult RemoveForm(string keyValue)
|
||||
public ActionResult RemoveForm(Guid keyValue)
|
||||
{
|
||||
wfFlowInfoBLL.RemoveForm(keyValue);
|
||||
return Content("删除成功。");
|
||||
|
@ -100,6 +100,17 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
var data = wfFrmMainBLL.GetForm(keyValue);
|
||||
return Content(data.ToJson());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表单数据all
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetAllListJson()
|
||||
{
|
||||
var data = wfFrmMainBLL.GetAllList();
|
||||
return Content(data.ToJson());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交数据
|
||||
|
@ -12,29 +12,21 @@
|
||||
})
|
||||
function initLoadPageData()
|
||||
{
|
||||
frmType = top.FlowSchemeBuider.postData["FrmType"];
|
||||
var _FlowDesignObject = top.FlowSchemeBuider.FlowDesignObject;
|
||||
var _FlowDesignObject = parent.FlowDesignObject;
|
||||
node = _FlowDesignObject.$nodeData[_FlowDesignObject.$focus];
|
||||
node.id = _FlowDesignObject.$focus;
|
||||
for (var i in _FlowDesignObject.$nodeData) {
|
||||
_FlowDesignObject.$nodeData[i]["id"] = i;
|
||||
nodelist.push(_FlowDesignObject.$nodeData[i]);
|
||||
}
|
||||
if (frmType != 1)
|
||||
{
|
||||
frmContentJson = JSON.parse(top.FlowSchemeBuider.frmData["FrmContent"]);
|
||||
|
||||
frmContentJson = JSON.parse(parent.frmData["FrmContent"]);
|
||||
initFrmCotent(frmContentJson);
|
||||
}
|
||||
}
|
||||
//初始化控件
|
||||
function initControl() {
|
||||
GetDesignateMemberTree();
|
||||
if (frmType == 0) {//自定义表单
|
||||
$('.systemdatabase').hide();
|
||||
}
|
||||
else {//系统表单(需要绑定数据表)
|
||||
initLoadSysTemTable();
|
||||
}
|
||||
if (node.type != "confluencenode")//是否会签节点
|
||||
{
|
||||
$('#confluencenode').hide();
|
||||
@ -95,12 +87,8 @@
|
||||
$("#Treebackground").show();
|
||||
}
|
||||
});
|
||||
$("#NodeDataBaseToSQL").ComboBoxTree({
|
||||
description: "==请选择执行SQL语句的数据库==",
|
||||
height: "230px",
|
||||
url: "../../SystemManage/DataBaseLink/GetTreeJson",
|
||||
allowSearch: true
|
||||
})
|
||||
|
||||
|
||||
if (node.setInfo != undefined)
|
||||
{
|
||||
var _NodeCode = $('#NodeCode').val();
|
||||
@ -198,58 +186,58 @@
|
||||
}
|
||||
function GetDesignateMemberTree()
|
||||
{
|
||||
GetTree('Role');
|
||||
GetTree('Post');
|
||||
GetTree('UserGroup');
|
||||
GetTree('User');
|
||||
function GetTree(type) {
|
||||
var item = {
|
||||
height: 262,
|
||||
showcheck: true,
|
||||
data: $.arrayClone(top.FlowSchemeBuider.AllAuthorizeCheckData[type]),
|
||||
oncheckboxclick: function (item, et, s) {
|
||||
var $item = $("#" + item.mytype + "Div");
|
||||
if (et == 1) {
|
||||
var mytype = "";
|
||||
var _html = "";
|
||||
var _title = '';
|
||||
switch (item.mytype) {
|
||||
case "Role":
|
||||
mytype = 'label-success';
|
||||
break;
|
||||
case "Post":
|
||||
mytype = 'label-info';
|
||||
break;
|
||||
case "UserGroup":
|
||||
mytype = 'label-warning';
|
||||
break;
|
||||
case "User":
|
||||
mytype = 'label-danger';
|
||||
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>';
|
||||
$item.append(_html);
|
||||
$item.show();
|
||||
//GetTree('Role');
|
||||
//GetTree('Post');
|
||||
//GetTree('UserGroup');
|
||||
//GetTree('User');
|
||||
//function GetTree(type) {
|
||||
// var item = {
|
||||
// height: 262,
|
||||
// showcheck: true,
|
||||
// data: $.arrayClone(parent.AllAuthorizeCheckData[type]),
|
||||
// oncheckboxclick: function (item, et, s) {
|
||||
// var $item = $("#" + item.mytype + "Div");
|
||||
// if (et == 1) {
|
||||
// var mytype = "";
|
||||
// var _html = "";
|
||||
// var _title = '';
|
||||
// switch (item.mytype) {
|
||||
// case "Role":
|
||||
// mytype = 'label-success';
|
||||
// break;
|
||||
// case "Post":
|
||||
// mytype = 'label-info';
|
||||
// break;
|
||||
// case "UserGroup":
|
||||
// mytype = 'label-warning';
|
||||
// break;
|
||||
// case "User":
|
||||
// mytype = 'label-danger';
|
||||
// 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>';
|
||||
// $item.append(_html);
|
||||
// $item.show();
|
||||
|
||||
$(".flow-card-box").click(function () {
|
||||
$(this).remove();
|
||||
$('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id'));
|
||||
if ($item.find('.flow-card-box').length == 0) {
|
||||
$item.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
else if (et == 0) {
|
||||
$item.find('#' + item.id).remove();
|
||||
if ($item.find('.flow-card-box').length == 0) {
|
||||
$item.hide();
|
||||
}
|
||||
}
|
||||
// $(".flow-card-box").click(function () {
|
||||
// $(this).remove();
|
||||
// $('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id'));
|
||||
// if ($item.find('.flow-card-box').length == 0) {
|
||||
// $item.hide();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else if (et == 0) {
|
||||
// $item.find('#' + item.id).remove();
|
||||
// if ($item.find('.flow-card-box').length == 0) {
|
||||
// $item.hide();
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
};
|
||||
$("#" + type).treeview(item);
|
||||
}
|
||||
// }
|
||||
// };
|
||||
// $("#" + type).treeview(item);
|
||||
//}
|
||||
}
|
||||
function initFrmCotent(data)
|
||||
{
|
||||
@ -301,15 +289,14 @@
|
||||
baseinfo["frmPermissionInfo"] = _PermissionInfo;
|
||||
var sqlinfo = $("#SQLInfo").GetWebControls();
|
||||
baseinfo = $.extend(baseinfo, sqlinfo);
|
||||
top.FlowSchemeBuider.callBackNode(node.id, baseinfo, NodePramData);
|
||||
dialogClose();
|
||||
parent.callBackNode(node.id, baseinfo, NodePramData);
|
||||
}
|
||||
</script>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#BaseInfo" 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="#SQLInfo" data-toggle="tab">节点通过后执行SQL</a></li>
|
||||
@*<li><a href="#SQLInfo" data-toggle="tab">节点通过后执行SQL</a></li>*@
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="BaseInfo" class="tab-pane active" style="padding-top:15px;padding-right:30px;">
|
||||
|
@ -267,19 +267,17 @@
|
||||
area: ['800px', '450px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
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) {
|
||||
FlowDesignObject = object;
|
||||
@ -291,16 +289,25 @@
|
||||
dialogTop("前一个节点是分流节点无法设置流转条件", "error");
|
||||
return false;
|
||||
}
|
||||
dialogOpen({
|
||||
id: "FlowNodeForm",
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '450px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
title: '流转条件设置',
|
||||
url: '/FlowManage/FlowDesign/FlowLineForm',
|
||||
width: "750px",
|
||||
height: "430px",
|
||||
callBack: function (iframeId) {
|
||||
top.frames[iframeId].AcceptClick();
|
||||
content: '/FlowManage/FlowDesign/FlowLineForm',
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user