KJDP 联动下拉菜单

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>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值