ggooalice 2 år sedan
förälder
incheckning
deb20d7f79
1 ändrade filer med 26 tillägg och 0 borttagningar
  1. 26 0
      fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue

+ 26 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue

@@ -31,7 +31,9 @@
                 <div>
                     <el-button size="small" @click="handleAdd('编辑角色', '立即修改', scope.row)" :style="scope.row.rolename != '超级管理员' ? '' : 'visibility:hidden;'">编辑角色</el-button>
                     <el-button type="primary" size="small" @click="shisha(scope.row.id), roleName = scope.row.rolename" v-if="scope.row.rolename !='超级管理员' || (scope.row.rolename =='超级管理员' && user.roleName == '超级管理员')">分配权限</el-button>
+                    
                     <el-button type="danger" size="small" @click="deteHand(scope.row)" v-if="scope.row.rolename != '超级管理员'">删除</el-button>
+                    <el-button size="small" @click="exportAuthority(scope.row)" v-if="scope.row.rolename != '超级管理员'" style="margin-left:30px">导出权限</el-button>
                 </div>
             </template>
         </el-table-column>
@@ -457,6 +459,30 @@ export default {
                   type: "error"
               });
           });
+      },
+      exportAuthority(row){ // 导出权限
+      console.log(row);
+      return
+        this.http.post('',{
+
+        },res => {
+          if(res.code == 'ok'){
+            var a = document.createElement('a');
+            a.download = "角色权限.xls";
+            a.href = res.data;
+            a.click();
+          }else{
+            this.$message({
+              message: res.msg,
+              type: 'error'
+            })
+          }
+        },err => {
+          this.$message({
+            message: err,
+            type: 'error'
+          })
+        })
       }
   },
 };