用一个label标签命名为para_branch_name_label
,默认值为下拉框的值。
在下拉框编辑后事件中添加
var pre_arr = pre_value.split("','");
var cur_arr = this.getValue().split("','");
if (cur_value.indexOf("ALL") != -1 && cur_arr.length > 1) {
if (pre_value.indexOf("ALL") != -1) {
var temp = cur_arr.filter(function(item) {
return item != "ALL";
});
//this.setValue(temp.join("','"));
$.each(this.ck_el_array, function(i, item) {
if (item.options.value == "ALL") {
item.setSelected(false);
}
});
} else {
//this.setValue("ALL");
$.each(this.ck_el_array, function(i, item) {
if (item.options.value != "ALL") {
item.setSelected(false);
}
});
}
}
_g().getWidgetByName("para_branch_name_label").setValue(this.getValue());