MessageDeatil.cshtml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. 
  2. @{
  3. ViewBag.Title = "MessageDeatil";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <style>
  7. .message-title{
  8. font-size:16px;
  9. font-weight:bold;
  10. padding:1rem 1rem
  11. }
  12. .message-detail{
  13. font-size:14px;
  14. padding:1rem 1rem
  15. }
  16. .message-person{
  17. font-size:15px;
  18. font-weight:bold;
  19. padding:0 1rem;
  20. color:#5840a0
  21. }
  22. .message-attachment
  23. {
  24. font-size: 15px;
  25. font-weight: bold;
  26. color:royalblue
  27. }
  28. </style>
  29. <div class="easyui-layout" data-options="fit:true">
  30. <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
  31. @*<a href="#" onclick="" class="easyui-linkbutton c1">
  32. <i class="fa fa-check-square"></i> 确定
  33. </a>*@
  34. <a href="#" id="btnClose" class="easyui-linkbutton c5">
  35. <i class="fa fa-power-off"></i>
  36. 关闭
  37. </a>
  38. </div>
  39. <div data-options="region:'center',border:false">
  40. <div class="message-title" id="title">
  41. </div>
  42. <div class="message-person" id="Person">
  43. </div>
  44. <div class="message-detail" id="Detail">
  45. </div>
  46. <div class="message-detail" id="Attachment">
  47. </div>
  48. </div>
  49. </div>
  50. <script>
  51. $(function()
  52. {
  53. $.post('/Home/GetMessageDeatilById/@ViewBag.ID', function (data) {
  54. $("#title").html(data[0].标题);
  55. $("#Person").html(data[0].添加人+"-"+data[0].发布时间);
  56. $("#Detail").html(data[0].内容);
  57. if (data[0].附件ID != null) {
  58. $("#Attachment").html('<a href="#" class="message-attachment" onclick="downloadfile(' + data[0].附件ID + ')">下载附件</a>');
  59. }
  60. })
  61. })
  62. $("#btnClose").bind("click", function () {
  63. ZLPMS.CloseTopWindow();
  64. })
  65. //下载附件文件
  66. function downloadfile(id) {
  67. window.open('/Problem/ViewProblemImage?id=' + id);
  68. }
  69. </script>