修改BUG:菜单界面增加带层次功能后查询结果不正确 closed #IU1SM
#Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=IU1SM
This commit is contained in:
parent
9e50cae073
commit
499c950c89
|
@ -138,13 +138,21 @@ $(function () {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
idField: "Id",
|
idField: "Id",
|
||||||
//在哪一列展开树形
|
|
||||||
treeShowField: 'Name',
|
treeShowField: 'Name',
|
||||||
//指定父id列
|
|
||||||
parentIdField: 'ParentId',
|
parentIdField: 'ParentId',
|
||||||
|
onPreBody: function(data) {
|
||||||
onResetView: function (data) {
|
if($('#txt_parent_menus_name').val() !== '') {
|
||||||
//console.log('load');
|
this.treeShowField = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.treeShowField = 'Name';
|
||||||
|
}
|
||||||
|
var bt = $table.data('bootstrap.table');
|
||||||
|
if(bt) {
|
||||||
|
bt.treeEnable = !!this.treeShowField;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onResetView: function () {
|
||||||
$table.treegrid({
|
$table.treegrid({
|
||||||
treeColumn: 2,
|
treeColumn: 2,
|
||||||
expanderExpandedClass: 'fa fa-chevron-circle-down',
|
expanderExpandedClass: 'fa fa-chevron-circle-down',
|
||||||
|
@ -153,7 +161,6 @@ $(function () {
|
||||||
$table.bootstrapTable('resetWidth');
|
$table.bootstrapTable('resetWidth');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//只展开树形的第一级节点
|
|
||||||
$table.treegrid('getRootNodes').treegrid('expand');
|
$table.treegrid('getRootNodes').treegrid('expand');
|
||||||
},
|
},
|
||||||
onCheckRoot: function (row, data) {
|
onCheckRoot: function (row, data) {
|
||||||
|
|
Loading…
Reference in New Issue