Sfoglia il codice sorgente

优化根据权限名称查询问题

wuxw 6 anni fa
parent
commit
dd925f7f63

+ 2 - 2
WebService/src/main/resources/components/privilegePackage/privilege-manage/privilege.html

@@ -10,9 +10,9 @@
             ><i class="fa fa-plus"></i> 添加权限</button>
             <form method="get" action="index.html" class="float-right mail-search" style="margin-right:10px">
                 <div class="input-group">
-                    <input type="text" class="form-control form-control-sm" name="search" placeholder="请输入权限名称">
+                    <input type="text" class="form-control form-control-sm" v-model="privilegeInfo._currentPgName" name="search" placeholder="请输入权限名称">
                     <div class="input-group-btn">
-                        <button type="submit" class="btn btn-sm btn-primary">
+                        <button v-on:click="queryPrivilege()" class="btn btn-sm btn-primary">
                             查询
                         </button>
                     </div>

+ 9 - 2
WebService/src/main/resources/components/privilegePackage/privilege-manage/privilege.js

@@ -28,8 +28,12 @@
             _loadPrivilege:function(_pgId){
                 vc.component.privilegeInfo._privileges=[];
                 var param = {
-                                    params:{pgId:_pgId}
-                                };
+                    params:{
+                        pgId:_pgId,
+                        name:vc.component.privilegeInfo._currentPgName
+
+                    }
+                };
 
                                 //发送get请求
                vc.http.get('privilege',
@@ -51,6 +55,9 @@
             openDeletePrivilegeModel:function(_p){
                 _p.pgId = vc.component.privilegeInfo._currentPgId;
                 vc.emit('deletePrivilege','openDeletePrivilegeModel',_p);
+            },
+            queryPrivilege:function(){
+                vc.component._loadPrivilege(vc.component.privilegeInfo._currentPgId);
             }
         }
     });