外部授课接口联调

This commit is contained in:
wangxuemei
2024-06-11 19:04:38 +08:00
parent 03a56bbfd7
commit 78e47e688c
4 changed files with 58 additions and 73 deletions

View File

@@ -2,7 +2,7 @@ import http from "./config";
//列表查询内部讲师授课记录
export const getNewInTeacherCourseList = (obj) => http.post('/admin/teacher/getNewInTeacherCourseList', obj)
//内部讲师授课记录详情
export const getTeacherCourseList = (obj) => http.post(`/admin/teacher/getTeacherCourseList?=${obj}`)
export const getTeacherCourseList = (obj) => http.post(`/admin/teacher/getTeacherCourseList?id=${obj}`)
// export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList', obj)
//授课记录导出
export const getexport = (obj) => http.post('/lesson_records/export', obj)
@@ -19,4 +19,8 @@ export const getOuterTeacherCourseDetail = (obj) => http.post(`/admin/teacher/ge
//删除讲师授课记录
export const deleteInTeacherCourse= (obj) => http.post(`/admin/teacher/deleteInTeacherCourse?offcourseId=${obj}`)
//新增内部授课记录
export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/insertInTeacherCourse', obj)
export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/insertInTeacherCourse', obj)
//修改内部讲师授课记录
export const updateInTeacherCourse = (obj) => http.post('/admin/teacher/updateInTeacherCourse', obj)
//新增外部授课记录
export const insertOutTeaherCourse = (obj) => http.post('/admin/teacher/insertOutTeaherCourse', obj)

View File

@@ -130,7 +130,7 @@
</div>
<span style="display:inline-block ;width:115px ;text-align:center ">课程名称 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.name" style="width:200px; height: 40px;"
placeholder="自动带出讲师组织" allowClear showSearch>
placeholder="" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
</div>
@@ -142,7 +142,7 @@
<span style="display:inline-block ;width:125px ;text-align:center ">授课日期 :</span>
<a-date-picker v-if="teacherdialog1 == 0" v-model:value="formParam.beginTime" style="width: 200px"
format="YYYY-MM-DD" placeholder="年/月/日" />
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.valueDate }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.beginTime }}</span>
</div>
<!-- 课程类型 -->
<div class="select">
@@ -153,7 +153,7 @@
<a-select style="width: 200px" v-if="teacherdialog1 == 0" v-model:value="formParam.type"
showSearch :option="OnTheJobStatusList" placeholder="课程类型 ">
</a-select>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.type }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{formParam.type==1 ?'项目开课':formParam.type==2?'路径开课' :formParam.type==3 ? '面授开课':''}}</span>
</div>
<!-- 授课时长 -->
<div class="select">
@@ -179,7 +179,6 @@
</div>
<!-- 评分 -->
<div class="select">
<!-- v-model:value="searchParam.name" -->
<span style="display:inline-block ;width:125px ;text-align:center ">评分 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.score" style="width:200px; height: 40px; "
placeholder="" allowClear showSearch>
@@ -188,7 +187,6 @@
</div>
<!-- 参训人数 -->
<div class="select">
<!-- v-model:value="searchParam.name" -->
<span style="display:inline-block ;width:125px ;text-align:center ">参训人数 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.studys" style="width:200px; height: 40px; "
placeholder="0 " allowClear showSearch>
@@ -198,9 +196,10 @@
<!-- 备注 -->
<div style="width: 834px;height: 1px;"></div>
<span style="display:inline-block ;width:115px ;text-align:center ">备注 :</span>
<Editor v-if="teacherdialog1 == 0" v-model="formParam.remark"
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.userNo }}</span>
<a-input v-if="teacherdialog1 == 0" v-model="formParam.remark"
style="width: 550px ;display:inline-block ;
height: 80px;" />
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.remark }}</span>
<div class="del_btnbox" v-if="teacherdialog1 == 0">
<a-button class="del_btn btn1" @click="cancelTeacherDialog" style="margin-right: 32px;">取消</a-button>
<a-button class="del_btn btn2" @click="createTeacherDialog" :loading="buttonLoading">保存
@@ -246,8 +245,8 @@
import { reactive, toRefs, ref } from "vue";
import { useRouter } from "vue-router";
import { message } from "ant-design-vue";
import { insertTeacher, deleteInTeacherCourse, updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
import { getOuterTeacherCourseList, getAddress,getOuterTeacherCourseDetail } from "../../api/Teaching";
import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
import { getOuterTeacherCourseList, getAddress,getOuterTeacherCourseDetail ,deleteInTeacherCourse,insertOutTeaherCourse} from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
@@ -322,8 +321,8 @@ export default {
},
{
title: '授课讲师 ',
dataIndex: 'name',
key: 'name',
dataIndex: 'teacher',
key: 'teacher',
elipsis: true,
width: 120,
},
@@ -462,7 +461,7 @@ export default {
status: null,
beginTime: null,
};
// getTableDate();
getTableDate();
};
// List接口数据
const getTableDate = (obj) => {
@@ -476,28 +475,7 @@ export default {
console.log("获取tableData", tableData);
})
};
getTableDate()
// // List接口数据
// const getTableDate = ()=>{
// state.tableloading = true ;
// api
// // api 接口命名
// getOuterTeacherCourseList({
// ...state.searchParam
// })
// .then((res)=>{
// console.log(res.data.rows)
// // state.tableDataTotal = Number(res.data.data.total);
// // state.tableLoading = false;
// // const tableData = res.data.rows;
// // // initDataSublist("", data);
// // console.log(data);
// // tableData.value = data;
// // console.log("tableData", tableData);
// })
// }
// 获取项目列表信息
//let tableData = ref([]);
getTableDate();
// // 翻页
const changePagination = (page) => {
state.searchParam.pageNo = page;
@@ -516,32 +494,25 @@ export default {
const handleModify = (record) => {
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '修改信息'
TeacherSystem()
state.teacherdialogtitle = '查看详情'
TeacherSystem(record)
}
//保存
const createTeacherDialog = () => {
//调用新增修改接口
// this.$refs["formParam"].validate(valid => {
// if (valid) {
let objform = { ...state.formParam }
// if (state.formParam.userNo != undefined) {
// updateInTeacher (objform).then(response => {
// state.$modal.msgSuccess("修改成功");
// state.teacherdialog = false;
// state.getlist()
// });
// }
// else {
// insertTeacher(objform).then(response => {
// console.log('1')
// state.$modal.msgSuccess("新增成功");
// state.teacherdialog = false;
// getTableDate()
// })
// }
// }
// })
if (state.formParam.userNo != undefined) {
updateInTeacherCourse (state.formParam).then(response => {
message.success("修改成功");
});
}
else {
insertOutTeaherCourse(state.formParam)
.then((res) => {
message.success("保存成功");
}).catch((err) => {
console.log(err);
});
}
getTableDate();
state.teacherdialog = false
}
//删除弹窗
@@ -611,20 +582,30 @@ export default {
state.teacherdialog = true;
state.teacherdialogtitle = '查看详情'
state.userNoid = record.userNo
state.lookTeacherId = record.
// alert(record.grade)
TeacherSystem()
state.lookTeacherId = record.id
TeacherSystem(record)
// let id = record.userNo
// router.push({ path: '/lecturer/ExternalTeachingDetail/', query: { id } })
// router.push({ path: '/ExternalTeachingDetail' })
}
//外部授课详情
const TeacherSystem = () => {
getOuterTeacherCourseDetail(state.lookTeacherId).then((res) => {
state.formParam = res.data.data
})
.catch((err) => {
});
const TeacherSystem = (record) => {
state.formParam={
teacher:record.teacher,
mobile:record.mobile,
name:record.name,
beginTime:record.beginTime || '2024-06-11',
type:record.type,
duration:record.duration,
defaultTeachingTime:record.defaultTeachingTime,
score:record.score,
remark:record.remark
}
// getOuterTeacherCourseDetail(state.lookTeacherId).then((res) => {
// state.formParam = res.data.data
// })
// .catch((err) => {
// });
}
//导出功能
const handleExport = () => {

View File

@@ -253,7 +253,7 @@
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">教师专长 :</span>
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.TeacherExpertise"
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.TeacherExpertise" defaultActiveFirstOption
:options="TeacherExpertiseList" @change=changeSelect >
</a-select>
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.getTeacherExpertiseByPid"

View File

@@ -373,8 +373,8 @@ import { useRouter } from "vue-router";
import Editor from "@/components/project/Editor";
import Upload from "@/components/project/Upload";
import { message } from "ant-design-vue";
import {getTeacherSystemList ,infoteacher, getTeacherExpertise,insertInTeacherCourse,deleteInTeacherCourse,updateInTeacher, } from "../../api/Lecturer";
import {getNewInTeacherCourseList,getOrganization,getTeacherCourseList} from "../../api/Teaching";
import {getTeacherSystemList ,infoteacher, getTeacherExpertise,deleteInTeacherCourse} from "../../api/Lecturer";
import {getNewInTeacherCourseList,getOrganization,getTeacherCourseList,insertInTeacherCourse,updateInTeacherCourse} from "../../api/Teaching";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
name: "InsideTeaching",
@@ -717,7 +717,7 @@ export default {
//保存
const createTeacherDialog =()=>{
if (state.formParam.userNo != undefined) {
updateInTeacher (state.formParam).then(response => {
updateInTeacherCourse (state.formParam).then(response => {
message.success("修改成功");
});
}