wps在线编辑文件提交
This commit is contained in:
parent
0dfd310c55
commit
0576704a1d
@ -0,0 +1,30 @@
|
||||
package com.actionsoft.apps.coe.pal.datamigration.aslp;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.datamigration.util.readword.ReadWordUtil;
|
||||
import com.actionsoft.apps.resource.interop.aslp.ASLP;
|
||||
import com.actionsoft.apps.resource.interop.aslp.Meta;
|
||||
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class TranslateDocAslp implements ASLP {
|
||||
public TranslateDocAslp() {
|
||||
}
|
||||
|
||||
@Meta(parameter = {"name:'sid',required:true,allowEmpty:false,desc:'sessionId'",
|
||||
"name:'groupValue',required:true,allowEmpty:false,desc:'groupValue'",
|
||||
"name:'ruuid',required:true,allowEmpty:false,desc:'ruuid'",
|
||||
"name:'fileNames',required:true,allowEmpty:false,desc:'fileNames'"})
|
||||
public ResponseObject call(Map<String, Object> params) {
|
||||
String sid = params.get("sid").toString();
|
||||
String groupValue = params.get("groupValue").toString();
|
||||
String ruuid = params.get("ruuid").toString();
|
||||
String fileNames = params.get("fileNames").toString();
|
||||
String wsId = "";
|
||||
UserContext me = UserContext.fromSessionId(sid);
|
||||
new ReadWordUtil().translateDoc(me,wsId,groupValue,ruuid,fileNames);
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
return ro;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.actionsoft.apps.coe.pal.datamigration.plugin;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.aslp.TranslateDocAslp;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.position.constant.PositionConstant;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.versionNo.constant.VersionNoConstant;
|
||||
import com.actionsoft.apps.coe.pal.datamigration.web.DataMigrationWeb;
|
||||
@ -29,6 +30,8 @@ public class Plugins implements PluginListener {
|
||||
list.add(new DCPluginProfile(PositionConstant.REPOSITORY_NAME, CoeFileProcessor.class.getName(), "存放岗位Excel数据导入日志", false, false));
|
||||
list.add(new DCPluginProfile(VersionNoConstant.REPOSITORY_NAME, CoeFileProcessor.class.getName(), "存放流程版本号数据导入日志", false, false));
|
||||
|
||||
list.add(new ASLPPluginProfile("TranslateDoc", TranslateDocAslp.class.getName(), "解析文档", new HttpASLP(HttpASLP.AUTH_AWS_SID)));
|
||||
|
||||
// PAL应用扩展点
|
||||
Map<String, Object> params0 = new HashMap<String, Object>();
|
||||
params0.put("title", "PAL数据迁移");
|
||||
|
||||
@ -831,19 +831,38 @@
|
||||
}
|
||||
function switchWpsDisplay(flag){
|
||||
if(flag){//显示wps页面,隐藏其余页面
|
||||
debugger;
|
||||
$("#wpsPage").css('display','block');
|
||||
$("#wpsPage").height($('#designer_viewport').height());
|
||||
$("#shape_panel").css('display','none');
|
||||
$("#shape_panel_more_shape").css('display','none');
|
||||
$("#designer_layout").css('display','none');
|
||||
//打开wps在线编辑页面
|
||||
$("#dock").css("right", 0);
|
||||
openWpsUrl();
|
||||
}else{
|
||||
debugger;
|
||||
$.ajax({
|
||||
url: "./jd?sid=" + sid + "&cmd=com.awspaas.user.apps.yiliwps.getCoeDefinition&palId=" + ruuid,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
definition = data;
|
||||
Designer.open(definition);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#wpsPage").css('display','none');
|
||||
$("#shape_panel").css('display','block');
|
||||
$("#shape_panel_more_shape").css('display','block');
|
||||
$("#designer_layout").css('display','block');
|
||||
var layoutW = $("#designer_layout").width();
|
||||
var viewW = $("#layout_block").width();
|
||||
// 总宽度减去可视区域的宽度,得到滚动条宽度
|
||||
var navRight = layoutW - viewW;
|
||||
$("#dock").css("right", navRight);
|
||||
updateShapePanel();
|
||||
|
||||
}
|
||||
}
|
||||
//切换视图页面
|
||||
@ -856,7 +875,7 @@
|
||||
}
|
||||
function openWpsUrl(){
|
||||
$.ajax({
|
||||
url: "./jd?sid=" + sid + "&cmd=com.actionsoft.apps.addons.wpsonline_get_previewUrl&fileId=" + ruuid +"&fileName="+updatedPolicyFileList,
|
||||
url: "./jd?sid=" + sid + "&cmd=com.awspaas.user.apps.yiliwps.previewUrl&palId=" + ruuid +"&fileName="+updatedPolicyFileList,
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
if(data.code ===200){
|
||||
@ -1696,7 +1715,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="wpsPage" style="width: 100%;right:36px;position: relative;background-color: #EEEEEE;">
|
||||
<div id="wpsPage" style="width: calc(100% - 36px);position: relative;background-color: #EEEEEE;">
|
||||
<iframe id="wpsUrl" style="width: 100%;height: 100%;"></iframe>>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user