!50 增加功能:角色对用户授权弹窗增加过滤条件框

Merge pull request !50 from Argo/dev-I1645P
This commit is contained in:
Argo 2019-12-08 10:25:04 +08:00 committed by Gitee
commit 4f60ca085f
2 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,19 @@
</div>
<div class="modal-body">
<form class="form-inline">
<div class="row" id="useFilter">
<div class="form-group col-12">
<div class="input-group flex-fill">
<div class="input-group-prepend d-none d-sm-flex">
<span class="input-group-text">过滤条件</span>
</div>
<input class="form-control" type="text" />
<div class="input-group-append">
<button class="btn btn-primary" type="button">查询</button>
</div>
</div>
</div>
</div>
<div class="row" id="userForm"></div>
</form>
</div>

View File

@ -172,4 +172,13 @@ $(function () {
$nestMenu.find('[data-category="1"]').removeClass('d-none');
}
});
// 用户列表过滤
var $userFilter = $('#useFilter').on('input', 'input', function (e) {
var userName = $(this).val();
$userFilter.next().find('.checkbox-label').each(function (index, element) {
if ($(element).text().toLocaleLowerCase().indexOf(userName.toLocaleLowerCase()) === -1) $(element).parents(".form-group").hide();
else $(element).parents(".form-group").show();
});
});
});