Commit 155fb9e9 authored by Mac's avatar Mac

1

parent 4f285b65
...@@ -19,6 +19,12 @@ ...@@ -19,6 +19,12 @@
alt=""> alt="">
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="关联用户" size="small">
<el-select size="small" v-model="addMsg.UserId" filterable remote reserve-keyword placeholder="关联用户" :remote-method="remoteMethod" :loading="loadingPeople">
<el-option v-for="item in peopleData" :key="item.Id" :label="`${item.AliasName}`" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="电话" prop="Telephone" class="is-required" size="small"> <el-form-item label="电话" prop="Telephone" class="is-required" size="small">
<el-input v-model="addMsg.Telephone" placeholder="请输入电话" type="number"/> <el-input v-model="addMsg.Telephone" placeholder="请输入电话" type="number"/>
</el-form-item> </el-form-item>
...@@ -100,6 +106,7 @@ ...@@ -100,6 +106,7 @@
TeacherLogo:'', TeacherLogo:'',
Name:'', Name:'',
Telephone:"", Telephone:"",
UserId:'',
Introduction:'', Introduction:'',
Major:'', Major:'',
WorkYears:'', WorkYears:'',
...@@ -108,6 +115,7 @@ ...@@ -108,6 +115,7 @@
Nationality:'',//老师国籍 Nationality:'',//老师国籍
ForeignersUrl:'',//国家图片 ForeignersUrl:'',//国家图片
}, },
loadingPeople:false,
dynamicTags: [], dynamicTags: [],
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: '',
...@@ -154,6 +162,7 @@ ...@@ -154,6 +162,7 @@
loading: false, loading: false,
changeState:false, changeState:false,
imgType:0, imgType:0,
peopleData:[],
}; };
}, },
created() { created() {
...@@ -197,7 +206,11 @@ ...@@ -197,7 +206,11 @@
let content = this.$refs.ue.getUEContent(); let content = this.$refs.ue.getUEContent();
this.addMsg.Introduction = content; this.addMsg.Introduction = content;
this.apipost("/api/Education/AddOrUpdateTeacher", this.addMsg, res => { let msg = this.addMsg
if(msg.UserId==''){
msg.UserId =0
}
this.apipost("/api/Education/AddOrUpdateTeacher", msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CommonJump('lecturermanage'); this.CommonJump('lecturermanage');
this.Success(res.data.message); this.Success(res.data.message);
...@@ -245,6 +258,26 @@ ...@@ -245,6 +258,26 @@
this.dynamicTags = this.addMsg.LableNameList this.dynamicTags = this.addMsg.LableNameList
} }
if(this.addMsg.UserId==0){
this.addMsg.UserId=''
}else if(this.addMsg.UserId>0){
this.peopleData = [
{Id:this.addMsg.UserId,AliasName:this.addMsg.UserName}
]
}
})
},
remoteMethod(val){
console.log(val)
this.loadingPeople = true;
this.apipost("/api/User/GetListByPhoneOrAliasName",{'AliasName':val,SmallShopId:0}, res => {
this.loadingPeople = false;
if (res.data.resultCode == 1) {
this.peopleData = res.data.data
} else {
this.Info(res.data.message);
}
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment