Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Activiti: js定位当前的节点
var imageUrl = ctx + "/activiti/activiti!loadResource.action?resourceType=image&processInstanceId=" + pid;
$.getJSON(ctx + '/activiti/activiti!traceProcess.action?processInstanceId=' + pid, function(info) {
var titles = "";
/*$.each(info.vars, function(i, v) {
titles += i + ":" + v;
});*/
if ($('#workflowTraceDialog').length == 0) {
$('<div/>', {
id: 'workflowTraceDialog',
title: '查看流程(按ESC键可以关闭)',
html: "<div id='workflowTraceAccordion'><h3><a href='#'>图片形式</a></h3><div><img src='" + imageUrl + "' style='position:absolute; left:0px; top:0px;' />" +
"<div style='position:absolute; border:2px solid red;left:" +
(info.x - 1) +
"px;top:" +
(info.y - 1) +
"px;width:" +
(info.width - 2) +
"px;height:" +
(info.height - 2) +
"px;' title='" +
titles +
"' class='ui-corner-all-12'></div></div><h3><a href='#'>文字形式</a></h3><div id='workflowTrace' class='workflow-trace-container'><table id='workflowTraceList'></table><div id='workflowTracePager'></div></div></div>"
}).appendTo('body');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.