refactor(系统设置): 创建项目

This commit is contained in:
shiziyuan9527 2020-12-08 15:17:59 +08:00
parent 0d8d12b17b
commit 8da32177de
14 changed files with 36 additions and 33 deletions

View File

@ -8,11 +8,11 @@
<template v-slot:title>{{ $t('commons.project') }}</template> <template v-slot:title>{{ $t('commons.project') }}</template>
<search-list ref="projectRecent" :options="projectRecent"/> <search-list ref="projectRecent" :options="projectRecent"/>
<el-divider class="menu-divider"/> <el-divider class="menu-divider"/>
<el-menu-item :index="'/performance/project/create'"> <el-menu-item :index="'/setting/project/create'">
<font-awesome-icon :icon="['fa', 'plus']"/> <font-awesome-icon :icon="['fa', 'plus']"/>
<span style="padding-left: 7px;">创建项目</span> <span style="padding-left: 7px;">{{ $t("project.create") }}</span>
</el-menu-item> </el-menu-item>
<ms-show-all :index="'/setting/project'"/> <ms-show-all :index="'/setting/project/all'"/>
</el-submenu> </el-submenu>
<el-menu-item :index="'/api/home'"> <el-menu-item :index="'/api/home'">

View File

@ -24,11 +24,11 @@ export default {
name: "ApiTestList", name: "ApiTestList",
component: () => import('@/business/components/api/test/ApiTestList'), component: () => import('@/business/components/api/test/ApiTestList'),
}, },
{ // {
path: "project/:type", // path: "project/:type",
name: "fucProject", // name: "fucProject",
component: MsProject, // component: MsProject,
}, // },
{ {
path: "report/list/:testId", path: "report/list/:testId",
name: "ApiReportList", name: "ApiReportList",

View File

@ -32,7 +32,7 @@ export default {
options: Object options: Object
}, },
mounted() { mounted() {
this.recent(); this.init();
}, },
data() { data() {
return { return {
@ -44,7 +44,7 @@ export default {
watch: { watch: {
search_text(val) { search_text(val) {
if (!val) { if (!val) {
this.recent(); this.init();
} else { } else {
this.search(); this.search();
} }
@ -66,7 +66,7 @@ export default {
}, },
methods: { methods: {
recent: function () { init: function () {
if (hasRoles(ROLE_TEST_VIEWER, ROLE_TEST_USER, ROLE_TEST_MANAGER)) { if (hasRoles(ROLE_TEST_VIEWER, ROLE_TEST_USER, ROLE_TEST_MANAGER)) {
this.result = this.$get(this.options.url, (response) => { this.result = this.$get(this.options.url, (response) => {
this.items = response.data; this.items = response.data;

View File

@ -9,11 +9,11 @@
<template v-slot:title>{{ $t('commons.project') }}</template> <template v-slot:title>{{ $t('commons.project') }}</template>
<search-list ref="projectRecent" :options="projectRecent"/> <search-list ref="projectRecent" :options="projectRecent"/>
<el-divider/> <el-divider/>
<el-menu-item :index="'/performance/project/create'"> <el-menu-item :index="'/setting/project/create'">
<font-awesome-icon :icon="['fa', 'plus']"/> <font-awesome-icon :icon="['fa', 'plus']"/>
<span style="padding-left: 7px;">创建项目</span> <span style="padding-left: 7px;">{{ $t("project.create") }}</span>
</el-menu-item> </el-menu-item>
<ms-show-all :index="'/setting/project'"/> <ms-show-all :index="'/setting/project/all'"/>
</el-submenu> </el-submenu>
<el-menu-item :index="'/performance/home'"> <el-menu-item :index="'/performance/home'">

View File

@ -43,11 +43,11 @@ export default {
name: "perPlan", name: "perPlan",
component: PerformanceTestList component: PerformanceTestList
}, },
{ // {
path: "project/:type", // path: "project/:type",
name: "perProject", // name: "perProject",
component: MsProject // component: MsProject
}, // },
{ {
path: "report/:type", path: "report/:type",
name: "perReport", name: "perReport",

View File

@ -144,7 +144,7 @@ export default {
if (this.$route.path.split('/')[2] === 'project' && if (this.$route.path.split('/')[2] === 'project' &&
this.$route.path.split('/')[3] === 'create') { this.$route.path.split('/')[3] === 'create') {
this.create(); this.create();
this.$router.push('/' + this.baseUrl + '/project/all'); // this.$router.push('/setting/project');
} }
this.list(); this.list();
}, },
@ -156,7 +156,7 @@ export default {
if (this.$route.path.split('/')[2] === 'project' && if (this.$route.path.split('/')[2] === 'project' &&
to.path.split('/')[3] === 'create') { to.path.split('/')[3] === 'create') {
this.create(); this.create();
this.$router.push('/' + this.baseUrl + '/project/all'); // this.$router.push('/setting/project');
} else if (this.$route.path.split('/')[2] === 'project' && } else if (this.$route.path.split('/')[2] === 'project' &&
to.path.split('/')[3] === 'all') { to.path.split('/')[3] === 'all') {
this.list(); this.list();

View File

@ -80,9 +80,9 @@ export default {
} }
}, },
{ {
path: 'project', path: 'project/:type',
component: () => import('@/business/components/settings/project/Project'), component: () => import('@/business/components/settings/project/Project'),
meta: {project: true, title: '项目管理'} meta: {project: true, title: 'project.manager'}
}, },
] ]

View File

@ -10,11 +10,11 @@
<template v-slot:title>{{ $t('commons.project') }}</template> <template v-slot:title>{{ $t('commons.project') }}</template>
<search-list ref="projectRecent" :options="projectRecent"/> <search-list ref="projectRecent" :options="projectRecent"/>
<el-divider/> <el-divider/>
<el-menu-item :index="'/performance/project/create'"> <el-menu-item :index="'/setting/project/create'">
<font-awesome-icon :icon="['fa', 'plus']"/> <font-awesome-icon :icon="['fa', 'plus']"/>
<span style="padding-left: 7px;">创建项目</span> <span style="padding-left: 7px;">{{ $t("project.create") }}</span>
</el-menu-item> </el-menu-item>
<ms-show-all :index="'/setting/project'"/> <ms-show-all :index="'/setting/project/all'"/>
</el-submenu> </el-submenu>
<el-menu-item :index="'/track/home'"> <el-menu-item :index="'/track/home'">

View File

@ -7,7 +7,7 @@
<related-test-plan-list ref="relatedTestPlanList"/> <related-test-plan-list ref="relatedTestPlanList"/>
</el-row> </el-row>
<el-row> <el-row>
<review-list :title="$t('review.my_review')" ref="caseReviewList"/> <review-list :title="$t('test_track.review.my_review')" ref="caseReviewList"/>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">

View File

@ -51,11 +51,11 @@ export default {
name: "planViewEdit", name: "planViewEdit",
component: TestPlanView component: TestPlanView
}, },
{ // {
path: "project/:type", // path: "project/:type",
name: "trackProject", // name: "trackProject",
component: MsProject // component: MsProject
}, // },
{ {
path: "review/:type", path: "review/:type",
name: "testCaseReview", name: "testCaseReview",

@ -1 +1 @@
Subproject commit 8a972a198775b3783ed6e4cef27197e53d1ebdc8 Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a

View File

@ -294,6 +294,7 @@ export default {
tapd_id: 'TAPD Project ID', tapd_id: 'TAPD Project ID',
jira_key: 'JIRA Project key', jira_key: 'JIRA Project key',
zentao_id: 'Zentao Project ID', zentao_id: 'Zentao Project ID',
manager: 'Manager',
}, },
member: { member: {
create: 'Create', create: 'Create',

View File

@ -293,6 +293,7 @@ export default {
tapd_id: 'TAPD项目ID', tapd_id: 'TAPD项目ID',
jira_key: 'JIRA项目key', jira_key: 'JIRA项目key',
zentao_id: 'Zentao项目ID', zentao_id: 'Zentao项目ID',
manager: '项目管理',
}, },
member: { member: {
create: '添加成员', create: '添加成员',

View File

@ -293,6 +293,7 @@ export default {
tapd_id: 'TAPD項目ID', tapd_id: 'TAPD項目ID',
jira_key: 'JIRA項目key', jira_key: 'JIRA項目key',
zentao_id: 'Zentao項目ID', zentao_id: 'Zentao項目ID',
manager: '項目管理',
}, },
member: { member: {
create: '添加成員', create: '添加成員',