create.jsp 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <%@ page contentType="text/html; charset=UTF-8" language="java"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page
  4. import="com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  5. com.sysmodel.XFormFactory,
  6. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  7. com.sysmodel.datamodel.xmlmodel.ModelFactory"%>
  8. <%
  9. SysModel sysmodel = ModelFactory.getSysmodel();
  10. ArrayList FormList = XFormFactory.getXFormModel().getFormLists();
  11. ArrayList list = sysmodel.getMdpModules();
  12. %>
  13. <HTML>
  14. <HEAD>
  15. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  16. <TITLE></TITLE>
  17. <link rel="stylesheet" href="../../../../styles/style.css"
  18. type="text/css"></link>
  19. <link rel="stylesheet" href="../../../../styles/css.css"
  20. type="text/css"></link>
  21. <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
  22. djConfig="isDebug: false, parseOnLoad: true"></script>
  23. <link rel="stylesheet" type="text/css" href="../../../../scripts/ext20/resources/css/ext-all.css" />
  24. <script type="text/javascript" src="../../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  25. <script type="text/javascript" src="../../../../scripts/ext20/ext-all.js"></script>
  26. <link rel="stylesheet" href="../../../../scripts/ext20/examples/examples.css" type="text/css"></link>
  27. <script type="text/javascript" src="../../../../scripts/ext20/examples/examples.js"></script>
  28. <script type="text/javascript">
  29. dojo.require("dijit.form.Form");
  30. dojo.require("dijit.form.FilteringSelect");
  31. dojo.require("dijit.form.Button");
  32. dojo.require("dijit.Tooltip");
  33. </script>
  34. <script language="JavaScript">
  35. function ChooseModule(Code, selectName){
  36. var strA = "";
  37. if(Code == "root") Code = "";
  38. createXMLHttpRequest();
  39. axo = new ActiveXObject("Microsoft.XMLDOM");
  40. //XMLHttpReq.open("POST","../getClassids.jsp?type="+ Code + "",false);
  41. XMLHttpReq.open("POST","../getListids.jsp?type="+Code+"",false);
  42. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  43. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  44. XMLHttpReq.send(strA);
  45. axo.loadXML(XMLHttpReq.responseText);
  46. n1 = axo.selectNodes("/root/listid");
  47. n2 = axo.selectNodes("/root/description");
  48. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  49. }
  50. </script>
  51. <script type="text/javascript">
  52. Ext.onReady(function(){
  53. Ext.BLANK_IMAGE_URL = '../../../../scripts/ext20/resources/images/default/s.gif';
  54. var Tree = Ext.tree;
  55. var tree = new Tree.TreePanel({
  56. el:'tree-div',
  57. autoScroll:true,
  58. animate:true,//是否动画
  59. enableDD:true,// 是否支持拖放
  60. containerScroll:true,
  61. lines:true,
  62. loader:new Tree.TreeLoader({dataUrl:"../../../getModuleJson.jsp"})
  63. });
  64. var root = new Tree.AsyncTreeNode({
  65. text: '全部系统模块',
  66. draggable:false,
  67. id:'root'
  68. });
  69. tree.on('click', function(node){
  70. ChooseModule(node.id, dojo.byId('role1'))
  71. });
  72. tree.setRootNode(root);
  73. tree.render();
  74. root.expand();
  75. });
  76. </script>
  77. <style type="text/css">
  78. @import "../../../../scripts/dojo/dojo/resources/dojo.css";
  79. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  80. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  81. @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  82. </style>
  83. <script type="text/javascript" src="../select.js"></script>
  84. </HEAD>
  85. <body class="tundra">
  86. <form dojoType="dijit.form.Form" name="form1" method="post" action="">
  87. <div id=total>
  88. <div class="whiteborder">
  89. <div class="titback">
  90. <div class="floatleft"><img src="../../../../images/index/arrow1.gif" alt="1"
  91. width="20" height="24" /></div>
  92. <div class="dropshadow">根据列表配置初始化生成业务页面</div>
  93. <div class="clear"></div>
  94. </div>
  95. <div class="report">
  96. <table align="center" id="SortTable512_1" width="100%"
  97. cellpadding="1" cellspacing="1" class="ltab2">
  98. <tr>
  99. <td width="60%" valign="top">
  100. <table align="center" width="100%" border="0" cellpadding="1" cellspacing="1" class="ltab2">
  101. <tr class="TableBgColorAsh">
  102. <td width="30%" align="left" valign="top">
  103. <div id="tree-div" style="z-index:9999;overflow:auto; height:100%; width:100%;border:1px solid #c3daf9;">
  104. </div>
  105. </td>
  106. <td width="30%" align="center">
  107. <select name="select2" size="15" class="SelectScroll" multiple id="role1" style="width:80%">
  108. <%
  109. for (int i = 0; i < FormList.size(); i++) {
  110. FormListImpl FormListImpl = (FormListImpl) FormList.get(i);
  111. %>
  112. <option value="<%=FormListImpl.getListid()%>"> <%=FormListImpl.getDescription()%> </option>
  113. <%
  114. }
  115. %>
  116. </select></td>
  117. <td width="10%" align="center"><input name="button" type="button" class="button2"
  118. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  119. value=" &gt;&gt; " />
  120. <br>
  121. <br>
  122. <input name="button" type="button" class="button2"
  123. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  124. value=" &lt;&lt; " /> </td>
  125. <td align="center" valign="middle">
  126. <select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
  127. </select> </td>
  128. </tr>
  129. <tr class="TableBgColorBlack">
  130. <td colspan="4">
  131. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),checkConfig();' type="button" iconClass="plusIcon">
  132. 开始执行</button>
  133. <span dojoType="dijit.Tooltip" connectId="save"> 开始执行</span>&nbsp;&nbsp;
  134. &nbsp;&nbsp; </td>
  135. </tr>
  136. </table></td>
  137. </tr>
  138. </table>
  139. <!--验证信息放在这里 -->
  140. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"></div>
  141. </div>
  142. </div>
  143. </div>
  144. </form>
  145. <script language="JavaScript">
  146. var indexOfCheck = 0;
  147. var role2=document.all.item("role2");
  148. function checkConfig() {
  149. indexOfCheck = 0
  150. var boxIdea=document.all.item("boxIdea");
  151. boxIdea.innerHTML = "";
  152. if(role2.options.length == 0){
  153. alert("请选则进行验证的表对象!");
  154. return;
  155. }
  156. var classid = role2.options[0].value;
  157. checkOneObj(classid)
  158. }
  159. function checkOneObj(classid){
  160. if(classid=="") return;
  161. createXMLHttpRequest();
  162. var strA = "";
  163. XMLHttpReq.open("POST","createExc.jsp?listid=" + classid,false);
  164. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  165. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  166. XMLHttpReq.send(strA);
  167. var boxIdea=document.all.item("boxIdea");
  168. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  169. indexOfCheck = indexOfCheck + 1;
  170. if(indexOfCheck < role2.options.length){
  171. checkOneObj(role2.options[indexOfCheck].value);
  172. }else{
  173. return;
  174. }
  175. }
  176. </script>
  177. </BODY>
  178. </HTML>