被覆盖文件还原
This commit is contained in:
parent
2e1f6cb992
commit
d8b5450ad8
File diff suppressed because it is too large
Load Diff
@ -22,20 +22,20 @@ $(document).ready(function(){
|
|||||||
var resizeWaiter = false;
|
var resizeWaiter = false;
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
if(!resizeWaiter){
|
if(!resizeWaiter){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
resizeWaiter = true;
|
resizeWaiter = true;
|
||||||
if (!$("#publisher_new_tr").is(':hidden')) {
|
if (!$("#publisher_new_tr").is(':hidden')) {
|
||||||
initWidth(true, 'new');
|
initWidth(true, 'new');
|
||||||
}
|
}
|
||||||
if (!$("#publisher_change_tr").is(':hidden')) {
|
if (!$("#publisher_change_tr").is(':hidden')) {
|
||||||
initWidth(true, 'change');
|
initWidth(true, 'change');
|
||||||
}
|
}
|
||||||
if (!$("#publisher_stop_tr").is(':hidden')) {
|
if (!$("#publisher_stop_tr").is(':hidden')) {
|
||||||
initWidth(true, 'stop');
|
initWidth(true, 'stop');
|
||||||
}
|
}
|
||||||
resizeWaiter = false;
|
resizeWaiter = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化自定义内容,不能写到html 文件中,表单会被平台自动调整的不成样子
|
// 初始化自定义内容,不能写到html 文件中,表单会被平台自动调整的不成样子
|
||||||
@ -50,11 +50,11 @@ function initHtml() {
|
|||||||
dialogHtml += '</div>';
|
dialogHtml += '</div>';
|
||||||
dialogHtml += '</div>';
|
dialogHtml += '</div>';
|
||||||
$('body').append(dialogHtml);
|
$('body').append(dialogHtml);
|
||||||
|
|
||||||
$('#publisher_new_div').html('<div id="contentDiv1" class="" border="0"></div>');
|
$('#publisher_new_div').html('<div id="contentDiv1" class="" border="0"></div>');
|
||||||
$('#publisher_change_div').html('<div id="contentDiv2" class="" border="0"></div>');
|
$('#publisher_change_div').html('<div id="contentDiv2" class="" border="0"></div>');
|
||||||
$('#publisher_stop_div').html('<div id="contentDiv3" class="" border="0"></div>');
|
$('#publisher_stop_div').html('<div id="contentDiv3" class="" border="0"></div>');
|
||||||
|
|
||||||
var newHtml = '';
|
var newHtml = '';
|
||||||
newHtml += '<!-- 流程文件发布-->';
|
newHtml += '<!-- 流程文件发布-->';
|
||||||
newHtml += '<div id="publisher_new" border="1">';
|
newHtml += '<div id="publisher_new" border="1">';
|
||||||
@ -83,7 +83,7 @@ function initHtml() {
|
|||||||
newHtml += '</tbody>';
|
newHtml += '</tbody>';
|
||||||
newHtml += '</table>';
|
newHtml += '</table>';
|
||||||
newHtml += '</div>';
|
newHtml += '</div>';
|
||||||
|
|
||||||
var changeHtml = '';
|
var changeHtml = '';
|
||||||
changeHtml += '<!-- 流程文件变更 -->';
|
changeHtml += '<!-- 流程文件变更 -->';
|
||||||
changeHtml += '<div id="publisher_change" border="1">';
|
changeHtml += '<div id="publisher_change" border="1">';
|
||||||
@ -115,7 +115,7 @@ function initHtml() {
|
|||||||
changeHtml += '</tbody>';
|
changeHtml += '</tbody>';
|
||||||
changeHtml += '</table>';
|
changeHtml += '</table>';
|
||||||
changeHtml += '</div>';
|
changeHtml += '</div>';
|
||||||
|
|
||||||
var stopHtml = '';
|
var stopHtml = '';
|
||||||
stopHtml += '<!-- 流程文件废止-->';
|
stopHtml += '<!-- 流程文件废止-->';
|
||||||
stopHtml += '<div id="publisher_stop" border="1">';
|
stopHtml += '<div id="publisher_stop" border="1">';
|
||||||
@ -144,7 +144,7 @@ function initHtml() {
|
|||||||
stopHtml += '</tbody>';
|
stopHtml += '</tbody>';
|
||||||
stopHtml += '</table>';
|
stopHtml += '</table>';
|
||||||
stopHtml += '</div>';
|
stopHtml += '</div>';
|
||||||
|
|
||||||
$('#contentDiv1').append(newHtml);
|
$('#contentDiv1').append(newHtml);
|
||||||
$('#contentDiv2').append(changeHtml);
|
$('#contentDiv2').append(changeHtml);
|
||||||
$('#contentDiv3').append(stopHtml);
|
$('#contentDiv3').append(stopHtml);
|
||||||
@ -161,11 +161,11 @@ function initParam() {
|
|||||||
// 初始化内容数据
|
// 初始化内容数据
|
||||||
function initContentData() {
|
function initContentData() {
|
||||||
var param = {
|
var param = {
|
||||||
cmd: 'com.actionsoft.apps.coe.pal.publisher_data_query',
|
cmd: 'com.actionsoft.apps.coe.pal.publisher_data_query',
|
||||||
processInstId: processInstId,
|
processInstId: processInstId,
|
||||||
wsId : wsId,
|
wsId : wsId,
|
||||||
sid: sid
|
sid: sid
|
||||||
};
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
type : "POST",
|
type : "POST",
|
||||||
@ -212,7 +212,7 @@ function initContentData() {
|
|||||||
$('#OPTIONTYPE_2').prev('img').attr('src', uncheckImg);
|
$('#OPTIONTYPE_2').prev('img').attr('src', uncheckImg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ var changeOption;
|
|||||||
*/
|
*/
|
||||||
function initPublishData(data, type, isEnd, proNumber) {
|
function initPublishData(data, type, isEnd, proNumber) {
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
var fileName = data.publishFileName + ' V' + data.fileVersion + '.0';
|
var fileName = data.publishFileName + ' V' + data.fileVersion;
|
||||||
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.publishFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.publishFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
||||||
$('#publisher_new_file_name').children('span.file_name').html(aHtml);
|
$('#publisher_new_file_name').children('span.file_name').html(aHtml);
|
||||||
$('#publisher_new_file_id').val(data.publishFileId);
|
$('#publisher_new_file_id').val(data.publishFileId);
|
||||||
@ -250,14 +250,14 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
if (type == 'change') {
|
if (type == 'change') {
|
||||||
changeData = data;
|
changeData = data;
|
||||||
// 变更文件处理
|
// 变更文件处理
|
||||||
var sourceFileName = data.changeFileName + ' V' + data.fileVersion + '.0';
|
var sourceFileName = data.changeFileName + ' V' + data.fileVersion;
|
||||||
$('#publisher_change_source_file_name').children('span.file_name').html(sourceFileName);
|
$('#publisher_change_source_file_name').children('span.file_name').html(sourceFileName);
|
||||||
$('#publisher_change_source_file_id').val(data.changeFileId);
|
$('#publisher_change_source_file_id').val(data.changeFileId);
|
||||||
|
|
||||||
// 变更目标文件处理
|
// 变更目标文件处理
|
||||||
var targetFileName = "";
|
var targetFileName = "";
|
||||||
if (data.changedFileNameNew != undefined && data.changedFileNameNew != '') {
|
if (data.changedFileNameNew != undefined && data.changedFileNameNew != '') {
|
||||||
targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion + '.0';
|
targetFileName = data.changedFileNameNew + ' V' + data.targetFileVersion;
|
||||||
}
|
}
|
||||||
var targetId = "";
|
var targetId = "";
|
||||||
if (data.changedFileIdNew != undefined && data.changedFileIdNew != '') {
|
if (data.changedFileIdNew != undefined && data.changedFileIdNew != '') {
|
||||||
@ -274,7 +274,7 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
$('#publisher_change_report_name').html('无流程手册');
|
$('#publisher_change_report_name').html('无流程手册');
|
||||||
}
|
}
|
||||||
$('#publisher_change_report_id').text(data.taskId);
|
$('#publisher_change_report_id').text(data.taskId);
|
||||||
|
|
||||||
// 下选框处理
|
// 下选框处理
|
||||||
if (!proNumber) {
|
if (!proNumber) {
|
||||||
var tempHtml = '<span class="file_name" style="display:inline-block;text-align:left;"><a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.changedFileIdNew + '\', \'' + data.taskId + '\')">' + targetFileName + '</a></span>';
|
var tempHtml = '<span class="file_name" style="display:inline-block;text-align:left;"><a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.changedFileIdNew + '\', \'' + data.taskId + '\')">' + targetFileName + '</a></span>';
|
||||||
@ -283,12 +283,12 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
$('#select').html('<select id="publisher_change_target_file"></select>');
|
$('#select').html('<select id="publisher_change_target_file"></select>');
|
||||||
if (data.targetFiles.length > 0) {
|
if (data.targetFiles.length > 0) {
|
||||||
var opt1 = {
|
var opt1 = {
|
||||||
data : []
|
data : []
|
||||||
};
|
};
|
||||||
var flag = false;
|
var flag = false;
|
||||||
for (var i = 0; i < data.targetFiles.length; i++) {
|
for (var i = 0; i < data.targetFiles.length; i++) {
|
||||||
var temp = data.targetFiles[i];
|
var temp = data.targetFiles[i];
|
||||||
var name = temp.text + ' V' + temp.version + '.0';
|
var name = temp.text + ' V' + temp.version;
|
||||||
var obj = {id:temp.id, text:name};
|
var obj = {id:temp.id, text:name};
|
||||||
opt1.data.push(obj);
|
opt1.data.push(obj);
|
||||||
if (targetId == temp.id) {
|
if (targetId == temp.id) {
|
||||||
@ -324,7 +324,7 @@ function initPublishData(data, type, isEnd, proNumber) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == 'stop') {
|
if (type == 'stop') {
|
||||||
var fileName = data.stopFileName + ' V' + data.fileVersion + '.0';
|
var fileName = data.stopFileName + ' V' + data.fileVersion;
|
||||||
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.stopFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
var aHtml = '<a class="link" href="javascript:void(0);" onclick="openPortalPage(\'' + data.stopFileId + '\', \'' + data.taskId + '\')">' + fileName + '</a>';
|
||||||
$('#publisher_stop_file_name').children('span.file_name').html(aHtml);
|
$('#publisher_stop_file_name').children('span.file_name').html(aHtml);
|
||||||
$('#publisher_stop_file_id').val(data.stopFileId);
|
$('#publisher_stop_file_id').val(data.stopFileId);
|
||||||
@ -366,15 +366,15 @@ function initChangedData(data, opt1) {
|
|||||||
$('#publisher_change_report_name').html('无流程手册');
|
$('#publisher_change_report_name').html('无流程手册');
|
||||||
}
|
}
|
||||||
$('#publisher_change_report_id').text(selectedTaskId);
|
$('#publisher_change_report_id').text(selectedTaskId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开流程文件查看页面
|
// 打开流程文件查看页面
|
||||||
function openPortalPage(uuid, taskId) {
|
function openPortalPage(uuid, taskId) {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_repository_method_check",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_repository_method_check",
|
||||||
uuid : uuid
|
uuid : uuid
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -383,7 +383,7 @@ function openPortalPage(uuid, taskId) {
|
|||||||
data : param,
|
data : param,
|
||||||
success : function(r) {
|
success : function(r) {
|
||||||
if (r.result == 'ok') {
|
if (r.result == 'ok') {
|
||||||
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + uuid + "&sid=" + sid + "&taskId=" + taskId);// open Windows
|
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + uuid + "&sid=" + sid + "&taskId=" + taskId);// open Windows
|
||||||
} else {
|
} else {
|
||||||
$.simpleAlert(r.msg);
|
$.simpleAlert(r.msg);
|
||||||
}
|
}
|
||||||
@ -397,40 +397,40 @@ function openQueryDataDialog(type) {
|
|||||||
$('#treeDataDiv').html('<div id="loadImg" style="width:100%;height:100%;text-align:center;vertical-align: middle;margin: auto;"></div>');
|
$('#treeDataDiv').html('<div id="loadImg" style="width:100%;height:100%;text-align:center;vertical-align: middle;margin: auto;"></div>');
|
||||||
$('#searchData').html('<input id="processName" style="width:700px;" type="text" class="awsui-txt" placeholder="快速查询">');
|
$('#searchData').html('<input id="processName" style="width:700px;" type="text" class="awsui-txt" placeholder="快速查询">');
|
||||||
$("#loadImg").loading({
|
$("#loadImg").loading({
|
||||||
description:"加载中",
|
description:"加载中",
|
||||||
size:'large',
|
size:'large',
|
||||||
color:'#000'
|
color:'#000'
|
||||||
});
|
});
|
||||||
$('.awsui-loading').css('position', 'relative');
|
$('.awsui-loading').css('position', 'relative');
|
||||||
$('.awsui-loading').css('top', '60px');
|
$('.awsui-loading').css('top', '60px');
|
||||||
$("#loading-demo-basic").loading();
|
$("#loading-demo-basic").loading();
|
||||||
$("#treeDialog").dialog({
|
$("#treeDialog").dialog({
|
||||||
buttons:[
|
buttons:[
|
||||||
{text:'确定',cls:"blue",handler:function(){
|
{text:'确定',cls:"blue",handler:function(){
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
getNewPublishResult(type);
|
getNewPublishResult(type);
|
||||||
} else if( type == 'change'){
|
} else if( type == 'change'){
|
||||||
getChangeResult(type);
|
getChangeResult(type);
|
||||||
} else {// stop
|
} else {// stop
|
||||||
getStopResult(type);
|
getStopResult(type);
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
{text:'关闭',handler:function(){
|
{text:'关闭',handler:function(){
|
||||||
closeDialog();// 关闭窗口
|
closeDialog();// 关闭窗口
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
onClose:function(){
|
onClose:function(){
|
||||||
$('#autoSearchProcessDiv').empty();
|
$('#autoSearchProcessDiv').empty();
|
||||||
$('#autoSearchProcessDiv').hide();
|
$('#autoSearchProcessDiv').hide();
|
||||||
$('#treeDataDiv').empty();
|
$('#treeDataDiv').empty();
|
||||||
$('#searchData').empty();
|
$('#searchData').empty();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
initPublishSearch(type);// 绑定搜索事件
|
initPublishSearch(type);// 绑定搜索事件
|
||||||
getNotPublishTreeData(type);
|
getNotPublishTreeData(type);
|
||||||
} else {// stop
|
} else {// stop
|
||||||
initPublishSearch(type);// 绑定搜索事件
|
initPublishSearch(type);// 绑定搜索事件
|
||||||
getPublishedTreeData(type);
|
getPublishedTreeData(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -438,12 +438,12 @@ function openQueryDataDialog(type) {
|
|||||||
// 获取未发布文件数据结构
|
// 获取未发布文件数据结构
|
||||||
function getNotPublishTreeData(type) {
|
function getNotPublishTreeData(type) {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
type: type,
|
type: type,
|
||||||
flag : true
|
flag : true
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -452,19 +452,19 @@ function getNotPublishTreeData(type) {
|
|||||||
data : param,
|
data : param,
|
||||||
success : function(r) {
|
success : function(r) {
|
||||||
var data = r.data.data;
|
var data = r.data.data;
|
||||||
var setting = {
|
var setting = {
|
||||||
checkbox: false,
|
checkbox: false,
|
||||||
checkInherit: false,
|
checkInherit: false,
|
||||||
event : {
|
event : {
|
||||||
beforeExpand : loadNewData
|
beforeExpand : loadNewData
|
||||||
},
|
},
|
||||||
dataModel : {
|
dataModel : {
|
||||||
data: data
|
data: data
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$("#treeDataDiv").empty();
|
$("#treeDataDiv").empty();
|
||||||
$('#treeDataDiv').html('<ul id="tree" style="width: 100%;"></ul>');
|
$('#treeDataDiv').html('<ul id="tree" style="width: 100%;"></ul>');
|
||||||
initTree = awsui.tree.init($("#tree"), setting);
|
initTree = awsui.tree.init($("#tree"), setting);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -472,16 +472,16 @@ function getNotPublishTreeData(type) {
|
|||||||
function loadNewData(treeNode) {
|
function loadNewData(treeNode) {
|
||||||
// 如果是父节点并且存在子节点执行加载
|
// 如果是父节点并且存在子节点执行加载
|
||||||
if (treeNode) {
|
if (treeNode) {
|
||||||
var pid;
|
var pid;
|
||||||
if (typeof(treeNode) == "string") {
|
if (typeof(treeNode) == "string") {
|
||||||
pid = treeNode;
|
pid = treeNode;
|
||||||
} else {
|
} else {
|
||||||
pid = treeNode.id;
|
pid = treeNode.id;
|
||||||
}
|
}
|
||||||
var dataModel = {
|
var dataModel = {
|
||||||
url : "./w?sid=" + jQuery("#sid").val()
|
url : "./w?sid=" + jQuery("#sid").val()
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query&flag=" + false + "&pid=" + pid
|
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query&flag=" + false + "&pid=" + pid
|
||||||
+ "&wsId=" + wsId + "&type=" + "new" + "&teamId=" + teamId,
|
+ "&wsId=" + wsId + "&type=" + "new" + "&teamId=" + teamId,
|
||||||
method : "POST",
|
method : "POST",
|
||||||
dataType : "json"
|
dataType : "json"
|
||||||
}
|
}
|
||||||
@ -492,40 +492,40 @@ function loadNewData(treeNode) {
|
|||||||
var data = initTree.getChildrenByPid(pid);
|
var data = initTree.getChildrenByPid(pid);
|
||||||
var newData = [];
|
var newData = [];
|
||||||
for (var i=0;i<data.length;i++){
|
for (var i=0;i<data.length;i++){
|
||||||
if (data[i].pid != pid) {
|
if (data[i].pid != pid) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var v = data[i].nocheck;
|
var v = data[i].nocheck;
|
||||||
if (v && data[i].id.length <= 36){
|
if (v && data[i].id.length <= 36){
|
||||||
data[i].name = data[i].name + ' (已发布)';
|
data[i].name = data[i].name + ' (已发布)';
|
||||||
}
|
}
|
||||||
// 流程名称连接责任部门和责任人
|
// 流程名称连接责任部门和责任人
|
||||||
data[i].tempName = data[i].name;
|
data[i].tempName = data[i].name;
|
||||||
var hasDutyDept = false;
|
var hasDutyDept = false;
|
||||||
var hasDutyUser = false;
|
var hasDutyUser = false;
|
||||||
if (data[i].dutyDeptName != undefined && data[i].dutyDeptName != '') {
|
if (data[i].dutyDeptName != undefined && data[i].dutyDeptName != '') {
|
||||||
hasDutyDept = true;
|
hasDutyDept = true;
|
||||||
}
|
}
|
||||||
if (data[i].dutyUserName != undefined && data[i].dutyUserName != '') {
|
if (data[i].dutyUserName != undefined && data[i].dutyUserName != '') {
|
||||||
hasDutyUser = true;
|
hasDutyUser = true;
|
||||||
}
|
}
|
||||||
if (hasDutyDept && hasDutyUser) {
|
if (hasDutyDept && hasDutyUser) {
|
||||||
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ' ' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ' ' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
} else if (hasDutyDept) {
|
} else if (hasDutyDept) {
|
||||||
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ']';
|
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
} else if (hasDutyUser) {
|
} else if (hasDutyUser) {
|
||||||
var tempText = '[' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
var tempText = '[' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
}
|
}
|
||||||
newData.push(data[i]);
|
newData.push(data[i]);
|
||||||
//initTree.refreshNodeById(data[i]);
|
//initTree.refreshNodeById(data[i]);
|
||||||
}
|
}
|
||||||
initTree.refreshNode({
|
initTree.refreshNode({
|
||||||
id : pid,
|
id : pid,
|
||||||
data : newData
|
data : newData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,14 +548,14 @@ function getNewPublishResult(type) {
|
|||||||
// 创建流程手册
|
// 创建流程手册
|
||||||
taskId = createReport(node.category, node.method, node.id, taskId);
|
taskId = createReport(node.category, node.method, node.id, taskId);
|
||||||
var data = {
|
var data = {
|
||||||
category : node.category,
|
category : node.category,
|
||||||
fileVersion : node.version,
|
fileVersion : node.version,
|
||||||
methodId : node.method,
|
methodId : node.method,
|
||||||
publishDesc : "",
|
publishDesc : "",
|
||||||
publishFileId : node.id,
|
publishFileId : node.id,
|
||||||
// publishFileName : node.name,
|
// publishFileName : node.name,
|
||||||
publishFileName : node.tempName,
|
publishFileName : node.tempName,
|
||||||
taskId : taskId
|
taskId : taskId
|
||||||
}
|
}
|
||||||
clearData(type);// 清空
|
clearData(type);// 清空
|
||||||
closeDialog();// 关闭窗口
|
closeDialog();// 关闭窗口
|
||||||
@ -565,12 +565,12 @@ function getNewPublishResult(type) {
|
|||||||
//获取已发布文件数据结构
|
//获取已发布文件数据结构
|
||||||
function getPublishedTreeData(type) {
|
function getPublishedTreeData(type) {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
type: type,
|
type: type,
|
||||||
flag : true
|
flag : true
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -580,37 +580,37 @@ function getPublishedTreeData(type) {
|
|||||||
success : function(r) {
|
success : function(r) {
|
||||||
var data = r.data.data;
|
var data = r.data.data;
|
||||||
var setting = {
|
var setting = {
|
||||||
checkbox: false,
|
checkbox: false,
|
||||||
checkInherit: false,
|
checkInherit: false,
|
||||||
dataModel : {
|
dataModel : {
|
||||||
data: data
|
data: data
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (var i=0;i<data.length;i++){
|
for (var i=0;i<data.length;i++){
|
||||||
// 流程名称连接责任部门和责任人
|
// 流程名称连接责任部门和责任人
|
||||||
data[i].tempName = data[i].name;
|
data[i].tempName = data[i].name;
|
||||||
var hasDutyDept = false;
|
var hasDutyDept = false;
|
||||||
var hasDutyUser = false;
|
var hasDutyUser = false;
|
||||||
if (data[i].dutyDeptName != undefined && data[i].dutyDeptName != '') {
|
if (data[i].dutyDeptName != undefined && data[i].dutyDeptName != '') {
|
||||||
hasDutyDept = true;
|
hasDutyDept = true;
|
||||||
}
|
}
|
||||||
if (data[i].dutyUserName != undefined && data[i].dutyUserName != '') {
|
if (data[i].dutyUserName != undefined && data[i].dutyUserName != '') {
|
||||||
hasDutyUser = true;
|
hasDutyUser = true;
|
||||||
}
|
}
|
||||||
if (hasDutyDept && hasDutyUser) {
|
if (hasDutyDept && hasDutyUser) {
|
||||||
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ' ' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ' ' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
} else if (hasDutyDept) {
|
} else if (hasDutyDept) {
|
||||||
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ']';
|
var tempText = '[' + varDutyDept + ':' + data[i].dutyDeptName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
} else if (hasDutyUser) {
|
} else if (hasDutyUser) {
|
||||||
var tempText = '[' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
var tempText = '[' + varDutyUser + ':' + data[i].dutyUserName + ']';
|
||||||
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
data[i].name += '<span style="color:#ddd">   ' + tempText + '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#treeDataDiv").empty();
|
$("#treeDataDiv").empty();
|
||||||
$('#treeDataDiv').html('<ul id="tree" style="width: 100%;"></ul>');
|
$('#treeDataDiv').html('<ul id="tree" style="width: 100%;"></ul>');
|
||||||
initTree = awsui.tree.init($("#tree"), setting);
|
initTree = awsui.tree.init($("#tree"), setting);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -637,11 +637,11 @@ function getChangeResult(type) {
|
|||||||
var notPublishData = [];
|
var notPublishData = [];
|
||||||
// 查询其他未版本
|
// 查询其他未版本
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_not_publish_version_query",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_not_publish_version_query",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
uuid: node.id
|
uuid: node.id
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -657,19 +657,19 @@ function getChangeResult(type) {
|
|||||||
var changeFileNewName = "";
|
var changeFileNewName = "";
|
||||||
var changeFileNewVersion = 1;
|
var changeFileNewVersion = 1;
|
||||||
var data = {
|
var data = {
|
||||||
category : node.category,
|
category : node.category,
|
||||||
changeFileId : node.id,
|
changeFileId : node.id,
|
||||||
// changeFileName : node.name,
|
// changeFileName : node.name,
|
||||||
changeFileName : node.tempName,
|
changeFileName : node.tempName,
|
||||||
changedDesc : "",
|
changedDesc : "",
|
||||||
changedFileIdNew : changeFileNewId,
|
changedFileIdNew : changeFileNewId,
|
||||||
changedFileNameNew : changeFileNewName,
|
changedFileNameNew : changeFileNewName,
|
||||||
fileVersion : node.version,
|
fileVersion : node.version,
|
||||||
methodId : node.method,
|
methodId : node.method,
|
||||||
targetCategory: node.category,
|
targetCategory: node.category,
|
||||||
targetFileVersion: changeFileNewVersion,
|
targetFileVersion: changeFileNewVersion,
|
||||||
targetFiles: notPublishData,
|
targetFiles: notPublishData,
|
||||||
targetMethodId: node.method
|
targetMethodId: node.method
|
||||||
}
|
}
|
||||||
clearData(type);// 清空
|
clearData(type);// 清空
|
||||||
closeDialog();// 关闭窗口
|
closeDialog();// 关闭窗口
|
||||||
@ -695,11 +695,11 @@ function getStopResult(type) {
|
|||||||
if (node.category == 'process' && node.method != "process.evc" && node.method != 'default') {
|
if (node.category == 'process' && node.method != "process.evc" && node.method != 'default') {
|
||||||
// 获取流程手册id
|
// 获取流程手册id
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_query",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_query",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
uuid: node.id
|
uuid: node.id
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -713,14 +713,14 @@ function getStopResult(type) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
var data = {
|
var data = {
|
||||||
category : node.category,
|
category : node.category,
|
||||||
fileVersion : node.version,
|
fileVersion : node.version,
|
||||||
methodId : node.method,
|
methodId : node.method,
|
||||||
stopDesc : "",
|
stopDesc : "",
|
||||||
stopFileId : node.id,
|
stopFileId : node.id,
|
||||||
// stopFileName : node.name,
|
// stopFileName : node.name,
|
||||||
stopFileName : node.tempName,
|
stopFileName : node.tempName,
|
||||||
taskId : taskId
|
taskId : taskId
|
||||||
}
|
}
|
||||||
clearData(type);// 清空
|
clearData(type);// 清空
|
||||||
closeDialog();// 关闭窗口
|
closeDialog();// 关闭窗口
|
||||||
@ -731,11 +731,11 @@ function getStopResult(type) {
|
|||||||
function createReport(category, method, uuid, taskId) {
|
function createReport(category, method, uuid, taskId) {
|
||||||
if (category == 'process' && method != "process.evc" && method != 'default') {
|
if (category == 'process' && method != "process.evc" && method != 'default') {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
uuid: uuid
|
uuid: uuid
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
@ -745,7 +745,7 @@ function createReport(category, method, uuid, taskId) {
|
|||||||
data : param,
|
data : param,
|
||||||
success : function(r) {
|
success : function(r) {
|
||||||
if (r.result == 'ok') {
|
if (r.result == 'ok') {
|
||||||
taskId = r.data.taskId;
|
taskId = r.data.taskId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -772,41 +772,41 @@ function closeDialog() {
|
|||||||
function openReportFile(taskId) {
|
function openReportFile(taskId) {
|
||||||
$.simpleAlert("文件正在处理", "loading");
|
$.simpleAlert("文件正在处理", "loading");
|
||||||
awsui.ajax.request({
|
awsui.ajax.request({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "./jd?sid=" + sid + "&cmd=com.actionsoft.apps.coe.pal.publisher_publish_output_file_open",
|
url: "./jd?sid=" + sid + "&cmd=com.actionsoft.apps.coe.pal.publisher_publish_output_file_open",
|
||||||
data: {taskId: taskId},
|
data: {taskId: taskId},
|
||||||
ok: function(msg) {
|
ok: function(msg) {
|
||||||
$.simpleAlert("close");
|
$.simpleAlert("close");
|
||||||
var url = msg.data.url;
|
var url = msg.data.url;
|
||||||
if (msg.data.noSupport) {
|
if (msg.data.noSupport) {
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
} else {
|
} else {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
err: function(msg) {
|
err: function(msg) {
|
||||||
$.simpleAlert("close");
|
$.simpleAlert("close");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击checkbox
|
// 点击checkbox
|
||||||
function onCheckboxClickEvent(boItemName, $checkbox, val) {
|
function onCheckboxClickEvent(boItemName, $checkbox, val) {
|
||||||
var isCheck = !$checkbox.closest('div').hasClass('checked');
|
var isCheck = !$checkbox.closest('div').hasClass('checked');
|
||||||
if (val == '流程文件发布') {
|
if (val == '流程文件发布') {
|
||||||
dealPublishCheck(isCheck, 'new');
|
dealPublishCheck(isCheck, 'new');
|
||||||
} else if (val == '流程文件版本更新') {
|
} else if (val == '流程文件版本更新') {
|
||||||
dealPublishCheck(isCheck, 'change');
|
dealPublishCheck(isCheck, 'change');
|
||||||
} else if (val == '流程文件废止') {
|
} else if (val == '流程文件废止') {
|
||||||
dealPublishCheck(isCheck, 'stop');
|
dealPublishCheck(isCheck, 'stop');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 主体内容显示与隐藏
|
// 主体内容显示与隐藏
|
||||||
function dealPublishCheck(isCheck, type) {
|
function dealPublishCheck(isCheck, type) {
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
clearData(type); //清空
|
clearData(type); //清空
|
||||||
isCheck ? $('#publisher_new_tr').show() : $('#publisher_new_tr').hide();
|
isCheck ? $('#publisher_new_tr').show() : $('#publisher_new_tr').hide();
|
||||||
} else if (type == 'change') {
|
} else if (type == 'change') {
|
||||||
clearData(type);
|
clearData(type);
|
||||||
isCheck ? $('#publisher_change_tr').show() : $('#publisher_change_tr').hide();
|
isCheck ? $('#publisher_change_tr').show() : $('#publisher_change_tr').hide();
|
||||||
@ -821,9 +821,9 @@ function dealPublishCheck(isCheck, type) {
|
|||||||
// 初始化宽度
|
// 初始化宽度
|
||||||
function initWidth(isCheck, type) {
|
function initWidth(isCheck, type) {
|
||||||
if (type == 'new' && isCheck) {
|
if (type == 'new' && isCheck) {
|
||||||
$('#publisher_new_file_name').width($('#publisher_new_file_name').closest('td').width());
|
$('#publisher_new_file_name').width($('#publisher_new_file_name').closest('td').width());
|
||||||
$('#publisher_new_file_name').children('span.file_name').width($('#publisher_new_file_name').width() - 20);
|
$('#publisher_new_file_name').children('span.file_name').width($('#publisher_new_file_name').width() - 20);
|
||||||
$('#publisher_new_desc').width('86%');
|
$('#publisher_new_desc').width('86%');
|
||||||
}
|
}
|
||||||
if (type == 'change' && isCheck) {
|
if (type == 'change' && isCheck) {
|
||||||
$('#publisher_change_source_file_name').width($('#publisher_change_source_file_name').closest('td').width());
|
$('#publisher_change_source_file_name').width($('#publisher_change_source_file_name').closest('td').width());
|
||||||
@ -833,7 +833,7 @@ function initWidth(isCheck, type) {
|
|||||||
}
|
}
|
||||||
if (type == 'stop' && isCheck) {
|
if (type == 'stop' && isCheck) {
|
||||||
$('#publisher_stop_file_name').width($('#publisher_stop_file_name').closest('td').width());
|
$('#publisher_stop_file_name').width($('#publisher_stop_file_name').closest('td').width());
|
||||||
$('#publisher_stop_file_name').children('span.file_name').width($('#publisher_stop_file_name').width() - 20);
|
$('#publisher_stop_file_name').children('span.file_name').width($('#publisher_stop_file_name').width() - 20);
|
||||||
$('#publisher_stop_desc').width('86%');
|
$('#publisher_stop_desc').width('86%');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -915,34 +915,34 @@ function formSave(isTransact){
|
|||||||
var publishStopFileId = $('#publisher_stop_file_id').val();
|
var publishStopFileId = $('#publisher_stop_file_id').val();
|
||||||
var publishStopTaskId = $('#publisher_stop_report_id').text();
|
var publishStopTaskId = $('#publisher_stop_report_id').text();
|
||||||
var publishStopDesc = $('#publisher_stop_desc').val();
|
var publishStopDesc = $('#publisher_stop_desc').val();
|
||||||
|
|
||||||
var saveData = {};
|
var saveData = {};
|
||||||
var newObj = {
|
var newObj = {
|
||||||
uuid : publishNewFileId,
|
uuid : publishNewFileId,
|
||||||
taskId : publishNewTaskId,
|
taskId : publishNewTaskId,
|
||||||
desc : publishNewDesc
|
desc : publishNewDesc
|
||||||
};
|
};
|
||||||
var changeObj = {
|
var changeObj = {
|
||||||
uuid : publishChangeFileId,
|
uuid : publishChangeFileId,
|
||||||
targetId : publishChangeTargetFileId,
|
targetId : publishChangeTargetFileId,
|
||||||
taskId : publishChangeTaskId,
|
taskId : publishChangeTaskId,
|
||||||
desc : publishChangeDesc
|
desc : publishChangeDesc
|
||||||
};
|
};
|
||||||
var stopObj = {
|
var stopObj = {
|
||||||
uuid : publishStopFileId,
|
uuid : publishStopFileId,
|
||||||
taskId : publishStopTaskId,
|
taskId : publishStopTaskId,
|
||||||
desc : publishStopDesc
|
desc : publishStopDesc
|
||||||
};
|
};
|
||||||
saveData.newObj = newObj;
|
saveData.newObj = newObj;
|
||||||
saveData.changeObj = changeObj;
|
saveData.changeObj = changeObj;
|
||||||
saveData.stopObj = stopObj;
|
saveData.stopObj = stopObj;
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_save_before",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_save_before",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId,
|
wsId: wsId,
|
||||||
processInstId : processInstId,
|
processInstId : processInstId,
|
||||||
data: JSON.stringify(saveData)
|
data: JSON.stringify(saveData)
|
||||||
}
|
}
|
||||||
|
|
||||||
var flag = false;
|
var flag = false;
|
||||||
@ -957,11 +957,11 @@ function formSave(isTransact){
|
|||||||
if (r.result == 'error') {
|
if (r.result == 'error') {
|
||||||
flag = true;
|
flag = true;
|
||||||
var data = r.data.data;
|
var data = r.data.data;
|
||||||
var name = data.name + ' V' + data.version + '.0';
|
var name = data.name + ' V' + data.version;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
tempName = name;
|
tempName = name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
$.simpleAlert("表单信息错误,请联系管理员!", 'error');
|
$.simpleAlert("表单信息错误,请联系管理员!", 'error');
|
||||||
}
|
}
|
||||||
@ -998,11 +998,11 @@ function initPublishSearch(type) {
|
|||||||
searchProcess(type);
|
searchProcess(type);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#autoSearchProcessDiv").off("mouseenter").on("mouseenter", function () {
|
$("#autoSearchProcessDiv").off("mouseenter").on("mouseenter", function () {
|
||||||
$('#autoSearchProcessDiv').show();
|
$('#autoSearchProcessDiv').show();
|
||||||
}).off("autoSearchProcessDiv").on("mouseleave", function () {
|
}).off("autoSearchProcessDiv").on("mouseleave", function () {
|
||||||
$('#autoSearchProcessDiv').hide();
|
$('#autoSearchProcessDiv').hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
@ -1012,107 +1012,107 @@ function searchProcess(type) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var name = $("#processName").val().trim().toLowerCase();
|
var name = $("#processName").val().trim().toLowerCase();
|
||||||
var html = '';
|
var html = '';
|
||||||
//先向后台请求完整tree数据
|
//先向后台请求完整tree数据
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
var data = getAllTreeData();
|
var data = getAllTreeData();
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var text = data[i].name;
|
var text = data[i].name;
|
||||||
if (text.indexOf(name) > -1) {
|
if (text.indexOf(name) > -1) {
|
||||||
var id = data[i].id;
|
var id = data[i].id;
|
||||||
var path = getSearchTreeNodePath(data[i], text, data, 1);
|
var path = getSearchTreeNodePath(data[i], text, data, 1);
|
||||||
var pids = getSearchTreeNodePath(data[i], text, data, 2);
|
var pids = getSearchTreeNodePath(data[i], text, data, 2);
|
||||||
html += '<div class="auto_divcontenr" onmouseover="auto_move($(this))" onmouseout="auto_out($(this)) " onclick="auto_click($(this))">';
|
html += '<div class="auto_divcontenr" onmouseover="auto_move($(this))" onmouseout="auto_out($(this)) " onclick="auto_click($(this))">';
|
||||||
html += '<span plId="' + id + '" data-type="' + type +'" data-pids="' + pids + '" style="cursor:pointer; display:inline-block;margin-left:5px;">';
|
html += '<span plId="' + id + '" data-type="' + type +'" data-pids="' + pids + '" style="cursor:pointer; display:inline-block;margin-left:5px;">';
|
||||||
html += '<div style="height:100%">' + path + '</div>';
|
html += '<div style="height:100%">' + path + '</div>';
|
||||||
html += '<div style="float:right;height:100%"></div>';
|
html += '<div style="float:right;height:100%"></div>';
|
||||||
html += '</span>';
|
html += '</span>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$('span.tree-items-title').each(function() {
|
$('span.tree-items-title').each(function() {
|
||||||
var text = $(this).text().toLowerCase();
|
var text = $(this).text().toLowerCase();
|
||||||
if (text.indexOf(name) > -1) {// found
|
if (text.indexOf(name) > -1) {// found
|
||||||
var id = $(this).attr('id').substring(10);
|
var id = $(this).attr('id').substring(10);
|
||||||
if (id.length <= 36) {
|
if (id.length <= 36) {
|
||||||
var node = initTree.getNodeById(id);
|
var node = initTree.getNodeById(id);
|
||||||
var path = getFilePath(node, text);
|
var path = getFilePath(node, text);
|
||||||
html += '<div class="auto_divcontenr" onmouseover="auto_move($(this))" onmouseout="auto_out($(this)) " onclick="auto_click($(this))">';
|
html += '<div class="auto_divcontenr" onmouseover="auto_move($(this))" onmouseout="auto_out($(this)) " onclick="auto_click($(this))">';
|
||||||
html += '<span plId="' + id + '" style="cursor:pointer; display:inline-block;margin-left:5px;">';
|
html += '<span plId="' + id + '" style="cursor:pointer; display:inline-block;margin-left:5px;">';
|
||||||
html += '<div style="height:100%">' + path + '</div>';
|
html += '<div style="height:100%">' + path + '</div>';
|
||||||
html += '<div style="float:right;height:100%"></div>';
|
html += '<div style="float:right;height:100%"></div>';
|
||||||
html += '</span>';
|
html += '</span>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (html.length > 0) {
|
if (html.length > 0) {
|
||||||
$("#autoSearchProcessDiv").html(html).show();
|
$("#autoSearchProcessDiv").html(html).show();
|
||||||
// $("#processName").val('');
|
// $("#processName").val('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllTreeData() {
|
function getAllTreeData() {
|
||||||
var param = {
|
var param = {
|
||||||
sid : sid,
|
sid : sid,
|
||||||
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query_search",
|
cmd : "com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query_search",
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
wsId: wsId
|
wsId: wsId
|
||||||
}
|
}
|
||||||
var data;
|
var data;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "./jd",
|
url : "./jd",
|
||||||
type : "POST",
|
type : "POST",
|
||||||
dataType : "JSON",
|
dataType : "JSON",
|
||||||
data : param,
|
data : param,
|
||||||
async : false,
|
async : false,
|
||||||
success : function(d) {
|
success : function(d) {
|
||||||
data = d;
|
data = d;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSearchTreeNodePath(node, text, data, isPid) {
|
function getSearchTreeNodePath(node, text, data, isPid) {
|
||||||
var name = text;
|
var name = text;
|
||||||
var pids = node.pid;
|
var pids = node.pid;
|
||||||
do {
|
do {
|
||||||
var p = undefined;
|
var p = undefined;
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
if (data[i].id == node.pid) {
|
if (data[i].id == node.pid) {
|
||||||
p = data[i];
|
p = data[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (p == undefined) {
|
if (p == undefined) {
|
||||||
if (node.pid == "process") {
|
if (node.pid == "process") {
|
||||||
name = "流程>" + name;
|
name = "流程>" + name;
|
||||||
}
|
}
|
||||||
if (node.pid == "org") {
|
if (node.pid == "org") {
|
||||||
name = "组织>" + name;
|
name = "组织>" + name;
|
||||||
}
|
}
|
||||||
if (node.pid == "data") {
|
if (node.pid == "data") {
|
||||||
name = "数据>" + name;
|
name = "数据>" + name;
|
||||||
}
|
}
|
||||||
if (node.pid == "itsystem") {
|
if (node.pid == "itsystem") {
|
||||||
name = "IT系统>" + name;
|
name = "IT系统>" + name;
|
||||||
}
|
}
|
||||||
if (node.pid == "control") {
|
if (node.pid == "control") {
|
||||||
name = "控制>" + name;
|
name = "控制>" + name;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
name = p.name + ">" + name;
|
name = p.name + ">" + name;
|
||||||
pids = p.pid + "." + pids;
|
pids = p.pid + "." + pids;
|
||||||
node = p;
|
node = p;
|
||||||
} while(true);
|
} while(true);
|
||||||
if (isPid == 2) {
|
if (isPid == 2) {
|
||||||
return pids;
|
return pids;
|
||||||
} else {
|
} else {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFilePath(node, text) {
|
function getFilePath(node, text) {
|
||||||
@ -1141,16 +1141,16 @@ function auto_click(obj, type) {
|
|||||||
var type = obj.find("span").data("type");
|
var type = obj.find("span").data("type");
|
||||||
var dom = initTree.getNodeDomById(plId)
|
var dom = initTree.getNodeDomById(plId)
|
||||||
if (type == 'new') {
|
if (type == 'new') {
|
||||||
//预先去加载initTree
|
//预先去加载initTree
|
||||||
var pids = obj.find("span").data("pids");
|
var pids = obj.find("span").data("pids");
|
||||||
var pidList = pids.split('.');
|
var pidList = pids.split('.');
|
||||||
for (var i = 0; i < pidList.length; i++) {
|
for (var i = 0; i < pidList.length; i++) {
|
||||||
loadNewData(pidList[i]);
|
loadNewData(pidList[i]);
|
||||||
dom = initTree.getNodeDomById(pidList[i]);
|
dom = initTree.getNodeDomById(pidList[i]);
|
||||||
initTree.expandNodes(dom, true, true, true);
|
initTree.expandNodes(dom, true, true, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
initTree.expandNodes(dom, true, true, true);
|
initTree.expandNodes(dom, true, true, true);
|
||||||
}
|
}
|
||||||
// 偏移至可见区域
|
// 偏移至可见区域
|
||||||
var ele = document.getElementById('tree_span_' + plId);
|
var ele = document.getElementById('tree_span_' + plId);
|
||||||
@ -1182,7 +1182,7 @@ function listenCloseEvent() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//在弹出“是否离开”的提示框后,选择离开,则触发onunload事件
|
//在弹出“是否离开”的提示框后,选择离开,则触发onunload事件
|
||||||
window.onunload = function(){
|
window.onunload = function(){
|
||||||
// 查询bo表数据,是否保存过,未保存过离开页面则删除该实例
|
// 查询bo表数据,是否保存过,未保存过离开页面则删除该实例
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user