MessageDeatil.cshtml 2.2 KB

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