总部检查图片预览功能实现

This commit is contained in:
2024-03-07 16:12:32 +08:00
parent 5823d7534e
commit d03c9a0e00
9 changed files with 339 additions and 189 deletions
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
namespace FineUIPro.Web.HSSE.Check
{
@@ -127,5 +128,44 @@ namespace FineUIPro.Web.HSSE.Check
ShowNotify("数据已提交成功!");
}
}
/// <summary>
/// 获取整改前图片(放于Img中)
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertImageUrlByImage(object RectifyItemId)
{
string url = string.Empty;
if (RectifyItemId != null)
{
var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(RectifyItemId.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 RectifyItemId)
{
string url = string.Empty;
if (RectifyItemId != null)
{
var RectifyNoticesItem = BLL.AttachFileService.GetAttachFileByToKeyId(RectifyItemId.ToString() + "#2");
if (RectifyNoticesItem != null)
{
url = BLL.UploadAttachmentService.ShowImage("../../", RectifyNoticesItem.AttachUrl);
}
}
return url;
}
}
}