ViewProcessInfo.cshtml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. 
  2. @{
  3. ViewBag.Title = "ViewProcessInfo";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <style>
  7. table {
  8. width: 100%;
  9. }
  10. table td {
  11. border: solid 1px #cacaca;
  12. padding: 3px;
  13. }
  14. .lable {
  15. width: 130px;
  16. padding: 5px 5px 5px 15px;
  17. background: #f5f5f5;
  18. color: #2636a3;
  19. font-size: 13px;
  20. }
  21. .img {
  22. width: 40px;
  23. height: 50px;
  24. border: solid 1px #000;
  25. }
  26. file {
  27. margin: 1px;
  28. }
  29. #content img{
  30. max-width:400px;
  31. height:auto;
  32. }
  33. </style>
  34. <script src="~/Content/Scripts/plugins/layui/layui.all.js"></script>
  35. <script src="~/Content/Scripts/zlpms.js"></script>
  36. <script src="~/ViewModels/projectproblem.index.js?r=121"></script>
  37. <script type="text/javascript">
  38. $(function () {
  39. $('#btnClose').bind('click', function () { ZLPMS.CloseTopWindow(false) });
  40. $('#btnUpdate').bind('click', function () {
  41. ZLPMS.CloseTopWindow(true)
  42. });
  43. //加载附件信息
  44. var attfiles = '@Model.附件';
  45. if (attfiles != '') {
  46. var files = attfiles.split(',')
  47. var imghtml = '';
  48. $.each(files, function (i, n) {
  49. var imgs = n.split('|');
  50. var id = imgs[0];
  51. var ft = imgs[1];
  52. if (ft == '1') {//图像类型,显示缩略图 o原图,s缩略图,m大图
  53. imghtml += '<a href="#" onclick="OpenImage(' + id + ')"><img src="/Problem/ViewProblemImage?id=' + id + '&type=s" class="img"/></a>&nbsp;';
  54. } else {//非图像类型,显示下载附件
  55. imghtml += '<a href="#" onclick="downloadfile(' + id + ')">下载附件' + (i + 1) + '</a> ';
  56. }
  57. });
  58. $('#attach').html(imghtml);
  59. }
  60. //放大图片
  61. var img = $('#content').find("img");
  62. if (img) {
  63. img.bind("click", function () {
  64. var src = $(this).attr("src")
  65. top.ZLPMS.OpenNewWindow("查看图片", "/Problem/ViewImg?src=" + src, "850px", "620px")
  66. })
  67. }
  68. });
  69. //查看附件大图
  70. function OpenImage(id) {
  71. top.ZLPMS.OpenNewWindow('', '/Problem/ViewProblemImage?id=' + id + '&type=m', '80%', '90%');
  72. };
  73. //下载附件文件
  74. function downloadfile(id) {
  75. window.open('/Problem/ViewProblemImage?id=' + id);
  76. }
  77. </script>
  78. <div class="easyui-layout" data-options="fit:true">
  79. <div data-options="region:'south',border:false" style="height:50px; padding-top:10px;text-align:right; padding-right:10px;">
  80. <a id="btnUpdate" href="#" class="easyui-linkbutton c6"><i class="fa fa-pencil"></i> 修改</a>
  81. <a id="btnClose" href="#" class="easyui-linkbutton c5"><i class="fa fa-power-off"></i> 关闭</a>
  82. </div>
  83. <div data-options="region:'center',border:false">
  84. <div id="tabMyprocess" class="easyui-tabs" data-options="fit:true">
  85. <div title="过程详细信息" style="padding:3px;">
  86. <table>
  87. <tr>
  88. <td class="lable">问题编号</td>
  89. <td id="code" style="width:200px">@Model.编号</td>
  90. <td class="lable">处理人</td>
  91. <td id="property">@Model.处理人</td>
  92. </tr>
  93. <tr>
  94. <td class="lable">处理时间</td>
  95. <td id="code">@Model.记录时间</td>
  96. <td class="lable">状态</td>
  97. <td id="property">@Model.状态</td>
  98. </tr>
  99. <tr>
  100. <td class="lable">问题标题</td>
  101. <td id="title" colspan="3">@Model.问题标题</td>
  102. </tr>
  103. <tr>
  104. <td class="lable">过程描述</td>
  105. <td id="content" colspan="3" style="height:200px;overflow:auto;">@Html.Raw(Model.描述)</td>
  106. </tr>
  107. <tr>
  108. <td class="lable">问题附件</td>
  109. <td colspan="3" style="height:50px;" id="attach"></td>
  110. </tr>
  111. </table>
  112. </div>
  113. </div>
  114. </div>
  115. </div>