check.jsp 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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.collectmodel.xmlmodel.impl.FormCollectionImpl,
  7. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  8. com.sysmodel.XFormFactory"%>
  9. <%
  10. SysModel sysmodel = ModelFactory.getSysmodel();
  11. ArrayList list = sysmodel.getMdpModules();
  12. List formCollections = XFormFactory.getXFormModel().getFormCollections();
  13. %>
  14. <HTML>
  15. <HEAD>
  16. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  17. <TITLE>批量验证数据表配置</TITLE>
  18. <link rel="stylesheet" href="../../../../styles/css.css" type="text/css"></link>
  19. <link rel="stylesheet" href="../../../../styles/style.css" 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. .formQuestion {
  34. background-color:#d0e3f5;
  35. padding:0.3em;
  36. font-weight:900;
  37. font-family:Verdana, Arial, sans-serif;
  38. font-size:0.8em;
  39. color:#5a5a5a;
  40. }
  41. .formAnswer {
  42. background-color:#f5eede;
  43. padding:0.3em;
  44. margin-bottom:1em;
  45. width: 100%;
  46. }
  47. .pageSubContentTitle {
  48. color:#8e8e8e;
  49. font-size:1em;
  50. font-family:Verdana, Arial, sans-serif;
  51. margin-bottom:0.75em;
  52. }
  53. .small INPUT {
  54. width: 2.5em;
  55. }
  56. .medium INPUT {
  57. width: 10em;
  58. }
  59. .long INPUT {
  60. width: 20em;
  61. }
  62. .firstLabel {
  63. display: inline-block;
  64. display: -moz-inline-box;
  65. width: 10em;
  66. min-width: 10em;
  67. }
  68. .secondLabel {
  69. width: auto;
  70. margin-left: 5em;
  71. margin-right: 1em;
  72. }
  73. fieldset label {
  74. margin-right: 1em;
  75. }
  76. .noticeMessage {
  77. display: block;
  78. float: right;
  79. font-weight: normal;
  80. font-family:Arial, Verdana, sans-serif;
  81. color:#663;
  82. font-size:0.9em;
  83. }
  84. </style>
  85. <script type="text/javascript" src="../select.js"></script>
  86. <script language="JavaScript">
  87. function ChooseModule(Code, selectName){
  88. var strA = "";
  89. if(Code == "root") Code = "";
  90. createXMLHttpRequest();
  91. axo = new ActiveXObject("Microsoft.XMLDOM");
  92. XMLHttpReq.open("POST","../getFormCollections.jsp?type="+ Code +"",false);
  93. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  94. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  95. XMLHttpReq.send(strA);
  96. axo.loadXML(XMLHttpReq.responseText);
  97. n1 = axo.selectNodes("/root/pageid");
  98. n2 = axo.selectNodes("/root/description");
  99. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  100. }
  101. </script>
  102. <!-- 为了实现模块的选择功能引入下面资源 -->
  103. <link rel="stylesheet" type="text/css" href="../../../../scripts/ext20/resources/css/ext-all.css" />
  104. <script type="text/javascript" src="../../../../scripts/ext20/adapter/ext/ext-base.js"></script>
  105. <script type="text/javascript" src="../../../../scripts/ext20/ext-all.js"></script>
  106. <link rel="stylesheet" href="../../../../scripts/ext20/examples/examples.css" type="text/css"></link>
  107. <script type="text/javascript" src="../../../../scripts/ext20/examples/examples.js"></script>
  108. <script type="text/javascript">
  109. Ext.onReady(function(){
  110. Ext.BLANK_IMAGE_URL = '../../../../scripts/ext20/resources/images/default/s.gif';
  111. var Tree = Ext.tree;
  112. var tree = new Tree.TreePanel({
  113. el:'tree-div',
  114. autoScroll:true,
  115. animate:true,//是否动画
  116. enableDD:true,// 是否支持拖放
  117. containerScroll:true,
  118. lines:true,
  119. loader:new Tree.TreeLoader({dataUrl:"../../../getModuleJson.jsp"})
  120. });
  121. var root = new Tree.AsyncTreeNode({
  122. text: '全部系统模块',
  123. draggable:false,
  124. id:'root'
  125. });
  126. tree.on('click', function(node){
  127. ChooseModule(node.id, dojo.byId('role1'))
  128. });
  129. tree.setRootNode(root);
  130. tree.render();
  131. root.expand();
  132. });
  133. </script>
  134. </HEAD>
  135. <body class="tundra">
  136. <form dojoType="dijit.form.Form" name="form1" method="post" action="">
  137. <div id=total>
  138. <div class="whiteborder">
  139. <div class="titback">
  140. <div class="floatleft"><img src="../../../../images/index/arrow1.gif" alt="1"
  141. width="20" height="24" /></div>
  142. <div class="dropshadow"> 批量验证采集配置信息</div>
  143. <div class="clear"></div>
  144. </div>
  145. <div class="report">
  146. <table align="center" id="SortTable512_1" width="100%"
  147. cellpadding="1" cellspacing="1" class="ltab2">
  148. <tr>
  149. <td width="60%" valign="top">
  150. <table align="center" width="100%" border="0" cellpadding="1" cellspacing="1" class="ltab2">
  151. <tr class="TableBgColorAsh">
  152. <td width="30%" align="left" valign="top">
  153. <div id="tree-div" style="z-index:9999;overflow:auto; height:100%; width:100%;border:1px solid #c3daf9;">
  154. </div>
  155. </td>
  156. <td width="30%" align="center">
  157. <select name="select" size="15" multiple class="SelectScroll" id="role1" style="width:80%">
  158. <%
  159. for (int i = 0; i < formCollections.size(); i++) {
  160. FormCollectionImpl formCollectionImpl = (FormCollectionImpl)formCollections.get(i);
  161. %>
  162. <option value="<%=formCollectionImpl.getPageid()%>"> <%=formCollectionImpl.getDescription()%> </option>
  163. <%
  164. }
  165. %>
  166. </select>
  167. </td>
  168. <td width="10%" align="center"><input name="button" type="button" class="button2"
  169. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  170. value=" &gt;&gt; " />
  171. <br>
  172. <br>
  173. <input name="button" type="button" class="button2"
  174. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  175. value=" &lt;&lt; " />
  176. </td>
  177. <td width="40%" align="center" valign="middle">
  178. <select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
  179. </select>
  180. </td>
  181. </tr>
  182. <tr class="TableBgColorBlack">
  183. <td colspan="4"><button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),checkConfig();' type="button" iconClass="plusIcon">
  184. 开始检查
  185. </button>
  186. <span dojoType="dijit.Tooltip" connectId="save">开始检查</span>&nbsp;&nbsp;
  187. &nbsp;&nbsp; </td>
  188. </tr>
  189. </table></td>
  190. </table>
  191. <!--验证信息放在这里 -->
  192. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"></div>
  193. </div>
  194. </div>
  195. </div>
  196. </form>
  197. <script language="JavaScript">
  198. var indexOfCheck = 0;
  199. var role2=document.all.item("role2");
  200. function checkConfig() {
  201. indexOfCheck = 0
  202. var boxIdea=document.all.item("boxIdea");
  203. boxIdea.innerHTML = "";
  204. if(role2.options.length == 0){
  205. alert("请选则进行验证的表对象!");
  206. return;
  207. }
  208. var pageid = role2.options[0].value;
  209. checkOneObj(pageid)
  210. }
  211. function checkOneObj(pageid){
  212. if(pageid=="") return;
  213. createXMLHttpRequest();
  214. var strA = "";
  215. axo = new ActiveXObject("Microsoft.XMLDOM");
  216. XMLHttpReq.open("POST","checkExc.jsp?pageid=" + pageid,false);
  217. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  218. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  219. XMLHttpReq.send(strA);
  220. var boxIdea=document.all.item("boxIdea");
  221. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  222. indexOfCheck = indexOfCheck + 1;
  223. if(indexOfCheck < role2.options.length){
  224. checkOneObj(role2.options[indexOfCheck].value);
  225. }else{
  226. return;
  227. }
  228. }
  229. // End -->
  230. </script>
  231. </BODY>
  232. </HTML>