Browse Source

公告通知查看页面嵌套iframe

娄底高职分支
liangkun 2 years ago
committed by ndbs
parent
commit
6bda566bcf
3 changed files with 25 additions and 3 deletions
  1. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml
  3. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js

+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs View File

@@ -5,7 +5,9 @@ using System.Collections.Generic;
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http;
using System.Web.Mvc; using System.Web.Mvc;
using Learun.Application.OA;


namespace Learun.Application.Web.Controllers namespace Learun.Application.Web.Controllers
{ {
@@ -595,6 +597,24 @@ namespace Learun.Application.Web.Controllers
{ {
return View(); return View();
} }

private NoticeIBLL noticeIBLL = new NoticeBLL();
[HttpGet]
public ActionResult ListContentView(string keyValue)
{
var data = noticeIBLL.GetEntity(keyValue);
data.F_NewsContent = WebHelper.HtmlDecode(data.F_NewsContent);
return Content(data.F_NewsContent);
}
/// <summary>
/// 失物招领
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult ListContentIndexLost()
{
return View();
}
#endregion #endregion


#region 开发向导 #region 开发向导


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml View File

@@ -23,9 +23,10 @@
<span>发布:<span id="F_CreateUserName"></span></span> <span>发布:<span id="F_CreateUserName"></span></span>
<span>公告类别:<span id="F_Category"></span></span> <span>公告类别:<span id="F_Category"></span></span>
</div> </div>
<div class="listDotBox" id="F_NewsContent">
@*<div class="listDotBox" id="F_NewsContent">
</div>
</div>*@
<iframe id="newscontentframe"scrolling="auto" frameborder="0" width="100%" height="400px"></iframe>
<div id="F_NewsImage"></div> <div id="F_NewsImage"></div>
</div> </div>
</div> </div>


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js View File

@@ -26,7 +26,8 @@ var bootstrap = function ($, learun) {
$("#F_CreateDate").text(data.F_CreateDate); $("#F_CreateDate").text(data.F_CreateDate);
$("#F_CreateUserName").text(data.F_CreateUserName); $("#F_CreateUserName").text(data.F_CreateUserName);
$("#F_Category").text(data.F_Category); $("#F_Category").text(data.F_Category);
$("#F_NewsContent").html($('<div></div>').html(data.F_NewsContent));
//$("#F_NewsContent").html($('<div></div>').html(data.F_NewsContent));
$("#newscontentframe").attr("src","/Utility/ListContentView?keyValue="+id);
$('#F_NewsImage').lrUploaderSet(data.F_NewsImage); $('#F_NewsImage').lrUploaderSet(data.F_NewsImage);
}); });
} }


Loading…
Cancel
Save