|
|
@@ -29,8 +29,7 @@
|
|
|
<div class="form-group row">
|
|
|
<label for="authority" class="col-2 col-form-label text-md-right">允许权限</label>
|
|
|
<div class="col-8">
|
|
|
- <input type="text" class="form-control tooltipTarget" placeholder="定位权限"
|
|
|
- @input="seekAuthority($event)" title="输入关键词快速定位下拉列表" ></div>
|
|
|
+ <input type="text" class="form-control tooltipTarget" placeholder="定位权限" @input="filterAuthority($event)" title="输入关键词快速定位下拉列表" ></div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-2"></label>
|
|
|
@@ -38,7 +37,7 @@
|
|
|
<input name="authority" hidden v-model="authorities" >
|
|
|
<div class="input-group" style="max-height: 245px; overflow-y: scroll;border-radius:5px;opacity:0.5;text-align: center;">
|
|
|
<ul class="list-group tooltipTarget" style="width: 100%" onselectstart="return false;">
|
|
|
- <li :data-original-title="authority.style ? '双击删除权限' :'双击添加权限'" v-for="authority in authoritiesAll" v-if="authority.permission=='允许'" :id="authority.name" class="tooltipTarget list-group-item list-group-item-action pt-0 pb-0"
|
|
|
+ <li :data-original-title="authority.style ? '双击删除权限' :'双击添加权限'" v-for="authority in authoritiesAllFilter" v-if="authority.permission=='允许'" :id="authority.name" class="tooltipTarget list-group-item list-group-item-action pt-0 pb-0"
|
|
|
@dblclick="selectedAuthority(authority)" :class="authority.style ? 'active' :''"><span style="cursor: default;" > @{{ authority.name }} </span></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -61,14 +60,14 @@
|
|
|
<label for="authority" class="col-2 col-form-label text-md-right">禁止权限</label>
|
|
|
<div class="col-8">
|
|
|
<input type="text" class="form-control tooltipTarget" placeholder="定位权限"
|
|
|
- @change="seekAuthority($event)" title="输入关键词快速定位下拉列表"></div>
|
|
|
+ @input="filterForbiddenPermissions($event)" title="输入关键词快速定位下拉列表"></div>
|
|
|
</div>
|
|
|
<div class="form-group row">
|
|
|
<label class="col-2"></label>
|
|
|
<div class="col-5">
|
|
|
<div class="input-group" style="max-height: 150px; overflow-y: scroll;border-radius:5px;opacity:0.5;text-align: center;">
|
|
|
<ul class="list-group tooltipTarget" style="width: 100%" >
|
|
|
- <li :data-original-title="authority.style ? '双击删除权限' :'双击添加权限'" v-for="authority in authoritiesAll" v-if="authority.permission=='禁止'" :id="authority.name" class="tooltipTarget list-group-item list-group-item-action pt-0 pb-0"
|
|
|
+ <li :data-original-title="authority.style ? '双击删除权限' :'双击添加权限'" v-for="authority in authoritiesFilter" v-if="authority.permission=='禁止'" :id="authority.name" class="tooltipTarget list-group-item list-group-item-action pt-0 pb-0"
|
|
|
@dblclick="selectedAuthority(authority)" :class="authority.style ? 'active' :''"><span style="cursor: default;" > @{{ authority.name }} </span></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -103,6 +102,8 @@
|
|
|
{id:'{{$authority->id}}',name:'{{$authority->alias_name}}',style:false,permission:'{{$authority->permission}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
+ authoritiesAllFilter:[],
|
|
|
+ authoritiesFilter:[],
|
|
|
authorities:[{{old('authority')}}],
|
|
|
authoritiesList:[],
|
|
|
},
|
|
|
@@ -123,6 +124,8 @@
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ this.authoritiesAllFilter=this.authoritiesAll
|
|
|
+ this.authoritiesFilter=this.authoritiesAll
|
|
|
},
|
|
|
methods:{
|
|
|
selectedAuthority:function (e) {
|
|
|
@@ -186,6 +189,26 @@
|
|
|
if(bool){ $(e.target).focus();}
|
|
|
},10)
|
|
|
},
|
|
|
+ filterAuthority(e){
|
|
|
+ let _arr = [];
|
|
|
+ let value = $(e.target).val();
|
|
|
+ this.authoritiesAll.forEach(item=>{
|
|
|
+ if(item.name.includes(value)){
|
|
|
+ _arr.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.authoritiesAllFilter = _arr
|
|
|
+ },
|
|
|
+ filterForbiddenPermissions(e){
|
|
|
+ let _arr = [];
|
|
|
+ let value = $(e.target).val();
|
|
|
+ this.authoritiesAll.forEach(item=>{
|
|
|
+ if(item.name.includes(value)){
|
|
|
+ _arr.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.authoritiesFilter = _arr
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
|