config.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page
  4. import ="java.util.*"%>
  5. <%@ page language="java"
  6. import="com.sysmodel.XFormFactory,
  7. com.sysmodel.datamodel.xmlmodel.ModelFactory,
  8. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  9. com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl,
  10. com.sysmodel.collectmodel.xmlmodel.able.FormCollection,
  11. com.sysmodel.datamodel.xmlmodel.able.MdpClass"%>
  12. <HTML>
  13. <HEAD>
  14. <%
  15. String pageid = request.getParameter("pageid") == null ? "" : request.getParameter("pageid");
  16. String multipart = "";
  17. String description = "";
  18. String type = "";
  19. String formaction = "";
  20. int iclassid =0;
  21. String Action = "add";
  22. type = request.getParameter("type") == null ? "" : request.getParameter("type");
  23. if (!pageid.equals("")){
  24. Action = "edit";
  25. FormCollection FormCollection =(FormCollection)XFormFactory.getXFormModel().getFormCollection(pageid);
  26. iclassid = Integer.parseInt(FormCollection.getClassid());
  27. formaction = FormCollection.getAction();
  28. multipart = FormCollection.getEnctype();
  29. System.out.println("multipart="+multipart);
  30. description = FormCollection.getDescription();
  31. type = FormCollection.getType();
  32. }
  33. SysModel sysmodel = ModelFactory.getSysmodel();
  34. %>
  35. <TITLE></TITLE>
  36. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  37. <link rel="stylesheet" href="../../../../styles/css.css" type="text/css">
  38. <script type="text/javascript">
  39. <%
  40. String refreshNode = request.getParameter("refreshNode") == null ? "" : request.getParameter("refreshNode");
  41. if(!refreshNode.equals("")){%>
  42. var loadTip = "<div>数据装载中,请稍候...</div>";
  43. var treeImagePath = "<%=request.getContextPath()%>/images/tree_images/";
  44. var url = "<%=request.getContextPath()%>/admin/menu/divTreeService.jsp?nodeID=pageCollection.<%=type%>";
  45. var treeCloseImg = "plus.gif";
  46. var treeOpenImg = "minus.gif";
  47. parent.parent.parent.frames["confTreeFrame"].refreshNode('pageCollection.<%=type%>');
  48. parent.parent.location.href= "../container.html?pagid=<%=pageid%>";
  49. <%}%>
  50. </script>
  51. <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true"></script>
  52. <script type="text/javascript">
  53. dojo.require("dijit.form.Form");
  54. dojo.require("dijit.form.ValidationTextBox");
  55. dojo.require("dijit.form.ComboBox");
  56. dojo.require("dijit.form.FilteringSelect");
  57. dojo.require("dijit.form.NumberSpinner");
  58. dojo.require("dijit.form.Button");
  59. dojo.require("dijit.Tooltip");
  60. dojo.require("dojo.parser");
  61. </script>
  62. <style type="text/css">
  63. @import "../../../../scripts/dojo/dojo/resources/dojo.css";
  64. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  65. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  66. @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  67. .formQuestion {
  68. background-color:#d0e3f5;
  69. padding:0.3em;
  70. font-weight:900;
  71. font-family:Verdana, Arial, sans-serif;
  72. font-size:0.8em;
  73. color:#5a5a5a;
  74. }
  75. .formAnswer {
  76. background-color:#f5eede;
  77. padding:0.3em;
  78. margin-bottom:1em;
  79. width: 100%;
  80. }
  81. .pageSubContentTitle {
  82. color:#8e8e8e;
  83. font-size:1em;
  84. font-family:Verdana, Arial, sans-serif;
  85. margin-bottom:0.75em;
  86. }
  87. .small INPUT {
  88. width: 2.5em;
  89. }
  90. .medium INPUT {
  91. width: 10em;
  92. }
  93. .long INPUT {
  94. width: 20em;
  95. }
  96. .firstLabel {
  97. display: inline-block;
  98. display: -moz-inline-box;
  99. width: 10em;
  100. min-width: 10em;
  101. }
  102. .secondLabel {
  103. width: auto;
  104. margin-left: 5em;
  105. margin-right: 1em;
  106. }
  107. fieldset label {
  108. margin-right: 1em;
  109. }
  110. .noticeMessage {
  111. display: block;
  112. float: right;
  113. font-weight: normal;
  114. font-family:Arial, Verdana, sans-serif;
  115. color:#663;
  116. font-size:0.9em;
  117. }
  118. </style>
  119. </HEAD>
  120. <body class="tundra">
  121. <form action="configExc.jsp" method="post">
  122. <input type="hidden" name="Action" value="<%=Action%>">
  123. <div id=total>
  124. <div class="whiteborder">
  125. <div class="titback">
  126. <div class="floatleft">
  127. <img src="../../../../images/index/arrow1.gif" width="20" height="24"/></div>
  128. <div class="dropshadow">采集基本信息配置&nbsp;&nbsp;&nbsp;</div>
  129. <div class="clear"></div>
  130. </div>
  131. <div class="report">
  132. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  133. <tr>
  134. <td align="right" width="28%">配置编号&nbsp;<span class="redcolor">*</span></td>
  135. <td align="left" width="72%">
  136. <input type="text" value="<%=pageid %>"
  137. id="pageid" name="pageid" class="medium"
  138. dojoType="dijit.form.ValidationTextBox"
  139. required="true"
  140. ucfirst="true"
  141. invalidMessage="标题必须填写!"
  142. <%if(!pageid.equals(""))out.print("readonly") ;%>>
  143. </td>
  144. </tr>
  145. <tr>
  146. <td align="right">提交页面&nbsp;<span class="redcolor">*</span></td>
  147. <td align="left">
  148. <input type="text" value="<%=formaction %>"
  149. id="action" name="action" class="medium"
  150. dojoType="dijit.form.ValidationTextBox"
  151. required="true"
  152. ucfirst="true"
  153. invalidMessage="标题必须填写!"></td>
  154. </tr>
  155. <tr>
  156. <td align="right">页面Enctype&nbsp;&nbsp;&nbsp;</td>
  157. <td align="left">
  158. <select id="multipart" name="multipart"
  159. dojoType="dijit.form.FilteringSelect"
  160. required="true"
  161. autocomplete="true">
  162. <option value="true">true</option>
  163. <option value="false">false</option>
  164. </select></td>
  165. </tr>
  166. <tr>
  167. <td align="right">所属模块&nbsp;<span class="redcolor">*</span></td>
  168. <td align="left">
  169. <select id="type" name="type"
  170. dojoType="dijit.form.FilteringSelect"
  171. required="true"
  172. autocomplete="true">
  173. <%
  174. ArrayList mod = sysmodel.getMdpModules();
  175. MdpModuleImpl MdpModule = new MdpModuleImpl();
  176. for(int i = 0 ; i < mod.size(); i ++){
  177. MdpModule = (MdpModuleImpl)mod.get(i);
  178. String id =String.valueOf(MdpModule.getCode());
  179. %>
  180. <option value="<%=id %>" <%if(id.equals(type)) out.print("selected"); %> ><%=MdpModule.getName() %></option>
  181. <%
  182. }
  183. %>
  184. </select></td>
  185. </tr>
  186. <tr>
  187. <td align="right">维护表&nbsp;<span class="redcolor">*</span></td>
  188. <td align="left">
  189. <select id="classid" name="classid"
  190. dojoType="dijit.form.FilteringSelect"
  191. required="true"
  192. autocomplete="true">
  193. <%
  194. mod = sysmodel.getMdpClasses();
  195. MdpClass MdpClass = null;
  196. for(int i = 0 ; i < mod.size(); i ++){
  197. MdpClass = (MdpClass)mod.get(i);
  198. int id = MdpClass.getClassid();
  199. %>
  200. <option value="<%=id %>" <%if(id == iclassid) out.print("selected"); %> ><%=MdpClass.getDescription() %></option>
  201. <%
  202. }
  203. %>
  204. </select>
  205. </td>
  206. </tr>
  207. <tr>
  208. <td align="right">备注&nbsp;<span class="redcolor">*</span></td>
  209. <td align="left">
  210. <input type="text" value="<%=description %>"
  211. id="description" name="description" class="medium"
  212. dojoType="dijit.form.ValidationTextBox"
  213. required="true"
  214. ucfirst="true"
  215. invalidMessage="标题必须填写!">
  216. </td>
  217. </tr>
  218. </table>
  219. </div>
  220. <div class="btmbox">
  221. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple")' type="submit" iconClass="plusIcon">
  222. 保存
  223. </button>
  224. <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>&nbsp;&nbsp;
  225. </div></div>
  226. </div>
  227. </form>
  228. </BODY>
  229. </HTML>