总部检查图片预览功能实现
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace FineUIPro.Web.OfficeCheck.Check
|
||||
{
|
||||
@@ -49,7 +50,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnAdd.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
this.Grid1.Columns[9].Hidden = true;
|
||||
this.Grid1.Columns[11].Hidden = true;
|
||||
}
|
||||
|
||||
this.CheckNoticeId = Request.Params["CheckNoticeId"];
|
||||
@@ -133,14 +134,16 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
List <SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (Funs.DB.ProjectSupervision_RectifyItem.FirstOrDefault(x => x.RectifyId == this.hdRectifyNoticesId.Text) != null)
|
||||
{
|
||||
strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType,null as CheckReportItemId
|
||||
strSql = @"select RectifyItemId,WrongContent,Requirement,LimitTime,RectifyResults,IsRectify,HiddenHazardType
|
||||
,null as CheckReportItemId, RectifyItemId AS FileUrlId
|
||||
from ProjectSupervision_RectifyItem
|
||||
where RectifyId = @RectifyId";
|
||||
listStr.Add(new SqlParameter("@RectifyId", this.hdRectifyNoticesId.Text));
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"select newid() as RectifyItemId,UnConformItem as WrongContent,null as Requirement,null as LimitTime, null as RectifyResults,0 as IsRectify,'1' as HiddenHazardType,item.CheckReportItemId
|
||||
strSql = @"select newid() as RectifyItemId,UnConformItem as WrongContent,null as Requirement,null as LimitTime, null as RectifyResults,0 as IsRectify
|
||||
,'1' as HiddenHazardType,item.CheckReportItemId,item.CheckReportItemId AS FileUrlId
|
||||
from ProjectSupervision_CheckReportItem as item
|
||||
left join ProjectSupervision_CheckReport as Report on item.CheckReportId=Report.CheckReportId
|
||||
where Report.CheckNoticeId = @CheckNoticeId";
|
||||
@@ -264,7 +267,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
}
|
||||
else
|
||||
{
|
||||
string checkReportItemId= Grid1.Rows[e.RowIndex].Values[10].ToString();
|
||||
string checkReportItemId= Grid1.Rows[e.RowIndex].Values[12].ToString();
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Rectify&menuId={1}&type=0&strParam=1", checkReportItemId, BLL.Const.CheckInfoMenuId)));
|
||||
}
|
||||
}
|
||||
@@ -528,5 +531,43 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取整改前图片(放于Img中)
|
||||
/// </summary>
|
||||
/// <param name="registrationId"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertImageUrlByImage(object FileUrlId)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (FileUrlId != null)
|
||||
{
|
||||
var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(FileUrlId.ToString() + "#1");
|
||||
if (RectifyNoticesItem != null)
|
||||
{
|
||||
url = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl));
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取整改后图片
|
||||
/// </summary>
|
||||
/// <param name="registrationId"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertImageUrlByImage2(object FileUrlId)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (FileUrlId != null)
|
||||
{
|
||||
var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(FileUrlId.ToString() + "#2");
|
||||
if (RectifyNoticesItem != null)
|
||||
{
|
||||
url = BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user