c2560e7ee10d8a75254e20077495635803d8c99e.svn-base 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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">批量务表字段英文翻译</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='console.log("clicked simple"),checkConfig();' type="button" iconClass="plusIcon">
  125. 开始更新 </button>
  126. <span dojoType="dijit.Tooltip" connectId="save">开始更新</span>&nbsp;&nbsp;
  127. &nbsp;&nbsp; </td>
  128. </table></td>
  129. </tr>
  130. </table>
  131. <div id="boxIdea" align="left" style="width:98%;height:98%;border:1px solid #999999;"> </div>
  132. </div>
  133. </div>
  134. </div>
  135. </form>
  136. <script language="JavaScript">
  137. var indexOfCheck = 0;
  138. var role2=document.all.item("role2");
  139. function checkConfig() {
  140. indexOfCheck = 0
  141. var boxIdea=document.all.item("boxIdea");
  142. boxIdea.innerHTML = "";
  143. if(role2.options.length == 0){
  144. alert("请选则进行验证的表对象!");
  145. return;
  146. }
  147. var classid = role2.options[0].value;
  148. checkOneObj(classid)
  149. }
  150. function checkOneObj(classid){
  151. if(classid=="") return;
  152. createXMLHttpRequest();
  153. var strA = "";
  154. XMLHttpReq.open("POST","getExc.jsp?classid=" + classid,false);
  155. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  156. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  157. XMLHttpReq.send(strA);
  158. var boxIdea=document.all.item("boxIdea");
  159. boxIdea.innerHTML = boxIdea.innerHTML + XMLHttpReq.responseText;
  160. indexOfCheck = indexOfCheck + 1;
  161. if(indexOfCheck < role2.options.length){
  162. checkOneObj(role2.options[indexOfCheck].value);
  163. }else{
  164. return;
  165. }
  166. }
  167. // End -->
  168. </script>
  169. </BODY>
  170. </HTML>