fix: 修复在列表页面点击显示全部无效的问题
This commit is contained in:
parent
09081ba2d5
commit
73af237437
|
@ -11,7 +11,7 @@
|
||||||
<template v-slot:title>{{$t('commons.project')}}</template>
|
<template v-slot:title>{{$t('commons.project')}}</template>
|
||||||
<ms-recent-list :options="projectRecent"/>
|
<ms-recent-list :options="projectRecent"/>
|
||||||
<el-divider class="menu-divider"/>
|
<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'"
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/api/project/create'"
|
||||||
:title="$t('project.create')"/>
|
:title="$t('project.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
<template v-slot:title>{{$t('commons.test')}}</template>
|
<template v-slot:title>{{$t('commons.test')}}</template>
|
||||||
<ms-recent-list :options="testRecent"/>
|
<ms-recent-list :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'"/>
|
||||||
<ms-create-button v-permission="['test_manager','test_user']" :index="'/api/test/create'"
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/api/test/create'"
|
||||||
:title="$t('load_test.create')"/>
|
:title="$t('load_test.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<template v-slot:title>{{$t('commons.report')}}</template>
|
<template v-slot:title>{{$t('commons.report')}}</template>
|
||||||
<ms-recent-list :options="reportRecent"/>
|
<ms-recent-list :options="reportRecent"/>
|
||||||
<el-divider class="menu-divider"/>
|
<el-divider class="menu-divider"/>
|
||||||
<ms-show-all :index="'/api/report/list/all'"/>
|
<ms-show-all :index="'/api/report/list'"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<el-menu-item :index="this.index">
|
<el-menu-item :index="this.index" @click="changeRoute">
|
||||||
<font-awesome-icon :icon="['fa', 'list-ul']"/>
|
<font-awesome-icon :icon="['fa', 'list-ul']"/>
|
||||||
<span>{{$t('commons.show_all')}}</span>
|
<span>{{$t('commons.show_all')}}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
@ -10,6 +10,12 @@
|
||||||
name: "MsShowAll",
|
name: "MsShowAll",
|
||||||
props: {
|
props: {
|
||||||
index: String
|
index: String
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
changeRoute() {
|
||||||
|
// 解决在列表页面点击 显示全部 无效的问题(点击显示全部后改变路由)
|
||||||
|
this.$router.push(this.index + '/all');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<template v-slot:title>{{$t('commons.project')}}</template>
|
<template v-slot:title>{{$t('commons.project')}}</template>
|
||||||
<ms-recent-list :options="projectRecent"/>
|
<ms-recent-list :options="projectRecent"/>
|
||||||
<el-divider/>
|
<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')"/>
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/performance/project/create'" :title="$t('project.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<template v-slot:title>{{$t('commons.test')}}</template>
|
<template v-slot:title>{{$t('commons.test')}}</template>
|
||||||
<ms-recent-list :options="testRecent"/>
|
<ms-recent-list :options="testRecent"/>
|
||||||
<el-divider/>
|
<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')"/>
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/performance/test/create'" :title="$t('load_test.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<template v-slot:title>{{$t('commons.report')}}</template>
|
<template v-slot:title>{{$t('commons.report')}}</template>
|
||||||
<ms-recent-list :options="reportRecent"/>
|
<ms-recent-list :options="reportRecent"/>
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
<ms-show-all :index="'/performance/report/all'"/>
|
<ms-show-all :index="'/performance/report'"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -125,6 +125,12 @@
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$route'(to) {
|
||||||
|
this.projectId = to.params.projectId;
|
||||||
|
this.initTableData();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData(combine) {
|
initTableData(combine) {
|
||||||
let condition = combine ? {combine: combine} : this.condition;
|
let condition = combine ? {combine: combine} : this.condition;
|
||||||
|
|
|
@ -136,6 +136,9 @@
|
||||||
to.path.split('/')[3] === 'create') {
|
to.path.split('/')[3] === 'create') {
|
||||||
this.create();
|
this.create();
|
||||||
this.$router.push('/' + this.baseUrl + '/project/all');
|
this.$router.push('/' + this.baseUrl + '/project/all');
|
||||||
|
} else if (this.$route.path.split('/')[2] === 'project' &&
|
||||||
|
to.path.split('/')[3] === 'all') {
|
||||||
|
this.list();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<template v-slot:title>{{$t('commons.project')}}</template>
|
<template v-slot:title>{{$t('commons.project')}}</template>
|
||||||
<ms-recent-list :options="projectRecent"/>
|
<ms-recent-list :options="projectRecent"/>
|
||||||
<el-divider/>
|
<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')"/>
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/project/create'" :title="$t('project.create')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<template v-slot:title>{{$t('test_track.case.test_case')}}</template>
|
<template v-slot:title>{{$t('test_track.case.test_case')}}</template>
|
||||||
<ms-recent-list :options="caseRecent"/>
|
<ms-recent-list :options="caseRecent"/>
|
||||||
<el-divider/>
|
<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="testCaseEditPath" class="blank_item"></el-menu-item>
|
||||||
<el-menu-item :index="testCaseProjectPath" 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')"/>
|
<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>
|
<template v-slot:title>{{$t('test_track.plan.test_plan')}}</template>
|
||||||
<ms-recent-list :options="planRecent"/>
|
<ms-recent-list :options="planRecent"/>
|
||||||
<el-divider/>
|
<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>
|
<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')"/>
|
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/plan/create'" :title="$t('test_track.plan.create_plan')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
Loading…
Reference in New Issue