1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <%@ page contentType="text/html; charset=UTF-8" language="java"%>
- <%@ page import ="com.sysmodel.datamodel.xmlmodel.ModelFactory,
- com.sysmodel.datamodel.xmlmodel.able.SysModel,
- com.sysmodel.datamodel.xmlmodel.impl.MdpDataSourceImpl,
- com.sysmodel.datamodel.xmlmodel.able.MdpDataSource,
- com.persistence.DBdll.adapter.DatabaseAdapter,
- com.persistence.DBdll.DatabaseFactory,
- com.persistence.DBdll.adapter.assitant.index.IndexInfo,
- java.util.ArrayList"
- %>
- <HTML>
- <HEAD>
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <TITLE></TITLE>
- <style type="text/css">
- <!--
- .STYLE1 {
- font-size: 24px;
- font-weight: bold;
- }
- .STYLE2 {color: #FF0000}
- -->
- </style>
- </HEAD>
- <%
- SysModel sysmodel = ModelFactory.getSysmodel();
- MdpDataSource datasource = sysmodel.getDataSourceByCode(1);
-
- DatabaseAdapter Dbadapter = DatabaseFactory.getInstance(datasource);
-
- ArrayList<IndexInfo> indlis = Dbadapter.getTableIndexInfo();
- String title = sysmodel.getUnitname()+"("+sysmodel.getUnitCode()+")数据库字段索引创建情况一览";
- %>
- <body>
- <center>
- <h2>
- <span class="STYLE2"><%=title %></span>
- <input type="button" onClick="javascript:outPdaExcel();" value="导出EXCEL">
- </h2>
- </center>
- <div id="PrintDiv">
- <table id='tabid' width="95%" border="1" align="center" cellspacing="0" bordercolor="#0000FF">
- <tr>
- <td colspan="11" align="left"><%=title %></td>
- </tr>
- <tr>
- <td>序号</td>
- <td>表名</td>
- <td>索引名称</td>
- <td>类型</td>
- <td>字段</td>
- </tr>
- <%for(int i = 0; i < indlis.size(); i ++){
- IndexInfo IndexInfo = indlis.get(i);
- %>
- <tr>
- <td><%=i+1%></td>
- <td><%=IndexInfo.getTabName()%></td>
- <td><%=IndexInfo.getIndexName()%></td>
- <td><%=IndexInfo.getIndexType()%></td>
- <td><%=IndexInfo.getColumNames()%></td>
- </tr>
- <%
- }
- %>
- </table>
- </div>
- <form name="ExcleformOut" method="post" action="" target="_top">
- <input type="hidden" name="t1">
- </form>
- <script type="text/javascript">
- //导出Excel
- function outPdaExcel(){
- var oTable=document.getElementById("tabid");
- //如果 border=0 想在打印的表格中出现边框 需要设置
- //oTable.border=1;
- ExcleformOut.t1.value=PrintDiv.innerHTML;
- ExcleformOut.action='printExcel.jsp';
- ExcleformOut.submit();
- //原来 border=0 想在打印的表格中出现边框 打印完后设置回去
- //oTable.border=0;
- }
- </script>
- </BODY>
- </HTML>
|