refactor(权限管理): 删除v-roles
This commit is contained in:
parent
dedaa2ecdf
commit
d0896a541a
|
@ -25,19 +25,17 @@
|
||||||
{{ $t("i18n.report") }}
|
{{ $t("i18n.report") }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
|
||||||
<el-submenu v-show="isOldVersion"
|
<el-submenu v-show="isOldVersion" index="4">
|
||||||
v-roles="['test_manager','test_user','test_viewer']" index="4">
|
|
||||||
<template v-slot:title>{{ $t('commons.test') }}</template>
|
<template v-slot:title>{{ $t('commons.test') }}</template>
|
||||||
<ms-recent-list ref="testRecent" :options="testRecent"/>
|
<ms-recent-list ref="testRecent" :options="testRecent"/>
|
||||||
<el-divider class="menu-divider"/>
|
<el-divider class="menu-divider"/>
|
||||||
<ms-show-all :index="'/api/test/list/all'"/>
|
<ms-show-all :index="'/api/test/list/all'"/>
|
||||||
<el-menu-item :index="apiTestProjectPath" class="blank_item"></el-menu-item>
|
<el-menu-item :index="apiTestProjectPath" class="blank_item"></el-menu-item>
|
||||||
<ms-create-button v-roles="['test_manager','test_user']" :index="'/api/test/create'"
|
<ms-create-button :index="'/api/test/create'"
|
||||||
:title="$t('load_test.create')"/>
|
:title="$t('load_test.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
<el-submenu v-show="isOldVersion"
|
<el-submenu v-show="isOldVersion" index="5">
|
||||||
v-roles="['test_manager','test_user','test_viewer']" index="5">
|
|
||||||
<template v-slot:title>{{ $t('commons.report') }}</template>
|
<template v-slot:title>{{ $t('commons.report') }}</template>
|
||||||
<ms-recent-list ref="reportRecent" :options="reportRecent"/>
|
<ms-recent-list ref="reportRecent" :options="reportRecent"/>
|
||||||
<el-divider class="menu-divider"/>
|
<el-divider class="menu-divider"/>
|
||||||
|
@ -45,8 +43,7 @@
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
|
|
||||||
<el-menu-item v-show="isOldVersion"
|
<el-menu-item v-show="isOldVersion" :index="'/api/monitor/view'">
|
||||||
v-roles="['test_manager','test_user','test_viewer']" :index="'/api/monitor/view'">
|
|
||||||
{{ $t('commons.monitor') }}
|
{{ $t('commons.monitor') }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" default-active="1" router>
|
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" default-active="1" router>
|
||||||
<!-- 不激活项目路由-->
|
<!-- 不激活项目路由-->
|
||||||
<el-menu-item index="1" v-show="false">Placeholder</el-menu-item>
|
<el-menu-item index="1" v-show="false">Placeholder</el-menu-item>
|
||||||
<el-submenu v-roles="['test_manager','test_user','test_viewer']" index="2" popper-class="submenu">
|
<el-submenu index="2" popper-class="submenu">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<span class="project-name" :title="currentProject">
|
<span class="project-name" :title="currentProject">
|
||||||
{{ $t('commons.project') }}: {{ currentProject }}
|
{{ $t('commons.project') }}: {{ currentProject }}
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
</template>
|
</template>
|
||||||
<search-list :current-project.sync="currentProject"/>
|
<search-list :current-project.sync="currentProject"/>
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
<el-menu-item :index="'/setting/project/create'" v-roles="['test_manager','test_user']">
|
<el-menu-item :index="'/setting/project/create'">
|
||||||
<font-awesome-icon :icon="['fa', 'plus']"/>
|
<font-awesome-icon :icon="['fa', 'plus']"/>
|
||||||
<span style="padding-left: 7px;">{{ $t("project.create") }}</span>
|
<span style="padding-left: 7px;">{{ $t("project.create") }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
|
|
@ -37,8 +37,7 @@
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-table-operator :edit-permission="['WORKSPACE_USER:READ+EDIT']"
|
<ms-table-operator :edit-permission="['WORKSPACE_USER:READ+EDIT']"
|
||||||
:delete-permission="['WORKSPACE_USER:READ+DELETE']"
|
:delete-permission="['WORKSPACE_USER:READ+DELETE']"
|
||||||
:tip2="$t('commons.remove')" @editClick="edit(scope.row)" @deleteClick="del(scope.row)"
|
:tip2="$t('commons.remove')" @editClick="edit(scope.row)" @deleteClick="del(scope.row)"/>
|
||||||
v-roles="['test_manager']"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
Loading…
Reference in New Issue