mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-25 02:32:52 +08:00
教师管理修改
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
<el-form label-width="100px" :model="form" ref="form" :rules="rules">
|
||||
<el-form-item>
|
||||
<div class="avator">
|
||||
<imageUpload dir="avatar" :value="form.account.avatar" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
|
||||
<imageUpload dir="avatar" :value="coverImage" @success="handleUploadSuccess" @remove="removeHandle"></imageUpload>
|
||||
<div class="avatorText">
|
||||
<p>上传头像</p>
|
||||
<p>图片尺寸建议在:宽100px,高100px</p>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user