create.jsp 7.5 KB

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