修改BUG,下拉框无法保存
This commit is contained in:
parent
77f469cf7c
commit
cba0ff6fd0
|
@ -17,13 +17,17 @@
|
||||||
},
|
},
|
||||||
reset: function () {
|
reset: function () {
|
||||||
for (name in this.options.map) {
|
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 () {
|
get: function () {
|
||||||
var target = {};
|
var target = {};
|
||||||
for (name in this.options.map) {
|
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;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
<div class="form-group col-lg-6">
|
<div class="form-group col-lg-6">
|
||||||
<label class="control-label" for="dictDefine">字典类别</label>
|
<label class="control-label" for="dictDefine">字典类别</label>
|
||||||
<select class="selectpicker form-control" data-width="auto" id="dictDefine">
|
<select class="selectpicker form-control" data-width="auto" id="dictDefine">
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="1">自定义</option>
|
<option value="1">自定义</option>
|
||||||
<option value="0">系统使用</option>
|
<option value="0">系统使用</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -93,7 +93,6 @@
|
||||||
<div class="form-group col-lg-6">
|
<div class="form-group col-lg-6">
|
||||||
<label class="control-label" for="category">菜单类别</label>
|
<label class="control-label" for="category">菜单类别</label>
|
||||||
<select class="selectpicker form-control" data-width="auto" id="category">
|
<select class="selectpicker form-control" data-width="auto" id="category">
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="0">系统菜单</option>
|
<option value="0">系统菜单</option>
|
||||||
<option value="1">外部菜单</option>
|
<option value="1">外部菜单</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue