tSNotice-add.jsp 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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?doAdd" 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" >
  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">
  58. <script id="content" type="text/plain" style="width:700px;" ></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. </script>
  75. <span class="Validform_checktip"></span>
  76. <label class="Validform_label" style="display: none;">通知公告内容</label>
  77. </td>
  78. </tr>
  79. <tr>
  80. <td align="right">
  81. <label class="Validform_label">
  82. 类型:
  83. </label>
  84. </td>
  85. <td class="value">
  86. <input type="radio" name="noticeType" value="1" datatype="*" />通知
  87. &nbsp;&nbsp;<input type="radio" name="noticeType" value="2" checked="checked" />公告
  88. <span class="Validform_checktip"></span>
  89. <label class="Validform_label" style="display: none;">通知公告类型</label>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td align="right">
  94. <label class="Validform_label" style="white-space:nowrap;">
  95. 授权级别:
  96. </label>
  97. </td>
  98. <%-- update-begin--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%>
  99. <td class="value">
  100. <input type="radio" name="noticeLevel" value="1" datatype="*" checked="checked" onclick="dataytpeSelect()"/>全员
  101. &nbsp;&nbsp;<br/><input type="radio" name="noticeLevel" value="2" onclick="dataytpeSelect('roleName')" />角色授权
  102. <span id="roleName_span" style="display: none">
  103. <input name="roleid" name="roleid" type="hidden" value="" id="roleid">
  104. <input name="roleName" class="inputxt" value="" id="roleName" readonly="readonly" />
  105. <t:choose hiddenName="roleid" hiddenid="id" url="userController.do?roles" name="roleList"
  106. icon="icon-search" title="common.role.list" textname="roleName" isclear="true" isInit="true"></t:choose>
  107. </span>
  108. &nbsp;&nbsp;<br/><input type="radio" name="noticeLevel" value="3" onclick="dataytpeSelect('userName')"/>用户授权
  109. <span id="userName_span" style="display: none">
  110. <input name="userid" name="userid" type="hidden" value="" id="userid">
  111. <input name="userName" class="inputxt" value="" id="userName" readonly="readonly" />
  112. <t:choose hiddenName="userid" hiddenid="id" url="noticeAuthorityUserController.do?selectUser" name="userList"
  113. icon="icon-search" title="common.user.list" textname="userName" isclear="true" isInit="true"></t:choose>
  114. <%-- update-end--Author:dangzhenghui --date-- 20170322 for:TASK #1801 【公告改进】公告的创建维护角色,人员,直接在一个页面即可 --%> </span>
  115. <span class="Validform_checktip"></span>
  116. <label class="Validform_label" style="display: none;">授权级别</label>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td align="right">
  121. <label class="Validform_label" style="white-space:nowrap;">
  122. 阅读期限:
  123. </label>
  124. </td>
  125. <td class="value">
  126. <input id="noticeTerm" name="noticeTerm" type="text" style="width: 150px"
  127. class="Wdate" onClick="WdatePicker()" >
  128. <span class="Validform_checktip"></span>
  129. <label class="Validform_label" style="display: none;">阅读期限</label>
  130. </td>
  131. </tr>
  132. </table>
  133. </t:formvalid>
  134. </body>