pages.beangle.database.query.result.ftl Maven / Gradle / Ivy
[#ftl]
[#if !(Parameters['sql']??)]
[@sj.tabbedpanel id="localtabs" ]
[@sj.tab id="tab1" target="t1" label="SQL语句"/]
[@sj.tab id="tab2" href="${b.url('!history')}" label="SQL历史"/]
[@b.form action="query" target="sqlResult">
输入sql语句进行查询,使用分号分隔多条语句。更新语句自动提交,无法会滚!
[@b.submit value="-执行"/]
批量
[/@]
[@b.div id="sqlResult"/]
[#else]
[#if (results?size>0)]
[@sj.tabbedpanel id="datatabs"]
[#list results as result]
[@sj.tab id="datatab${result_index}" target="datat${result_index}" label="sql${result_index+1}"/]
${result.sql}
[#if result.datas?? && (result.datas?size>0)]
[/#if]
[#if result.datas??]
[#if (result.datas?size>0)]
[@b.grid items=result.datas var="data" sortable="false"]
[@b.row]
[@b.col width="5%" title="序号"]${data_index+1}[/@]
[#list result.columns?if_exists as columnName]
[@b.col title=columnName ]
[#if data[columnName]??][#if data[columnName]?is_boolean]${data[columnName]?string("1","0")}[#else]${data[columnName]}[/#if][/#if]
[/@]
[/#list]
[/@]
[/@]
[#else]
无数据
[/#if]
[#else]
[#if (result.updateCount>0)]影响记录数:${result.updateCount}[/#if]
[/#if]
[#if result.msg??]
[@sj.div id="msg" cssClass="result ui-widget-content ui-corner-all data" ]${result.msg?html}[/@]
[/#if]
[/#list]
[/@]
[/#if]
[/#if]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy