NoteR.jsp.svn-base 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. String path = request.getContextPath();
  5. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  6. %>
  7. <!DOCTYPE html>
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  12. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  13. <style type="text/css">
  14. h1{
  15. padding-top: 85px;
  16. }
  17. body{
  18. background: #f1f2f5;
  19. font-family: 宋体;
  20. }
  21. .input{
  22. margin-right: 5px;
  23. background-color: #9ABACD;
  24. font-weight: bold;
  25. height: 30;
  26. width: 70;
  27. }
  28. .input:hover{
  29. background-color: #3CD60D;
  30. }
  31. #top{
  32. background: url("<%=basePath %>resource/images/screens/cs1.jpg");
  33. background-repeat:no-repeat;
  34. background-position: center;
  35. background-size: cover;
  36. width:100%,
  37. height: 155px
  38. }
  39. #content{
  40. background: url("<%=basePath %>resource/images/screens/cz1.jpg");
  41. background-position: center;
  42. background-repeat: repeat-y;
  43. background-size: cover;
  44. font-size: 16px;
  45. width:100%;
  46. height:100%;
  47. padding-left: 60px;
  48. padding-right:60px;
  49. }
  50. #emergency{
  51. background: url("<%=basePath %>resource/images/screens/cx1.jpg");
  52. background-repeat: no-repeat;
  53. background-position: center;
  54. background-size: cover;
  55. }
  56. .note-body {
  57. padding-left: 25%;
  58. z-index: 0;
  59. }
  60. .note-title {
  61. font-weight: 800;
  62. font: bold 16px Arial, Helvetica;
  63. color: #8f5a0a;
  64. text-transform: uppercase;
  65. text-align: center;
  66. margin: 0 0 20px 0;
  67. letter-spacing: 4px;
  68. position: relative;
  69. max-width: 400px;
  70. }
  71. .note-title:after, .note-title:before{
  72. background-color: #777;
  73. content: "";
  74. height: 1px;
  75. position: absolute;
  76. top: 15px;
  77. width: 120px;
  78. }
  79. .note-title:after{
  80. background-image: -webkit-gradient(linear, left top, right top, from(#777), to(#fff));
  81. background-image: -webkit-linear-gradient(left, #777, #fff);
  82. background-image: -moz-linear-gradient(left, #777, #fff);
  83. background-image: -ms-linear-gradient(left, #777, #fff);
  84. background-image: -o-linear-gradient(left, #777, #fff);
  85. background-image: linear-gradient(left, #777, #fff);
  86. right: 0;
  87. }
  88. .note-title:before{
  89. background-image: -webkit-gradient(linear, right top, left top, from(#777), to(#fff));
  90. background-image: -webkit-linear-gradient(right, #777, #fff);
  91. background-image: -moz-linear-gradient(right, #777, #fff);
  92. background-image: -ms-linear-gradient(right, #777, #fff);
  93. background-image: -o-linear-gradient(right, #777, #fff);
  94. background-image: linear-gradient(right, #777, #fff);
  95. left: 0;
  96. }
  97. .note-text {
  98. margin-bottom: 15px;
  99. margin-left: 20px;
  100. }
  101. .note-item {
  102. color: #666;
  103. margin: 2px 0px 2px 10px;
  104. }
  105. .note-default {
  106. overflow:hidden;margin:0 auto;text-align:left;width:700px;
  107. }
  108. </style>
  109. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  110. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  111. <script type="text/javascript">
  112. /*通知浏览界面*/
  113. Ext.onReady(function(){
  114. var id = getUrlParam('formCondition').replace(/IS/g, '=').split('=')[1];
  115. Ext.Ajax.request({
  116. url : basePath + 'oa/note/getNote.action',
  117. params: {
  118. id:id
  119. },
  120. method : 'post',
  121. callback : function(options,success,response){
  122. var localJson = new Ext.decode(response.responseText);
  123. if(localJson.success){
  124. Ext.get('title').insertHtml('afterBegin', localJson.no_title);
  125. Ext.get('date').insertHtml('afterBegin', localJson.date);
  126. Ext.get('approver').insertHtml('afterBegin', localJson.approver);
  127. Ext.get('content').insertHtml('afterBegin', "&nbsp;&nbsp;&nbsp;" + localJson.content);
  128. var attachs=localJson.no_attachs;
  129. if(attachs.length>0&&attachs!=""&&attachs!=null){
  130. Ext.get('content').insertHtml('beforeEnd','</br></br></br>');
  131. Ext.Array.each(attachs,function(attach){
  132. Ext.get('content').insertHtml('beforeEnd','<li style="float:right;padding-right:80px; font-size:14px;"><a href='+basePath+'common/downloadbyId.action?id='+attach.split("#")[0]+'>'+attach.split('#')[1]+'</a></li>');
  133. });
  134. }
  135. if(localJson.no_emergency == '3' || localJson.no_emergency == '特急'){
  136. document.getElementById('emergency').className = 'emergency_worry';
  137. }
  138. //审核人 可编辑和修改新闻
  139. if(localJson.approver != em_name){
  140. Ext.get('edit').destroy();
  141. Ext.get('delete').destroy();
  142. }
  143. } else {
  144. if(localJson.exceptionInfo){
  145. showError(localJson.exceptionInfo);
  146. window.location.href = basePath + 'jsps/error/e-500.jsp';
  147. }
  148. }
  149. }
  150. });
  151. });
  152. function deleteNote() {
  153. var id = getUrlParam('formCondition').replace(/IS/g, '=').split('=')[1];
  154. Ext.Ajax.request({
  155. url : basePath + '/oa/note/deleteNote.action',
  156. params: {
  157. id: id
  158. },
  159. method : 'post',
  160. callback : function(options,success,response){
  161. window.location.href = basePath + 'jsps/oa/info/Note.jsp';
  162. }
  163. });
  164. }
  165. function editNote() {
  166. var id = getUrlParam('formCondition').replace(/IS/g, '=').split('=')[1];
  167. window.location.href = basePath + 'jsps/oa/info/Note.jsp?formCondition=no_id='+id;
  168. }
  169. </script>
  170. </head>
  171. <body >
  172. <div id='top' style="height:170px"><center><h1><span id="title" ></span></h1><br/>
  173. <font color=#999;><span id="date"></span></font>&nbsp;&nbsp;&nbsp;
  174. 审批人:<font color=#999;><span id="approver"></span></font>&nbsp;&nbsp;&nbsp;
  175. <input type="button" value="编&nbsp;辑" class="input" onclick="editNote();" id="edit">
  176. <input type="button" value="删&nbsp;除" class="input" onclick="deleteNote();" id="delete"></center></div>
  177. <div id="content"></div>
  178. <!-- <div id="attachs"> </div> -->
  179. <div id="emergency" style="height:174px"></div>
  180. </body>
  181. </html>