check bugs

This commit is contained in:
yubaolee 2018-03-27 17:46:49 +08:00
parent e91971dc61
commit 17dd5552c6
9 changed files with 2491 additions and 322 deletions

View File

@ -43,4 +43,13 @@
}
public class Tag
{
public int Taged { get; set; }
public string UserId { get; set; }
public string UserName { get; set; }
public string Description { get; set; }
public string TagedTime { get; set; }
}
}

View File

@ -239,57 +239,29 @@ namespace OpenAuth.App.Flow
/// <param name="nodeId"></param>
/// <param name="flag"></param>
/// <returns>-1不通过,1等待,其它通过</returns>
public string NodeConfluence(string nodeId, bool flag, string userId, string description = "")
public string NodeConfluence(string nodeId, Tag tag)
{
string res = "-1";
try
string _nextNodeId = GetNextNodeByNodeId(nodeId);//获取下一个节点
if (_nextNodeId != "-1")
{
if (flag)
Dictionary<string, List<FlowLine>> toLines = GetToLineDictionary(_runtimeModel.schemeContentJson);
int allnum = toLines[_nextNodeId].Count;
int i = 0;
foreach (var item in _runtimeModel.schemeContentJson.Flow.nodes)
{
MakeTagNode(nodeId, 1, userId, description);
}
else
{
MakeTagNode(nodeId, -1, userId, description);
}
string _nextNodeId = GetNextNodeByNodeId(nodeId);//获取下一个节点
if (_nextNodeId != "-1")
{
Dictionary<string, List<FlowLine>> toLines = GetToLineDictionary(_runtimeModel.schemeContentJson);
int allnum = toLines[_nextNodeId].Count;
int i = 0;
foreach (var item in _runtimeModel.schemeContentJson.Flow.nodes)
if (item.id.Value == _nextNodeId)
{
if (item.id.Value == _nextNodeId)
if (item.setInfo.NodeConfluenceType.Value == "")//0所有步骤通过 todo:先用空格
{
if (item.setInfo.NodeConfluenceType.Value == "")//0所有步骤通过 todo:先用空格
if (tag.Taged == 1)
{
if (flag)
if (item.setInfo.ConfluenceOk == null)
{
if (item.setInfo.ConfluenceOk == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1;
res = "1";
}
else if (item.setInfo.ConfluenceOk.Value == (allnum - 1))
{
res = GetNextNodeByNodeId(_nextNodeId);
if (res == "-1")
{
throw (new Exception("会签成功寻找不到下一个节点"));
}
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++;
res = "1";
}
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1;
res = "1";
}
}
else if (item.setInfo.NodeConfluenceType.Value == "1")//1一个步骤通过即可
{
if (flag)
else if (item.setInfo.ConfluenceOk.Value == (allnum - 1))
{
res = GetNextNodeByNodeId(_nextNodeId);
if (res == "-1")
@ -299,93 +271,105 @@ namespace OpenAuth.App.Flow
}
else
{
if (item.setInfo.ConfluenceNo == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1;
res = "1";
}
else if (item.setInfo.ConfluenceNo.Value == (allnum - 1))
{
res = "-1";
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++;
res = "1";
}
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++;
res = "1";
}
}
else//2按百分比计算
}
else if (item.setInfo.NodeConfluenceType.Value == "1")//1一个步骤通过即可
{
if (tag.Taged ==1)
{
if (flag)
res = GetNextNodeByNodeId(_nextNodeId);
if (res == "-1")
{
if (item.setInfo.ConfluenceOk == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1;
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++;
}
throw (new Exception("会签成功寻找不到下一个节点"));
}
else
}
else
{
if (item.setInfo.ConfluenceNo == null)
{
if (item.setInfo.ConfluenceNo == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1;
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++;
}
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1;
res = "1";
}
if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) / allnum * 100 > int.Parse(item.setInfo.NodeConfluenceRate.Value))
{
res = GetNextNodeByNodeId(_nextNodeId);
if (res == "-1")
{
throw (new Exception("会签成功寻找不到下一个节点"));
}
}
else if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) == allnum)
else if (item.setInfo.ConfluenceNo.Value == (allnum - 1))
{
res = "-1";
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++;
res = "1";
}
}
break;
}
i++;
else//2按百分比计算
{
if (tag.Taged == 1)
{
if (item.setInfo.ConfluenceOk == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk = 1;
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceOk++;
}
}
else
{
if (item.setInfo.ConfluenceNo == null)
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo = 1;
}
else
{
_runtimeModel.schemeContentJson.Flow.nodes[i].setInfo.ConfluenceNo++;
}
}
if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) / allnum * 100 > int.Parse(item.setInfo.NodeConfluenceRate.Value))
{
res = GetNextNodeByNodeId(_nextNodeId);
if (res == "-1")
{
throw (new Exception("会签成功寻找不到下一个节点"));
}
}
else if ((item.setInfo.ConfluenceNo.Value + item.setInfo.ConfluenceOk.Value) == allnum)
{
res = "-1";
}
else
{
res = "1";
}
}
break;
}
if (res == "-1")
{
MakeTagNode(_nextNodeId, -1, userId);
}
else if (res != "1") //则时res是会签结束节点的ID
{
MakeTagNode(_nextNodeId, 1, userId);
_runtimeModel.nextNodeId = res;
_runtimeModel.nextNodeType = GetNodeType(res);
}
else
{
_runtimeModel.nextNodeId = _nextNodeId;
_runtimeModel.nextNodeType = GetNodeType(_nextNodeId);
}
return res;
i++;
}
if (res == "-1")
{
tag.Taged = -1;
MakeTagNode(_nextNodeId, tag);
}
else if (res != "1") //则时res是会签结束节点的ID
{
tag.Taged = 1;
MakeTagNode(_nextNodeId,tag);
_runtimeModel.nextNodeId = res;
_runtimeModel.nextNodeType = GetNodeType(res);
}
else
{
throw (new Exception("寻找不到会签下合流节点"));
_runtimeModel.nextNodeId = _nextNodeId;
_runtimeModel.nextNodeType = GetNodeType(_nextNodeId);
}
return res;
}
catch
{
throw;
}
throw (new Exception("寻找不到会签下合流节点"));
}
/// <summary>
/// 驳回节点0"前一步"1"第一步"2"某一步" 3"不处理"
@ -439,19 +423,17 @@ namespace OpenAuth.App.Flow
/// 标记节点1通过-1不通过0驳回
/// </summary>
/// <param name="nodeId"></param>
/// <param name="flag"></param>
/// <param name="userId"></param>
/// <param name="description"></param>
public void MakeTagNode(string nodeId, int flag, string userId, string description = "")
public void MakeTagNode(string nodeId, Tag tag)
{
int i = 0;
foreach (var item in _runtimeModel.schemeContentJson.nodes)
{
if (item.id.Value.ToString() == nodeId)
{
_runtimeModel.schemeContentJson.nodes[i].setInfo.Taged = flag;
_runtimeModel.schemeContentJson.nodes[i].setInfo.UserId = userId;
_runtimeModel.schemeContentJson.nodes[i].setInfo.description = description;
_runtimeModel.schemeContentJson.nodes[i].setInfo.Taged = tag.Taged;
_runtimeModel.schemeContentJson.nodes[i].setInfo.UserId = tag.UserId;
_runtimeModel.schemeContentJson.nodes[i].setInfo.UserName = tag.UserName;
_runtimeModel.schemeContentJson.nodes[i].setInfo.Description = tag.Description;
_runtimeModel.schemeContentJson.nodes[i].setInfo.TagedTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
break;
}

View File

@ -98,11 +98,18 @@ namespace OpenAuth.App
FlowRuntime wfruntime = new FlowRuntime(flowInstance);
var user = AuthUtil.GetCurrentUser().User;
var tag = new Tag
{
UserName = user.Name,
UserId = user.Id,
Description = description
};
#region
if (flowInstance.ActivityType == 0)//会签
{
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, 1, "");//±ê¼Çµ±Ç°½Úµãͨ¹ý
tag.Taged = 1;
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);//±ê¼Çµ±Ç°½Úµãͨ¹ý
///寻找需要审核的节点Id
string _VerificationNodeId = "";
List<string> _nodelist = wfruntime.GetCountersigningNodeIdList(wfruntime.runtimeModel.currentNodeId);
@ -128,20 +135,19 @@ namespace OpenAuth.App
{
if (flag)
{
tag.Taged = 1;
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.nodes[_VerificationNodeId].name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】同意,备注:" + description;
}
else
{
tag.Taged = -1;
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.nodes[_VerificationNodeId].name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description;
}
string _Confluenceres = wfruntime.NodeConfluence(_VerificationNodeId, flag, AuthUtil.GetCurrentUser().User.Id, description);
var _data = new
{
SchemeContent = wfruntime.runtimeModel.schemeContentJson.ToString(),
wfruntime.runtimeModel.frmData
};
switch (_Confluenceres)
string confluenceres = wfruntime.NodeConfluence(_VerificationNodeId, tag);
switch (confluenceres)
{
case "-1"://不通过
flowInstance.IsFinish = 3;
@ -157,14 +163,17 @@ namespace OpenAuth.App
flowInstance.MakerList = (wfruntime.runtimeModel.nextNodeType == 4 ? "" : GetMakerList(wfruntime));//当前节点可执行的人信息
#region
processTransitionHistoryEntity = new FlowInstanceTransitionHistory();
processTransitionHistoryEntity.FromNodeId = wfruntime.runtimeModel.currentNodeId;
processTransitionHistoryEntity.FromNodeName = wfruntime.runtimeModel.currentNode.name;
processTransitionHistoryEntity.FromNodeType = wfruntime.runtimeModel.currentNodeType;
processTransitionHistoryEntity.ToNodeId = wfruntime.runtimeModel.nextNodeId;
processTransitionHistoryEntity.ToNodeName = wfruntime.runtimeModel.nextNode.name;
processTransitionHistoryEntity.ToNodeType = wfruntime.runtimeModel.nextNodeType;
processTransitionHistoryEntity.TransitionSate = 0;
processTransitionHistoryEntity = new FlowInstanceTransitionHistory
{
FromNodeId = wfruntime.runtimeModel.currentNodeId,
FromNodeName = wfruntime.runtimeModel.currentNode.name,
FromNodeType = wfruntime.runtimeModel.currentNodeType,
ToNodeId = wfruntime.runtimeModel.nextNodeId,
ToNodeName = wfruntime.runtimeModel.nextNode.name,
ToNodeType = wfruntime.runtimeModel.nextNodeType,
TransitionSate = 0
};
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
#endregion
@ -183,8 +192,8 @@ namespace OpenAuth.App
{
if (flag)
{
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, 1
, AuthUtil.GetCurrentUser().User.Id, description);
tag.Taged = 1;
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);
flowInstance.PreviousId = flowInstance.ActivityId;
flowInstance.ActivityId = wfruntime.runtimeModel.nextNodeId;
flowInstance.ActivityType = wfruntime.runtimeModel.nextNodeType;
@ -212,12 +221,15 @@ namespace OpenAuth.App
else
{
flowInstance.IsFinish = 3; //表示该节点不同意
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, -1, AuthUtil.GetUserName(), description);
tag.Taged = -1;
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId,tag);
flowInstanceOperationHistory.Content = "【" + "todo name" + "】【" + wfruntime.runtimeModel.currentNode.name + "】【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "】不同意,备注:" + description;
}
}
#endregion
#endregion
flowInstance.SchemeContent = JsonHelper.Instance.Serialize(wfruntime.runtimeModel.schemeContentJson);
UnitWork.Update(flowInstance);
UnitWork.Add(flowInstanceOperationHistory);
@ -250,7 +262,17 @@ namespace OpenAuth.App
{
resnode = nodeId;
}
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, 0, AuthUtil.GetUserName(), description);
var user = AuthUtil.GetCurrentUser().User;
var tag = new Tag
{
Description = description,
Taged = 0,
UserId = user.Id,
UserName = user.Name
};
wfruntime.MakeTagNode(wfruntime.runtimeModel.currentNodeId, tag);
flowInstance.IsFinish = 4;//4表示驳回需要申请者重新提交表单
if (resnode != "")
{

View File

@ -179,6 +179,7 @@
<Content Include="images\login\logo.png" />
<Content Include="images\login\right_hand.png" />
<Content Include="images\login\tou.png" />
<Content Include="js\bootstrap.js" />
<Content Include="js\flow\config.js" />
<Content Include="js\flow\fonts\demo.css" />
<Content Include="js\flow\fonts\demo_fontclass.html" />

2286
OpenAuth.Mvc/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -327,7 +327,7 @@ var GooFlow = function(selector,property){
var ev=_mouseP(e),t=_elCsys(this);
X=ev.x-t.left+this.parentNode.scrollLeft;
Y=ev.y-t.top+this.parentNode.scrollTop;
This.addNode(new Date().getTime(),{name:"node_"+This.$max,left:X,top:Y,type:This.$nowType});
This.addNode(new Date().getTime().toString(),{name:"node_"+This.$max,left:X,top:Y,type:This.$nowType});
This.$max++;
});
@ -807,7 +807,7 @@ GooFlow.prototype={
if(This.$nowType==="dashed"){
tmp.dash=true;
}
This.addLine(new Date().getTime(),tmp);
This.addLine(new Date().getTime().toString(),tmp);
This.$max++;
}
else{

View File

@ -1,4 +1,4 @@
layui.define(["jquery","layer"],
layui.define(["jquery","layer","bootstrap"],
function(exports) {
var $ = layui.jquery;
var layer = layui.layer;
@ -42,145 +42,12 @@
complex: "复合结点",
group: "组织划分框编辑开"
});
flowPanel.loadData("");
//导出数据扩展方法
//所有节点必须有进出线段
//必须有开始结束节点(且只能为一个)
//分流合流节点必须成对出现
//分流合流节点必须一一对应且中间必须有且只能有一个普通节点
//分流节点与合流节点之前的审核节点必须有且只能有一条出去和进来节点
//flowPanel.exportDataEx = function() {
// var _data = flowPanel.exportData();
// var _fromlines = {},
// _tolines = {},
// _nodes = {},
// _fnodes = [],
// _hnodes = [],
// _startroundFlag = 0,
// _endroundFlag = 0;
// for (var i in _data.lines) {
// if (_fromlines[_data.lines[i].from] == undefined) {
// _fromlines[_data.lines[i].from] = [];
// }
// _fromlines[_data.lines[i].from].push(_data.lines[i].to);
if (options != undefined
&& options.flowcontent != undefined
&& options.flowcontent != null) { //加载内容
flowPanel.loadData(options.flowcontent);
}
// if (_tolines[_data.lines[i].to] == undefined) {
// _tolines[_data.lines[i].to] = [];
// }
// _tolines[_data.lines[i].to].push(_data.lines[i].from);
// }
// for (var j in _data.nodes) {
// var _node = _data.nodes[j];
// var _flag = false;
// switch (_node.type) {
// case "start round mix":
// _startroundFlag++;
// if (_fromlines[_node.id] == undefined) {
// layer.msg("开始节点无法流转到下一个节点");
// return -1;
// }
// break;
// case "end round":
// _endroundFlag++;
// if (_tolines[_node.id] == undefined) {
// layer.msg("无法流转到结束节点");
// return -1;
// }
// break;
// case "node":
// _flag = true;
// break;
// case "shuntnode":
// _flag = true;
// _fnodes.push(_node.id);
// break;
// case "confluencenode":
// _hnodes.push(_node.id);
// _flag = true;
// break;
// default:
// layer.msg("节点数据异常,请重新登录下系统!");
// return -1;
// break;
// }
// if (_flag) {
// if (_tolines[_node.id] == undefined) {
// labellingRedNode(_node.id);
// layer.msg("标注红色的节点没有【进来】的连接线段");
// return -1;
// }
// if (_fromlines[_node.id] == undefined) {
// labellingRedNode(_node.id);
// layer.msg("标注红色的节点没有【出去】的连接线段");
// return -1;
// }
// }
// _nodes[_node.id] = _node;
// }
// if (_startroundFlag == 0) {
// layer.msg("必须有开始节点");
// return -1;
// }
// if (_endroundFlag == 0) {
// layer.msg("必须有结束节点");
// return -1;
// }
// if (_fnodes.length != _hnodes.length) {
// layer.msg("分流节点必须等于合流节点");
// return -1;
// }
// for (var a in _fnodes) {
// var aNondeid = _fnodes[a];
// if (_fromlines[aNondeid].length == 1) {
// labellingRedNode(aNondeid);
// layer.msg("标注红色的分流节点不允许只有一条【出去】的线段");
// return -1;
// }
// var _hhnodeid = {};
// for (var b in _fromlines[aNondeid]) {
// btoNode = _fromlines[aNondeid][b];
// if (_nodes[btoNode].type == "stepnode") {
// var _nextLine = _fromlines[_nodes[btoNode].id];
// var _nextNode = _nodes[_nextLine[0]];
// if (_nextNode.type != "confluencenode") {
// labellingRedNode(_nodes[btoNode].id);
// layer.msg("标注红色的普通节点下一个节点必须是合流节点");
// return -1;
// } else {
// _hhnodeid[_nextLine[0]] = 0;
// if (_hhnodeid.length > 1) {
// labellingRedNode(aNondeid);
// layer.msg("标注红色的分流节点与之对应的合流节点只能有一个");
// return -1;
// }
// if (_tolines[_nextLine[0]].length != _fromlines[aNondeid].length) {
// labellingRedNode(_nextLine[0]);
// layer.msg("标注红色的合流节点与之对应的分流节点只能有一个");
// return -1;
// }
// }
// if (_nextLine.length > 1) {
// labellingRedNode(_nodes[btoNode].id);
// layer.msg("标注红色的节点只能有一条出去的线条【分流合流之间】");
// return -1;
// } else if (_tolines[_nodes[btoNode].id], length > 1) {
// labellingRedNode(_nodes[btoNode].id);
// layer.msg("标注红色的节点只能有一条进来的线条【分流合流之间】");
// return -1;
// }
// } else {
// labellingRedNode(aNondeid);
// layer.msg("标注红色的分流节点必须经过一个普通节点到合流节点");
// return -1;
// }
// }
// }
// return _data;
//}
flowPanel.SetNodeEx = function(id, data) {
flowPanel.setName(id, data.NodeName, "node", data);
}
@ -204,53 +71,52 @@
var tipHtml =
'<div style="position:absolute;left:10px;margin-top: 10px;padding:10px;border-radius:5px;background:rgba(0,0,0,0.05);z-index:1000;display:inline-block;">';
tipHtml +=
'<div style="display: inline-block;"><i style="padding-right:5px;color:#5cb85c;" class="fa fa-flag"></i><span>已处理</span></div>';
'<div style="display: inline-block;"><i style="padding-right:5px;color:#5cb85c;" class="layui-icon">&#xe612;</i><span>已处理</span></div>';
tipHtml +=
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#5bc0de;" class="fa fa-flag"></i><span>正在处理</span></div>';
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#5bc0de;" class="layui-icon">&#xe612;</i><span>正在处理</span></div>';
tipHtml +=
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#d9534f;" class="fa fa-flag"></i><span>不通过</span></div>';
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#d9534f;" class="layui-icon">&#xe612;</i><span>不通过</span></div>';
tipHtml +=
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#f0ad4e;" class="fa fa-flag"></i><span>驳回</span></div>';
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#f0ad4e;" class="layui-icon">&#xe612;</i><span>驳回</span></div>';
tipHtml +=
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#999;" class="fa fa-flag"></i><span>未处理</span></div></div>';
'<div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#999;" class="layui-icon">&#xe612;</i><span>未处理</span></div></div>';
$frmpreview.find('.GooFlow_work .GooFlow_work_inner').css('background-image', 'none');
$frmpreview.find('td').css('color', '#fff');
$('.GooFlow_work .GooFlow_work_inner').css('background-image', 'none');
$('td').css('color', '#fff');
$frmpreview.css('background', '#fff');
$frmpreview.find('.ico').remove();
$frmpreview.find('.GooFlow_item').css('border', '0px');
$('.ico').remove();
$('.GooFlow_item').css('border', '0px');
$frmpreview.append(tipHtml);
$.each(options.nodeData,
function(i, item) {
$frmpreview.find("#" + item.id).css("background", "#999");
if (item.type == "startround") {
$frmpreview.find("#" + item.id).css("background", "#5cb85c");
function (i, item) {
$("#" + item.id).css("background", "#999");
if (item.type == "start round mix") {
$("#" + item.id).css("background", "#5cb85c");
} else {
if (item.id == options.activityId) {
$frmpreview.find("#" + item.id).css("background", "#5bc0de"); //正在处理
$("#" + item.id).css("background", "#5bc0de"); //正在处理
}
if (item.setInfo != undefined && item.setInfo.Taged != undefined) {
if (item.setInfo.Taged == -1) {
$frmpreview.find("#" + item.id).css("background", "#d9534f"); //不通过
$("#" + item.id).css("background", "#d9534f"); //不通过
} else if (item.setInfo.Taged == 1) {
$frmpreview.find("#" + item.id).css("background", "#5cb85c"); //通过
$("#" + item.id).css("background", "#5cb85c"); //通过
} else {
$frmpreview.find("#" + item.id).css("background", "#f0ad4e"); //驳回
$("#" + item.id).css("background", "#f0ad4e"); //驳回
}
}
}
if (item.setInfo != undefined && item.setInfo.Taged != undefined) {
var _one = clientuserData[item.setInfo.UserId];
var _row = '<div style="text-align:left">';
var tagname = { "-1": "不通过", "1": "通过", "0": "驳回" };
_row += "<p>处理人:" + (_one == undefined ? item.setInfo.UserId : _one.RealName) + "</p>";
_row += "<p>处理人:" + item.setInfo.UserName + "</p>";
_row += "<p>结果:" + tagname[item.setInfo.Taged] + "</p>";
_row += "<p>处理时间:" + item.setInfo.TagedTime + "</p>";
_row += "<p>备注:" + item.setInfo.description + "</p></div>";
_row += "<p>备注:" + item.setInfo.Description + "</p></div>";
$frmpreview.find('#' + item.id).attr('data-toggle', 'tooltip');
$frmpreview.find('#' + item.id).attr('data-placement', 'bottom');
$frmpreview.find('#' + item.id).attr('title', _row);
$('#' + item.id).attr('data-toggle', 'tooltip');
$('#' + item.id).attr('data-placement', 'bottom');
$('#' + item.id).attr('title', _row);
}
});
$('[data-toggle="tooltip"]').tooltip({ "html": true });
@ -376,29 +242,29 @@
_popoverhtml += '</ul>';
}
$frmpreview.find('#' + item.id).attr('title', item.name);
$frmpreview.find('#' + item.id).attr('data-toggle', 'popover');
$frmpreview.find('#' + item.id).attr('data-placement', 'bottom');
$frmpreview.find('#' + item.id).attr('data-content', _popoverhtml);
$('#' + item.id).attr('title', item.name);
$('#' + item.id).attr('data-toggle', 'popover');
$('#' + item.id).attr('data-placement', 'bottom');
$('#' + item.id).attr('data-content', _popoverhtml);
} else {
$frmpreview.find('#' + item.id).attr('title', item.name);
$frmpreview.find('#' + item.id).attr('data-toggle', 'popover');
$frmpreview.find('#' + item.id).attr('data-placement', 'bottom');
$frmpreview.find('#' + item.id).attr('data-content', "该节点未被设置");
$('#' + item.id).attr('title', item.name);
$('#' + item.id).attr('data-toggle', 'popover');
$('#' + item.id).attr('data-placement', 'bottom');
$('#' + item.id).attr('data-content', "该节点未被设置");
}
});
$frmpreview.find('.GooFlow_item').popover({ html: true });
$('.GooFlow_item').popover({ html: true });
}
function labellingRedNode(id) {
$frmpreview.find('.flow-labellingnode-red').removeClass('flow-labellingnode-red');
$frmpreview.find('#' + id).addClass('flow-labellingnode-red');
$('.flow-labellingnode-red').removeClass('flow-labellingnode-red');
$('#' + id).addClass('flow-labellingnode-red');
}
return flowPanel;
}
exports('flowlayout'); //只有这样写才能找到flowlayout好尴尬
exports('flowlayout');
});

View File

@ -16,18 +16,20 @@
parent.layer.iframeAuto(index);
});
/*=========流程设计begin======================*/
var flowDesignPanel = $('#flowPanel').flowdesign({
height: 300,
widht: 300,
haveTool: false
});
/*=========流程设计end=====================*/
$.getJSON('/FlowInstances/get?id=' + id,
function (data) {
var obj = data.Result;
flowDesignPanel.loadData(JSON.parse(obj.SchemeContent));
var schemeContent = JSON.parse(obj.SchemeContent);
var flowDesignPanel = $('#flowPanel').flowdesign({
height: 300,
widht: 300,
haveTool: false
, isprocessing: true
, activityId: obj.ActivityId
, nodeData: schemeContent.nodes
, flowcontent:schemeContent
});
$("#frmPreview").html(data.Result.FrmDataHtml);
});

View File

@ -11,7 +11,8 @@
`官方QQ交流群`
1. 484498493【已满】
2. 626433139
2. 626433139【将满】
3. 566344079
`4.0版演示直达`