1.完成修改功能
//修改老师信息
updateTeacher(){
var _this = this;
axios.put('http://localhost:8181/teacher/updateTeaInfo?'+'tea_id='+sessionStorage.getItem('tid')+'&tea_name='+_this.form.tea_name+'&tea_gender='+_this.form.tea_gender+'&final_edu='+ _this.form.final_edu+
'&position='+ _this.form.position+'&tea_tel_num='+ _this.form.position+'&search_direction='+ _this.form.search_direction+'&mail_address='+ _this.form.mail_address+
'&highest_edu='+ _this.form.highest_edu+'&tea_doc_time='+ _this.form.tea_doc_time+'&tea_master_time='+ _this.form.tea_master_time+'&tea_dname='+ _this.form.tea_dname+'&person_intro='+ _this.form.person_intro).then(function(resp){
console.log(resp);
if(resp.data.msg =='操作成功')
_this.$alert('修改成功!', '消息', {
confirmButtonText: '确定',
})
})
},
2.完成删除功能
// 删除
handleDelete(index, row) {
var _this = this;
//console.log(row.tea_id);
axios.get('http://localhost:8181/teacher/delete?tea_id='+row.tea_id).then(function(resp){
if(resp.data.msg =='操作成功')
_this.$alert('删除成功!', '消息', {
confirmButtonText: '确定',
})
})
},
3.修改日期模式
<el-table-column prop="tea_doc_time" label="博导时间" width="80" value-format="yyyy-MM-dd"></el-table-column>
<el-table-column prop="tea_master_time" label="硕导时间" width="100" value-format="yyyy-MM-dd"></el-table-column>
否则会报错