mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-22 09:16:44 +08:00
教师管理同步接口
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user