mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
add flow run user
This commit is contained in:
parent
3657cb2add
commit
02742c5ad4
@ -591,14 +591,16 @@ namespace OpenAuth.App.Extention
|
||||
{
|
||||
MakeTagNode(_nextNodeId, -1, userId);
|
||||
}
|
||||
else if (res != "1")
|
||||
else if (res != "1") //则时res是会签结束节点的ID
|
||||
{
|
||||
MakeTagNode(_nextNodeId, 1, userId);
|
||||
_runtimeModel.nextNodeId = res;
|
||||
_runtimeModel.nextNodeType = GetNodeStatus(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
_runtimeModel.nextNodeId = res;
|
||||
_runtimeModel.nextNodeType = GetNodeStatus(res);
|
||||
_runtimeModel.nextNodeId = _nextNodeId;
|
||||
_runtimeModel.nextNodeType = GetNodeStatus(_nextNodeId);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using Infrastructure;
|
||||
using LeaRun.Util.WebControl;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.SSO;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Service;
|
||||
using OpenAuth.Mvc.Controllers;
|
||||
@ -181,48 +182,17 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
var treeList = new List<TreeEntity>();
|
||||
string companyid = "";
|
||||
string departmentid = "";
|
||||
foreach (DataRow item in data.rows)
|
||||
foreach (UserView item in data.rows)
|
||||
{
|
||||
TreeEntity tree = new TreeEntity();
|
||||
if (companyid != item["OrganizeId"].ToString())
|
||||
{
|
||||
TreeEntity tree1 = new TreeEntity();
|
||||
companyid = item["OrganizeId"].ToString();
|
||||
tree1.id = item["OrganizeId"].ToString();
|
||||
tree1.text = item["OrganizeName"].ToString();
|
||||
tree1.value = item["OrganizeId"].ToString();
|
||||
tree1.isexpand = true;
|
||||
tree1.complete = true;
|
||||
tree1.hasChildren = true;
|
||||
tree1.Attribute = "Sort";
|
||||
tree1.AttributeValue = "Organize";
|
||||
tree1.parentId = "0";
|
||||
tree1.img = "fa fa-home";
|
||||
treeList.Add(tree1);
|
||||
}
|
||||
if (departmentid != item["DepartmentId"].ToString() && !string.IsNullOrEmpty(item["DepartmentId"].ToString()))
|
||||
{
|
||||
TreeEntity tree1 = new TreeEntity();
|
||||
departmentid = item["DepartmentId"].ToString();
|
||||
tree1.id = item["DepartmentId"].ToString();
|
||||
tree1.text = item["DepartmentName"].ToString();
|
||||
tree1.value = item["DepartmentId"].ToString();
|
||||
tree1.isexpand = false;
|
||||
tree1.complete = true;
|
||||
tree1.hasChildren = true;
|
||||
tree1.Attribute = "Sort";
|
||||
tree1.AttributeValue = "Department";
|
||||
tree1.parentId = item["OrganizeId"].ToString();
|
||||
tree1.img = "fa fa-umbrella";
|
||||
treeList.Add(tree1);
|
||||
}
|
||||
tree.id = item["UserId"].ToString();
|
||||
tree.text = item["RealName"].ToString();
|
||||
tree.value = item["UserId"].ToString();
|
||||
|
||||
tree.id = item.Id.ToString();
|
||||
tree.text = item.Name;
|
||||
tree.value = item.Id.ToString();
|
||||
tree.isexpand = true;
|
||||
tree.complete = true;
|
||||
tree.hasChildren = false;
|
||||
tree.parentId = string.IsNullOrEmpty(item["DepartmentId"].ToString()) ? item["OrganizeId"].ToString() : item["DepartmentId"].ToString();
|
||||
tree.parentId = "0";
|
||||
tree.showcheck = true;
|
||||
tree.img = "fa fa-user";
|
||||
tree.Attribute = "mytype";
|
||||
|
@ -184,60 +184,63 @@
|
||||
allowSearch: true
|
||||
});
|
||||
}
|
||||
|
||||
function GetTree(authtype) {
|
||||
this.$authtype = authtype;
|
||||
var data = $.arrayClone(parent.AllAuthorizeCheckData[$authtype]);
|
||||
var item = {
|
||||
height: 262,
|
||||
showcheck: true,
|
||||
data: data,
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
$("#" + authtype).treeview(item);
|
||||
}
|
||||
function GetDesignateMemberTree()
|
||||
{
|
||||
//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();
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// };
|
||||
// $("#" + type).treeview(item);
|
||||
//}
|
||||
GetTree('User');
|
||||
}
|
||||
function initFrmCotent(data)
|
||||
{
|
||||
@ -367,22 +370,16 @@
|
||||
<div class="bottomline">
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType1" type="radio" checked /><label for="NodeDesignateType1">所有成员</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType2" type="radio" /><label for="NodeDesignateType2">指定成员</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType3" type="radio" /><label for="NodeDesignateType3">发起者领导</label></div>
|
||||
@*<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType3" type="radio" /><label for="NodeDesignateType3">发起者领导</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType4" type="radio" /><label for="NodeDesignateType4">前一步骤领导</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType5" type="radio" /><label for="NodeDesignateType5">发起者部门领导</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType6" type="radio" /><label for="NodeDesignateType6">发起者公司领导</label></div>
|
||||
<div class="rdio rdio-color_a"><input name="NodeDesignateTypename" id="NodeDesignateType6" type="radio" /><label for="NodeDesignateType6">发起者公司领导</label></div>*@
|
||||
</div>
|
||||
<div id="DesignateMember" >
|
||||
<div class="standtabborder" style="height: 262px;">
|
||||
<div class="standtab standtabactived" onclick="$.standTabchange(this, 'Role')">
|
||||
角色
|
||||
</div>
|
||||
<div class="standtab " onclick="$.standTabchange(this, 'Post')">
|
||||
岗位
|
||||
</div>
|
||||
<div class="standtab " onclick="$.standTabchange(this, 'UserGroup')">
|
||||
用户组
|
||||
</div>
|
||||
<div class="standtab " onclick="$.standTabchange(this, 'User')">
|
||||
用户
|
||||
</div>
|
||||
|
@ -90,7 +90,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
GetTree('User');
|
||||
//保存为草稿
|
||||
$('#btn_caogao').click(function () {
|
||||
if (!$('#step-1').Validform()) {
|
||||
@ -133,6 +133,69 @@
|
||||
return true;
|
||||
}
|
||||
/*=========基本配置(end)====================================================================*/
|
||||
function GetTree(type) {
|
||||
$.SetForm({
|
||||
url: "../../FlowManage/FlowDesign/Get" + type + "CheckTreeJson",
|
||||
success: function (data) {
|
||||
AllAuthorizeCheckData[type] = $.arrayClone(data);
|
||||
//var item = {
|
||||
// height: $(window).height() - 131,
|
||||
// showcheck: true,
|
||||
// //url: "../../FlowManage/FlowDesign/Get" + type + "CheckTreeJson",
|
||||
// data: data,
|
||||
// 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 = "角色";
|
||||
// break;
|
||||
// case "Post":
|
||||
// mytype = "岗位";
|
||||
// break;
|
||||
// case "UserGroup":
|
||||
// mytype = "用户组";
|
||||
// break;
|
||||
// case "User":
|
||||
// mytype = "用户";
|
||||
// break;
|
||||
// }
|
||||
// _html += '<div id="' + item.id + '" data-value="' + item.mytype + '" class="card-box shcemeinfocheck active">';
|
||||
// _html += ' <div class="card-box-img">';
|
||||
// _html += ' <img src="/Content/images/UserCard03.png" />';
|
||||
// _html += ' </div>';
|
||||
// _html += ' <div class="card-box-content">';
|
||||
// _html += ' <p>名称:' + item.text + '</p>';
|
||||
// _html += ' <p>类别:' + mytype + '</p>';
|
||||
// _html += ' </div><i></i>';
|
||||
// _html += '</div>';
|
||||
// $item.append(_html);
|
||||
// $item.show();
|
||||
|
||||
// $(".card-box").click(function () {
|
||||
// $(this).remove();
|
||||
// $('#' + $(this).attr('data-value')).setNoCheckedNodes($(this).attr('id'));
|
||||
// if ($item.find('.card-box-img').length == 0) {
|
||||
// $item.hide();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else if (et == 0) {
|
||||
// $item.find('#' + item.id).remove();
|
||||
// if ($item.find('.card-box-img').length == 0) {
|
||||
// $item.hide();
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
//};
|
||||
//$("#" + type).treeview(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*=========表单选择(begin)==================================================================*/
|
||||
var _frmdatabase = "";
|
||||
|
@ -45,28 +45,3 @@
|
||||
<div id="frmpreview" class="tab-pane app_layout app_preview">
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app_preview {
|
||||
height: 620px;
|
||||
}
|
||||
|
||||
.app_preview .item_field_value {
|
||||
width: 964px;
|
||||
}
|
||||
|
||||
.app_preview .item_row {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.app_layout .item_field_label {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
background: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -15,8 +15,12 @@
|
||||
<link href="~/Content/scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="~/Content/scripts/bootstrap/css/bootstrap.extension.css" rel="stylesheet" />
|
||||
<script src="~/Content/scripts/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!--bootstrap组件end-->
|
||||
|
||||
<!-- ace styles -->
|
||||
@*<link rel="stylesheet" href="/Content/ace/css/ace.css" />
|
||||
<link rel="stylesheet" href="/Content/ace/css/ace-skins.css" />*@
|
||||
|
||||
<script src="~/Content/scripts/plugins/datepicker/WdatePicker.js"></script>
|
||||
<script src="/Content/scripts/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -8977,9 +8977,9 @@ Drop=No</a:Settings>
|
||||
<a:Code>ActivityType</a:Code>
|
||||
<a:CreationDate>1484907080</a:CreationDate>
|
||||
<a:Creator>Administrator</a:Creator>
|
||||
<a:ModificationDate>1484907080</a:ModificationDate>
|
||||
<a:ModificationDate>1487897583</a:ModificationDate>
|
||||
<a:Modifier>Administrator</a:Modifier>
|
||||
<a:Comment>当前节点类型</a:Comment>
|
||||
<a:Comment>当前节点类型(0会签节点)</a:Comment>
|
||||
<a:DataType>int</a:DataType>
|
||||
<c:Domain>
|
||||
<o:PhysicalDomain Ref="o64"/>
|
||||
|
Loading…
Reference in New Issue
Block a user