mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
编辑教师和教师信息接口
This commit is contained in:
@@ -187,11 +187,9 @@
|
||||
Teacherinfo(){
|
||||
apiTeach.detail(this.userInfo.aid).then(res =>{
|
||||
this.teachtext = res.result;
|
||||
console.log(this.teachtext);
|
||||
})
|
||||
},
|
||||
Teacherprofile(){
|
||||
console.log()
|
||||
apiTeach.has(this.userInfo.aid).then(res =>{
|
||||
this.teaechswich = res.result.isTeacher;
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="informationItem">
|
||||
<div class="info-header">
|
||||
<h4 @click="infoswich=1" :class="infoswich == 1 ? 'h4active' : '' ">基础信息</h4>
|
||||
<h4 @click="infoswich=0" :class="infoswich == 0 ? 'h4active' : '' ">教师信息</h4>
|
||||
<h4 v-if="teaechswich" @click="infoswich=0" :class="infoswich == 0 ? 'h4active' : '' ">教师信息</h4>
|
||||
</div>
|
||||
<div v-if="infoswich == 0">
|
||||
<el-button type="primary" size="mini" @click="Edittearch = !Edittearch">教师信息编辑</el-button>
|
||||
@@ -24,26 +24,17 @@
|
||||
<div v-if="Edittearch">
|
||||
<div class="tearchimg">
|
||||
<h3>教师职业照</h3>
|
||||
<img src="../../../public/images/artfoot.png" alt="">
|
||||
<img :src="BaseUrl + teachtext.photo" alt="">
|
||||
</div>
|
||||
<div class="tearchexperi">
|
||||
<h3>工作经历</h3>
|
||||
<span>英语教研组在学校领导的关怀指导下,开学初制定了务实的工作计划。我们认真按照开学初制定的计划开展教研活动,较好地完成了本学期工作任务</span>
|
||||
<span>{{ teachtext.workExperience }}</span>
|
||||
</div>
|
||||
<div class="teachphoto" style="height:70px">
|
||||
<h3>擅长课程</h3>
|
||||
<div class="teachexcel">
|
||||
通用力
|
||||
</div>
|
||||
<div class="teachexcel">
|
||||
产品经理培训
|
||||
</div>
|
||||
<div class="teachexcel">
|
||||
规章制度
|
||||
</div>
|
||||
<div class="teachexcel">
|
||||
职业操守与道德
|
||||
</div>
|
||||
</div>
|
||||
<div class="teachphoto" style="height:70px">
|
||||
<h3>专长</h3>
|
||||
@@ -72,7 +63,7 @@
|
||||
maxlength="80"
|
||||
placeholder="请输入内容"
|
||||
show-word-limit
|
||||
v-model="teachform.tearchexpe">
|
||||
v-model="teachform.workExperience">
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
@@ -84,7 +75,7 @@
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入内容"
|
||||
v-model="teachform.couresexcel">
|
||||
v-model="teachform.courses">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,7 +92,7 @@
|
||||
<div>
|
||||
<div style="text-align: center;margin-top:56px">
|
||||
<el-button @click="Edittearch = true">取消</el-button>
|
||||
<el-button type="primary">保存</el-button>
|
||||
<el-button type="primary" @click="teacherUpdata">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -244,6 +235,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiTeach from '@/api/modules/teacher.js';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import userApi from "@/api/system/user";
|
||||
import accountApi from "@/api/account";
|
||||
@@ -291,6 +283,7 @@
|
||||
}
|
||||
};
|
||||
return {
|
||||
teaechswich:false,
|
||||
props: { multiple: true },
|
||||
options: [{
|
||||
value: 1,
|
||||
@@ -355,8 +348,10 @@
|
||||
account:{}
|
||||
},
|
||||
teachform:{
|
||||
img:'',
|
||||
tearchexpe:'',
|
||||
photo:'',
|
||||
courses:'',//擅长课程
|
||||
workExperience:'', //工作经历
|
||||
expertise:'', //专长
|
||||
},
|
||||
dialogVisibleAvatar:false,
|
||||
dialogVisiblePassword:false,
|
||||
@@ -424,8 +419,25 @@
|
||||
this.getSysTypeTree().then(rs => {
|
||||
this.sysTypeListMap = rs;
|
||||
});
|
||||
this.Teacherprofile();
|
||||
this.Teacherinfo();
|
||||
},
|
||||
methods:{
|
||||
teacherUpdata(){
|
||||
apiTeach.update(this.teachform).then(res =>{
|
||||
console.log('编辑成功')
|
||||
})
|
||||
},
|
||||
Teacherinfo(){
|
||||
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
||||
this.teachtext = res.result;
|
||||
})
|
||||
},
|
||||
Teacherprofile(){
|
||||
apiTeach.has(this.userInfo.aid).then(res =>{
|
||||
this.teaechswich = res.result.isTeacher;
|
||||
})
|
||||
},
|
||||
// 保存个人主页选项的编辑
|
||||
saveHideHome(){
|
||||
//执行隐藏操作
|
||||
@@ -551,12 +563,12 @@
|
||||
this.avatarUrl= res.result.httpPath;
|
||||
},
|
||||
handtearchUploadSuccess(res){
|
||||
this.teachform.img = res.result.filePath;
|
||||
this.teachform.photo = res.result.filePath;
|
||||
this.tearchUrl= res.result.httpPath;
|
||||
},
|
||||
removetearchHandle(){
|
||||
this.avatarUrl='';
|
||||
this.teachform.img = '';
|
||||
this.teachform.photo = '';
|
||||
},
|
||||
removeHandle(){
|
||||
this.avatarUrl='';
|
||||
|
||||
Reference in New Issue
Block a user