|
@@ -15,7 +15,7 @@
|
|
|
<el-form-item style="float: right">
|
|
|
<el-link type="primary" :underline="false" @click="handleAdd('添加角色', '立即添加')">添加角色</el-link>
|
|
|
<el-link type="primary" :underline="false" @click="modify()" style="margin-left: 20px;">修改默认角色</el-link>
|
|
|
- <el-link type="primary" :underline="false" @click="exportAuthority()" style="margin-left:20px">导出权限</el-link>
|
|
|
+ <!-- <el-link type="primary" :underline="false" @click="exportAuthority()" style="margin-left:20px">导出所有权限</el-link> -->
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -32,7 +32,7 @@
|
|
|
<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 size="small" @click="exportAuthority(scope.row)" >导出权限</el-button>
|
|
|
<el-button type="danger" size="small" @click="deteHand(scope.row)" v-if="scope.row.rolename != '超级管理员'">删除</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -153,7 +153,6 @@ export default {
|
|
|
auseList: [],
|
|
|
defaultRole: false,
|
|
|
roleId: '',
|
|
|
- cgRoleParamer: null,
|
|
|
roleName: '',
|
|
|
rules: {
|
|
|
rolename: [{
|
|
@@ -268,8 +267,6 @@ export default {
|
|
|
console.log(res.data, '数据来源')
|
|
|
this.tableData = res.data
|
|
|
this.auseList = res.data
|
|
|
- let item = this.tableData.filter(item => item.rolename == '超级管理员')
|
|
|
- this.cgRoleParamer = item[0].id
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -463,9 +460,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- exportAuthority(){ // 导出权限
|
|
|
+ exportAuthority(row){ // 导出权限
|
|
|
this.http.post('/permission/exportData',{
|
|
|
- role: this.cgRoleParamer,
|
|
|
+ role: row.id,
|
|
|
companyId: this.user.companyId
|
|
|
},res => {
|
|
|
if(res.code == 'ok'){
|