create project

This commit is contained in:
Captain.B 2020-02-27 10:55:39 +08:00
parent 6209a5f9b1
commit 320e941df5
1 changed files with 6 additions and 13 deletions

View File

@ -44,7 +44,7 @@
</div>
</el-card>
<el-dialog :title="$t('project.create')" :visible.sync="createVisible">
<el-dialog :title="$t('project.create')" :visible.sync="createVisible" @close="close">
<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>
@ -87,19 +87,8 @@
},
}
},
watch: {
'$route'() {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
}
},
mounted() {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
this.createVisible = this.$route.query.isCreate;
this.list();
},
destroyed() {
@ -114,6 +103,10 @@
this.createVisible = true;
this.form = Object.assign({}, row);
},
close() {
let query = {};
this.$router.push({query});
},
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {