diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index ec6d4807..6a4648a3 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -108,7 +108,7 @@ const save = function(data) { * @param {teacherId->sysId : 原系统的id,接口返回} sysId */ const updateSysId = function(id,sysId) { - return ajax.postJson('/xboe/teacher/update-sysid',{id,sysId}); + return ajax.post('/xboe/teacher/update-sysid',{id,sysId}); } diff --git a/src/views/manage/TeacherList.vue b/src/views/manage/TeacherList.vue index 9050e53e..c8bb9699 100644 --- a/src/views/manage/TeacherList.vue +++ b/src/views/manage/TeacherList.vue @@ -86,7 +86,7 @@
- +

上传头像

图片尺寸建议在:宽100px,高100px

@@ -249,7 +249,8 @@ systemData:[],//体系数组{id,name} levelData:[],//级别数组{id,name} queryLevelData:[], - teacherSystemids:[] + teacherSystemids:[], + coverImage:'', } }, watch:{ @@ -417,8 +418,8 @@ if (res.status == 200 && res.result != null) { this.havaInfo = true; this.form.account = res.result.account; - if(res.result.account.avatar != '') { - this.form.account.avatar = this.fileBaseUrl + res.result.account.avatar; + if(res.result.photo != '') { + this.coverImage = this.fileBaseUrl+res.result.photo; } this.form.user = res.result; } else { @@ -432,9 +433,13 @@ }, removeHandle(){ this.form.account.avatar = ''; + this.coverImage = ''; + this.form.photo = ''; }, handleUploadSuccess(res){ - this.form.account.avatar = this.fileBaseUrl + res.result.filePath; + this.coverImage = this.fileBaseUrl + res.result.filePath; + this.form.account.avatar = res.result.filePath; + this.form.photo = res.result.filePath; }, saveHandle(){ this.form.tsystemId = this.tSystemData.id; @@ -479,7 +484,6 @@ }); }, saveBoe() { - console.log("111"); let data = { teacher_user_id:this.form.user.sysId,// 教师对应的用户的id teacher_id:this.form.sysId, // 教师id ,有则编辑,没有则新建教师 @@ -518,6 +522,7 @@ }) }, updateHandle(data){ + this.coverImage = ''; this.saveLoading=false; this.newOrEdit='编辑教师'; this.allowInput=true; @@ -533,6 +538,9 @@ id:result.tlevelId, name: result.tlevelName }; + if(res.result.photo != '') { + this.coverImage = this.fileBaseUrl+res.result.photo; + } this.updateSystem(result.tsystemId) this.dialogVisible = true; } diff --git a/src/views/manage/teacherDetails.vue b/src/views/manage/teacherDetails.vue index 09f123ef..38d3e7a9 100644 --- a/src/views/manage/teacherDetails.vue +++ b/src/views/manage/teacherDetails.vue @@ -7,12 +7,12 @@ -
+
- +
@@ -286,9 +286,11 @@ export default { formatsec, formatSeconds, baseUrl: process.env.VUE_APP_BASE_API, + fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, newForm:{ account:{}, user:{}, + photo:'' }, dialogVisible:false, activeName: "first", @@ -349,9 +351,9 @@ export default { if (res.status == 200) { // const result = res.result; this.newForm = res.result; - if(res.result.account.avatar != '') { - this.newForm.account.avatar = this.baseUrl + res.result.account.avatar; - } + // if(res.result.account.avatar != '') { + // this.newForm.account.avatar = this.baseUrl + res.result.account.avatar; + // } } }) },