mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-23 01:36:44 +08:00
教师管理接口
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<el-form-item label="讲师组织:" >
|
||||
<el-col :span="12">--</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="初始授课时长:">12分账</el-form-item></el-col>
|
||||
<el-form-item label="初始授课时长:">{{form.user.teaching}}</el-form-item></el-col>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="讲师体系:">
|
||||
@@ -55,7 +55,7 @@
|
||||
<el-col :span="12">认证人</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="讲师介绍:">
|
||||
讲师介绍
|
||||
{{form.user.description}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-tab-pane label="授课记录" name="second">
|
||||
<div style="display:flex">
|
||||
<div><el-button type="primary">导出授课记录</el-button></div>
|
||||
<div style="margin: 0 5px"><el-select v-model="value" placeholder="请选择" clearable >
|
||||
<div style="margin: 0 5px"><el-select v-model="records.courseType" placeholder="请选择" clearable @change="getCourseScore()">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
@@ -80,43 +80,48 @@
|
||||
</el-select></div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:data="records.list"
|
||||
style="width: 100%;margin-top:10px">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="courseCode"
|
||||
label="班级编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="courseType"
|
||||
label="类型"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.courseType == '1'">面授班</span>
|
||||
<span v-if="scope.row.courseType == '2'">训练班</span>
|
||||
<span v-if="scope.row.courseType == '0'">在线班</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="courseName"
|
||||
label="班级名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="modName"
|
||||
label="模块名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="teachingTime"
|
||||
label="授课时长(min)"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="openStartTime"
|
||||
label="开班时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="courseStatus"
|
||||
label="班级状态"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="teacherScore"
|
||||
label="评分">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -128,6 +133,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align:center;margin-top:20px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="records.page"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="records.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="records.count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="授课资格" name="third">
|
||||
<el-table
|
||||
@@ -237,6 +254,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'qs'
|
||||
import teacherApi from "@/api/modules/teacher";
|
||||
import teacherBoeApi from "@/api/boe/teacher";
|
||||
import userApi from "@/api/system/user";
|
||||
@@ -255,7 +273,24 @@ export default {
|
||||
dialogVisible:false,
|
||||
activeName: "first",
|
||||
value: "",
|
||||
options: [],
|
||||
options: [//‘1,2’:面授,训练班;‘0’:在线班
|
||||
{label:'在线班',value:'0'},
|
||||
{label:'面授',value:'1'},
|
||||
{label:'训练班',value:'2'},
|
||||
],
|
||||
records:{// 授课记录
|
||||
courseType:'',
|
||||
pageSize: 1,
|
||||
page:10,
|
||||
count:0,
|
||||
list:[]
|
||||
},
|
||||
qualify:{//授课资格
|
||||
pageSize: 1,
|
||||
page:10,
|
||||
count:0,
|
||||
list:[]
|
||||
},
|
||||
tableData: [],
|
||||
input:'',
|
||||
form:{
|
||||
@@ -265,7 +300,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.id,'id');
|
||||
this.getDetail(this.id)
|
||||
},
|
||||
computed: {
|
||||
@@ -273,10 +307,57 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
update(row) {
|
||||
console.log(row,'row');
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleClick() {},
|
||||
handleClick(tab, event) {
|
||||
if(tab.name == 'second') {// 授课记录
|
||||
this.getCourseScore();
|
||||
} else if(tab.name == 'third') {// 授课资格
|
||||
this.getTeachingQualify();
|
||||
}else if(tab.name == 'fourth') {// 为开班资源
|
||||
|
||||
}if(tab.name == 'five') {// 晋级过程
|
||||
|
||||
}
|
||||
},
|
||||
// 授课资格
|
||||
getTeachingQualify() {
|
||||
let data = {
|
||||
id:this.id, // 教师id
|
||||
pageSize:this.qualify.pageSize, // 每页数据条数
|
||||
page:this.qualify.page, // 返回第几页数据
|
||||
}
|
||||
teacherBoeApi.getTeachingQualify(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授课记录
|
||||
getCourseScore() {
|
||||
let data = {
|
||||
id:this.id,// 教师id
|
||||
courseType:this.records.courseType || '0,1,2', // 课程类型:‘1,2’:面授,训练班;‘0’:在线班
|
||||
pageSize:this.records.pageSize, // 每页数据条数
|
||||
page:this.records.page, // 返回第几页数据
|
||||
isPage:0, // 是否分页:0分页返回,1:不分页直接返回全部
|
||||
}
|
||||
teacherBoeApi.getCourseScore(data).then(res=>{
|
||||
if(res.status === '200') {
|
||||
this.records.list = res.result.data;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.records.pageSize = val
|
||||
this.records.page = 1
|
||||
this.getCourseScore()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.records.page = val
|
||||
this.getCourseScore()
|
||||
},
|
||||
getDetail(id) {
|
||||
this.saveLoading = false;
|
||||
this.newOrEdit = "编辑教师";
|
||||
|
||||
Reference in New Issue
Block a user