1,首先写一个复选按钮
<li>
<label class="mini-label"><span class="required">*</span>公示类型 :</label>
<div class="mini-radiobuttonlist" id="fkTypeId" repeatItems="1" repeatLayout="table" repeatDirection="vertical" textName="fkTypeName" name="fkTypeId" textField="name" valueField="value" label="公示类型" required="true"></div>
</li>
“”id 为 字段本身id ,
textName 为 字段本身name
name 为 字段本身id
valueField="value"(字典值得话为value,关联表的话id)
2.拿到他的字典值
并做判断
mini.get("fkTypeId").select(0);
mini.get('fkActivityId').setUrl(contextPath + '/district/recruitmentActivity-recruitmentactivity/recruitmentactivity-selected-load-data.html');
var fkTypeId = mini.get("fkTypeId").getValue();
if (fkTypeId == Dictionary.PUBLICITY_TYPE.ACTIVITYPUBLICITY.VALUE) {
$(".activity-box").show();
} else {
$(".activity-box").hide();
}
3.在
js的setEvents中写入点击事件
mini.get("fkTypeId").on('valueChanged', function() {
me.release();
});
调用 release: function() {
var fkTypeId = mini.get("fkTypeId").getValue();
if (fkTypeId == Dictionary.PUBLICITY_TYPE.ACTIVITYPUBLICITY.VALUE) {
$(".activity-box").show();
} else {
$(".activity-box").hide();
}
},
最后在setDate的时候也调下me.release();
方法
这样就好了