init
This commit is contained in:
@@ -344,6 +344,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
addUser(this.form).then(data => {
|
addUser(this.form).then(data => {
|
||||||
this.$modal.msgSuccess("新增用户成功");
|
this.$modal.msgSuccess("新增用户成功");
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
@@ -353,6 +356,8 @@ export default {
|
|||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户类型" prop="type">
|
<el-form-item label="用户类型" prop="type">
|
||||||
<el-select v-model="form.type" clearable size="small" style="width: 95%">
|
<el-select v-model="form.type" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in appUserTypeList"
|
v-for="dict in appUserTypeList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="为谁征婚" prop="forPersonals">
|
<el-form-item label="为谁征婚" prop="forPersonals">
|
||||||
<el-select v-model="form.forPersonals" clearable size="small" style="width: 95%">
|
<el-select v-model="form.forPersonals" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userForPersonalsList"
|
v-for="dict in userForPersonalsList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="性别" prop="gender">
|
<el-form-item label="性别" prop="gender">
|
||||||
<el-select v-model="form.gender" clearable size="small" style="width: 95%">
|
<el-select v-model="form.gender" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in genderList"
|
v-for="dict in genderList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="学历" prop="education">
|
<el-form-item label="学历" prop="education">
|
||||||
<el-select v-model="form.education" clearable size="small" style="width: 95%">
|
<el-select v-model="form.education" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userEducationList"
|
v-for="dict in userEducationList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="婚况" prop="marriage">
|
<el-form-item label="婚况" prop="marriage">
|
||||||
<el-select v-model="form.marriage" clearable size="small" style="width: 95%">
|
<el-select v-model="form.marriage" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userMarriageList"
|
v-for="dict in userMarriageList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="职业" prop="profession">
|
<el-form-item label="职业" prop="profession">
|
||||||
<el-select v-model="form.profession" clearable size="small" style="width: 95%">
|
<el-select v-model="form.profession" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in professionList"
|
v-for="dict in professionList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="年收入" prop="annualIncome">
|
<el-form-item label="年收入" prop="annualIncome">
|
||||||
<el-select v-model="form.annualIncome" clearable size="small" style="width: 95%">
|
<el-select v-model="form.annualIncome" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userAnnualIncomeList"
|
v-for="dict in userAnnualIncomeList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="购车情况" prop="carStatus">
|
<el-form-item label="购车情况" prop="carStatus">
|
||||||
<el-select v-model="form.carStatus" clearable size="small" style="width: 95%">
|
<el-select v-model="form.carStatus" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userCarStatusList"
|
v-for="dict in userCarStatusList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="购房情况" prop="housingStatus">
|
<el-form-item label="购房情况" prop="housingStatus">
|
||||||
<el-select v-model="form.housingStatus" clearable size="small" style="width: 95%">
|
<el-select v-model="form.housingStatus" size="small" style="width: 95%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in userHousingStatusList"
|
v-for="dict in userHousingStatusList"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -339,7 +339,7 @@ export default {
|
|||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
updateUser(this.form).then(data => {
|
updateUser(this.form).then(data => {
|
||||||
this.$modal.msgSuccess("新增用户成功");
|
this.$modal.msgSuccess("编辑用户成功");
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
this.open = false
|
this.open = false
|
||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
|
|||||||
Reference in New Issue
Block a user