Quellcode durchsuchen

优化修改脚本

wuxw vor 6 Jahren
Ursprung
Commit
927e535e39

+ 2 - 2
WebService/src/main/java/com/java110/web/components/EditPrivilegeGroupComponent.java

@@ -26,10 +26,10 @@ public class EditPrivilegeGroupComponent {
      * @param pd
      * @param pd
      * @return
      * @return
      */
      */
-    public ResponseEntity<String> savePrivilegeGroupInfo(IPageData pd){
+    public ResponseEntity<String> editPrivilegeGroupInfo(IPageData pd){
         ResponseEntity<String> responseEntity = null;
         ResponseEntity<String> responseEntity = null;
         try{
         try{
-            responseEntity =  privilegeServiceSMOImpl.savePrivilegeGroup(pd);
+            responseEntity =  privilegeServiceSMOImpl.editPrivilegeGroup(pd);
         }catch (Exception e){
         }catch (Exception e){
             responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
             responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
         }finally {
         }finally {

+ 1 - 1
WebService/src/main/resources/components/privilegePackage/edit-privilege-group/editPrivilegeGroup.html

@@ -16,7 +16,7 @@
                                 <div class="col-sm-10"><input v-model="editPrivilegeGroupInfo.description" type="text" placeholder="必填,请填写员工名称" class="form-control"></div>
                                 <div class="col-sm-10"><input v-model="editPrivilegeGroupInfo.description" type="text" placeholder="必填,请填写员工名称" class="form-control"></div>
                             </div>
                             </div>
                             <div class="ibox-content">
                             <div class="ibox-content">
-                                <button class="btn btn-primary float-right" type="button" v-on:click="saveAddPrivilegeGroup()" ><i class="fa fa-check"></i>&nbsp;保存</button>
+                                <button class="btn btn-primary float-right" type="button" v-on:click="saveEditPrivilegeGroup()" ><i class="fa fa-check"></i>&nbsp;保存</button>
                                 <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
                                 <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
                             </div>
                             </div>
                         </div>
                         </div>

+ 4 - 4
WebService/src/main/resources/components/privilegePackage/edit-privilege-group/editPrivilegeGroup.js

@@ -58,7 +58,7 @@
 
 
                 });
                 });
             },
             },
-            saveAddPrivilegeGroup:function(){
+            saveEditPrivilegeGroup:function(){
                 if(!vc.component.editPrivilegeGroupValidate()){
                 if(!vc.component.editPrivilegeGroupValidate()){
                     vc.component.editPrivilegeGroupInfo.errorInfo = vc.validate.errInfo;
                     vc.component.editPrivilegeGroupInfo.errorInfo = vc.validate.errInfo;
                     return ;
                     return ;
@@ -66,7 +66,7 @@
                 vc.component.editPrivilegeGroupInfo.errorInfo = "";
                 vc.component.editPrivilegeGroupInfo.errorInfo = "";
                 vc.http.post(
                 vc.http.post(
                     'editPrivilegeGroup',
                     'editPrivilegeGroup',
-                    'savePrivilegeGroupInfo',
+                    'editPrivilegeGroupInfo',
                     JSON.stringify(vc.component.editPrivilegeGroupInfo),
                     JSON.stringify(vc.component.editPrivilegeGroupInfo),
                     {
                     {
                         emulateJSON:true
                         emulateJSON:true
@@ -76,7 +76,7 @@
                         if(res.status == 200){
                         if(res.status == 200){
                             //关闭model
                             //关闭model
                             $('#editPrivilegeGroupModel').modal('hide');
                             $('#editPrivilegeGroupModel').modal('hide');
-                            vc.component.clearAddPrivilegeGroupInfo();
+                            vc.component.clearEditPrivilegeGroupInfo();
                             vc.component.$emit('privilegeGroup_loadPrivilegeGroup',{});
                             vc.component.$emit('privilegeGroup_loadPrivilegeGroup',{});
                             return ;
                             return ;
                         }
                         }
@@ -88,7 +88,7 @@
                         vc.component.editPrivilegeGroupInfo.errorInfo = errInfo;
                         vc.component.editPrivilegeGroupInfo.errorInfo = errInfo;
                      });
                      });
             },
             },
-            clearAddPrivilegeGroupInfo:function(){
+            clearEditPrivilegeGroupInfo:function(){
                 vc.component.editPrivilegeGroupInfo = {
                 vc.component.editPrivilegeGroupInfo = {
                     pgId:'',
                     pgId:'',
                     name:'',
                     name:'',

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

@@ -29,7 +29,6 @@
                     <tr>
                     <tr>
                         <th>权限编码</th>
                         <th>权限编码</th>
                         <th>权限名称</th>
                         <th>权限名称</th>
-                        <th>资源路径</th>
                         <th>权限描述</th>
                         <th>权限描述</th>
                         <th>创建时间</th>
                         <th>创建时间</th>
                         <th>操作</th>
                         <th>操作</th>
@@ -41,13 +40,12 @@
                         {{privilege.pId}}
                         {{privilege.pId}}
                     </td>
                     </td>
                     <td class="mail-ontact">{{privilege.name}}</td>
                     <td class="mail-ontact">{{privilege.name}}</td>
-                    <td class="mail-ontact">{{privilege.resource}}</td>
                     <td class="mail-subject">{{privilege.description}}</td>
                     <td class="mail-subject">{{privilege.description}}</td>
                     <td class="">{{vc.dateFormat(privilege.createTime)}}</td>
                     <td class="">{{vc.dateFormat(privilege.createTime)}}</td>
                     <td class="text-right mail-date">
                     <td class="text-right mail-date">
-                        <i  v-if="privilegeInfo._currentStoreId != '9999'"
-                                                         v-on:click="openDeletePrivilegeModel(privilege)"
-                                                         class="glyphicon glyphicon-remove"></i>
+                        <button v-on:click="openDeletePrivilegeModel(privilege)" class="btn btn-sm btn-primary">
+                            删除
+                        </button>
                     </td>
                     </td>
                 </tr>
                 </tr>
 
 

+ 2 - 2
java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml

@@ -31,10 +31,10 @@
     <update id="updatePrivilegeGroup" parameterType="Map">
     <update id="updatePrivilegeGroup" parameterType="Map">
         UPDATE p_privilege_group a SET
         UPDATE p_privilege_group a SET
         <if test="name != null and name != ''">
         <if test="name != null and name != ''">
-            and a.name = #{name},
+             a.name = #{name},
         </if>
         </if>
         <if test="description != null and description != ''">
         <if test="description != null and description != ''">
-            and a.description = #{description}
+             a.description = #{description}
         </if>
         </if>
         WHERE 1= 1
         WHERE 1= 1
         <if test="storeId != null and storeId != ''">
         <if test="storeId != null and storeId != ''">