162 lines
4.9 KiB
HTML
162 lines
4.9 KiB
HTML
<html>
|
|
<head>
|
|
<meta content="IE=10" http-equiv="X-UA-Compatible"/>
|
|
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
|
|
<title>招标文件编辑器</title>
|
|
<link href="./ntkoStyle.css" rel="stylesheet" type="text/css"/>
|
|
<link href="./src/components/GlobalHeader/index.less" type="text/css"/>
|
|
<script type="text/javascript" src="./jquery.js"></script>
|
|
<script type="text/javascript" src="./ntko.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
var cmd; //命令类型
|
|
var DocfileCode;//doc id
|
|
var PDFfileCode;//pdf id
|
|
var HTMLfileCode;//HTML id
|
|
var readonly;//是否可编辑
|
|
var savePDF;//是否保存 pdf
|
|
var saveHTML;//是否保存 html
|
|
var datatext;
|
|
var datavalue;
|
|
|
|
function getQueryString(name) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (r != null) return unescape(r[2]);
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
function CurentTime() {
|
|
var now = new Date();
|
|
|
|
var year = now.getFullYear(); //年
|
|
var month = now.getMonth() + 1; //月
|
|
var day = now.getDate(); //日
|
|
|
|
var hh = now.getHours(); //时
|
|
var mm = now.getMinutes(); //分
|
|
var ss = now.getSeconds(); //分
|
|
|
|
var clock = year + "-";
|
|
|
|
if (month < 10)
|
|
clock += "0";
|
|
|
|
clock += month + "-";
|
|
|
|
if (day < 10)
|
|
clock += "0";
|
|
|
|
clock += day + " ";
|
|
|
|
if (hh < 10)
|
|
clock += "0";
|
|
|
|
clock += hh + ":";
|
|
if (mm < 10) clock += '0';
|
|
clock += mm + ":";
|
|
if (ss < 10) clock += '0';
|
|
clock += ss;
|
|
return (clock);
|
|
}
|
|
|
|
//在子页面定义的向父页面回传值的方法,方法名可以自定义
|
|
function ntkoSendDataToParentPage() {
|
|
var varData = new Array();
|
|
varData.push(ntko.docsize);
|
|
varData.push(CurentTime());
|
|
// ntkoBrowser.ntkoSetReturnValueToParentPage("OnData","dddd");
|
|
}
|
|
|
|
function ntkoDataToChild(data) {
|
|
ntko.SetBookmarkValue("ntko", data);
|
|
var ntkoc = ntko.ActiveDocument.bookMarks.count;
|
|
for (var i = 1; i <= ntkoc; i++) {
|
|
var ntkoname = ntko.ActiveDocument.bookMarks.item(i).name;
|
|
if (ntkoname == "ntko") {
|
|
ntko.ActiveDocument.bookMarks.item(i).select();
|
|
ntko.ActiveDocument.Application.Selection.Font.Color = 255;
|
|
ntko.ActiveDocument.Application.Selection.Font.Bold = 9999998;
|
|
ntko.ActiveDocument.Application.Selection.Font.Size = 16;
|
|
}
|
|
}
|
|
}
|
|
|
|
function ntkoGetParentData(data) {//该方法用于接收父页面传递的值
|
|
if (data == "Save") {
|
|
ntko.SaveToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + DocfileCode + "&file=" + DocfileCode + "&only=true", DocfileCode + ".doc", "", false);
|
|
}
|
|
if (data == "SavePDF" && savePDF == "1") {
|
|
ntko.PublishAsPDFToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + PDFfileCode + "&file=" + PDFfileCode + "&only=true", PDFfileCode + ".pdf", "", false)
|
|
}
|
|
if (data == "SaveHTML" && saveHTML == "1") {
|
|
ntko.PublishAsHTMLToURL("/api/core-service-ebtp-updownload/v1/attachment/upload/", "file", "businessId=" + HTMLfileCode + "&file=" + HTMLfileCode + "&only=true", HTMLfileCode + ".html", "", false)
|
|
}
|
|
}
|
|
|
|
function ntkocloseparentpage() {
|
|
ntkoGetParentData();
|
|
ntkoSendDataToParentPage();
|
|
|
|
}
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
|
<!--AfterPublishAsPDFToURL-->
|
|
|
|
<body onload="readonly=getQueryString('readonly');
|
|
DocfileCode=getQueryString('DocfileCode');
|
|
PDFfileCode=getQueryString('PDFfileCode');
|
|
savePDF=getQueryString('savePDF');
|
|
HTMLfileCode=getQueryString('HTMLfileCode');
|
|
saveHTML=getQueryString('saveHTML');
|
|
init(readonly,DocfileCode);" onbeforeunload="ntkocloseparentpage()">
|
|
<script language="JScript" for="TANGER_OCX" event="OnCustomButtonOnMenuCmd(btnPos,btnCaption,btnCmdid)">
|
|
|
|
</script>
|
|
<script language="JScript" for="TANGER_OCX" event="AfterOpenFromURL(doc, statusCode)">
|
|
if (ntko.StatusCode != 0) {
|
|
ntko.CreateNew("Word.Document");
|
|
}
|
|
;
|
|
if (readonly != "false") {
|
|
ntko.SetReadOnly(true);//只读
|
|
} else {
|
|
ntko.SetReadOnly(false);//可编辑
|
|
}
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript" for="TANGER_OCX" event="OnDocumentOpened(File, Document)">
|
|
<div class="divTopInnerNtko">
|
|
<span>商城3.0</span>
|
|
</div>
|
|
</script>
|
|
<div style="
|
|
background-color: #b30000;
|
|
color:white;
|
|
font-size: 20px;
|
|
height: 75px;
|
|
font-weight: 400;
|
|
display: flex;
|
|
">
|
|
<div style="
|
|
align-self: center;
|
|
margin-left: 20px;
|
|
">
|
|
<img src="logo.svg" style="height: 30px"/>
|
|
<span style="margin-left: 20px">电子招投标系统</span>
|
|
</div>
|
|
</div>
|
|
<div class="divBody">
|
|
<script type="text/javascript" src="./ntkoofficecontrol.min.js"></script>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|