3.10 工程代码同步master
This commit is contained in:
52
public/ntko4IE.js
Normal file
52
public/ntko4IE.js
Normal file
@ -0,0 +1,52 @@
|
||||
var ntko;//控件对象
|
||||
|
||||
//初始化去打开文档
|
||||
function init(readonly, DocfileCode) {
|
||||
ntko = document.getElementById("TANGER_OCX")
|
||||
ntko.Menubar = false;//隐藏窗体左上侧文件菜单
|
||||
ntko.TitleBar=false;//隐藏窗体左上图标
|
||||
$.ajax({
|
||||
url: "/api/core-service-ebtp-updownload/v1/attachment/find/bid/"+DocfileCode ,
|
||||
type: "get",
|
||||
dataType : 'json',
|
||||
traditional:true,
|
||||
success: function (result) {
|
||||
// [{"id":"0f8d98e4-379d-48fc-bd35-649a67256c6e","bid":"888888","filename":"888888.doc"}]
|
||||
if (window.navigator.platform == "Win64") {
|
||||
ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocallx64.cab", 51, true);
|
||||
} else {
|
||||
ntko.AddDocTypePlugin(".pdf", "PDF.NtkoDocument", "4.0.2.0", "officecontrol/ntkooledocall.cab", 51, true);//版增加对于PDF文件的支持
|
||||
}
|
||||
if (result.length>0) {
|
||||
// @ts-ignore
|
||||
ntko.BeginOpenFromURL("/api/core-service-ebtp-updownload/v1/attachment/download/bid/" + DocfileCode);
|
||||
} else {
|
||||
// @ts-ignore
|
||||
ntko.CreateNew("Word.Document");
|
||||
}
|
||||
/*展示保存按钮*/
|
||||
if(readonly=="false"){
|
||||
$("#saveBTN").show();
|
||||
}
|
||||
ntko.Menubar = true;//展示窗体左上侧文件菜单
|
||||
ntko.IsUseOfficeConvertDocToPDF=true;
|
||||
|
||||
},
|
||||
error:function () {
|
||||
alert("请求文档中心失败,请您关闭当前编辑器,重新打开。")
|
||||
}
|
||||
//请求失败,包含具体的错误信息
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// ntko.RibbonBars=false;//打开就啥工具都没有
|
||||
// ntko.ToolBars=false;
|
||||
// alert("RibbonBars1"+ntko.RibbonBars)
|
||||
// alert("ToolBars1"+ntko.ToolBars)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user