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