mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
教师详情接口对接
This commit is contained in:
@@ -98,7 +98,7 @@ const teacherSystem = function(id) {
|
||||
return ajax.get('/b1/system/teacher/course-info?id='+id);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-未开班资源查询接口
|
||||
* 内部讲师-晋级过程查询接口
|
||||
* @param {
|
||||
id // 教师id
|
||||
```
|
||||
@@ -107,7 +107,7 @@ const teacherSystem = function(id) {
|
||||
return ajax.get('/b1/system/teacher/teacher-upgrade-precess?id='+id);
|
||||
}
|
||||
/**
|
||||
* 内部讲师-未开班资源查询接口
|
||||
* 内部讲师-修改模块讲师信息
|
||||
* @param {
|
||||
courseId // 课程id
|
||||
modId // 模块id
|
||||
@@ -140,5 +140,6 @@ export default {
|
||||
getTeachingQualify,
|
||||
getCourseInfo,
|
||||
teacherUpgradePrecess,
|
||||
deleteModelTeacher
|
||||
deleteModelTeacher,
|
||||
editModelTeacher
|
||||
}
|
||||
@@ -83,14 +83,12 @@
|
||||
:data="records.list"
|
||||
style="width: 100%;margin-top:10px">
|
||||
<el-table-column
|
||||
prop="courseCode"
|
||||
label="班级编号"
|
||||
width="180">
|
||||
prop="courseCode" width="120"
|
||||
label="班级编号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseType"
|
||||
label="类型"
|
||||
width="180">
|
||||
label="类型">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.courseType == '1'">面授班</span>
|
||||
<span v-if="scope.row.courseType == '2'">训练班</span>
|
||||
@@ -98,27 +96,26 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseName"
|
||||
label="班级名称">
|
||||
prop="courseName" show-overflow-tooltip
|
||||
label="班级名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modName"
|
||||
prop="modName" show-overflow-tooltip
|
||||
label="模块名称"
|
||||
width="180">
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="teachingTime"
|
||||
label="授课时长(min)"
|
||||
width="180">
|
||||
label="授课时长(min)" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="openStartTime"
|
||||
label="开班时间">
|
||||
label="开班时间" width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseStatus"
|
||||
label="班级状态"
|
||||
width="180">
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="teacherScore"
|
||||
@@ -126,10 +123,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="180">
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="update()">修改</el-button>
|
||||
<el-button type="text">删除</el-button>
|
||||
<el-button type="text" @click="recordsUpdate(scope.row)">修改</el-button>
|
||||
<el-button type="text" @click="recordsDel(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -148,7 +145,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="授课资格" name="third">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:data="qualify.list"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
@@ -175,23 +172,35 @@
|
||||
width="180">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align:center;margin-top:20px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="qualifySizeChange"
|
||||
@current-change="qualifyCurrentChange"
|
||||
: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="fourth">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
<el-table
|
||||
:data="courseInfoList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="courseCode"
|
||||
label="班级编号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="courseName"
|
||||
label="班级名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="modName"
|
||||
label="模块名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -200,39 +209,40 @@
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
prop="openStartTime"
|
||||
label="开班时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="晋级过程" name="five">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
<el-table
|
||||
:data="precessList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="operatorTime"
|
||||
label="变更时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="变更方式"
|
||||
width="180">
|
||||
prop="type"
|
||||
label="变更方式">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == '0'">手动</span>
|
||||
<span v-if="scope.row.type == '1'">自动</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
prop="afterLevelName"
|
||||
label="模块名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="变更结果"
|
||||
width="180">
|
||||
prop="afterLevelName"
|
||||
label="变更结果">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作人"
|
||||
width="180">
|
||||
prop="operatorName"
|
||||
label="操作人">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
@@ -244,10 +254,10 @@
|
||||
top="20%"
|
||||
:modal="false">
|
||||
<div>请输入授课时长(分钟)</div>
|
||||
<div><el-input v-model="input" placeholder="请输入内容"></el-input></div>
|
||||
<div style="margin-top:20px"><el-input v-model="records.row.teachingTime" placeholder="请输入内容"></el-input></div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
<el-button type="primary" @click="editModelTeacher()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -281,16 +291,21 @@ export default {
|
||||
records:{// 授课记录
|
||||
courseType:'',
|
||||
pageSize: 1,
|
||||
page:10,
|
||||
page:5,
|
||||
count:0,
|
||||
list:[]
|
||||
list:[],
|
||||
row:{
|
||||
teachingTime:'',
|
||||
},
|
||||
},
|
||||
qualify:{//授课资格
|
||||
pageSize: 1,
|
||||
page:10,
|
||||
page:5,
|
||||
count:0,
|
||||
list:[]
|
||||
},
|
||||
courseInfoList: [],//未开班资源
|
||||
precessList:[],//晋级过程
|
||||
tableData: [],
|
||||
input:'',
|
||||
form:{
|
||||
@@ -306,7 +321,40 @@ export default {
|
||||
...mapGetters(["userInfo"])
|
||||
},
|
||||
methods: {
|
||||
update(row) {
|
||||
recordsDel(row) {
|
||||
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let data = {
|
||||
courseId:row.courseId, // 课程id
|
||||
modId:row.modId, // 模块id
|
||||
teacherId:row.teacherId, // 教师id
|
||||
remark:'', // 备注
|
||||
}
|
||||
teacherBoeApi.deleteModelTeacher(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.getCourseScore();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
recordsUpdate(row) {
|
||||
this.records.row = row;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
@@ -315,11 +363,27 @@ export default {
|
||||
} else if(tab.name == 'third') {// 授课资格
|
||||
this.getTeachingQualify();
|
||||
}else if(tab.name == 'fourth') {// 为开班资源
|
||||
|
||||
this.getCourseInfo();
|
||||
}if(tab.name == 'five') {// 晋级过程
|
||||
|
||||
this.teacherUpgradePrecess();
|
||||
}
|
||||
},
|
||||
// 晋级过程
|
||||
teacherUpgradePrecess() {
|
||||
teacherBoeApi.teacherUpgradePrecess(this.id).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.precessList = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 未开班资源
|
||||
getCourseInfo() {
|
||||
teacherBoeApi.getCourseInfo(this.id).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.courseInfoList = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授课资格
|
||||
getTeachingQualify() {
|
||||
let data = {
|
||||
@@ -329,10 +393,36 @@ export default {
|
||||
}
|
||||
teacherBoeApi.getTeachingQualify(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
|
||||
this.qualify.list = res.result.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
qualifySizeChange(val) {
|
||||
this.qualify.pageSize = val
|
||||
this.qualify.page = 1
|
||||
this.getTeachingQualify()
|
||||
},
|
||||
qualifyCurrentChange(val) {
|
||||
this.qualify.page = val
|
||||
this.getTeachingQualify()
|
||||
},
|
||||
editModelTeacher() {
|
||||
let data = {
|
||||
courseId:this.records.row.courseId, // 课程id
|
||||
modId:this.records.row.modId, // 模块id
|
||||
teacherId:this.records.row.teacherId, // 教师id
|
||||
teachingTime:this.records.row.teachingTime, // 授课时间
|
||||
}
|
||||
teacherBoeApi.editModelTeacher(data).then(res=>{
|
||||
if(res.status == '200') {
|
||||
this.$message.success('修改成功');
|
||||
this.dialogVisible = false;
|
||||
this.getCourseScore();
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 授课记录
|
||||
getCourseScore() {
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user