Commit 5a8a6516 authored by 王's avatar

班级管理老师编辑默认选项

parent fd41a59d
......@@ -69,7 +69,16 @@
this.exitTeacherList = this.dialogObj.teacherList.length > 0 ? this.dialogObj.teacherList : [];
getTeacherListApi().then(res=>{
if (this.exitTeacherList.length > 0) {
this.teacherList = this.findDifferentArray(res.list, this.exitTeacherList)
this.teacherList = this.findDifferentArray(res.list, this.exitTeacherList);
if (this.form.teacher_id){
let _index = this.teacherList.findIndex((ts)=>{
return ts.id == this.form.teacher_id
})
if (_index === -1) {
let obj = res.list.find((item)=>{ return item.id == this.form.teacher_id})
this.teacherList.push(obj)
}
}
} else {
this.teacherList = res.list
}
......@@ -90,7 +99,6 @@
},
initPage(){
this.periods = this.dialogObj.periods
this.getTeacher();
switch (this.dialogObj.type) {
case 0:
if(!this.dialogObj.periodsId){
......@@ -100,13 +108,15 @@
teacher_id:'',
max_join_num:''
};
this.getTeacher();
break;
case 1:
getClassDetailApi(this.dialogObj.id).then(res=>{
this.form = {
teacher_id:res.teacher_id,
teacher_id: parseInt(res.teacher_id),
max_join_num:res.max_join_num
};
this.getTeacher();
})
}
},
......
......@@ -259,6 +259,7 @@
});
},
onAdd(){
console.log('onAdd', this.periods)
this.dialogObj = {
show:true,
title:'添加班级',
......
......@@ -22,14 +22,14 @@
<el-table
:data="list"
style="width: 100%">
<el-table-column
prop="out_trade_no"
label="订单号">
</el-table-column>
<el-table-column
prop="refund_no"
label="退款编号">
</el-table-column>
<el-table-column
prop="out_trade_no"
label="订单号">
</el-table-column>
<el-table-column
label="用户信息"
min-width="140"
......@@ -56,11 +56,7 @@
</el-table-column>
<el-table-column
prop="desc"
label="退款原因">
</el-table-column>
<el-table-column
prop="callback"
label="微信回调">
label="备注">
</el-table-column>
<el-table-column
label="退款状态">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment