📄 documentdetail.aspx
字号:
<%@ Page language="c#" Codebehind="documentdetail.aspx.cs" AutoEventWireup="false" Inherits="OI.ReFileOperate.documentdetail" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<title>Untitled Document</title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<style type="text/css"> <!-- @import url(../test.css); -->
</style>
<script language="javascript">
function StatusMsg(mString){
StatusBar.innerText=mString;
}
function Load(){
try{
document.getElementById('menu').style.visibility='visible';
webform.WebOffice.ServerPath="<%=mServerUrl%>";
webform.WebOffice.RecordID="<%=mRecordID%>";
webform.WebOffice.Template="<%=mTemplate%>";
webform.WebOffice.FileName="<%=mFileName%>";
webform.WebOffice.FileType="<%=mFileType%>";
webform.WebOffice.EditType="<%=mEditType%>";
webform.WebOffice.UserName="<%=mUserName%>";
webform.WebOffice.WebOpen(); //打开该文档
StatusMsg(webform.WebOffice.Status);
}
catch(e)
{
}
}
function UnLoad(){
try{
if (!webform.WebOffice.WebClose()){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg("关闭文档...");
}
}catch(e){}
}
function ShowRevision(mObject){
var mFlag=mObject.value;
if (mFlag=="显示痕迹"){
mObject.value="隐藏痕迹";
webform.WebOffice.WebShow(true);
StatusMsg("显示痕迹...");
}else{
mObject.value="显示痕迹";
webform.WebOffice.WebShow(false);
StatusMsg("隐藏痕迹...");
}
}
function LoadDocument(){
StatusMsg("正在打开文档...");
if (!webform.WebOffice.WebOpen()){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function SaveDocument(){
if (webform.EditType.value=="0"){
alert("你在查看状态,不能保存!");
return false;
}
if (!webform.WebOffice.WebSave()){
StatusMsg(webform.WebOffice.Status);
return false;
}else{
StatusMsg(webform.WebOffice.Status);
return true;
}
}
function WebFocus(){
webform.WebOffice.WebFocus();
StatusMsg("文档已刷新...");
}
function WebOpenVersion(){
webform.WebOffice.WebOpenVersion();
StatusMsg(webform.WebOffice.Status);
}
function WebSaveVersion(){
webform.WebOffice.WebSaveVersion();
StatusMsg(webform.WebOffice.Status);
}
function LoadBookmarks(){
StatusMsg("正在填充模扳...");
if (!webform.WebOffice.WebLoadBookmarks()){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function SetBookmarks(vbmName,vbmValue){
if (!webform.WebOffice.WebSetBookmarks(vbmName,vbmValue)){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function GetBookmarks(vbmName){
var vbmValue;
vbmValue=webform.WebOffice.WebGetBookmarks(vbmName);
return vbmValue;
}
function WebOpenPrint(){
try{
webform.WebOffice.WebOpenPrint();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebOpenPageSetup(){
try{
if (webform.WebOffice.FileType==".doc"){
webform.WebOffice.WebObj.Application.Dialogs(178).Show();
}else{
webform.WebOffice.WebObj.Application.Dialogs(7).Show;
}
}catch(e){
}
}
function WebOpenPicture(){
try{
webform.WebOffice.WebOpenPicture();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebOpenSignature(){
try{
webform.WebOffice.WebOpenSignature();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebShowSignature(){
try{
webform.WebOffice.WebShowSignature();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebHideSignature(){
try{
webform.WebOffice.WebhideSignature();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebCheckSignature(){
try{
var i=webform.WebOffice.WebCheckSignature();
StatusMsg(i);
}catch(e){}
}
function WebOpenBookMarks(){
try{
webform.WebOffice.WebOpenBookmarks();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebSaveLocal(){
try{
webform.WebOffice.WebSaveLocal();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebOpenLocal(){
try{
webform.WebOffice.WebOpenLocal();
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebSaveAsHtml(){
try{
if (webform.WebOffice.WebSaveAsHtml())
{
webform.HTMLPath.value="HTML/<%=mRecordID%>.htm";
}
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebToolsVisible(ToolName,Visible){
try{
webform.WebOffice.WebToolsVisible(ToolName,Visible);
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebToolsEnable(ToolName,ToolIndex,Enable){
try{
webform.WebOffice.WebToolsEnable(ToolName,ToolIndex,Enable);
StatusMsg(webform.WebOffice.Status);
}catch(e){}
}
function WebGetWordContent(){
try{
alert(webform.WebOffice.WebObj.Content.Text);
}catch(e){}
}
function WebSetWordContent(){
var mText=window.prompt("请输入内容:","测试内容");
if (mText==null){
return (false);
}
else
{
//下面为显示选中的文本
//alert(webform.WebOffice.WebObj.Application.Selection.Range.Text);
//下面为在当前光标出插入文本
webform.WebOffice.WebObj.Application.Selection.Range.InsertAfter (mText+"\n");
//下面为在第一段后插入文本
//webform.WebOffice.WebObj.Application.ActiveDocument.Range(1).InsertAfter(mText);
}
}
function WebGetExcelContent(){
webform.WebOffice.WebObj.Application.Sheets(1).Select;
webform.WebOffice.WebObj.Application.Range("C5").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "126";
webform.WebOffice.WebObj.Application.Range("C6").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "446";
webform.WebOffice.WebObj.Application.Range("C7").Select;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "556";
webform.WebOffice.WebObj.Application.Range("C5:C8").Select;
webform.WebOffice.WebObj.Application.Range("C8").Activate;
webform.WebOffice.WebObj.Application.ActiveCell.FormulaR1C1 = "=SUM(R[-3]C:R[-1]C)";
webform.WebOffice.WebObj.Application.Range("D8").Select;
alert(webform.WebOffice.WebObj.Application.Range("C8").Text);
}
function WebInsertFile(){
webform.WebOffice.WebSetMsgByName("COMMAND","INSERTFILE");
webform.WebOffice.Template="模板一.doc";
if (webform.WebOffice.WebLoadTemplate()){
if (webform.WebOffice.WebInsertFile()){
alert("成功");
}else{
StatusMsg(webform.WebOffice.Status);
}
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function WebUpdateFile(){
if (webform.WebOffice.WebUpdateFile()){
StatusMsg(webform.WebOffice.Status);
}else{
StatusMsg(webform.WebOffice.Status);
}
}
function WebInportText(){
var mText;
webform.WebOffice.WebSetMsgByName("COMMAND","INPORTTEXT");
if (webform.WebOffice.WebSendMessage()){
mText=webform.WebOffice.WebGetMsgByName("CONTENT");
webform.WebOffice.WebObject.Application.Selection.Range.InsertAfter(mText);
alert("导入文本成功");
}
StatusMsg(webform.WebOffice.Status);
}
function WebExportText(){
var mText=webform.WebOffice.WebObject.Content.Text;
webform.WebOffice.WebSetMsgByName("COMMAND","EXPORTTEXT");
webform.WebOffice.WebSetMsgByName("CONTENT",mText);
if (webform.WebOffice.WebSendMessage()){
alert("导出文本成功");
}
StatusMsg(webform.WebOffice.Status);
}
</script>
</HEAD>
<body onload="Load()" onunload="UnLoad()">
<div align="center">
<form name="webform" method="post">
<input type=hidden
value="<%=mRecordID%>" name=RecordID> <input type=hidden
value="<%=mTemplate%>" name=Template> <input type=hidden
value="<%=mFileType%>" name=FileType> <input type=hidden
value="<%=mEditType%>" name=EditType> <input type=hidden
value="<%=mHTMLPath%>" name=HTMLPath>
<table class="tableframe" width="90%" border="0">
<tr>
<td bgColor="#fbe3b5">
<table width="27%" border="0">
<tr>
<td class="titlebar" width="42%" height="24"><IMG height="16" src="../images/mingpianguanli.gif" width="16"> 详细信息</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="tableframe" width="90%" bgColor="#fafad2" border="1">
<!--DWLayoutTable-->
<tr bgColor="#fffaf0">
<td width="20%">
<div align="right">标题:</div>
</td>
<td width="80%" colSpan="3"><% =PTitle %></td>
</tr>
<tr bgColor="#fafad2">
<td width="20%">
<div align="right">来文时间:</div>
</td>
<td width="50%"><% =PSendDate %></td>
<td width="10%">
<div align="right">密级:</div>
</td>
<td width="40%"><% =Psecretgreadname %></td>
</tr>
</table>
<table class="tableframe" cellSpacing="0" cellPadding="0" width="90%" border="1">
<!--DWLayoutTable-->
<tr bgColor="#fffaf0">
<td width="20%">
<div align="right">文档类型:</div>
</td>
<td width="10%"><% =Pdocumenttypename %></td>
<td width="20%">
<div align="right">紧急程度:</div>
</td>
<td width="20%"><% =Pexigencedegreename%></td>
<td width="10%">
<div align="right">作者:</div>
</td>
<td><%=drawman%></td>
</tr>
</table>
<table class="tableframe" cellSpacing="0" cellPadding="0" width="90%" bgColor="#fafad2"
border="0">
<tr>
<td>
<TABLE cellSpacing="0" cellPadding="0" width="58" align="right" border="0">
<TBODY>
<TR>
<TD></TD>
<TD><A href="../desktop/StreamDetail.aspx?DocumentID=<% =PDocumentID%>" ><IMG src="../images/viewnew.gif" border="0"></A></TD>
<TD></TD>
</TR>
</TBODY>
</TABLE>
</td>
</tr>
</table>
<table class="tableframe" cellSpacing="0" cellPadding="0" width="90%" border="0">
<!--DWLayoutTable-->
<tr>
<td height="500">
<!-- word begin -->
<table class="tableframe" height="600" cellSpacing="0" cellPadding="0" width="100%" align="left"
border="1">
<tr>
<td colspan="2" bgcolor="lightgoldenrodyellow"> 公文内容</td>
</tr>
<tr>
<!--td align=right valign=top width=64>内容</td-->
<td align="right" height="600"><asp:panel id="Panel1" runat="server"></asp:panel></td>
<td width="100%" height="600">
<table border="0" cellspacing='0' cellpadding='0' width='100%' height="600">
<tr>
<td bgColor="menu">
<OBJECT codeBase="../FairyWebOfficeOcx.ocx" height="100%" width="100%" classid="clsid:3010A4BD-B471-4146-95D8-4927D5C5C79F"
name="WebOffice" VIEWASTEXT>
<PARAM NAME="Visible" VALUE="0">
<PARAM NAME="AutoScroll" VALUE="0">
<PARAM NAME="AutoSize" VALUE="0">
<PARAM NAME="AxBorderStyle" VALUE="1">
<PARAM NAME="Caption" VALUE="FairyWebOffice">
<PARAM NAME="Color" VALUE="2147483663">
<PARAM NAME="Font" VALUE="MS Sans Serif">
<PARAM NAME="KeyPreview" VALUE="0">
<PARAM NAME="PixelsPerInch" VALUE="96">
<PARAM NAME="PrintScale" VALUE="1">
<PARAM NAME="Scaled" VALUE="-1">
<PARAM NAME="DropTarget" VALUE="0">
<PARAM NAME="HelpFile" VALUE="">
<PARAM NAME="DoubleBuffered" VALUE="0">
<PARAM NAME="Enabled" VALUE="-1">
<PARAM NAME="Cursor" VALUE="0">
<PARAM NAME="HelpType" VALUE="0">
<PARAM NAME="HelpKeyword" VALUE="">
<PARAM NAME="ServerPath" VALUE="">
<PARAM NAME="RecordID" VALUE="">
<PARAM NAME="Template" VALUE="">
<PARAM NAME="FileName" VALUE="">
<PARAM NAME="FileType" VALUE="">
<PARAM NAME="EditType" VALUE="0">
<PARAM NAME="UserName" VALUE="">
<PARAM NAME="Model" VALUE="0">
<PARAM NAME="Status" VALUE="">
</OBJECT>
</td>
</tr>
<tr>
<td bgColor="menu" height="20">
<div id="StatusBar">状态栏</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="60%">
<tr>
<td align="center"><A onclick="WebSaveLocal()" href="#"><img src="../images/save1.gif" border="0"></A>
<a href="#" onclick="javascript:history.back()"><img src="../images/fh.gif" border="0"></a>
</td>
</tr>
</table>
<!-- word end -->
<div id="menu" style=" position:absolute;visibility:hidden;top:179px;left:8px;width:100%; height::20px; background-color::red">
<table id=table1 border="=0" cellpadding="0"; cellspacing="0" >
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<iframe src="javascript:false" style="position:absolute; visibility:inherit;top:10px;left:8px;width:100%;height:20px; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';">
</iframe>
</div>
</form>
</div>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -