|
@@ -129,7 +129,7 @@
|
|
|
<el-form-item label="备注" v-if="forms.role == '6'" prop="remark">
|
|
|
<el-input v-model="forms.remark" placeholder="请输入备注"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-col :span="24" class="loginSubmit"><el-button type="primary" @click="registerSubmit">注册</el-button></el-col>
|
|
|
+ <el-col :span="24" class="loginSubmit"><el-button type="primary" @click="registerSubmit('forms')">注册</el-button></el-col>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-tab-pane>
|
|
@@ -237,8 +237,15 @@ export default {
|
|
|
loginSubmit() {
|
|
|
this.$emit('submitDate', this.form);
|
|
|
},
|
|
|
- registerSubmit() {
|
|
|
- this.$emit('submitDates', { data: this.forms, id: this.forms.id });
|
|
|
+ registerSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.$emit('submitDates', { data: this.forms, id: this.forms.id });
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
uploadSuccess({ type, data }) {
|
|
|
this.$set(this.forms, `${type}`, data.uri);
|