流程阅览移动端
This commit is contained in:
parent
55488bff4d
commit
d4e8eab923
Binary file not shown.
@ -430,6 +430,21 @@ public class PublisherController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 打开流程详情页面 (移动端)
|
||||
* @param me
|
||||
* @param uuid
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_publish_file_mobile_open")
|
||||
public String openPublishFileMobilePage(UserContext me, String uuid, String taskId) {
|
||||
return PALRepositoryQueryAPIManager.getInstance().getPublishMobilePortalHtml(me, uuid, taskId, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 预览流程手册
|
||||
* @param me
|
||||
|
||||
@ -33,6 +33,7 @@ var stopPageSetting = {
|
||||
}
|
||||
var isHighSecurity;
|
||||
$(document).ready(function(){
|
||||
|
||||
$('td,th').css('padding-top','0px');
|
||||
$('td,th').css('padding-bottom','0px');
|
||||
// $('#alertMsg').css('background', '#fff');
|
||||
@ -758,7 +759,6 @@ function addProcess(type) {
|
||||
buttons:[
|
||||
{text:'确定',cls:"blue",handler:function(){
|
||||
window.$.simpleAlert("请稍等...", "loading");
|
||||
debugger;
|
||||
if (type == 'new') {
|
||||
if (treeCheckedNewArr.length == 0) {
|
||||
$.simpleAlert('发布流程不能为空');
|
||||
@ -1307,7 +1307,6 @@ function getStopBatchResult(type) {
|
||||
|
||||
// 获取已有的流程手册
|
||||
function queryBatchReport(data) {
|
||||
debugger;
|
||||
var ids = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var temp = data[i];
|
||||
@ -1910,7 +1909,6 @@ function formSave(isTransact){
|
||||
$.simpleAlert('发布内容不能为空', 'info');
|
||||
return false;
|
||||
}
|
||||
debugger;
|
||||
var index = 0;
|
||||
if (!($("#publisher_new_tr").css('display') == 'none') && newTemp.length > 0) {
|
||||
index++;
|
||||
@ -2334,9 +2332,7 @@ function downloadReport(uuid, taskId) {
|
||||
uuid: uuid
|
||||
},
|
||||
success : function(r) {
|
||||
debugger;
|
||||
if (r.result == "ok") {
|
||||
debugger;
|
||||
window.open (r.data.url);
|
||||
} else {
|
||||
|
||||
|
||||
@ -1,12 +1,19 @@
|
||||
var pageLimit = 10;
|
||||
// 数据记录
|
||||
var newTemp;
|
||||
var changeTemp;
|
||||
var stopTemp;
|
||||
/**
|
||||
* 初始移动端明细数据
|
||||
*/
|
||||
function initMobileData() {
|
||||
debugger;
|
||||
$("table[id^='AWS-MobileGrid-Zone']").empty();
|
||||
|
||||
$("table[id^='AWS-MobileGrid-Zone']").html('<div id="contentDiv1" style="display: none;" border="0"></div><div id="contentDiv2" style="display: none;" border="0"></div><div id="contentDiv3" style="display: none;" border="0"></div>');
|
||||
|
||||
//新增版本
|
||||
var newHtml = '';
|
||||
newHtml +='<table id="AWS-MobileGrid-Zone-b6fa1d41-0e4a-49a8-9f7f-7007b5b321fe" style="width: 100% !important;">';
|
||||
newHtml +='<table id="AWS-MobileGrid-Zone-new" style="width: 100% !important;">';
|
||||
newHtml +='<tr>';
|
||||
newHtml +='<td style="padding:0px;">';
|
||||
newHtml +='<table border="0" cellspacing="0" cellpadding="0" heightType="auto" widthType="fixed" style="width:100%;">';
|
||||
@ -20,12 +27,65 @@ function initMobileData() {
|
||||
newHtml +='<tr>';
|
||||
newHtml +='<td>';
|
||||
newHtml +='<table class="" style="width:100%;">';
|
||||
newHtml +='<tbody id="appendBody">';
|
||||
newHtml +='<tbody id="appendNewBody">';
|
||||
$("#contentDiv1").append(newHtml);
|
||||
|
||||
//更新版本
|
||||
$("table[id='AWS-MobileGrid-Zone-change']").empty();
|
||||
var changeHtml = '';
|
||||
changeHtml +='<table id="AWS-MobileGrid-Zone-change" style="width: 100% !important;">';
|
||||
changeHtml +='<tr>';
|
||||
changeHtml +='<td style="padding:0px;">';
|
||||
changeHtml +='<table border="0" cellspacing="0" cellpadding="0" heightType="auto" widthType="fixed" style="width:100%;">';
|
||||
changeHtml +='<tbody>';
|
||||
changeHtml +='<tr class="form-grid-mobile-common-toolbar">';
|
||||
changeHtml +='<td>';
|
||||
changeHtml +='<div class="form-grid-mobile-common-toolbar"></div>';
|
||||
changeHtml +='</div>';
|
||||
changeHtml +='</td>';
|
||||
changeHtml +='</tr>';
|
||||
changeHtml +='<tr>';
|
||||
changeHtml +='<td>';
|
||||
changeHtml +='<table class="" style="width:100%;">';
|
||||
changeHtml +='<tbody id="appendChangeBody">';
|
||||
$("#contentDiv2").append(changeHtml);
|
||||
|
||||
|
||||
//废止
|
||||
$("table[id='AWS-MobileGrid-Zone-stop']").empty();
|
||||
var stopHtml = '';
|
||||
stopHtml +='<table id="AWS-MobileGrid-Zone-stop" style="width: 100% !important;">';
|
||||
stopHtml +='<tr>';
|
||||
stopHtml +='<td style="padding:0px;">';
|
||||
stopHtml +='<table border="0" cellspacing="0" cellpadding="0" heightType="auto" widthType="fixed" style="width:100%;">';
|
||||
stopHtml +='<tbody>';
|
||||
stopHtml +='<tr class="form-grid-mobile-common-toolbar">';
|
||||
stopHtml +='<td>';
|
||||
stopHtml +='<div class="form-grid-mobile-common-toolbar"></div>';
|
||||
stopHtml +='</div>';
|
||||
stopHtml +='</td>';
|
||||
stopHtml +='</tr>';
|
||||
stopHtml +='<tr>';
|
||||
stopHtml +='<td>';
|
||||
stopHtml +='<table class="" style="width:100%;">';
|
||||
stopHtml +='<tbody id="appendStopBody">';
|
||||
$("#contentDiv3").append(stopHtml);
|
||||
|
||||
//渲染数据
|
||||
initContentData();
|
||||
$("table[id^='AWS-MobileGrid-Zone']").append(newHtml);
|
||||
}
|
||||
|
||||
|
||||
// 主体内容显示与隐藏
|
||||
function dealPublishCheck(isCheck, type) {
|
||||
if (type == 'new') {
|
||||
isCheck ? $('#contentDiv1').show() : $('#contentDiv1').hide();
|
||||
} else if (type == 'change') {
|
||||
isCheck ? $('#contentDiv2').show() : $('#contentDiv2').hide();
|
||||
} else if (type == 'stop') {
|
||||
isCheck ? $('#contentDiv3').show() : $('#contentDiv3').hide();
|
||||
}
|
||||
}
|
||||
// 初始化内容数据
|
||||
function initContentData() {
|
||||
var param = {
|
||||
@ -47,12 +107,16 @@ function initContentData() {
|
||||
}
|
||||
closeFormPage = r.data.closeFormPage;
|
||||
var newData = r.data.newData;
|
||||
newTemp = newData;
|
||||
var changeData = r.data.changeData;
|
||||
changeTemp = changeData;
|
||||
var stopData = r.data.stopData;
|
||||
stopTemp = stopData;
|
||||
var checkImg = '../apps/_bpm.portal/img/icheck_checkbox_check.png';
|
||||
var uncheckImg = '../apps/_bpm.portal/img/icheck_checkbox_uncheck.png';
|
||||
if (!$.isEmptyObject(newData)) {
|
||||
$('#OPTIONTYPE_0').prev('img').attr('src', checkImg);
|
||||
dealPublishCheck(true, 'new');// 显示
|
||||
// 更新数据
|
||||
$("#OPTIONTYPE_0").check("option","checked", true);
|
||||
initPublishData(newData, 'new', 1, 1);
|
||||
@ -62,6 +126,7 @@ function initContentData() {
|
||||
}
|
||||
if (!$.isEmptyObject(changeData)) {
|
||||
$('#OPTIONTYPE_1').prev('img').attr('src', checkImg);
|
||||
dealPublishCheck(true, 'change');
|
||||
$("#OPTIONTYPE_1").check("option","checked", true);
|
||||
initPublishData(changeData, 'change', 1, 1);
|
||||
} else {
|
||||
@ -70,6 +135,7 @@ function initContentData() {
|
||||
}
|
||||
if (!$.isEmptyObject(stopData)) {
|
||||
$('#OPTIONTYPE_2').prev('img').attr('src', checkImg);
|
||||
dealPublishCheck(true, 'stop');
|
||||
$("#OPTIONTYPE_2").check("option","checked", true);
|
||||
initPublishData(stopData, 'stop', 1, 1);
|
||||
} else {
|
||||
@ -79,6 +145,8 @@ function initContentData() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function initPublishData(data, type, pageNumber, start){
|
||||
showlist(data, type, pageNumber, start);
|
||||
}
|
||||
@ -97,14 +165,10 @@ function getOutputName(category, method) {
|
||||
}
|
||||
|
||||
|
||||
//by bzp
|
||||
function showlist(data, type, pageNumber, start){
|
||||
var tableTdCss = 'style="padding-top: 0;padding-bottom: 0;"';
|
||||
if (type == 'new') {
|
||||
$('#new_check_all').check("option", "checked", false);
|
||||
if (data.length > pageLimit) {// 显示分页
|
||||
$('#new_pagination').show();
|
||||
}
|
||||
// 加载数据
|
||||
var html = '';
|
||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||
@ -117,11 +181,74 @@ function showlist(data, type, pageNumber, start){
|
||||
html +='<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId +'\');return false" >' + fileName + "-" + outputName + '</span>';
|
||||
html +='</td>';
|
||||
html +='</tr>';
|
||||
html +='<tr>';
|
||||
html +='<td class="form-grid-mobile-common-row" width=100%>';
|
||||
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.publishFileId + '\', \'' + curr.taskId + '\')">' + fileName+'</span>';
|
||||
html +='</td>';
|
||||
html +='</tr>';
|
||||
}
|
||||
}
|
||||
$("#appendBody").empty().html(html);
|
||||
$("#appendNewBody").empty().html(html);
|
||||
|
||||
}
|
||||
|
||||
if(type=="change"){
|
||||
// 加载数据
|
||||
var html = '';
|
||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||
var curr;
|
||||
if ((curr = data[s - 1]) != undefined) {
|
||||
var sourceFileName = curr.changeFileName + ' V' + curr.fileVersion;
|
||||
// 变更目标文件处理
|
||||
var targetFileName = "";
|
||||
if (curr.changedFileNameNew != undefined && curr.changedFileNameNew != '') {
|
||||
targetFileName = curr.changedFileNameNew + ' V' + curr.targetFileVersion;
|
||||
}
|
||||
var targetId = "";
|
||||
if (curr.changedFileIdNew != undefined && curr.changedFileIdNew != '') {
|
||||
targetId = curr.changedFileIdNew;
|
||||
}
|
||||
var outputName = getOutputName(curr.category, curr.methodId);
|
||||
|
||||
html += '<tr>';
|
||||
html += '<td class="form-grid-mobile-common-row" width=100%>';
|
||||
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' + targetFileName + "-" + outputName + '</span>';
|
||||
html += '</td>';
|
||||
html +='<tr>';
|
||||
html +='<td class="form-grid-mobile-common-row" width=100%>';
|
||||
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + targetId + '\', \'' + curr.taskId + '\')">' + targetFileName+'</span>';
|
||||
html +='</td>';
|
||||
html +='</tr>';
|
||||
|
||||
}
|
||||
}
|
||||
$("#appendChangeBody").empty().html(html);
|
||||
|
||||
}
|
||||
|
||||
if (type == 'stop') {
|
||||
// 加载数据
|
||||
var html = '';
|
||||
for (var i = 0, s = start; i < pageLimit; i++, s++) {
|
||||
var curr;
|
||||
if ((curr = data[s - 1]) != undefined) {
|
||||
var fileName = curr.stopFileName + ' V' + curr.fileVersion;
|
||||
var outputName = getOutputName(curr.category, curr.methodId);
|
||||
html += '<tr>';
|
||||
html += '<td class="form-grid-mobile-common-row" width=100%>';
|
||||
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' + fileName + "-" + outputName + '</span>';
|
||||
html += '</td>';
|
||||
html +='<tr>';
|
||||
html +='<td class="form-grid-mobile-common-row" width=100%>';
|
||||
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.stopFileId + '\', \'' + curr.taskId + '\')">' + fileName+'</span>';
|
||||
html +='</td>';
|
||||
html +='</tr>';
|
||||
}
|
||||
}
|
||||
$("#appendStopBody").empty().html(html);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -142,3 +269,30 @@ function openReportFile(taskId,appendid) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 打开流程文件查看页面
|
||||
function openPortalPage(uuid, taskId) {
|
||||
awsui.ajax.request({
|
||||
type: "POST",
|
||||
url: "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_publish_repository_method_check",
|
||||
data: {uuid: uuid},
|
||||
ok: function(r) {
|
||||
debugger;
|
||||
$.simpleAlert("close");
|
||||
if (r.result == 'ok') {
|
||||
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_mobile_open&uuid=" + uuid + "&sid=" + $("#sid").val() + "&taskId=" + taskId);// open Windows
|
||||
window.location.href = url;
|
||||
} else {
|
||||
$.simpleAlert(r.msg);
|
||||
}
|
||||
|
||||
},
|
||||
err: function(msg) {
|
||||
$.simpleAlert("close");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user