Project

General

Profile

金格 office 控件

设计
11/29/2020

背景:以前 iMIS 采用 软航office控件,为了更好的兼容google浏览器,先采用金格office控件

金格office控件适用注意事项

  • 客户端需安装 office 2008及以上 专业版 或者 WPS 专业版,必须专业版,不保证其他版本是否可以正常运行
  • 客户端 IE浏览器 支持,google浏览器版本需要在 47~80 之间,不支持最新版本google,客户端需设置浏览器禁止自动更新
  • 可按照页面提示安装控件,如果页面被拦截,有可根据 控件文件 独立安装,安装前请卸载干净已有控件

金格office 在 iMIS 中的应用

web 端目录路径及内容


目录路径:
  研发 webapp/static/scripts/iWebOffice/ 下
  项目工程目录 imis/static/scripts/iWebOffice/

  iWebOffice2015.cab  ---- 控件
  iWebOffice2015.js   ---- 控件核心js支持及授权
  jawaveOffice.js   ---- imis 调用 iWebOffice 支持
  officeDemo.jsp ---- 示例
  WebOffice.js  ---- WebOffice 相关js方法支持

首次更换 金格office控件更改文件记录

commit -m "金格office控件替换" -N (8 paths specified)
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/core/framework/servlet/BigFileUploadUtil.java
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/core/framework/servlet/OfficeServlet.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/km/documentlibrary/dl/GetFileAction.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/km/groupdoclib/action/bussiness/EditCompanyFileAction.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/km/groupdoclib/action/bussiness/EditGroupFileAction.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/km/groupdoclib/action/bussiness/FileVersionAction.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/pm/projectdoc/action/bussiness/ProjectOutputObjectAction.java
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/src/com/jawave/pm/projectdoc/action/bussiness/ProjectReferAction.java
commit -m "金格office控件替换" -N (22 paths specified)
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/WEB-INF/web.xml
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/core/upload/updateCompanyBigFile.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/core/upload/updateProjectOutputBigFile.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/km/doc_lib/openOfficeFile.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/km/groupdoc/edit_office_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/km/groupdoc/update_company_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/km/groupdoc/view_company_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/updateRefer.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/updateTaskRefer.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/update_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/update_task_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/view_output_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/view_refer_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/view_task_output_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/pm/project_doc/view_task_refer_file.jsp
    Sending        /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/ewebeditor/jsp/config.jsp
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice/WebOffice.js
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice/iWebOffice2015.cab
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice/iWebOffice2015.js
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice/jawaveOffice.js
    Adding         /Users/honeyao/Documents/workspace/imis_gicp/webapp/static/scripts/iWebOffice/officeDemo.jsp

软航office 在新版 iMIS 中的应用

web前段:

components -- projectDocument -- ntko.vue components -- projectDocument -- office.vue(暂作为调试用)

static -- officestatic -- office -- jawavedoc.js
static -- office -- jawaveofficeobj.js (暂作为调试)
static -- office -- OfficeControl.cab
static -- office -- OfficeControlx64.cab

java 后端方法接口:


commonservice-system/file/openOfficecommonservice-system/file/editOffice

控件接口封装:参数说明等见 jawavedoc.js 及软航office api
打开 
var newUrl = "//192.168.1.77:8080/commonservice-system/file/openOffice"TANGER_OCX_InitDoc(newUrl,'fileId',fileId)
保存 
//TANGER_OCX_SaveEditToImis(saveOfficeUrl,'theFile','','test.doc','updateOfficeFileForm');
var retHTML = TANGER_OCX_OBJ.SaveToURL(saveOfficeUrl,'theFile','','test.doc','updateOfficeFileForm');

Files