教师管理同步接口

This commit is contained in:
zhaofang
2022-06-06 11:04:50 +08:00
parent f9242c3576
commit e3d0f03e18
3 changed files with 61 additions and 8 deletions

View File

@@ -182,6 +182,7 @@
return {
query:{
tSystemId:'',
tSystemIds:'',
tLevelId:'',
queryName:'',
salaryId:'',
@@ -248,6 +249,7 @@
systemData:[],//体系数组{id,name}
levelData:[],//级别数组{id,name}
queryLevelData:[],
teacherSystemids:[]
}
},
watch:{
@@ -257,9 +259,9 @@
}
}
},
mounted() {
this.loadData(1);
this.getTeachersystem();
mounted() {
this.getTeachersystem();
},
computed: {
...mapGetters(['userInfo'])
@@ -281,13 +283,16 @@
this.systemLevelTree=res.result;
this.systemData=[];
res.result.forEach(item => {
this.teacherSystemids.push(item.teacher_system_id);
this.systemData.push({
id:item.teacher_system_id,
name:item.system_name
})
});
this.loadData(1);
} else {
this.$message.error('教师体系数据获取失败!')
this.loadData(1);
}
})
},
@@ -522,7 +527,7 @@
},
loadData(pageIndex) {
this.query.pageIndex = pageIndex;
console.log(this.query,'this.query');
this.query.tSystemIds = this.query.tSystemId || this.teacherSystemids.join();
teacherApi
.page(
this.query

View File

@@ -274,10 +274,10 @@ export default {
name: "teacherDetails",
components: { imageUpload },
props: {
id:{
id:{// sysId
type: String,
},
newId:{
newId:{// id
type: String,
}
},
@@ -497,11 +497,47 @@ export default {
if (res.status == 200) {
const result = res.result;
this.form = result;
this.synchronization(res.result);
} else {
this.$message.error(res.message);
}
});
},
synchronization(result) {
let param = {
id: this.newId,//当前老师记录的id
/**因为有可能部分老师没有这个字段,对应返回的teacher_id*/
sysId: result.teacher_id,
/**因为有可能部分老师没有这个字段*/
companyId: result.company_id,
companyName: result.company_name,
teacherCode: result.teacher_code,
/**返回的字段,不知道什么意义*/
teacherType: result.teacher_type,
userId: result.user_id,
userNo: result.user_no,
gender: result.gender,
teachingTime: result.teaching_time,
certification: result.certification,
language: result.language,
timezone: result.timezone,
tsystemId: result.system_id,
tsystemName: result.system_name,
tlevelId: result.level_id,
tlevelName: result.level_name,
/**认证人*/
certifyby: result.certify_by,
/**状态0临时1正式2停用*/
pstatus: result.status,
/**员工状态 2正常 3离职*/
pemployeeStatus: result.employee_status,
}
teacherApi.syncUpdate(param).then(res=>{
if(res.status != 200) {
console.log(res)
}
})
}
}
};
</script>