project
This commit is contained in:
parent
cf828f87b2
commit
e756e5aedc
|
@ -9,11 +9,11 @@
|
||||||
<template slot="title">项目</template>
|
<template slot="title">项目</template>
|
||||||
<ms-recent-project/>
|
<ms-recent-project/>
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
<el-menu-item index="/project">
|
<el-menu-item index="/project/all">
|
||||||
<font-awesome-icon :icon="['fa', 'list-ul']"/>
|
<font-awesome-icon :icon="['fa', 'list-ul']"/>
|
||||||
<span style="padding-left: 5px;">显示全部</span>
|
<span style="padding-left: 5px;">显示全部</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="/project" :route="{name:'project', query:{isCreate:true}}">
|
<el-menu-item index="/project/create">
|
||||||
<el-button type="text">创建项目</el-button>
|
<el-button type="text">创建项目</el-button>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="$t('project.create')" :visible.sync="createVisible" @close="close">
|
<el-dialog :title="$t('project.create')" :visible.sync="createVisible">
|
||||||
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
|
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
|
||||||
<el-form-item :label="$t('commons.name')">
|
<el-form-item :label="$t('commons.name')">
|
||||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||||
|
@ -88,9 +88,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.createVisible = this.$route.query.isCreate;
|
if (this.$route.path.split('/')[2] === 'create') {
|
||||||
|
this.createVisible = true;
|
||||||
|
this.$router.push('/project/all');
|
||||||
|
}
|
||||||
this.list();
|
this.list();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$route'(to) {
|
||||||
|
if (to.path.split('/')[2] === 'create') {
|
||||||
|
this.createVisible = true;
|
||||||
|
this.$router.push('/project/all');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.createVisible = false;
|
this.createVisible = false;
|
||||||
},
|
},
|
||||||
|
@ -103,10 +114,6 @@
|
||||||
this.createVisible = true;
|
this.createVisible = true;
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
},
|
},
|
||||||
close() {
|
|
||||||
let query = {};
|
|
||||||
this.$router.push({query});
|
|
||||||
},
|
|
||||||
submit(formName) {
|
submit(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
|
@ -99,7 +99,7 @@ const router = new VueRouter({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/project",
|
path: "/project/:type",
|
||||||
name: 'project',
|
name: 'project',
|
||||||
components: {
|
components: {
|
||||||
content: MsProject
|
content: MsProject
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
<el-button type="warning" plain @click="cancel">取消</el-button>
|
<el-button type="warning" plain @click="cancel">取消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-tabs v-model="active" type="border-card" :stretch="true">
|
|
||||||
|
<el-tabs style="margin-top: 15px;" v-model="active" type="border-card" :stretch="true">
|
||||||
<el-tab-pane label="基础配置">
|
<el-tab-pane label="基础配置">
|
||||||
<ms-test-plan-basic-config :test-plan="testPlan"/>
|
<ms-test-plan-basic-config :test-plan="testPlan"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
<ms-test-plan-advanced-config/>
|
<ms-test-plan-advanced-config/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue