update.jsp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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.able.*"%>
  8. <%
  9. SysModel sysmodel = ModelFactory.getSysmodel();
  10. ArrayList list = sysmodel.getMdpModules();
  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 getTable(obj, selectName){
  36. var strA = "";
  37. createXMLHttpRequest();
  38. axo = new ActiveXObject("Microsoft.XMLDOM");
  39. XMLHttpReq.open("POST","../getConstants.jsp?type="+obj.getValue()+"",false);
  40. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  41. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  42. XMLHttpReq.send(strA);
  43. axo.loadXML(XMLHttpReq.responseText);
  44. n1 = axo.selectNodes("/root/classid");
  45. n2 = axo.selectNodes("/root/description");
  46. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  47. }
  48. </script>
  49. <script type="text/javascript" src="../../select.js"></script>
  50. </HEAD>
  51. <body class="tundra">
  52. <form name="form1" method="post" action="">
  53. <div id=total>
  54. <div class="whiteborder">
  55. <div class="titback">
  56. <div class="floatleft"><img src="../../../../../images/index/arrow1.gif" alt="1"
  57. width="20" height="24" /></div>
  58. <div class="dropshadow">重新加载常量表数据</div>
  59. <div class="clear"></div>
  60. </div>
  61. <div class="report">
  62. <table align="center" id="SortTable512_1" width="100%"
  63. cellpadding="1" cellspacing="1" class="ltab2">
  64. <tr>
  65. <td width="60%" valign="top"><table align="center" width="100%" border="0" cellpadding="1"
  66. cellspacing="1" class="ltab2">
  67. <tr align="left" class="TableBgColorBlack">
  68. <td colspan="4" height="31"> 请选择模块&nbsp;&nbsp;&nbsp;
  69. <select name="module" onChange="getTable(this, dojo.byId('role1'))"
  70. dojoType="dijit.form.FilteringSelect"
  71. required="true" id="module" autocomplete="true">
  72. <option value="">全部数据表</option>
  73. <%
  74. for (int i = 0; i < list.size(); i++) {
  75. MdpModuleImpl Mdpmod = (MdpModuleImpl) list.get(i);
  76. %>
  77. <option value="<%=Mdpmod.getCode()%>"> <%=Mdpmod.getName()%> </option>
  78. <%
  79. }
  80. %>
  81. </select>
  82. </td>
  83. </tr>
  84. <tr class="TableBgColorAsh">
  85. <td width="40%" align="center">
  86. <select name="select" size="15" multiple id="role1" style="width:80%">
  87. <%
  88. ArrayList constants = sysmodel.getMdpConstants();
  89. for (int i = 0; i < constants.size(); i++) {
  90. MdpConstant MdpConstant = (MdpConstant) constants.get(i);
  91. %>
  92. <option value="<%=MdpConstant.getCodeName()%>"> <%=MdpConstant.getDescription()%> </option>
  93. <%
  94. }
  95. %>
  96. </select>
  97. </td>
  98. <td width="20%" align="center"><input name="button" type="button" class="button2"
  99. style="cursor:hand" onClick="move(this.form.role1,this.form.role2);"
  100. value=" &gt;&gt; " />
  101. <br>
  102. <br>
  103. <input name="button" type="button" class="button2"
  104. style="cursor:hand" onClick="move(this.form.role2,this.form.role1);"
  105. value=" &lt;&lt; " />
  106. </td>
  107. <td width="40%" align="center" valign="middle"><select name="select" size="15" multiple class="SelectScroll" id="role2" style="width:80%">
  108. </select>
  109. </td>
  110. </tr>
  111. <tr class="TableBgColorBlack">
  112. <td colspan="3">
  113. <button id="save" dojoType="dijit.form.Button" onClick='checkConfig();' type="button" iconClass="plusIcon">
  114. 开始加载
  115. </button>
  116. <span dojoType="dijit.Tooltip" connectId="save">开始加载</span>&nbsp;&nbsp;
  117. </td>
  118. </tr>
  119. </table></td>
  120. <td width="40%" height="100%" valign="top">
  121. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"> </div></td>
  122. </tr>
  123. </table>
  124. </div>
  125. </div>
  126. </div>
  127. </form>
  128. <script language="JavaScript">
  129. /**
  130. @ 批量验证配置信息的正确性
  131. */
  132. var indexOfCheck = 0;
  133. var role2=document.all.item("role2");
  134. function checkConfig() {
  135. //初始化验证的索引序号
  136. indexOfCheck = 0
  137. var boxIdea=document.all.item("boxIdea");
  138. boxIdea.innerHTML = "";
  139. //取得用户选择的所有信息
  140. if(role2.options.length == 0){
  141. alert("请选则进行验证的表对象!");
  142. return;
  143. }
  144. //从第0个元素启动验证机制
  145. var CodeName = role2.options[0].value;
  146. checkOneObj(CodeName)
  147. }
  148. function checkOneObj(CodeName){
  149. if(CodeName=="") return;
  150. createXMLHttpRequest();
  151. var strA = "";
  152. XMLHttpReq.open("POST","updateExc.jsp?CodeName=" + CodeName,false);
  153. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  154. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  155. XMLHttpReq.send(strA);
  156. var boxIdea=document.all.item("boxIdea");
  157. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  158. indexOfCheck = indexOfCheck + 1;
  159. if(indexOfCheck < role2.options.length){
  160. checkOneObj(role2.options[indexOfCheck].value);
  161. }else{
  162. return;
  163. }
  164. }
  165. // End -->
  166. </script>
  167. </BODY>
  168. </HTML>