fix(系统设置): 项目设置菜单权限控制

--bug=1015855 --user=李玉号 【系统设置】报表统计,没有报表 / 报告权限,但是会显示二级菜单
https://www.tapd.cn/55049933/s/1233816
This commit is contained in:
shiziyuan9527 2022-08-25 15:36:17 +08:00 committed by lyh
parent baa8cc27a3
commit af7d10a8bb
4 changed files with 13 additions and 7 deletions

View File

@ -61,8 +61,13 @@
</el-menu-item>
<el-menu-item index="/project" onselectstart="return false"
v-permission="['PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE',
'PROJECT_CUSTOM_CODE:READ','PROJECT_ERROR_REPORT_LIBRARY:READ', 'PROJECT_TEMPLATE:READ', 'PROJECT_MESSAGE:READ']">
v-permission="['PROJECT_USER:READ', 'PROJECT_MANAGER:READ',
'PROJECT_GROUP:READ', 'PROJECT_FILE:READ', 'PROJECT_VERSION:READ',
'PROJECT_APP_MANAGER:READ+EDIT',
'PROJECT_ENVIRONMENT:READ', 'PROJECT_OPERATING_LOG:READ',
'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE',
'PROJECT_CUSTOM_CODE:READ','PROJECT_ERROR_REPORT_LIBRARY:READ',
'PROJECT_TEMPLATE:READ', 'PROJECT_MESSAGE:READ']">
<div>
<svg-icon iconClass="project" class-name="ms-menu-img"/>
<span slot="title" class="ms-menu-item-title">{{ $t('commons.project_setting') }}</span>

View File

@ -463,13 +463,13 @@ export default {
tip: this.$t('commons.copy'),
icon: "el-icon-copy-document",
exec: this.handleCopy,
permission: ['PROJECT_TRACK_PLAN:READ+COPY']
permissions: ['PROJECT_TRACK_PLAN:READ+COPY']
},
{
tip: this.$t('test_track.plan_view.view_report'),
icon: "el-icon-s-data",
exec: this.openReport,
permission: ['PROJECT_TRACK_PLAN:READ+EDIT']
permissions: ['PROJECT_TRACK_PLAN:READ+EDIT']
},
],
batchExecuteType: "serial",

View File

@ -22,7 +22,8 @@
</el-button>
</el-row>
<el-row>
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExportHtml()">
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser"
v-permission="['PROJECT_TRACK_REPORT:READ+EXPORT']" plain size="mini" @click="handleExportHtml()">
{{ $t('commons.export')}}
</el-button>
</el-row>

View File

@ -196,7 +196,7 @@ export default {
{
name: this.$t('api_test.definition.request.batch_delete'),
handleClick: this.handleDeleteBatch,
permission: ['PROJECT_TRACK_REPORT:READ+DELETE']
permissions: ['PROJECT_TRACK_REPORT:READ+DELETE']
},
],
selectDataCounts: 0,
@ -209,7 +209,7 @@ export default {
{
name: this.$t('api_test.definition.request.batch_delete'),
handleClick: this.handleDeleteBatch,
permission: ['PROJECT_TRACK_REPORT:READ+DELETE'],
permissions: ['PROJECT_TRACK_REPORT:READ+DELETE'],
},
],
simpleOperators: [