1.HTML
<input name="TABLE_NAME" id="TABLE_NAME_ID" style="width:280px;" kui-options="required:true" />
<input name="TABLE_DESC" id="TABLE_DESC_ID" style="width: 150px;" class="kui-textinput" />
2.JS
window.$ready=function(){
using(['combogrid'],function(){
$('#TABLE_NAME_ID').combogrid({
panelWidth:500,
panelHeight:415,
singleSelect:true,
fallParas: [{enable: true}],
idField:'TABLE_NAME',
textField:'COMMENTS',
req:[{
service:'S1010013'
}],
queryCols:[
{
'text':'查询',
'icon':'icon-search',
collapsed:true,
cols:[
{title:'表名',field:'TABLE_NAME_LIKE',
editor:{
type:'validatebox',
options:{
validType:'val[1,30]',
width:80
}
}
},{title:'表描述',field:'COMMENTS_LIKE',
editor:{
type:'text',
options:{
validType:'val[1,128]',
width:100
}
}
}
]
}
],
columns:[[
{field:'TABLE_NAME',title:'表名'},
{field:'COMMENTS',title:'表描述'}
]],
onClickRow:function (rowIndex, row) {
$('#TABLE_DESC_ID').val(row['COMMENTS']) ;
}
});
});
}
3.查询接口service.xml
<service service_code="S1010013" service_name="查ufs用户下所有表" service_type="1" service_cate="1" arrange_type="1" soap_enable="1" attr1="" attr2="">
<businesses>
<service_business business_code="queryTABS2kirsBex" business_method="" serial_no="1" business_name="查ufs用户下所有表" business_type="1" business_cate="1" attr1=""/>
</businesses>
</service>
4.bex
<bex bex_code="queryTABS2kirsBex" bex_type="4" page_mode="2" bex_cate="1" attr1="queryTABS2kirs" attr2="ufs"/>
5.mybaties
<select id="queryTABS2kirs" parameterType="java.util.HashMap" resultType="java.util.HashMap">
select a.table_name,a.comments from user_tab_comments a where a.table_type='TABLE'
<if test="TABLE_NAME_LIKE !='' and TABLE_NAME_LIKE !=null">
AND a.table_name like '%${TABLE_NAME_LIKE}%'
</if>
<if test="TABLE_NAME !='' and TABLE_NAME !=null">
AND a.table_name = '${TABLE_NAME}'
</if>
<if test="COMMENTS_LIKE !='' and COMMENTS_LIKE !=null">
AND a.comments like '%${COMMENTS_LIKE}%'
</if>
</select>