教师职业照,图片移除问题

This commit is contained in:
daihh
2022-12-29 15:37:51 +08:00
parent b8071a7455
commit a18320e755
3 changed files with 21 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="component-upload-image" :style="`width:${width};height:${height};`"> <div class="component-upload-image" :style="`width:${width};height:${height};`">
<el-upload <el-upload
:action="uploadImgUrl" :action="uploadImgUrl"
class="image-upload" class="image-upload"
@@ -15,8 +15,8 @@
:show-file-list="false" :show-file-list="false"
:headers="headers" :headers="headers"
style="display: inline-block; vertical-align: top;"> style="display: inline-block; vertical-align: top;">
<el-image v-if="!value" :src="value" :style="`width:${width};height:${height};`"> <el-image v-if="!value" :style="`width:${width};height:${height};`"> -->
<div slot="error" class="image-slot" :style="`line-height:${height};`"> <div slot="error" class="image-slot" :style="`line-height:${height};`">
<i class="el-icon-plus" /> <i class="el-icon-plus" />
</div> </div>
@@ -133,7 +133,7 @@ export default {
}else if(that.endWith(this.fileSizeLimit,"KB")){ }else if(that.endWith(this.fileSizeLimit,"KB")){
sizeLimt = size * 1024; sizeLimt = size * 1024;
} }
} }
} }
if (sizeLimt > 0 && file.size > sizeLimt) { if (sizeLimt > 0 && file.size > sizeLimt) {
that.$message.error("图片不能超过"+this.fileSizeLimit+",请重新上传!") that.$message.error("图片不能超过"+this.fileSizeLimit+",请重新上传!")
@@ -152,7 +152,7 @@ export default {
} }
} }
resolve(file) resolve(file)
}) })
}, },
handleUploadError() { handleUploadError() {
this.$message({ this.$message({

View File

@@ -363,17 +363,17 @@ export default {
}, },
mounted() { mounted() {
this.upload.orgId=this.userInfo.departId; this.upload.orgId=this.userInfo.departId;
this.upload.orgName=this.userInfo.departName; // this.upload.orgName=this.userInfo.departName;
this.needOrg=''; // this.needOrg='';
//console.log(this.upload.orgId,'this.upload.orgId') //console.log(this.upload.orgId,'this.upload.orgId')
// if(this.upload.orgId){ if(this.upload.orgId){
// apiUserBasic.getOrgInfo(this.upload.orgId).then(rs=>{ apiUserBasic.getOrgInfo(this.upload.orgId).then(rs=>{
// if(rs.status==200){ if(rs.status==200){
// this.upload.orgName=rs.result.name; this.upload.orgName=rs.result.name;
// this.needOrg=''; this.needOrg='';
// } }
// }); });
// } }
this.loadResOwners(); this.loadResOwners();
this.getResOwnerTree().then(rs => { this.getResOwnerTree().then(rs => {
this.resOwnerListMap = rs; this.resOwnerListMap = rs;

View File

@@ -405,7 +405,7 @@
this.teachform.photo = res.result.photo; this.teachform.photo = res.result.photo;
this.tearchUrl = this.fileBaseUrl + res.result.photo; this.tearchUrl = this.fileBaseUrl + res.result.photo;
} }
apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{ apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{
if(sinfo.status=='200'){ if(sinfo.status=='200'){
if(sinfo.result.courses){ if(sinfo.result.courses){
@@ -420,7 +420,7 @@
} }
} }
}) })
this.teachform.expertise = res.result.expertise.split( ',' ); this.teachform.expertise = res.result.expertise.split( ',' );
let children=[]; let children=[];
this.sysTypeListtear.forEach(nm =>{ this.sysTypeListtear.forEach(nm =>{
@@ -614,10 +614,12 @@
this.tearchUrl= res.result.httpPath; this.tearchUrl= res.result.httpPath;
}, },
removetearchHandle(){ removetearchHandle(){
this.avatarUrl=''; //this.$message.error('移除图片');
this.teachform.photo = ''; this.tearchUrl='';
this.teachform.photo = '';
}, },
removeHandle(){ removeHandle(){
this.avatarUrl=''; this.avatarUrl='';
this.form.account.avatar = ''; this.form.account.avatar = '';
}, },