代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
+15 -5
View File
@@ -10,10 +10,20 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" Size="Medium">
</f:Button>
<iframe id="LookHtml" runat="server" width="400" height="600" name="LookHtml"></iframe>
</form>
<f:PageManager ID="PageManager1" AutoSizePanelID="TabStrip1" runat="server" />
<f:TabStrip ID="TabStrip1" IsFluid="true" ShowBorder="true" ActiveTabIndex="0" Hidden="true"
runat="server">
<Tabs>
<f:Tab ID="Tab1" EnableIFrame="true" Width="12000px"
Title="预览" runat="server">
</f:Tab>
</Tabs>
</f:TabStrip>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Hidden="true" Text="关闭" runat="server" Icon="SystemClose" Size="Medium">
</f:Button>
<iframe id="LookHtml" runat="server" width="700" height="600" name="LookHtml" hidden="hidden"></iframe>
<f:Image ID="Image1" runat="server" ImageWidth="1000px" Icon="World" Hidden="true">
</f:Image>
</form>
</body>
</html>
+31 -7
View File
@@ -1,5 +1,6 @@
using BLL;
using System;
using System.IO;
namespace FineUIPro.Mobile.AttachFile
{
@@ -12,19 +13,42 @@ namespace FineUIPro.Mobile.AttachFile
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
var url = Request.Params["fileUrl"];
var newurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, "");
this.LookHtml.Src = newurl;
var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src=";
// var Baseurl = "https://view.xdocin.com/view?src=";
var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, "");
var newurl = "";
var FiletExtension = Path.GetExtension(url);
if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx")
{
newurl = Baseurl + Fileurl;
}
else if (FiletExtension == ".txt" || FiletExtension == "pdf")
{
newurl = Fileurl;
}
else
{
newurl = Fileurl;
}
if (AttachFileService.IsImage(FiletExtension) && 1 > 2)
{
this.TabStrip1.Hidden = true;
this.Image1.Hidden = false;
this.Image1.ImageUrl = newurl;
}
else
{
this.TabStrip1.Hidden = false;
this.Image1.Hidden = true;
this.LookHtml.Src = newurl;
this.Tab1.IFrameUrl = newurl;
}
//StreamReader fread = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312"));
//string ss = fread.ReadToEnd();
//Response.Write(ss);
//fread.Close();
//fread.Dispose();
// Response.Redirect(url);
//Process process = new Process();
//process.StartInfo.UseShellExecute = true;
//process.StartInfo.FileName = url;
//process.Start();
}
+27
View File
@@ -32,6 +32,24 @@ namespace FineUIPro.Mobile.AttachFile
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab1;
/// <summary>
/// btnClose 控件。
/// </summary>
@@ -49,5 +67,14 @@ namespace FineUIPro.Mobile.AttachFile
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlIframe LookHtml;
/// <summary>
/// Image1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Image Image1;
}
}
@@ -364,25 +364,15 @@ namespace FineUIPro.Mobile.AttachFile
info = new FileInfo(url);
}
var FiletExtension = Path.GetExtension(savedName);
if (FiletExtension == ".docx" || FiletExtension == ".pdf")
bool isSupportType = AttachFileService.IsSupportFileType(FiletExtension);
if (isSupportType)
{
string httpUrl = BLL.AsposeWordHelper.WordToHtml(url);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
}
else if (FiletExtension == ".txt")
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -")));
}
else if (FiletExtension == ".xls")
{
string httpUrl = BLL.AsposeWordHelper.PriviewExcel(url);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
}
else
{
ShowNotify("不支持预览", MessageBoxIcon.Warning);
}
}
catch (Exception ex)