Aurora-lov

本文详细介绍了在Echarts中如何使用Lov组件进行数据集定义,包括字段配置、显示标签设置以及代码示例,展示了如何设置contract_num字段的lov服务和映射关系。
摘要由CSDN通过智能技术生成

lov使用说明

常规用法

  • dataSet下定义field
<a:field name="dimension2_name" autoComplete="true" autoCompleteField="dimension_value_name" fetchRemote="true" lovGridHeight="380" lovHeight="450" lovLabelWidth="120" lovService="tme_expm.tme_exp_report_dimension2_lov" prompt="测试" title="测试">
    <a:mapping>
        <a:map from="dimension_value_id" to="dimension2_id"/>
        <a:map from="dimension_value_name" to="dimension2_name"/>
    </a:mapping>
</a:field>
  • 显示标签
<a:lov name="dimension2_name" id="dimension2_name_id" bindtarget="exp_report_head" width="340"/>
  • grid下
<a:grid id="line_grid" autoAdjustHeight="true" autoFocus="true" bindTarget="exp_report_lines" height="430" marginWidth="45" navBar="true" navBarType="tiny">
    <a:columns>
        <a:column name="dimension2_name" align="left" editor="line_lov_edit" prompt="项目" width="100"/>
    </a:columns>
    <a:editors>
        <a:lov id="line_lov_edit"/>
    </a:editors>
</a:grid>

#代码设置

 var record = ds.getAt(0);
record.getField('contract_num').setLovService('expm.tme_con_contract_lov?document_category=EXP_REQUISITION');
record.getField('contract_num').setLovPara('employee_id', record.get('employee_id'));

var mapping = [{
                            from: 'account_number',
                            to: 'account_number'
                        }, {
                            from: 'account_name',
                            to: 'account_name'
                        }];
record.getField('contract_num').setMapping(mapping);
  • 8
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值