<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
%>
|
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=EmulateIE8; IE=EmulateIE9">
|
<meta name="renderer" content="webkit">
|
<title>正文编辑</title>
|
<!--设置缓存-->
|
<meta http-equiv="cache-control" content="no-cache,must-revalidate"/>
|
<meta http-equiv="pragram" content="no-cache"/>
|
<meta http-equiv="expires" content="0"/>
|
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/desktop.css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/material-teal.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/plugins/jquery.portal.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-afterresize/jquery.afterresize.js"></script>
|
<script type="text/javascript" src="static/plugins/echarts/echarts.min.js"></script>
|
<script type="text/javascript" src="static/scripts/customResize.js"></script>
|
|
<!-- 弹窗加载组件 -->
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
|
<!-- wcp组件 -->
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
|
|
<script type="text/javascript" src="static/plugins/ntko-office/OfficeContorlFunctions.js"></script>
|
</head>
|
<body onload="window_onload()" onbeforeunload="onPageClose()" style="padding:0px;margin:0px;height:100%;width:100%;">
|
<form id="form1"
|
action="general/uploadFile?moduleId=${moduleId}&tableId=${tableId}&keyId=${keyId}&attachType=1&autoSave=0"
|
enctype="multipart/form-data"
|
style="padding:0px;margin:0px;height:100%;width:100%;">
|
<div id="officeControl" style="padding:0px;margin:0px;height:100%;width:100%;">
|
<script type="text/javascript" src="static/plugins/ntko-office/ntkoofficecontrol.js"></script>
|
</div>
|
</form>
|
</body>
|
|
<script>
|
var moduleId = "${moduleId}";
|
var tableId = "${tableId}";
|
var keyId = "${keyId}";
|
var templateList = JSON.parse('${templateList}');
|
var attachId = "${attachId}";
|
var fileUrl = "${fileUrl}";
|
var fileName = "${fileName}";
|
var deferred = null; //保存事件的延时对象,用于异步保存成功后调用回调函数
|
var isSave = eval("${isSave}");
|
|
function window_onload() {
|
canApplyTemplate = true;
|
|
//判断附件列表是否有自己已加载的正文
|
if (window.parent && window.parent.getMainBodyFun) {
|
var mainBody = window.parent.getMainBodyFun();
|
if (mainBody != null) {
|
attachId = mainBody.attachId;
|
fileUrl = "general/getAttachStream" + mainBody.extension + "?attachId=" + mainBody.attachId + "&extention=" + mainBody.extension + "&controlType=activex";
|
fileName = mainBody.physicalName;
|
}
|
}
|
|
//if (fileUrl != "") {
|
intializePage(fileUrl);//调用ntko.js中编辑文档方法
|
//}
|
|
setReviewMode(true);//修订模式
|
setShowRevisions(false);//显示痕迹
|
}
|
|
$(function () {
|
resizeHeight();
|
bindWindowEvent();
|
});
|
|
function bindWindowEvent() {
|
$(window).afterresize(function () {
|
resizeHeight();
|
});
|
}
|
|
function changeFile(attach) {
|
if (this.attachId != attach.attachId) {
|
this.attachId = attach.attachId;
|
this.fileUrl = "general/getAttachStream" + attach.extension + "?attachId=" + attach.attachId + "&extention=" + attach.extension + "&controlType=activex";
|
this.fileName = attach.physicalName;
|
|
NTKO_OCX_OpenDoc(fileUrl);
|
}
|
}
|
|
function resizeHeight() {
|
document.getElementById("TANGER_OCX").height = ($(window).height() - 5) + "px";
|
}
|
|
function getTemplateUrl(submenuPos) {
|
return templateList[submenuPos].attachUrl;
|
}
|
|
function setKeyId(val) {
|
keyId = val;
|
}
|
|
function getSaveDataAjax_NoUse() {
|
deferred = $.Deferred(function (deferred) {
|
saveFileToUrl();
|
})
|
|
deferred.done(function (result) {
|
console.log("callback:" + result);
|
});
|
|
return deferred;
|
}
|
</script>
|
</html>
|