This commit is contained in:
chenjianxing 2020-07-29 18:06:44 +08:00
commit 560a22a186
6 changed files with 25 additions and 10 deletions

View File

@ -11,7 +11,7 @@
<template v-slot:title>{{$t('commons.project')}}</template>
<ms-recent-list :options="projectRecent"/>
<el-divider class="menu-divider"/>
<ms-show-all :index="'/api/project/all'"/>
<ms-show-all :index="'/api/project'"/>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/api/project/create'"
:title="$t('project.create')"/>
</el-submenu>
@ -20,7 +20,7 @@
<template v-slot:title>{{$t('commons.test')}}</template>
<ms-recent-list :options="testRecent"/>
<el-divider class="menu-divider"/>
<ms-show-all :index="'/api/test/list/all'"/>
<ms-show-all :index="'/api/test/list'"/>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/api/test/create'"
:title="$t('load_test.create')"/>
</el-submenu>
@ -29,7 +29,7 @@
<template v-slot:title>{{$t('commons.report')}}</template>
<ms-recent-list :options="reportRecent"/>
<el-divider class="menu-divider"/>
<ms-show-all :index="'/api/report/list/all'"/>
<ms-show-all :index="'/api/report/list'"/>
</el-submenu>
</el-menu>
</el-col>

View File

@ -1,5 +1,5 @@
<template>
<el-menu-item :index="this.index">
<el-menu-item :index="this.index" @click="changeRoute">
<font-awesome-icon :icon="['fa', 'list-ul']"/>
<span>{{$t('commons.show_all')}}</span>
</el-menu-item>
@ -10,6 +10,12 @@
name: "MsShowAll",
props: {
index: String
},
methods: {
changeRoute() {
//
this.$router.push(this.index + '/all');
}
}
}
</script>

View File

@ -12,7 +12,7 @@
<template v-slot:title>{{$t('commons.project')}}</template>
<ms-recent-list :options="projectRecent"/>
<el-divider/>
<ms-show-all :index="'/performance/project/all'"/>
<ms-show-all :index="'/performance/project'"/>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/performance/project/create'" :title="$t('project.create')"/>
</el-submenu>
@ -21,7 +21,7 @@
<template v-slot:title>{{$t('commons.test')}}</template>
<ms-recent-list :options="testRecent"/>
<el-divider/>
<ms-show-all :index="'/performance/test/all'"/>
<ms-show-all :index="'/performance/test'"/>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/performance/test/create'" :title="$t('load_test.create')"/>
</el-submenu>
@ -30,7 +30,7 @@
<template v-slot:title>{{$t('commons.report')}}</template>
<ms-recent-list :options="reportRecent"/>
<el-divider/>
<ms-show-all :index="'/performance/report/all'"/>
<ms-show-all :index="'/performance/report'"/>
</el-submenu>
</el-menu>
</el-col>

View File

@ -125,6 +125,12 @@
],
}
},
watch: {
'$route'(to) {
this.projectId = to.params.projectId;
this.initTableData();
}
},
methods: {
initTableData(combine) {
let condition = combine ? {combine: combine} : this.condition;

View File

@ -136,6 +136,9 @@
to.path.split('/')[3] === 'create') {
this.create();
this.$router.push('/' + this.baseUrl + '/project/all');
} else if (this.$route.path.split('/')[2] === 'project' &&
to.path.split('/')[3] === 'all') {
this.list();
}
}
},

View File

@ -13,7 +13,7 @@
<template v-slot:title>{{$t('commons.project')}}</template>
<ms-recent-list :options="projectRecent"/>
<el-divider/>
<ms-show-all :index="'/track/project/all'"/>
<ms-show-all :index="'/track/project'"/>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/project/create'" :title="$t('project.create')"/>
</el-submenu>
@ -22,7 +22,7 @@
<template v-slot:title>{{$t('test_track.case.test_case')}}</template>
<ms-recent-list :options="caseRecent"/>
<el-divider/>
<ms-show-all :index="'/track/case/all'"/>
<ms-show-all :index="'/track/case'"/>
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
<el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/case/create'" :title="$t('test_track.case.create_case')"/>
@ -32,7 +32,7 @@
<template v-slot:title>{{$t('test_track.plan.test_plan')}}</template>
<ms-recent-list :options="planRecent"/>
<el-divider/>
<ms-show-all :index="'/track/plan/all'"/>
<ms-show-all :index="'/track/plan'"/>
<el-menu-item :index="testPlanViewPath" class="blank_item"></el-menu-item>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/plan/create'" :title="$t('test_track.plan.create_plan')"/>
</el-submenu>