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;
@ -78,6 +79,7 @@
savePDF=getQueryString('savePDF');
HTMLfileCode=getQueryString('HTMLfileCode');
saveHTML=getQueryString('saveHTML');
fileName=getQueryString('fileName');
init(readonly,DocfileCode);"
>
<script language="JScript" for="TANGER_OCX" event="OnCustomButtonOnMenuCmd(btnPos,btnCaption,btnCmdid)">
@ -110,7 +112,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>
@ -124,15 +126,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 varData = new Array();
@ -144,7 +150,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 varData = new Array();
@ -157,7 +167,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");
}
}
@ -173,11 +183,18 @@
<script language="JScript" for="TANGER_OCX" event="AfterPublishAsPDFToURL(ret,code)">
var msg = JSON.parse(ret);
if (msg.success == true) {
var varData = new Array();
var retMsg = PDFfileCode;
varData.push(retMsg);
ntkoBrowser.ntkoSetReturnValueToParentPage("NTKO_PDF_PostMessage", varData);
uploadSuccess();
var pdfName = PDFfileCode;
if(fileName != null) {
pdfName = fileName;
}
var res = ntkoUpdateFile(PDFfileCode, pdfName);
if(res) {
var varData = new Array();
var retMsg = PDFfileCode;
varData.push(retMsg);
ntkoBrowser.ntkoSetReturnValueToParentPage("NTKO_PDF_PostMessage", varData);
uploadSuccess();
}
}
</script>
<div class="divBody">