流程阅览界面手册处理
This commit is contained in:
parent
84cca3442c
commit
c53c9a2697
Binary file not shown.
@ -1196,6 +1196,27 @@ public class CoEPALController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 流程手册单个下载
|
||||
* @param me
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal_outputreport_output_single_file_downLoad")
|
||||
public String coePALProcessSingleFileDownload(UserContext me, RequestParams params) throws Exception {
|
||||
UpfileWeb web = new UpfileWeb(me);
|
||||
String fileId = params.get("fileId");
|
||||
return web.coePALProcessSingleFileDownload(fileId);
|
||||
}
|
||||
|
||||
@Mapping("com.actionsoft.apps.coe.pal_outputreport_output_query_manual_logdata")
|
||||
public String coePALProcessManualLogData(UserContext me, RequestParams params) throws Exception {
|
||||
UpfileWeb web = new UpfileWeb(me);
|
||||
String ruuid = params.get("ruuid");
|
||||
return web.coePALProcessManualLogData(ruuid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 文件属性的单个 值 修改
|
||||
|
||||
@ -26,6 +26,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyMod
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
|
||||
import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
|
||||
import com.actionsoft.bpms.bo.engine.BO;
|
||||
import com.actionsoft.bpms.server.DispatcherRequest;
|
||||
import com.actionsoft.bpms.server.conf.server.AWSServerConf;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
@ -600,13 +601,6 @@ public class UpfileWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UtilFile.zipCompress(targetDir, new File(targetDir + zipName));
|
||||
|
||||
File[] files = targetFileDir.listFiles(new FilenameFilter()
|
||||
@ -642,6 +636,35 @@ public class UpfileWeb extends ActionWeb {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单个附件下载
|
||||
*
|
||||
* @param uuid
|
||||
* @return
|
||||
* @author zhaolei
|
||||
*/
|
||||
public String coePALProcessSingleFileDownload(String fileId) throws Exception {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
UpFileDao upfileDao = new UpFileDao();
|
||||
UpfileModel upfileModel = upfileDao.get(fileId);
|
||||
DCContext dcContext = getDCContext(upfileModel);
|
||||
|
||||
String downUrl=SDK.getConfAPI().getPortalUrl() + "/r/" + dcContext.getDownloadURL().replace("./", "");
|
||||
ro.put("url",downUrl);
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
public String coePALProcessManualLogData(String ruuid) throws Exception {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
BO outputreportBO=SDK.getBOAPI().query("BO_EU_PAL_OUTPUTREPORT").addQuery("PLID=",ruuid).addQuery("RESULT=","手册转换成功!").detail();
|
||||
if(outputreportBO!=null){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("taskId",outputreportBO.getString("TASKID"));
|
||||
map.put("plname",outputreportBO.getString("PLNAME"));
|
||||
ro.put("resultMap",map);
|
||||
}
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1638,6 +1638,7 @@ function ProcessManual(obj) {
|
||||
}else if(methodId=="control.kpi"){
|
||||
manualName="流程绩效文件 :";
|
||||
}
|
||||
|
||||
$('#processFileDock').empty();
|
||||
var t = '';
|
||||
/*t += '<table class="awsui-table">';
|
||||
@ -1651,30 +1652,54 @@ function ProcessManual(obj) {
|
||||
t += '</td></tr>';
|
||||
t += '</table>';*/
|
||||
|
||||
var resultMap=getProcessManuallogData();
|
||||
var transitionflag;
|
||||
if(resultMap!=null){
|
||||
transitionflag=true;
|
||||
var gettaskId=resultMap["taskId"];
|
||||
var getplname=resultMap["plname"];
|
||||
t += '<div>';
|
||||
t +='<strong>'+manualName+'</strong>';
|
||||
t += '<table class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
t += '<tr>';
|
||||
t += '<td id="manualDownload">';
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+getplname+'" onclick="openOutputFile(\''+ gettaskId +'\')">'+ getplname +'</a>';
|
||||
t +='<button id="ProcessManual" type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm">';
|
||||
t += '<i class="awsui-iconfont" title="手册下载" onclick="downloadProcessFile(\''+gettaskId+'\')"></i>';
|
||||
t +='</button>';
|
||||
t +='</div>';
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
t +='</div>';
|
||||
|
||||
t += '<div>';
|
||||
t +='<strong>'+manualName+'</strong>';
|
||||
t += '<table class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
t += '<tr>';
|
||||
t += '<td>';
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+fileName+'" onclick="openOutputFile(\''+ taskId +'\')">'+ fileName +'</a>';
|
||||
t +='<button id="ProcessManual" type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm">';
|
||||
t += '<i class="awsui-iconfont" title="手册下载" onclick="downloadProcessFile(\''+taskId+'\')"></i>';
|
||||
t +='</button>';
|
||||
}else{
|
||||
transitionflag=false;
|
||||
t += '<div>';
|
||||
t +='<strong>'+manualName+'</strong>';
|
||||
t += '<table class="awsui-table">';
|
||||
t +='<tbody>';
|
||||
t += '<tr>';
|
||||
t += '<td id="manualDownload">';
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+fileName+'" onclick="openOutputFile(\''+ taskId +'\')">'+ fileName +'</a>';
|
||||
t +='<button id="ProcessManual" type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm">';
|
||||
t += '<i class="awsui-iconfont" title="手册下载" onclick="downloadProcessFile(\''+taskId+'\')"></i>';
|
||||
t +='</button>';
|
||||
t +='</div>';
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
t +='</div>';
|
||||
}
|
||||
|
||||
t +='</div>';
|
||||
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
t +='</div>';
|
||||
|
||||
$('#processFileDock').append(t);
|
||||
|
||||
//相关文件/相关附件
|
||||
initUpfileData(obj);
|
||||
initUpfileData(obj,transitionflag);
|
||||
|
||||
}
|
||||
|
||||
@ -1705,6 +1730,27 @@ function openOutputFile(taskId) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getProcessManuallogData() {
|
||||
var resultData;
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "./jd?sid=" + sid
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_query_manual_logdata",
|
||||
data : {
|
||||
ruuid : ruuid
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.result.result == "ok") {
|
||||
resultData=msg.result.result.resultMap;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return resultData;
|
||||
}
|
||||
|
||||
|
||||
function downloadProcessFile(taskId) {
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
@ -1725,6 +1771,22 @@ function downloadProcessFile(taskId) {
|
||||
}
|
||||
|
||||
|
||||
function singleFileDownload(id) {
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "./jd?sid=" + sid
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_single_file_downLoad",
|
||||
data : {
|
||||
fileId :id
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.result == "ok") {
|
||||
window.location.href = msg.data.url;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 相关文件/制度文件下载
|
||||
* @param uuid
|
||||
@ -1751,7 +1813,7 @@ function downloadZipFile(splitId,toolbarname) {
|
||||
|
||||
|
||||
// 初始化上传附件
|
||||
function initUpfileData(obj) {
|
||||
function initUpfileData(obj,transitionflag) {
|
||||
$('#alertMessage').remove();
|
||||
if (obj == undefined || obj == '0') {
|
||||
$('#portalFileDock').empty();
|
||||
@ -1769,7 +1831,6 @@ function initUpfileData(obj) {
|
||||
t += '<i class="awsui-iconfont" onclick="downloadZipFile(\''+obj.id+'\')"></i>';
|
||||
t +='</button>';*!/
|
||||
t +='</div>';
|
||||
|
||||
}*/
|
||||
|
||||
t += '<div>';
|
||||
@ -1787,6 +1848,23 @@ function initUpfileData(obj) {
|
||||
t +='</tbody>';
|
||||
t += '</table>';
|
||||
splitId+=obj.id+',';
|
||||
|
||||
|
||||
var spiltName=obj.name;
|
||||
if(spiltName.substring(0,spiltName.lastIndexOf("."))==fileName && transitionflag==false){
|
||||
var s='';
|
||||
$("#manualDownload").empty();
|
||||
s += '<td id="manualDownload">';
|
||||
s += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+obj.name+'" onclick="readFile(\''+ obj.id +'\')">'+ obj.name+"替换后" +'</a>';
|
||||
s +='<button id="ProcessManual" type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm">';
|
||||
s += '<i class="awsui-iconfont" title="手册下载" onclick="singleFileDownload(\''+obj.id+'\')"></i>';
|
||||
s +='</button>';
|
||||
s +='</div>';
|
||||
s += '</td>';
|
||||
$("#manualDownload").append(s);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1817,7 +1895,6 @@ function initUpfileData(obj) {
|
||||
var obj = processShape[i];
|
||||
t += '<div class="tablefileContent"><a href="javascript:void(0);" title="'+obj.name+'" onclick="readFile(\''+ obj.id +'\')">'+ obj.name +'</a>';
|
||||
t +='</div>';
|
||||
|
||||
t += '</td>';
|
||||
t += '</tr>';
|
||||
t +='</tbody>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user