diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple_L4.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple_L4.js index 535b63d1..ebc7201b 100644 --- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple_L4.js +++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple_L4.js @@ -646,6 +646,14 @@ function queryapprove(){ } + var adaptregionname = r.data.ADAPT_REGION_NAME; + if(adaptregionname!=''){ + ui("ADAPT_REGION_NAME",adaptregionname); + } + var applicableproduct = r.data.APPLICABLE_PRODUCT; + if(applicableproduct!=''){ + ui("APPLICABLE_PRODUCT",applicableproduct); + } } }); } @@ -1013,7 +1021,7 @@ function addProcess(type) { } // 生成流程手册taskId if (temps.length > 0) { - temps = createBatchReport(temps, getReportCreateTime()); + temps = createBatchReport(temps, getReportCreateTime(),type); // 更新到最新数据中 for (var i = 0; i < temps.length; i++) { temps[i].publishDesc = desc; @@ -1754,6 +1762,56 @@ function createReport(category, method, uuid, taskId) { return taskId; } +// 异步创建流程手册 by yujh +function createReportAsync(category, method, uuid, taskId,object,obj,type) { + if ((method == 'control.policy' || method == 'data.form' || method.indexOf('process.') > -1) && method != 'default') { + var param = { + sid : sid, + cmd : "com.actionsoft.apps.coe.pal.publisher_output_pr_report_create", + teamId: teamId, + wsId: wsId, + uuid: uuid + } + $.ajax({ + url : "./jd", + type : "POST", + dataType : "JSON", + async : true, + data : param, + success : function(r) { + $.simpleAlert('文件创建成功'); + if (r.result == 'ok') { + //更新阻断参数 + bigFileCheck = false; + //更新数据记录 + if (type == 'new') { + var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method); + $(object).text(fileName); + for (var i = 0; i < newTemp.length; i++) { + if (newTemp[i].publishFileId == uuid) { + newTemp[i].taskId = taskId; + } + } + } else if (type == 'change') { + var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method); + $(object).text(targetFileName); + for (var i = 0; i < changeTemp.length; i++) { + if (changeTemp[i].changedFileIdNew == uuid) { + changeTemp[i].taskId = taskId; + } + } + } + $(object).prev().remove();//先删除加载图表元素 + $(object).after(''); + } + } + }); + } else { + $.simpleAlert('不支持创建手册'); + } + return taskId; +} + // 批量创建流程手册 function createBatchReport(data, createTime) { var ids = []; @@ -1847,8 +1905,10 @@ function getOutputName(category, method) { } //单个流程立即创建流程手册 +//增加大文件异步处理逻辑 by yujh function quickCreateReport(obj, object, type) { var taskId; + var bigFile =false; var category = obj.category; var method = obj.methodId; var uuid = ''; @@ -1857,43 +1917,80 @@ function quickCreateReport(obj, object, type) { } else if (type == 'change') { uuid = obj.changedFileIdNew; } - $.simpleAlert("正在创建", "loading"); - taskId = createReport(category, method, uuid, taskId); - $.simpleAlert("close"); - //打开流程手册 - $(object).attr('onclick', "openReportFile(\'" + taskId + "\')"); - - //三员管理下,立即创建 - if(isHighSecurity){ - //更新数据记录 - if (type == 'new') { - var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method); - $(object).text(fileName); - } else if (type == 'change') { - var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method); - $(object).text(targetFileName); + //先查询正文大小,如果超过设置值,则弹框提醒逻辑修改 + $.ajax({ + type: "POST", + url: "./jd?sid=" + + sid + + "&cmd=com.awspaas.user.apps.yiliwps.checkFileSize", + data: { + palId: uuid + }, + async : false, + success: function (r) { + debugger; + if (r.result == "ok") { + bigFile = r.data.state; + } } + }); + if(bigFile){ + //设置保存、提交阻断参数 + bigFileCheck = true; + //修改 立即创建文字为创建中请稍后 + //异步执行 + $(object).text("正在创建中,请稍后"); + $(object).before('
'); + taskId = createReportAsync(category, method, uuid, taskId,object,obj,type); + // }else{ - //更新数据记录 - if (type == 'new') { - var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method); - $(object).text(fileName); - for (var i = 0; i < newTemp.length; i++) { - if (newTemp[i].publishFileId == uuid) { - newTemp[i].taskId = taskId; - } + $.simpleAlert("正在创建", "loading"); + taskId = createReport(category, method, uuid, taskId); + $.simpleAlert("close"); + //打开流程手册 + $(object).attr('onclick', "openReportFile(\'" + taskId + "\')"); + //三员管理下,立即创建 + if(isHighSecurity){ + //更新数据记录 + if (type == 'new') { + var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method); + $(object).text(fileName); + } else if (type == 'change') { + var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method); + $(object).text(targetFileName); } - } else if (type == 'change') { - var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method); - $(object).text(targetFileName); - for (var i = 0; i < changeTemp.length; i++) { - if (changeTemp[i].changedFileIdNew == uuid) { - changeTemp[i].taskId = taskId; + }else{ + //更新数据记录 + if (type == 'new') { + var fileName = obj.publishFileName + ' V' + obj.fileVersion + '-' + getOutputName(category, method); + $(object).text(fileName); + for (var i = 0; i < newTemp.length; i++) { + if (newTemp[i].publishFileId == uuid) { + newTemp[i].taskId = taskId; + } + } + } else if (type == 'change') { + var targetFileName = obj.changedFileNameNew + ' V' + obj.targetFileVersion + '-' + getOutputName(category, method); + $(object).text(targetFileName); + for (var i = 0; i < changeTemp.length; i++) { + if (changeTemp[i].changedFileIdNew == uuid) { + changeTemp[i].taskId = taskId; + } } } } + $(object).after(''); } - $(object).parent().append(''); + } // 清空树结构 @@ -2301,6 +2398,10 @@ function saveFormData(type) { // 点击办理时的校验+保存字表 function formSave(isTransact){ + if(bigFileCheck){ + $.simpleAlert("手册正在创建中,暂不支持操作"); + return false; + } var userTaskDefName = $("#userTaskDefName").val(); if(userTaskDefName == '发起人'){ if(isTransact==true){