check.jsp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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.MdpClassImpl"%>
  8. <%
  9. SysModel sysmodel = ModelFactory.getSysmodel();
  10. ArrayList list = sysmodel.getMdpModules();
  11. ArrayList mdpClasses = sysmodel.getMdpClasses();
  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. <script type="text/javascript">
  24. dojo.require("dijit.form.Form");
  25. dojo.require("dijit.form.FilteringSelect");
  26. dojo.require("dijit.form.Button");
  27. dojo.require("dijit.Tooltip");
  28. </script>
  29. <style type="text/css">
  30. @import "../../../../../scripts/dojo/dojo/resources/dojo.css";
  31. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  32. @import "../../../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  33. @import "../../../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  34. </style>
  35. <script language="JavaScript">
  36. function ChooseModule(Code, selectName){
  37. var strA = "";
  38. if(Code == "root") Code = "";
  39. createXMLHttpRequest();
  40. axo = new ActiveXObject("Microsoft.XMLDOM");
  41. XMLHttpReq.open("POST","../getClassids.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/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"><table align="center" width="100%" border="0" cellpadding="1"
  100. cellspacing="1" class="ltab2">
  101. <tr class="TableBgColorAsh">
  102. <td width="20%" 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"><select name="select2" size="15" class="SelectScroll" multiple id="role1" style="width:80%">
  107. <%
  108. for (int i = 0; i < mdpClasses.size(); i++) {
  109. MdpClassImpl mdpClass = (MdpClassImpl) mdpClasses.get(i);
  110. %>
  111. <option value="<%=mdpClass.getClassid()%>"> <%=mdpClass.getDescription()%> </option>
  112. <%
  113. }
  114. %>
  115. </select></td>
  116. <td width="5%" align="center"><input name="button" type="button" class="button2"
  117. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  118. value=" &gt;&gt; " />
  119. <br>
  120. <br>
  121. <input name="button" type="button" class="button2"
  122. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  123. value=" &lt;&lt; " /> </td>
  124. <td width="30%" align="center" valign="middle"><select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
  125. </select> </td>
  126. </tr>
  127. <tr class="TableBgColorBlack">
  128. <td colspan="4"><button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),checkConfig();' type="button" iconClass="plusIcon">
  129. 开始检查
  130. </button>
  131. <span dojoType="dijit.Tooltip" connectId="save">开始检查</span>&nbsp;&nbsp;
  132. &nbsp;&nbsp; </td>
  133. </tr>
  134. </table></td>
  135. </tr>
  136. </table>
  137. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"> </div>
  138. </div>
  139. </div>
  140. </div>
  141. </form>
  142. <script language="JavaScript">
  143. var indexOfCheck = 0;
  144. var role2=document.all.item("role2");
  145. function checkConfig() {
  146. indexOfCheck = 0
  147. var boxIdea=document.all.item("boxIdea");
  148. boxIdea.innerHTML = "";
  149. if(role2.options.length == 0){
  150. alert("请选则进行验证的表对象!");
  151. return;
  152. }
  153. var classid = role2.options[0].value;
  154. checkOneObj(classid)
  155. }
  156. function checkOneObj(classid){
  157. if(classid=="") return;
  158. createXMLHttpRequest();
  159. var strA = "";
  160. XMLHttpReq.open("POST","checkExc.jsp?classid=" + classid,false);
  161. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  162. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  163. XMLHttpReq.send(strA);
  164. var boxIdea=document.all.item("boxIdea");
  165. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  166. indexOfCheck = indexOfCheck + 1;
  167. if(indexOfCheck < role2.options.length){
  168. checkOneObj(role2.options[indexOfCheck].value);
  169. }else{
  170. return;
  171. }
  172. }
  173. // End -->
  174. </script>
  175. </BODY>
  176. </HTML>