4.1 同步发版内容到天梯

This commit is contained in:
jl-zhoujl2
2022-04-01 20:06:34 +08:00
parent a3b939d154
commit 7b3efe00dd
128 changed files with 929 additions and 5029 deletions

View File

@ -16,6 +16,7 @@
var readonly;//是否可编辑
var savePDF;//是否保存 pdf
var saveHTML;//是否保存 html
var fileName;//weboffice文件名
var datatext;
var datavalue;
@ -82,6 +83,7 @@
savePDF=getQueryString('savePDF');
HTMLfileCode=getQueryString('HTMLfileCode');
saveHTML=getQueryString('saveHTML');
fileName=getQueryString('fileName');
init(readonly,DocfileCode);"
onbeforeunload="closePostMessage()"
>
@ -115,7 +117,7 @@
</div>
<div class="elementPosition">
<button type="button" class="btnStyle btnStyle02" onclick="generalProp(1)">打开</button>
<button type="button" class="btnStyle btnStyle02" onclick="generalProp(3)">另存为</button>
<button type="button" class="btnStyle btnStyle02" onclick="generalProp(2)">另存为</button>
<button type="button" class="btnStyle btnStyle02" onclick="generalProp(4)">打印</button>
<button type="button" class="btnStyle btnStyle01" id="saveBTN" style="display:none;" onclick="uploadMsg()" >保存</button>
<button type="button" class="btnStyle btnStyle02" onclick="closeBTN()">关闭</button>
@ -129,15 +131,19 @@
window.close();
}
}
//调用文档通用属性方法 1-打开 3-另存为 4-打印
//调用文档通用属性方法 1-打开 2-保存(另存为 4-打印
function generalProp(param) {
TANGER_OCX.ShowDialog(param)
TANGER_OCX.WebFileName = fileName + ".doc";
TANGER_OCX.ShowDialog(param);
}
function uploadMsg() {
var docMsg = ntko.SaveToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + DocfileCode + "&file=" + DocfileCode + "&only=true", DocfileCode + ".doc", "");
var docName = DocfileCode;
if(fileName != null) {
docName = fileName;
}
var docMsg = ntkoUpload("Doc",DocfileCode,docName + ".doc");
var msg1 = JSON.parse(docMsg);
if (msg1.success) {
var retMsg = DocfileCode;
@ -147,7 +153,11 @@
}
}
if (saveHTML == "true") {
var htmlMsg = ntko.PublishAsHTMLToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + HTMLfileCode + "&file=" + HTMLfileCode + "&only=true", HTMLfileCode + ".html", "")
var htmlName = HTMLfileCode;
if(fileName != null) {
htmlName = fileName;
}
var htmlMsg = ntkoUpload("HTML",HTMLfileCode,htmlName + ".html");
var msg2 = JSON.parse(htmlMsg);
if (msg2.success == true) {
var retMsg = HTMLfileCode;
@ -158,7 +168,7 @@
}
}
if (savePDF == "true") {
ntko.PublishAsPDFToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + PDFfileCode + "&file=" + PDFfileCode + "&only=true", PDFfileCode + ".pdf", "")
ntkoUpload("PDF",PDFfileCode,PDFfileCode + ".pdf");
}
}
@ -174,9 +184,16 @@
<script language="JScript" for="TANGER_OCX" event="AfterPublishAsPDFToURL(ret,code)">
var msg = JSON.parse(ret);
if (msg.success == true) {
var retMsg = PDFfileCode;
window.opener.postMessage({type: 'FROM_RETURN_PDF',text: retMsg}, "*")
uploadSuccess();
var pdfName = PDFfileCode;
if(fileName != null) {
pdfName = fileName;
}
var res = ntkoUpdateFile(PDFfileCode, pdfName);
if(res) {
var retMsg = PDFfileCode;
window.opener.postMessage({type: 'FROM_RETURN_PDF',text: retMsg}, "*")
uploadSuccess();
}
}
</script>
<div class="divBody">