<el-form :model="TeacherruleForm" label-width="80px"> <el-form-item label="人员:" prop="name" class="huo-dong" > <el-select v-model="TeacherruleForm.name【X】"> <el-option style="width:280px" v-for="item in teacherArrSelectData1" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="科目:" prop="subject"> <el-input style="width:280px" v-model="TeacherruleForm.subject"></el-input> </el-form-item> </el-form>
回填时。
this.TeacherruleForm.subject=mess.subject;//科目(直接回填中文名称。因为当用户输入时,也是直接输入的)
this.TeacherruleForm.name【X】=mess.userInfoId【y】;//因为这是多选框中的回填,
//这里回填时要注意下。回填时
/因为新增时是
userInfoId【y】: this.addTracherUseid.name
传递参数的时候userInfoId就是name‘
还有就是回填时,teacherArrSelectData1中必须要有值,否者回填失败哈