diff --git a/com.actionsoft.apps.coe.pal.output.pr/lib/com.actionsoft.apps.coe.pal.output.pr.jar b/com.actionsoft.apps.coe.pal.output.pr/lib/com.actionsoft.apps.coe.pal.output.pr.jar index 267eed9a..d4ad07ab 100644 Binary files a/com.actionsoft.apps.coe.pal.output.pr/lib/com.actionsoft.apps.coe.pal.output.pr.jar and b/com.actionsoft.apps.coe.pal.output.pr/lib/com.actionsoft.apps.coe.pal.output.pr.jar differ diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index d8547941..c07dcb29 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 3c5ca9bd..ba06b5cb 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -2607,30 +2607,6 @@ public class CoEPALController { return PALRepositoryQueryAPIManager.getInstance().createOutputReportZd(wsId, me.getUID(), teamId, fileId); } - - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String nowDate=sdf.format(new Date()); - // 调用App - String sourceAppId = "com.awspaas.user.apps.browsing_data"; - // aslp服务地址 - String aslp = "aslp://com.awspaas.user.apps.browsing_data/RecordDownloadAlsp"; - // 参数定义列表 - Map alspparams = new HashMap(); - alspparams.put("sid", me.getSessionId()); - alspparams.put("uid", me.getUID()); - alspparams.put("username", me.getUserName()); - alspparams.put("modelId", fileId); - alspparams.put("modelName", model.getName()); - alspparams.put("downloadTime", nowDate); - alspparams.put("fileName", model.getName()); - alspparams.put("downloadType", "doc"); - alspparams.put("recordSource", "PAL画布-导出手册"); - alspparams.put("downloadsource", "PAL画布"); - AppAPI appAPI = SDK.getAppAPI(); - //根据上传的文件进行更新相关的excel或者ppt - ResponseObject alsp_ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, alspparams); - - return PALRepositoryQueryAPIManager.getInstance().createOutputReportPr(wsId, me.getUID(), teamId, fileId); } diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java index cd3a8675..4672a450 100644 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/output/util/OutputWordUtil.java @@ -3153,8 +3153,9 @@ public class OutputWordUtil { * @param uuid */ public static void mergeMRWord(String filePath, String uuid,JSONObject dataMap) { - Map stringJSONObjectMap = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(uuid); + Map stringJSONObjectMap = PALRepositoryQueryAPIManager.queryRepositoryAttributeById(uuid); JSONObject attrJson = stringJSONObjectMap.get("management_requirements_Location"); + String text = attrJson.getString("text"); if ("不显示管理要求".equals(text)) { return; diff --git a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.html b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.html index c4027c7e..eac62d84 100755 --- a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.html +++ b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.html @@ -289,153 +289,7 @@ } }); - //判断如果当前页面有编辑权进行记录操作 - if($('#checkoutTip').css('display') != 'block'){ - // 页面停留时间统计 - class PageStayTimeTracker { - constructor() { - this.startTime = null; - this.lastReportTime = null; - this.reportInterval = 10000; // 60秒报告一次 - this.isActive = false; - this.isPageVisible = true; // 默认页面是可见的 - this.visibilityBound = false; // 是否已绑定可见性事件 - } - - - // 延迟绑定可见性事件 - bindVisibilityEvents() { - if (this.visibilityBound) return; - - document.addEventListener('visibilitychange', this.handleVisibilityChange.bind(this)); - this.visibilityBound = true; - - // 初始检查页面可见状态 - this.isPageVisible = !document.hidden; - if (!this.isPageVisible) { - this.lastReportTime = new Date(); // 更新最后记录时间 - } - } - - - - // 开始跟踪 - startTracking() { - if (this.isActive) return; - - this.startTime = new Date(); - this.lastReportTime = this.startTime; - this.isActive = true; - - - - // 设置定时器 - this.intervalId = setInterval(() => { - if (this.isPageVisible) { - this.reportStayTime(); - } - }, this.reportInterval); - - - - // 页面卸载前发送剩余时间 - window.addEventListener('beforeunload', this.finalReport.bind(this)); - - - // 延迟绑定可见性事件(在用户首次交互后) - const bindOnInteraction = () => { - this.bindVisibilityEvents(); - // 移除所有交互监听器 - ['click', 'scroll', 'keydown', 'mousemove', 'touchstart'].forEach(event => { - window.removeEventListener(event, bindOnInteraction); - }); - }; - - // 添加多种交互监听 - ['click', 'scroll', 'keydown', 'mousemove', 'touchstart'].forEach(event => { - window.addEventListener(event, bindOnInteraction, { once: true }); - }); - - - } - - // 报告停留时间 - reportStayTime() { - const now = new Date(); - const elapsed = now - this.lastReportTime; - this.totalStayTime += elapsed; - this.lastReportTime = now; - - this.sendStayTimeToServer(elapsed, true); - } - - // 最终报告 - finalReport() { - if (!this.isActive) return; - if (this.isPageVisible) { - const now = new Date(); - const elapsed = now - this.lastReportTime; - } - - - this.sendStayTimeToServer(elapsed, false); - this.cleanUp(); - } - - // 处理页面可见性变化 - handleVisibilityChange() { - var now = new Date(); - if (document.hidden) { - if (this.isPageVisible) { - this.isPageVisible = false; - // 页面不可见,暂停计时 - const now = new Date(); - const elapsed = now - this.lastReportTime; - this.totalStayTime += elapsed; - this.sendStayTimeToServer(elapsed, false); - clearInterval(this.intervalId); - } - - } else { - // 页面恢复可见 - if (!this.isPageVisible) { - this.lastReportTime = now; // 重置最后记录时间 - } - this.isPageVisible = true; - - } - } - - // 发送数据到服务器 - sendStayTimeToServer(elapsedMs,isActive) { - $.ajax({ - type : "POST", - url : "./w?sid=" + encodeURIComponent($('#sid').val()) + "&cmd=com.awspaas.user.apps.browsing_data.service.insertReadingLog", - data : "userId="+userId+"&userName="+userName+"&ruuid="+ruuid+"&fileName="+fileName+"&startTime="+new Date(this.startTime).getTime()+"¤tTime="+new Date().getTime()+"&browserId="+browserId+"&isActive="+isActive, - success : function(msg) { - if (msg.result == "error") { - $.simpleAlert("新增失败", "error"); - } - } - }); - - } - - // 清理资源 - cleanUp() { - clearInterval(this.intervalId); - document.removeEventListener('visibilitychange', this.handleVisibilityChange); - window.removeEventListener('beforeunload', this.finalReport); - this.isActive = false; - } - } - - // 使用示例 - const tracker = new PageStayTimeTracker(); - tracker.startTracking(); - - } // 导出流程手册 function outputProcess() { diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.pl.upfile.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.pl.upfile.js index 12e5ae65..4ade11e3 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.pl.upfile.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.pl.upfile.js @@ -454,7 +454,6 @@ function delFileAll(callback) { //删除全部文件 //下载附件 function downloadFile(url,type) { window.location.href = url; - } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.wizard.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.wizard.js index 8aef622c..791a8b72 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.wizard.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/pal.pl.repository.outputreport.wizard.js @@ -267,7 +267,30 @@ var OutputReportWizard = { } tempArr.push(tempObj); } else { - targetFileId += "," + fileTreeArr[index].id; + if(fileTreeArr[index].isParent==false){ + var params = { + "modelId": fileTreeArr[index].id, + "modelName":fileTreeArr[index].name.replace(/(已发布)$/, ''), + "downloadType": "doc", + "fileName":fileTreeArr[index].name.replace(/(已发布)$/, ''), + "recordSource": "报告生成器-手册下载", + "downloadsource": "报告生成器下载" + } + jQuery.ajax({ + type: "POST", + url: "./jd?sid=" + encodeURIComponent(sid) + "&cmd=com.awspaas.user.apps.browsing_data.service.downloadRecord", + data: params, + success: function(msg) { + $.simpleAlert("close"); + + }, + err: function(msg) { + $.simpleAlert("close"); + } + }); + targetFileId += "," + fileTreeArr[index].id; + } + } } if (tempArr.length > 0) { @@ -307,7 +330,6 @@ var OutputReportWizard = { data : params, type : "post", success : function(msg) { - debugger; $.simpleAlert('close'); if (msg.result == "ok") { OutputReportWizard.isModify = false; diff --git a/com.awspaas.user.apps.browsing_data/src/com.awspaas.user.apps.browsing_data/service/DownloadRecordService.java b/com.awspaas.user.apps.browsing_data/src/com.awspaas.user.apps.browsing_data/service/DownloadRecordService.java index 5ead6d1b..49b6c13f 100644 --- a/com.awspaas.user.apps.browsing_data/src/com.awspaas.user.apps.browsing_data/service/DownloadRecordService.java +++ b/com.awspaas.user.apps.browsing_data/src/com.awspaas.user.apps.browsing_data/service/DownloadRecordService.java @@ -61,7 +61,7 @@ public class DownloadRecordService extends ActionWeb alspparams.put("recordSource", params.get("recordSource")); alspparams.put("downloadsource", params.get("downloadsource")); AppAPI appAPI = SDK.getAppAPI(); - //根据上传的文件进行更新相关的excel或者ppt + ResponseObject alsp_ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, alspparams);