修改BUG,下拉框无法保存

This commit is contained in:
Argo-Lenovo 2016-11-08 16:31:23 +08:00
parent 77f469cf7c
commit cba0ff6fd0
3 changed files with 6 additions and 4 deletions

View File

@ -17,13 +17,17 @@
},
reset: function () {
for (name in this.options.map) {
$("#" + this.options.map[name]).val("");
var ctl = $("#" + this.options.map[name]);
if (ctl.hasClass('selectpicker')) ctl.selectpicker('val', "");
else ctl.val("");
}
},
get: function () {
var target = {};
for (name in this.options.map) {
target[name] = $("#" + this.options.map[name]).val();
var ctl = $("#" + this.options.map[name]);
if (ctl.hasClass('selectpicker')) target[name] = ctl.selectpicker('val');
else target[name] = ctl.val();
}
return target;
}

View File

@ -66,7 +66,6 @@
<div class="form-group col-lg-6">
<label class="control-label" for="dictDefine">字典类别</label>
<select class="selectpicker form-control" data-width="auto" id="dictDefine">
<option value="">全部</option>
<option value="1">自定义</option>
<option value="0">系统使用</option>
</select>

View File

@ -93,7 +93,6 @@
<div class="form-group col-lg-6">
<label class="control-label" for="category">菜单类别</label>
<select class="selectpicker form-control" data-width="auto" id="category">
<option value="">全部</option>
<option value="0">系统菜单</option>
<option value="1">外部菜单</option>
</select>