create.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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"
  17. type="text/css"></link>
  18. <link rel="stylesheet" href="../../../../styles/css.css"
  19. type="text/css"></link>
  20. <script type="text/javascript" src="../../../../scripts/dojo/dojo/dojo.js"
  21. djConfig="isDebug: false, parseOnLoad: true"></script>
  22. <script type="text/javascript">
  23. dojo.require("dijit.form.Form");
  24. dojo.require("dijit.form.FilteringSelect");
  25. dojo.require("dijit.form.Button");
  26. dojo.require("dijit.Tooltip");
  27. </script>
  28. <style type="text/css">
  29. @import "../../../../scripts/dojo/dojo/resources/dojo.css";
  30. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  31. @import "../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  32. @import "../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  33. </style>
  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. //alert("Code = " + Code)
  41. XMLHttpReq.open("POST","../../../sysmodel/dbmanager/table/getClassids.jsp?type="+ Code +"&action=all",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/classid");
  47. n2 = axo.selectNodes("/root/description");
  48. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  49. }
  50. </script>
  51. <script type="text/javascript" src="../select.js"></script>
  52. <!-- 为了实现模块的选择功能引入下面资源 -->
  53. <link rel="stylesheet" type="text/css" href="../../../../scripts/ext20/resources/css/ext-all.css" />
  54. <script type="text/javascript" src="../../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  55. <script type="text/javascript" src="../../../../scripts/ext20/ext-all.js"></script>
  56. <link rel="stylesheet" href="../../../../scripts/ext20/examples/examples.css" type="text/css"></link>
  57. <script type="text/javascript" src="../../../../scripts/ext20/examples/examples.js"></script>
  58. <script type="text/javascript">
  59. Ext.onReady(function(){
  60. Ext.BLANK_IMAGE_URL = '../../../../scripts/ext20/resources/images/default/s.gif';
  61. var Tree = Ext.tree;
  62. var tree = new Tree.TreePanel({
  63. el:'tree-div',
  64. autoScroll:true,
  65. animate:true,//是否动画
  66. enableDD:true,// 是否支持拖放
  67. containerScroll:true,
  68. lines:true,
  69. loader:new Tree.TreeLoader({dataUrl:"../../../getModuleJson.jsp"})
  70. });
  71. var root = new Tree.AsyncTreeNode({
  72. text: '全部系统模块',
  73. draggable:false,
  74. id:'root'
  75. });
  76. tree.on('click', function(node){
  77. ChooseModule(node.id, dojo.byId('role1'))
  78. });
  79. tree.setRootNode(root);
  80. tree.render();
  81. root.expand();
  82. });
  83. </script>
  84. </HEAD>
  85. <body class="tundra">
  86. <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="select" size="15" multiple class="SelectScroll" id="role1" style="width:80%">
  108. <%
  109. for (int i = 0; i < mdpClasses.size(); i++) {
  110. MdpClassImpl mdpClass = (MdpClassImpl) mdpClasses.get(i);
  111. %>
  112. <option value="<%=mdpClass.getClassid()%>"> <%=mdpClass.getDescription()%> </option>
  113. <%
  114. }
  115. %>
  116. </select>
  117. </td>
  118. <td width="10%" align="center"><input name="button" type="button" class="button2"
  119. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  120. value=" &gt;&gt; " />
  121. <br>
  122. <br>
  123. <input name="button" type="button" class="button2"
  124. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  125. value=" &lt;&lt; " />
  126. </td>
  127. <td align="center" valign="middle"><select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
  128. </select>
  129. </td>
  130. </tr>
  131. <tr class="TableBgColorBlack">
  132. <td colspan="4"><button id="save" dojoType="dijit.form.Button" onClick='checkConfig();' type="button">
  133. 开始检查
  134. </button><!-- console.log("clicked simple"),-->
  135. <span dojoType="dijit.Tooltip" connectId="save">开始检查</span>&nbsp;&nbsp;
  136. &nbsp;&nbsp; </td>
  137. </table></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 role2=document.all.item("role2");
  147. function checkConfig() {
  148. var boxIdea=document.all.item("boxIdea");
  149. boxIdea.innerHTML = "";
  150. if(role2.options.length == 0){
  151. alert("请选则进行验证的表对象!");
  152. return;
  153. }
  154. var classids = "";
  155. for(var i = 0 ; i < role2.options.length ; i++){
  156. classids = classids + role2.options[i].value + ",";
  157. }
  158. checkOneObj(classids)
  159. }
  160. function checkOneObj(classids){
  161. if(classids=="") return;
  162. createXMLHttpRequest();
  163. var strA = "";
  164. XMLHttpReq.open("POST","createExc.jsp?classids=" + classids,false);
  165. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  166. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  167. XMLHttpReq.send(strA);
  168. var boxIdea=document.all.item("boxIdea");
  169. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  170. }
  171. // End -->
  172. </script>
  173. </BODY>
  174. </HTML>