mirror of https://gitee.com/y_project/RuoYi.git
!136 optgroup标签下多选后表单值转json丢失
Merge pull request !136 from Dulk/fix-optgroup_value_jsonOverride_bugpull/136/MERGE
commit
ac97d15a7f
|
@ -1353,7 +1353,11 @@
|
|||
formToJSON: function(formId) {
|
||||
var json = {};
|
||||
$.each($("#" + formId).serializeArray(), function(i, field) {
|
||||
json[field.name] = field.value;
|
||||
if(json[field.name]) {
|
||||
json[field.name] += ("," + field.value);
|
||||
} else {
|
||||
json[field.name] = field.value;
|
||||
}
|
||||
});
|
||||
return json;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue