NoteR.jsp 6.5 KB

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