mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
教师管理同步接口
This commit is contained in:
@@ -25,7 +25,7 @@ const getInfoById = function(id) {
|
|||||||
* name 姓名
|
* name 姓名
|
||||||
* tlevelId级别
|
* tlevelId级别
|
||||||
* salaryId发薪地
|
* salaryId发薪地
|
||||||
tsystemId这个应该是教师体系,他注释没有写明白
|
* tsystemId
|
||||||
|
|
||||||
* } query
|
* } query
|
||||||
* @returns
|
* @returns
|
||||||
@@ -187,6 +187,17 @@ const exports=function(query){
|
|||||||
const findAllCourses=function(query){
|
const findAllCourses=function(query){
|
||||||
return ajax.post('/xboe/teacher/compose/find/courses',query);
|
return ajax.post('/xboe/teacher/compose/find/courses',query);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 内部讲师-删除模块讲师接口
|
||||||
|
* @param {
|
||||||
|
courseId // 课程id
|
||||||
|
modId // 模块id
|
||||||
|
teacherId // 教师id
|
||||||
|
remark // 备注
|
||||||
|
*/
|
||||||
|
const syncUpdate = function(data) {
|
||||||
|
return ajax.postJson('/xboe/teacher/update-sync',data);
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
findByName,
|
findByName,
|
||||||
@@ -201,5 +212,6 @@ export default {
|
|||||||
has,
|
has,
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
exports
|
exports,
|
||||||
|
syncUpdate
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,6 +182,7 @@
|
|||||||
return {
|
return {
|
||||||
query:{
|
query:{
|
||||||
tSystemId:'',
|
tSystemId:'',
|
||||||
|
tSystemIds:'',
|
||||||
tLevelId:'',
|
tLevelId:'',
|
||||||
queryName:'',
|
queryName:'',
|
||||||
salaryId:'',
|
salaryId:'',
|
||||||
@@ -248,6 +249,7 @@
|
|||||||
systemData:[],//体系数组{id,name}
|
systemData:[],//体系数组{id,name}
|
||||||
levelData:[],//级别数组{id,name}
|
levelData:[],//级别数组{id,name}
|
||||||
queryLevelData:[],
|
queryLevelData:[],
|
||||||
|
teacherSystemids:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@@ -258,8 +260,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData(1);
|
|
||||||
this.getTeachersystem();
|
this.getTeachersystem();
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo'])
|
...mapGetters(['userInfo'])
|
||||||
@@ -281,13 +283,16 @@
|
|||||||
this.systemLevelTree=res.result;
|
this.systemLevelTree=res.result;
|
||||||
this.systemData=[];
|
this.systemData=[];
|
||||||
res.result.forEach(item => {
|
res.result.forEach(item => {
|
||||||
|
this.teacherSystemids.push(item.teacher_system_id);
|
||||||
this.systemData.push({
|
this.systemData.push({
|
||||||
id:item.teacher_system_id,
|
id:item.teacher_system_id,
|
||||||
name:item.system_name
|
name:item.system_name
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
this.loadData(1);
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('教师体系数据获取失败!')
|
this.$message.error('教师体系数据获取失败!')
|
||||||
|
this.loadData(1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -522,7 +527,7 @@
|
|||||||
},
|
},
|
||||||
loadData(pageIndex) {
|
loadData(pageIndex) {
|
||||||
this.query.pageIndex = pageIndex;
|
this.query.pageIndex = pageIndex;
|
||||||
console.log(this.query,'this.query');
|
this.query.tSystemIds = this.query.tSystemId || this.teacherSystemids.join();
|
||||||
teacherApi
|
teacherApi
|
||||||
.page(
|
.page(
|
||||||
this.query
|
this.query
|
||||||
|
|||||||
@@ -274,10 +274,10 @@ export default {
|
|||||||
name: "teacherDetails",
|
name: "teacherDetails",
|
||||||
components: { imageUpload },
|
components: { imageUpload },
|
||||||
props: {
|
props: {
|
||||||
id:{
|
id:{// sysId
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
newId:{
|
newId:{// id
|
||||||
type: String,
|
type: String,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -497,10 +497,46 @@ export default {
|
|||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
const result = res.result;
|
const result = res.result;
|
||||||
this.form = result;
|
this.form = result;
|
||||||
|
this.synchronization(res.result);
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user