12-23-上传master
This commit is contained in:
30
public/ntko.js
Normal file
30
public/ntko.js
Normal file
@ -0,0 +1,30 @@
|
||||
var ntko;//控件对象
|
||||
|
||||
//初始化去打开文档
|
||||
function init(cmd,code,type){
|
||||
ntko = document.getElementById("TANGER_OCX");
|
||||
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(type=="creat"){
|
||||
ntko.CreateNew("Word.Document");
|
||||
}else{//读取
|
||||
ntko.BeginOpenFromURL("/api/ebtp-mall-attachment/v1/download/"+code);//获取文件
|
||||
}
|
||||
if (cmd != "false"){
|
||||
ntko.SetReadOnly(true);//只读
|
||||
}else{
|
||||
ntko.SetReadOnly(false);//可编辑
|
||||
}
|
||||
|
||||
// ntko.RibbonBars=false;//打开就啥工具都没有
|
||||
// ntko.ToolBars=false;
|
||||
// alert("RibbonBars1"+ntko.RibbonBars)
|
||||
// alert("ToolBars1"+ntko.ToolBars)
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user