家长维护页面调优

This commit is contained in:
sk1551 2020-10-26 21:30:43 +08:00
parent 12e7a2cbb6
commit 3811f96533
4 changed files with 22 additions and 26 deletions

View File

@ -94,7 +94,7 @@
v-model="form.parentId"
:options="parentidOptions"
:normalizer="normalizer"
placeholder="选择上级部门"
placeholder="选择上级内容"
/>
</el-form-item>
<el-form-item label="名称" prop="name">

View File

@ -16,12 +16,12 @@
<h2 class="title">幼儿信息查询与维护</h2>
<div class="result-form">
<p class="form-title">提交核对幼儿信息</p>
<el-form class="form" ref="form" :model="form" label-width="110px">
<el-form class="form" ref="form" :model="form" label-width="110px">
<el-form-item label="父亲姓名" prop="father">
<el-input v-model="form.father" placeholder="请输入父亲姓名" @input="onInput()"/>
<el-input v-model="form.father" placeholder="请输入父亲姓名" @input="onInput()" />
</el-form-item>
<el-form-item label="母亲姓名" prop="mother">
<el-input v-model="form.mother" placeholder="请输入母亲姓名" @input="onInput()"/>
<el-input v-model="form.mother" placeholder="请输入母亲姓名" @input="onInput()" />
</el-form-item>
<el-form-item label="家长联系方式" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系方式" :disabled="hide" />
@ -144,8 +144,8 @@
<el-form-item label="第一语言" prop="firstLanguage">
<el-input v-model="form.firstLanguage" placeholder="请输入第一语言" maxlength="2" />
</el-form-item>
<el-form-item label="第二语言" prop="seconderLanguage" >
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" maxlength="2"/>
<el-form-item label="第二语言" prop="seconderLanguage">
<el-input v-model="form.seconderLanguage" placeholder="请输入第二语言" maxlength="2" />
</el-form-item>
<el-form-item label="其他语言" prop="otherLanguage">
<el-input v-model="form.otherLanguage" placeholder="请输入其他语言" />
@ -167,7 +167,7 @@ import { getChild_query, updateChild } from "@/api/benyi/child";
import VDistpicker from "v-distpicker";
//
import { updateContactpeople } from "@/api/benyi/contactpeople";
import { updateContactpeople } from "@/api/benyi/contactpeople";
export default {
name: "result",
@ -223,8 +223,7 @@ export default {
phone: undefined
},
//
form: {
}
form: {}
};
},
created() {
@ -315,24 +314,21 @@ export default {
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
updateChild(this.form).then((response) => {
updateChild(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
//this.open = false;
this.hide = false;
}
});
this.form.childid = this.form.id;
this.form.fathername = this.form.father;
this.form.mothername = this.form.mother;
updateContactpeople(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
//this.open = false;
this.form.childid = this.form.id;
this.form.fathername = this.form.father;
this.form.mothername = this.form.mother;
updateContactpeople(this.form).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.hide = false;
}
});
this.hide = false;
}
});

View File

@ -121,7 +121,7 @@
<el-row :gutter="15">
<el-col :span="24">
<el-form-item label="选择幼儿" prop="childid">
<el-select v-model="form.childid" placeholder="请输入选择幼儿" disabled="true">
<el-select v-model="form.childid" placeholder="请输入选择幼儿" >
<el-option
v-for="dict in childOptions"
:key="dict.id"

View File

@ -135,7 +135,7 @@
<if test="gmoffphone != null and gmoffphone != ''">gmoffphone = #{gmoffphone},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
where id = #{id} or childid = #{childid}
</update>
<delete id="deleteByChildContactpeopleById" parameterType="Long">