create.jsp 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <%@ page contentType="text/html; charset=UTF-8" language="java"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page
  4. import="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  5. com.sysmodel.datamodel.xmlmodel.impl.MdpModuleImpl,
  6. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  7. com.sysmodel.datamodel.xmlmodel.impl.TemplateImpl,
  8. com.sysmodel.datamodel.xmlmodel.able.*"%>
  9. <HTML>
  10. <HEAD>
  11. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12. <TITLE></TITLE>
  13. <link rel="stylesheet" href="../../../../../styles/style.css"
  14. type="text/css"></link>
  15. <link rel="stylesheet" href="../../../../../styles/css.css"
  16. type="text/css"></link>
  17. <script type="text/javascript" src="../../../../../scripts/dojo/dojo/dojo.js"
  18. djConfig="isDebug: false, parseOnLoad: true"></script>
  19. <link rel="stylesheet" type="text/css" href="../../../../../scripts/ext20/resources/css/ext-all.css" />
  20. <script type="text/javascript" src="../../../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  21. <script type="text/javascript" src="../../../../../scripts/ext20/ext-all.js"></script>
  22. <link rel="stylesheet" href="../../../../../scripts/ext20/examples/examples.css" type="text/css"></link>
  23. <script type="text/javascript" src="../../../../../scripts/ext20/examples/examples.js"></script>
  24. <script language="JavaScript">
  25. function ChooseModule(Code, selectName){
  26. var strA = "";
  27. if(Code == "root") Code = "";
  28. createXMLHttpRequest();
  29. axo = new ActiveXObject("Microsoft.XMLDOM");
  30. XMLHttpReq.open("POST","../getConstants.jsp?type="+ Code + "",false);
  31. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  32. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  33. XMLHttpReq.send(strA);
  34. axo.loadXML(XMLHttpReq.responseText);
  35. n1 = axo.selectNodes("/root/classid");
  36. n2 = axo.selectNodes("/root/description");
  37. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  38. }
  39. </script>
  40. <script type="text/javascript">
  41. dojo.require("dijit.form.Form");
  42. dojo.require("dijit.form.FilteringSelect");
  43. dojo.require("dijit.form.Button");
  44. dojo.require("dijit.Tooltip");
  45. </script>
  46. <style type="text/css">
  47. @import "../../../../../scripts/dojo/dojo/resources/dojo.css";
  48. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  49. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  50. @import "../../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  51. .formQuestion {
  52. background-color:#d0e3f5;
  53. padding:0.3em;
  54. font-weight:900;
  55. font-family:Verdana, Arial, sans-serif;
  56. font-size:0.8em;
  57. color:#5a5a5a;
  58. }
  59. .formAnswer {
  60. background-color:#f5eede;
  61. padding:0.3em;
  62. margin-bottom:1em;
  63. width: 100%;
  64. }
  65. .pageSubContentTitle {
  66. color:#8e8e8e;
  67. font-size:1em;
  68. font-family:Verdana, Arial, sans-serif;
  69. margin-bottom:0.75em;
  70. }
  71. .small INPUT {
  72. width: 2.5em;
  73. }
  74. .medium INPUT {
  75. width: 10em;
  76. }
  77. .long INPUT {
  78. width: 20em;
  79. }
  80. .firstLabel {
  81. display: inline-block;
  82. display: -moz-inline-box;
  83. width: 10em;
  84. min-width: 10em;
  85. }
  86. .secondLabel {
  87. width: auto;
  88. margin-left: 5em;
  89. margin-right: 1em;
  90. }
  91. fieldset label {
  92. margin-right: 1em;
  93. }
  94. .noticeMessage {
  95. display: block;
  96. float: right;
  97. font-weight: normal;
  98. font-family:Arial, Verdana, sans-serif;
  99. color:#663;
  100. font-size:0.9em;
  101. }
  102. </style>
  103. <script type="text/javascript" src="../../select.js"></script>
  104. </HEAD>
  105. <body class="tundra">
  106. <form dojoType="dijit.form.Form" name="form1" method="post" action="">
  107. <div id=total>
  108. <div class="whiteborder">
  109. <div class="titback">
  110. <div class="floatleft"><img src="../../../../../images/index/arrow1.gif" alt="1" width="20" height="24" /></div>
  111. <div class="dropshadow">批量生成常量表DLL</div>
  112. <div class="clear"></div>
  113. </div>
  114. <div class="report">
  115. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  116. <tr>
  117. <td width="50%" valign="top">
  118. <table align="center" width="100%" border="0" cellpadding="1" cellspacing="1" class="ltab2">
  119. <tr class="TableBgColorAsh">
  120. <td width="30%" align="center">
  121. <select name="select2" size="15" class="SelectScroll" multiple id="role1" style="width:80%">
  122. <%
  123. SysModel sysmodel = ModelFactory.getSysmodel();
  124. ArrayList list = sysmodel.getTemplates();
  125. for (int i = 0; i < list.size(); i++) {
  126. TemplateImpl vo = (TemplateImpl) list.get(i);
  127. %><option value="<%=vo.getName()%>"> <%=vo.getDescription()%> </option><%
  128. }
  129. %>
  130. </select>
  131. </td>
  132. <td width="10%" align="center">
  133. <input name="button" type="button" class="button2"
  134. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  135. value=" &gt;&gt; " />
  136. <br>
  137. <br>
  138. <input name="button" type="button" class="button2"
  139. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  140. value=" &lt;&lt; " />
  141. </td>
  142. <td width="50%" align="center" valign="middle">
  143. <select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%"></select>
  144. </td>
  145. </tr>
  146. <tr class="TableBgColorBlack">
  147. <td colspan="3">
  148. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),checkConfig();'
  149. type="button" iconClass="plusIcon">开始生成</button>
  150. <span dojoType="dijit.Tooltip" connectId="save">开始生成</span>&nbsp;&nbsp;
  151. &nbsp;&nbsp; </td>
  152. </tr>
  153. </table>
  154. </td>
  155. </tr>
  156. </table>
  157. <!--验证信息放在这里 -->
  158. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"></div>
  159. </div>
  160. </div>
  161. </div>
  162. </form>
  163. <script language="JavaScript">
  164. /**
  165. @ 批量验证配置信息的正确性
  166. */
  167. var indexOfCheck = 0;
  168. var role2=document.all.item("role2");
  169. function checkConfig() {
  170. //初始化验证的索引序号
  171. indexOfCheck = 0
  172. var boxIdea=document.all.item("boxIdea");
  173. boxIdea.innerHTML = "";
  174. //取得用户选择的所有信息
  175. if(role2.options.length == 0){
  176. alert("请选则进行验证的表对象!");
  177. return;
  178. }
  179. //从第0个元素启动验证机制
  180. var CodeName = role2.options[0].value;
  181. checkOneObj(CodeName)
  182. }
  183. function checkOneObj(CodeName){
  184. if(CodeName=="") return;
  185. createXMLHttpRequest();
  186. var strA = "";
  187. axo = new ActiveXObject("Microsoft.XMLDOM");
  188. XMLHttpReq.open("POST","createExc.jsp?CodeName=" + CodeName,false);
  189. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  190. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  191. XMLHttpReq.send(strA);
  192. var boxIdea=document.all.item("boxIdea");
  193. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  194. indexOfCheck = indexOfCheck + 1;
  195. if(indexOfCheck < role2.options.length){
  196. checkOneObj(role2.options[indexOfCheck].value);
  197. }else{
  198. return;
  199. }
  200. }
  201. // End -->
  202. </script>
  203. </BODY>
  204. </HTML>