refactor(系统设置): 权限设置

This commit is contained in:
shiziyuan9527 2021-05-23 17:13:08 +08:00 committed by 刘瑞斌
parent 6276d1c719
commit 350071c03d
12 changed files with 18 additions and 12 deletions

View File

@ -8,7 +8,7 @@
</el-row>
<el-row type="flex" justify="space-between" align="middle">
<span class="operate-button">
<ms-table-button :is-tester-permission="isTesterPermission" v-if="showCreate" icon="el-icon-circle-plus-outline"
<ms-table-button v-permission="createPermission" :is-tester-permission="isTesterPermission" v-if="showCreate" icon="el-icon-circle-plus-outline"
:content="createTip" @click="create"/>
<ms-table-button :is-tester-permission="true" icon="el-icon-download" v-if="showImport"
:content="importTip" @click="importData"/>
@ -72,6 +72,12 @@
return this.$t('commons.import');
}
},
createPermission: {
type: Array,
default() {
return []
}
},
runTip: {
type: String,

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['ORGANIZATION_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
<ms-table-header :create-permission="['ORGANIZATION_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
</template>
<el-table border class="adjust-table ms-select-all-fixed" :data="tableData" style="width: 100%"

View File

@ -2,7 +2,7 @@
<div>
<el-card class="table-card" v-loading="result.loading">
<template v-slot:header>
<ms-table-header v-permission="['ORGANIZATION_WORKSPACE:READ+CREATE']" :condition.sync="condition" @search="list" @create="create"
<ms-table-header :create-permission="['ORGANIZATION_WORKSPACE:READ+CREATE']" :condition.sync="condition" @search="list" @create="create"
:create-tip="$t('workspace.create')" :title="$t('commons.workspace')"/>
</template>
<el-table border class="adjust-table" :data="items" style="width: 100%"

View File

@ -3,7 +3,7 @@
<el-card class="table-card" v-loading="result.loading">
<!-- 表头 -->
<template v-slot:header>
<ms-table-header v-permission="['PROJECT_ENVIRONMENT:READ+CREATE']" :title="$t('api_test.environment.environment_list')" :create-tip="btnTips"
<ms-table-header :create-permission="['PROJECT_ENVIRONMENT:READ+CREATE']" :title="$t('api_test.environment.environment_list')" :create-tip="btnTips"
:condition.sync="condition" :is-tester-permission="isTesterPermission" @search="search" @create="createEnv">
<template v-slot:button>
<ms-table-button v-permission="['PROJECT_ENVIRONMENT:READ+IMPORT']" :is-tester-permission="isTesterPermission" icon="el-icon-box"

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['PROJECT_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
<ms-table-header :create-permission="['PROJECT_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
:create-tip="$t('member.create')" :title="$t('commons.member')" :have-search="false"/>
</template>
<el-table border class="adjust-table ms-select-all-fixed" :data="tableData" style="width: 100%"

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['PROJECT_MANAGER:READ+CREATE']" :is-tester-permission="true" :condition.sync="condition" @search="search" @create="create"
<ms-table-header :create-permission="['PROJECT_MANAGER:READ+CREATE']" :is-tester-permission="true" :condition.sync="condition" @search="search" @create="create"
:create-tip="btnTips" :title="$t('commons.project')">
<template v-slot:button>
<ms-table-button :is-tester-permission="true" icon="el-icon-box"

View File

@ -3,7 +3,7 @@
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['SYSTEM_ORGANIZATION:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
<ms-table-header :create-permission="['SYSTEM_ORGANIZATION:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
:create-tip="$t('organization.create')" :title="$t('commons.organization')"/>
</template>
<!-- system menu organization table-->

View File

@ -2,7 +2,7 @@
<div>
<el-card class="table-card" v-loading="result.loading">
<template v-slot:header>
<ms-table-header v-permission="['SYSTEM_WORKSPACE:READ+CREATE']" :condition.sync="condition" @search="list" @create="create"
<ms-table-header :create-permission="['SYSTEM_WORKSPACE:READ+CREATE']" :condition.sync="condition" @search="list" @create="create"
:create-tip="$t('workspace.create')" :title="$t('commons.workspace')"/>
</template>
<!-- workspace table -->

View File

@ -2,7 +2,7 @@
<div>
<el-card class="table-card" v-loading="result.loading">
<template v-slot:header>
<ms-table-header v-permission="['SYSTEM_TEST_POOL:READ+CREATE']" :condition.sync="condition" @search="search" @create="create"
<ms-table-header :create-permission="['SYSTEM_TEST_POOL:READ+CREATE']" :condition.sync="condition" @search="search" @create="create"
:create-tip="$t('test_resource_pool.create_resource_pool')"
:title="$t('commons.test_resource_pool')"/>
</template>

View File

@ -3,7 +3,7 @@
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['SYSTEM_USER:READ+CREATE']" :condition.sync="condition" @search="search" @create="create"
<ms-table-header :create-permission="['SYSTEM_USER:READ+CREATE']" :condition.sync="condition" @search="search" @create="create"
:create-tip="$t('user.create')" :title="$t('commons.user')"/>
</template>

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card>
<template v-slot:header>
<ms-table-header v-permission="['SYSTEM_GROUP:READ+CREATE']" :condition.sync="condition" @search="initData" @create="create"
<ms-table-header :create-permission="['SYSTEM_GROUP:READ+CREATE']" :condition.sync="condition" @search="initData" @create="create"
create-tip="创建用户组" title="用户组与权限"/>
</template>

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card class="table-card">
<template v-slot:header>
<ms-table-header v-permission="['WORKSPACE_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
<ms-table-header :create-permission="['WORKSPACE_USER:READ+CREATE']" :condition.sync="condition" @search="initTableData" @create="create"
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
</template>
<el-table border class="adjust-table ms-select-all-fixed" :data="tableData" style="width: 100%"