|
楼主 |
发表于 2019-9-18 16:56:41
|
显示全部楼层
我想在我的功能实现类似于文档中心点击编辑的效果。我在我功能里面,引用和重写了docCenter的这个方法,还是遇到了this的这个问题。function officeHandler(docID, fileID, docName, docPath){debugger; var docFullPath = docPath;
var OVP = {
// host: getHost(docFullPath),
host: docFullPath,
userName : justep.Context.getCurrentPersonName() + (justep.Context.getCurrentDeptName()?justep.Context.getCurrentDeptName():"") ,
userInitials : justep.Context.getCurrentPersonName(),
filename: docName,
showField: true,
isPrint : NotifyPrintEvent()
};
var filename = docName;
OVP.filename = filename.substr(0, filename.lastIndexOf('.'));
OVP.fileID = fileID;
OVP.fileExt = String(/\.[^\.]+$/.exec(filename));
if ('.doc.docx.xls.xlsx.ppt.mpp.vsd.'.indexOf(OVP.fileExt + '.') >= 0) {
var callback = function(event) {
var data = event.data;
if (data.type == "officeAction") {
if (data.changes != 'W10=') {
document.lastOperation="noNeedLock";
update(data.filename, data.mediatype,data.size, data.cacheName, data.revisionCacheName, data.changes,data.createVersion);
} else {
if (document.lastOperation == "success") {
justep.doc.InnerUtils.unLockDoc(docNodeList.getCurrentRowId());
}
}
}
};
justep.doc.Dialog.openOfficeDialog(callback, OVP, this);
} else {
alert("请选择Office文档记录!");
}
}
|
-
|