tSNotice-update.jsp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>common.notice</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
  9. <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.js"> </script>
  10. <script type="text/javascript">
  11. //编写自定义JS代码
  12. function setContent(){
  13. if(editor.queryCommandState( 'source' ))
  14. editor.execCommand('source');//切换到编辑模式才提交,否则有bug
  15. if(editor.hasContents()){
  16. editor.sync();
  17. $("#noticeContent").val(editor.getContent());
  18. }
  19. }
  20. <%-- update-begin--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%>
  21. function dataytpeSelect(name) {
  22. $("#roleName").removeAttr('datatype');
  23. $("#roleName_span").hide()
  24. $("#userName").removeAttr('datatype');
  25. $("#userName_span").hide()
  26. if (name){
  27. $("#"+name).attr('datatype','*');
  28. $("#"+name+"_span").show()
  29. }
  30. }
  31. <%-- update-end--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%>
  32. </script>
  33. </head>
  34. <body>
  35. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="noticeController.do?doUpdate" tiptype="1" beforeSubmit="setContent()">
  36. <input id="id" name="id" type="hidden" value="${tSNoticePage.id }">
  37. <table style="width: 100%;" cellpadding="0" cellspacing="1" class="formtable">
  38. <tr>
  39. <td align="right">
  40. <label class="Validform_label" >
  41. 标题:
  42. </label>
  43. </td>
  44. <td class="value">
  45. <input id="noticeTitle" name="noticeTitle" type="text" style="width: 95%" class="inputxt" value='${tSNoticePage.noticeTitle}'>
  46. <span class="Validform_checktip"></span>
  47. <label class="Validform_label" style="display: none;">通知标题</label>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td align="right">
  52. <label class="Validform_label">
  53. 内容:
  54. </label>
  55. </td>
  56. <td class="value">
  57. <input id="noticeContent" name="noticeContent" type="hidden" value='${tSNoticePage.noticeContent}'>
  58. <script id="content" type="text/plain" style="width:700px;" value='${tSNoticePage.noticeContent}'></script>
  59. <script type="text/javascript">
  60. var editor = UE.getEditor('content',{
  61. toolleipi:true,//是否显示,设计器的 toolbars
  62. textarea: 'design_content',
  63. //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个/*
  64. toolbars: [[
  65. 'fullscreen', 'source', '|', 'undo', 'redo', '|',
  66. 'fontfamily', 'fontsize', '|', 'indent', '|',
  67. 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
  68. 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', '|',
  69. ]],
  70. wordCount:false,
  71. elementPathEnabled:false,
  72. initialFrameHeight:400
  73. });
  74. editor.ready(function() {
  75. editor.setContent($('#noticeContent').val());
  76. });
  77. </script>
  78. <span class="Validform_checktip"></span>
  79. <label class="Validform_label" style="display: none;">通知公告内容</label>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td align="right">
  84. <label class="Validform_label" >
  85. 类型:
  86. </label>
  87. </td>
  88. <td class="value">
  89. <input type="radio" name="noticeType" value="1" datatype="*" <c:if test="${tSNoticePage.noticeType=='1'}">checked="checked"</c:if>
  90. <c:if test="${empty tSNoticePage.noticeType}">checked="checked"</c:if> />通知
  91. &nbsp;&nbsp;<input type="radio" name="noticeType" value="2" <c:if test="${tSNoticePage.noticeType=='2'}">checked="checked"</c:if> />公告
  92. <span class="Validform_checktip"></span>
  93. <label class="Validform_label" style="display: none;">类型</label>
  94. </td>
  95. </tr>
  96. <tr>
  97. <td align="right">
  98. <label class="Validform_label" style="white-space:nowrap;">
  99. 授权级别:
  100. </label>
  101. </td>
  102. <%-- update-begin--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%>
  103. <td class="value">
  104. <input type="radio" onclick="dataytpeSelect()" id="noticeLevel" name="noticeLevel" value="1" datatype="*" <c:if test="${tSNoticePage.noticeLevel=='1'}">checked="checked"</c:if>
  105. <c:if test="${empty tSNoticePage.noticeLevel}">checked="checked"</c:if> />全员
  106. &nbsp;&nbsp;<br/><input type="radio" onclick="dataytpeSelect('roleName')" name="noticeLevel" value="2" <c:if test="${tSNoticePage.noticeLevel=='2'}">checked="checked"</c:if> />角色授权
  107. <span id="roleName_span" <c:if test="${tSNoticePage.noticeLevel!='2'}">style="display: none"</c:if>>
  108. <input name="roleid" name="roleid" type="hidden" value="${rolesid}" id="roleid">
  109. <input name="roleName" class="inputxt" value="${rolesName }" id="roleName" readonly="readonly" />
  110. <t:choose hiddenName="roleid" hiddenid="id" url="userController.do?roles" name="roleList"
  111. icon="icon-search" title="common.role.list" textname="roleName" isclear="true" isInit="true"></t:choose>
  112. &nbsp;&nbsp;
  113. </span>
  114. <br/><input type="radio" onclick="dataytpeSelect('userName')" name="noticeLevel" value="3" <c:if test="${tSNoticePage.noticeLevel=='3'}">checked="checked"</c:if> />用户授权
  115. <span id="userName_span" <c:if test="${tSNoticePage.noticeLevel!='3'}">style="display: none"</c:if>>
  116. <input name="userid" name="userid" type="hidden" value="${usersid}" id="userid">
  117. <input name="userName" class="inputxt" value="${usersName }" id="userName" readonly="readonly" />
  118. <t:choose hiddenName="userid" hiddenid="id" url="noticeAuthorityUserController.do?selectUser" name="userList"
  119. icon="icon-search" title="common.user.list" textname="userName" isclear="true" isInit="true"></t:choose>
  120. <%-- update-end--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%>
  121. </span>
  122. <span class="Validform_checktip"></span>
  123. <label class="Validform_label" style="display: none;">授权级别</label>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td align="right">
  128. <label class="Validform_label" style="white-space:nowrap;">
  129. 阅读期限:
  130. </label>
  131. </td>
  132. <td class="value">
  133. <input class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width: 150px" id="noticeTerm"
  134. name="noticeTerm" ignore="ignore" value="<fmt:formatDate value='${tSNoticePage.noticeTerm}' type="date" pattern="yyyy-MM-dd"/>">
  135. <span class="Validform_checktip"></span>
  136. <label class="Validform_label" style="display: none;">阅读期限</label>
  137. </td>
  138. </tr>
  139. </table>
  140. </t:formvalid>
  141. </body>