授课记录接口联调

This commit is contained in:
wangxuemei
2024-06-07 18:31:17 +08:00
parent 61e782e2c6
commit 03a56bbfd7
7 changed files with 718 additions and 876 deletions

View File

@@ -36,7 +36,7 @@ export const exportteacher = (obj) => http.post('/admin/lesson_records/export' ,
// 所有教师专长
export const getTeacherExpertise = (obj) => http.post('/admin/teacher/getTeacherExpertise' ,obj)
//根据父级教师专长(pid)查找子级教师专长
export const getTeacherExpertiseByPid = (obj) => http.post('/admin/teacher/getTeacherExpertiseByPid' ,obj)
export const getTeacherExpertiseByPid = (obj) => http.post(`/admin/teacher/deleteInTeacher?id=${obj}`)
// 新增页面内部姓名
export const infoteacher = (obj) => http.get('/admin/thirdApi/org/info' ,{params: obj})
//外部讲师列表

View File

@@ -2,7 +2,8 @@ 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?=${obj}`)
// export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList', obj)
//授课记录导出
export const getexport = (obj) => http.post('/lesson_records/export', obj)
//授课记录导入
@@ -10,4 +11,12 @@ export const importTeacherCourseRecord = (obj) => http.post('/importTeacherCours
//外部讲师授课记录
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)
//获取所属组织
export const getOrganization = (obj) => http.post('/admin/teacher/getOrganization', obj)
export const getOrganization = (obj) => http.post('/admin/teacher/getOrganization', obj)
//获取开课场地
export const getAddress = (obj) => http.post('/admin/teacher/getAddress', obj)
//获取外部授课记录详情
export const getOuterTeacherCourseDetail = (obj) => http.post(`/admin/teacher/getOuterTeacherCourseDetail?id=${obj}`)
//删除讲师授课记录
export const deleteInTeacherCourse= (obj) => http.post(`/admin/teacher/deleteInTeacherCourse?offcourseId=${obj}`)
//新增内部授课记录
export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/insertInTeacherCourse', obj)

View File

@@ -2,13 +2,13 @@
<template>
<div class="ExternalLecturer">
<div>
</div>
</div>
<!-- 搜索框及按钮 -->
<div class="filter">
<div class="filterItems">
<div class="filterItems">
<div class="select">
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.name " style="width: 230px; height: 40px; border-radius: 8px"
<a-input v-model:value="searchParam.name" style="width: 230px; height: 40px; border-radius: 8px"
placeholder="请输入讲师姓名检索" allowClear showSearch>
</a-input>
</div>
@@ -30,7 +30,7 @@
</div>
<div style="width: 100%; height: ;"></div>
<div class="btns">
<div class="btn btn3" @click="addTeacher">
<div class="btn btn3" @click="addTeacher">
<div class="search"></div>
<div class="btnText">新增讲师</div>
</div>
@@ -50,8 +50,10 @@
<a-space style="display:flex ;justify-content: space-around; ">
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button v-if="record.status== '1'" type="link" @click="() => handleOperate(record, String(record.courseform))">停用</a-button>
<a-button v-if="record.status== '2'" type="link" @click="() => handleOperate(record, String(record.courseform))"></a-button>
<a-button v-if="record.status == '1'" type="link"
@click="() => handleOperate(record, String(record.courseform))"></a-button>
<a-button v-if="record.status == '2'" type="link"
@click="() => handleOperate(record, String(record.courseform))">启用</a-button>
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
</a-space>
</template>
@@ -62,127 +64,102 @@
</div>
<div class="tableBox ">
<div style="float: right;">
<a-pagination
v-if="tableDataTotal > 10"
:showSizeChanger="true"
:hideOnSinglePage="true"
:pageSize="pageSize"
v-model:current="searchParam.pageNo"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :hideOnSinglePage="true" :pageSize="pageSize"
v-model:current="searchParam.pageNo" :total="tableDataTotal" class="pagination" @change="changePagination" />
</div>
</div>
<!-- 弹窗组件 -->
<a-modal :visible="teacherdialog" :title="teacherdialogtitle" @ok="closeModal2" :footer="null" :closable="false"
wrapClassName="doublepro" width="774px" height="476px">
<div style="cursor: pointer; margin-right: 32px;float: right; margin-top: -40px;" @click="cancelTeacherDialog">
<img
style="width: 22px; height: 22px"
src="../../assets/images/basicinfo/close22.png"
/>
</div>
<div style="padding-bottom: 15px;" >
<div class="headerLeft" style="margin-left: 33px" >
<a-button @click ="particulars">个人详情</a-button>
<a-button @click ="teacherrecords" v-if="teacherdialog1 == 1" >授课记录</a-button>
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png" />
</div>
<div style="padding-bottom: 15px;">
<div class="headerLeft" style="margin-left: 33px">
<a-button @click="particulars">个人详情</a-button>
<a-button @click="teacherrecords" v-if="teacherdialog1 == 1">授课记录</a-button>
</div>
<!-- 个人详情 -->
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;" v-show="tagsshow==1">
<div class="ExternalLecturer">
<div class="filter">
<div class="filterItems">
<!-- <div class="select">
<!-- 个人详情 -->
<div style="border: 1px rgb(177, 177, 177) solid; margin-left: 33px; margin-right: 33px; margin-bottom: 33px;"
v-show="tagsshow == 1">
<div class="ExternalLecturer">
<div class="filter">
<div class="filterItems">
<!-- <div class="select">
<span style="display:inline-block ;width:100px ;text-align:center ">头像 :</span>
</div> -->
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
<img
style="width: 5px; height: 5px"
src="../../assets/images/basicinfo/asterisk.png"
/>
</div>
<!-- v-model:value="searchParam.name" -->
<span style="display:inline-block ;width:80px ;text-align:center ">讲师姓名 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.name" style="width:200px; height: 40px; "
placeholder="请输入讲师姓名" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
</div>
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
<img
style="width: 5px; height: 5px"
src="../../assets/images/basicinfo/asterisk.png"
/>
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">手机号码 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.mobile"
style="width:200px; height: 40px; " placeholder="请输入11位手机号码" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.mobile }}</span>
</div>
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
<img
style="width: 5px; height: 5px"
src="../../assets/images/basicinfo/asterisk.png"
/>
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">邮箱:</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.email"
style="width:200px; height: 40px;" placeholder="" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.email }}</span>
</div>
<div class="select">
<!-- <Editor/> -->
<div class="select">
<span style="display:inline-block ;width:80px ; text-align:center ">讲师介绍 :</span>
<div style="display:inline-block ;width:5px ;text-align:center ">
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
</div>
<!-- v-model:value="searchParam.name" -->
<span style="display:inline-block ;width:80px ;text-align:center ">讲师姓名 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.name" style="width:200px; height: 40px; "
placeholder="请输入讲师姓名" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
</div>
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">手机号码 :</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.mobile" style="width:200px; height: 40px; "
placeholder="请输入11位手机号码" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.mobile }}</span>
</div>
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
<img style="width: 5px; height: 5px" src="../../assets/images/basicinfo/asterisk.png" />
</div>
<span style="display:inline-block ;width:80px ;text-align:center ">邮箱:</span>
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.email" style="width:200px; height: 40px;"
placeholder="" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.email }}</span>
</div>
<div class="select">
<!-- <Editor/> -->
<div class="select">
<span style="display:inline-block ;width:80px ; text-align:center ">讲师介绍 :</span>
</div>
<Editor v-if="teacherdialog1 == 0" v-model="formParam.description"
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description
}}</span>
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">备注 :</span>
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.remark"
style="width:500px; height: 80px; ">
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.remark }}</span>
</div>
<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">保存
</a-button>
</div>
<Editor v-if="teacherdialog1 == 0" v-model="formParam.description"
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description }}</span>
</div>
<div class="select">
<span style="display:inline-block ;width:80px ;text-align:center ">备注 :</span>
<a-input type="textarea" v-if="teacherdialog1 == 0" v-model:value="formParam.remark"
style="width:500px; height: 80px; ">
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.remark }}</span>
</div>
<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">保存
</a-button>
</div>
</div>
</div>
</div>
</div>
<!-- 授课记录 -->
<div class="ExternalLecturer" v-show="tagsshow==2" style="margin">
<!-- 授课记录 -->
<div class="ExternalLecturer" v-show="tagsshow == 2" style="margin">
<div style="padding: 33px">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="teacherrecordsColumns"
:data-source="teacherrecordstableData" :loading="teacherrecordsLoading" @expand="expandTable" :pagination="false">
<template #bodyCell="{ record, column }" >
</template>
</a-table>
</div>
<a-pagination
v-if="teacherrecordstableDataTotal > 10"
:showSizeChanger="true"
:hideOnSinglePage="true"
:pageSize="pageSize"
v-model:current="searchParam.pageNo"
:total="teacherrecordstableDataTotal"
class="pagination"
@change="teacherchangePagination"
/>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe"
:columns="teacherrecordsColumns" :data-source="teacherrecordstableData" :loading="teacherrecordsLoading"
@expand="expandTable" :pagination="false">
<template #bodyCell="{ record, column }">
</template>
</a-table>
</div>
<a-pagination v-if="teacherrecordstableDataTotal > 10" :showSizeChanger="true" :hideOnSinglePage="true"
:pageSize="pageSize" v-model:current="searchParam.pageNo" :total="teacherrecordstableDataTotal"
class="pagination" @change="teacherchangePagination" />
</div>
</div>
</a-modal>
<!-- 删除功能弹窗 -->
@@ -203,8 +180,7 @@
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2"
@click="closeDeleteTeacher">
<div class="del_btn btn2" @click="closeDeleteTeacher">
<div class="btnText">确定</div>
</div>
</div>
@@ -212,10 +188,9 @@
</div>
</a-modal>
</div>
<!-- 修改状态功能弹窗 -->
<div>
<a-modal v-model:visible="editTeacher" :footer="null" :closable="close" wrapClassName="canclestu1"
centered="true">
<!-- 修改状态功能弹窗 -->
<div>
<a-modal v-model:visible="editTeacher" :footer="null" :closable="close" wrapClassName="canclestu1" centered="true">
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
@@ -224,8 +199,8 @@
<span>提示</span>
</div>
<div class="body">
<span v-if="handleOperate1== 2">您确定要启用此讲师状态吗</span>
<span v-if="handleOperate1== 1" >您确定要停用此讲师状态吗</span>
<span v-if="handleOperate1 == 2">您确定要启用此讲师状态吗</span>
<span v-if="handleOperate1 == 1">您确定要停用此讲师状态吗</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn2" @click="cancelTeacherDialog" style="margin-right: 32px">
@@ -246,10 +221,10 @@
import { reactive, toRefs, ref } from "vue";
import Editor from "@/components/project/Editor";
import { message } from "ant-design-vue";
import {getOutTeacherList ,getOuterTeacherById ,getOuterTeacherCourseList,deleteInTeacher,updateInTeacher, updateTeacherState,insertTeacherOutSide,updateOutTeacher} from "../../api/Lecturer";
import { getOutTeacherList, getOuterTeacherById, getOuterTeacherCourseList, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
export default {
name: "ExternalLecturer",
components: {
// AddTeacher,
@@ -259,40 +234,40 @@ export default {
const state = reactive({
currentPage1: 1,
pageSize1: 10,
promotionrecordsLoading:false , //晋级记录遮罩层
tableLoading:false,
tagsshow:"1",
delTeacherId:null, //删除id确认
editTeacherid:null,//修改状态id确认
userNoid:null, //讲师详情工号确认
lookTeacherId:null, //讲师详情id确认
newStatus:null , //修改状态码确认
promotionrecordsLoading: false, //晋级记录遮罩层
tableLoading: false,
tagsshow: "1",
delTeacherId: null, //删除id确认
editTeacherid: null,//修改状态id确认
userNoid: null, //讲师详情工号确认
lookTeacherId: null, //讲师详情id确认
newStatus: null, //修改状态码确认
deleteTeacherdialog: false, //删除弹窗
editTeacher:false , //修改状态弹窗
handleOperate1:null, //修改状态弹窗内容
editTeacher: false, //修改状态弹窗
handleOperate1: null, //修改状态弹窗内容
teacherdialog1: null,
teacherdialog: false, //控制讲师弹窗
teacherdialogtitle: '',//讲师弹框title内容
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
pageSize: 10,
tableDataTotal: -1,//table列表总条数
teacherrecordstableDataTotal:-1,//授课记录列表总条数
teacherrecordstableDataTotal: -1,//授课记录列表总条数
formParam: {
},
searchParam: {
name:null,//姓名
status:null,//状态
name: null,//姓名
status: null,//状态
pageNo: "1",
pageSize: "10"
},
activeName:'first'
activeName: 'first'
})
const AccountStatusList = ref([
{ value: 0, label: "启用" },
{ value: 1, label: "停用" },
])
const columns = ref([
{
{
title: '讲师编号 ',
dataIndex: 'userNo',
key: 'userNo',
@@ -307,7 +282,7 @@ export default {
width: 200,
},
{
title: '手机号 ',
title: '手机号 ',
dataIndex: 'mobile',
key: 'mobile',
elipsis: true,
@@ -343,15 +318,15 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.status == 0 || value.record.status == 1|| value.record.status == 2
{value.record.status == 0 || value.record.status == 1 || value.record.status == 2
? {
'0': "临时",
'1': "启用",
'2': "停用"
}[value.record.status + ""] || ""
}[value.record.status + ""] || ""
: "-"}
</div>
)
)
}
},
{
@@ -374,24 +349,25 @@ export default {
//重置
const searchReset = () => {
state.searchParam = {
pageNo: 1,
pageSize: 10 ,
name:null,
status:null};
pageNo: 1,
pageSize: 10,
name: null,
status: null
};
getTableDate();
};
// List接口数据
const getTableDate = (obj) => {
state.tableLoading=true
const getTableDate = (obj) => {
state.tableLoading = true
state.loading = true;
let objA = {...state.searchParam};
let objA = { ...state.searchParam };
getOutTeacherList(objA)
.then((res) => {
tableData.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total);
state.tableLoading=false
state.tableLoading = false
// console.log("获取讲师tableDatateacherName", tableData);
})
})
};
getTableDate()
// // List接口数据
@@ -437,105 +413,91 @@ export default {
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '修改信息'
state.lookTeacherId= record.id
state.lookTeacherId = record.id
TeacherSystem()
}
//保存
const createTeacherDialog = () => {
console.log(state.formParam);
// if (state.formParam.id != undefined) {
updateOutTeacher (state.formParam).then(response => {
message.success("修改成功");
});
// }
// let objA = {...state.formParam};
// state.formParam ={
// name:'新增测试',
// userNo:'12315',
// departId:'8465784657',
// defaultTeachingTime:50,
// leveId:1,
// tsystemName:249,
// certStatus:1,
// description:'测试13.00',
// workExperience:'测试13.00',
// courses:'测试13.00',
// }
// else {
// insertTeacherOutSide(state.formParam)
// .then((res) => {
// message.success("保存成功");
// }).catch((err) => {
// console.log(err);
// });
// }
state.teacherdialog = false;
if (state.formParam.id != undefined) {
updateOutTeacher(state.formParam).then(response => {
message.success("修改成功");
});
}
else {
insertTeacher(state.formParam)
.then((res) => {
message.success("保存成功");
}).catch((err) => {
console.log(err);
});
}
state.teacherdialog = false;
getTableDate();
};
//删除弹窗
const deleteModal = (record) => {
state.deleteTeacherdialog = true
state.delTeacherId = record.id
state.delTeacherId = record.id
};
//修改状态窗口
const handleOperate = (record) => {
if( record.status == 1){
if (record.status == 1) {
state.handleOperate1 = record.status
state.newStatus= 2
}
if( record.status == 2){
state.handleOperate1 =record.status
state.newStatus= 1
}
state.editTeacherid =record.id
state.newStatus = 2
}
if (record.status == 2) {
state.handleOperate1 = record.status
state.newStatus = 1
}
state.editTeacherid = record.id
state.editTeacher = true
};
//确认删除
const closeDeleteTeacher=()=>{
//确认删除
const closeDeleteTeacher = () => {
//调用删除接口
deleteInTeacher(state.delTeacherId).then((res)=>{
if(res.data.code == 200 ){
deleteInTeacher(state.delTeacherId).then((res) => {
if (res.data.code == 200) {
// message.success("删除成功");
state.deleteTeacherdialog = false
getTableDate();
}
})
}
}
//确认启用停用
const closehandleOperate= ()=>{
//调用接口
let ids ={
id : state.editTeacherid,
newStatus: state.newStatus
const closehandleOperate = () => {
//调用接口
let ids = {
id: state.editTeacherid,
newStatus: state.newStatus
}
console.log(ids)
updateTeacherState(ids).then((res) => {
// message.success("操作成功");
state.editTeacher = false
getTableDate();
})
// message.success("操作成功");
state.editTeacher = false
getTableDate();
})
}
//取消按钮 清空输入的数据
const cancelTeacherDialog = () => {
if(state.teacherdialog = true )
{
state.teacherdialog = false
cancel()
}
state.deleteTeacherdialog = false
state.editTeacher = false
state.tagsshow= 1
if (state.teacherdialog = true) {
state.teacherdialog = false
cancel()
}
state.deleteTeacherdialog = false
state.editTeacher = false
state.tagsshow = 1
};
//清空数据
const cancel = () => {
state.formParam= {
name :null ,
mobile:null ,
email:null,
teacherIntrofuce:null ,
remark:null
state.formParam = {
name: null,
mobile: null,
email: null,
teacherIntrofuce: null,
remark: null
}
console.log(state.formParam);
}
@@ -544,34 +506,34 @@ export default {
state.teacherdialog1 = 1
state.teacherdialog = true;
state.teacherdialogtitle = '查看详情'
state.userNoid= record.userNo
state.lookTeacherId= record.id
state.userNoid = record.userNo
state.lookTeacherId = record.id
// alert(record.grade)
TeacherSystem()
}
//外部讲师详情
const TeacherSystem=()=>{
const TeacherSystem = () => {
getOuterTeacherById(state.lookTeacherId).then((res) => {
console.log("外部讲师详情", res.data);
state.formParam= res.data.data
})
.catch((err) => {
console.log("外部讲师详情", res.data);
state.formParam = res.data.data
})
.catch((err) => {
console.log("外部讲师详情", err);
});
}
// tab 标签切换
const particulars=()=>{
state.tagsshow= 1
const particulars = () => {
state.tagsshow = 1
}
const teacherrecords=()=>{
state.tagsshow= 2
getteacherrecordstableData ()
const teacherrecords = () => {
state.tagsshow = 2
getteacherrecordstableData()
}
const promotionrecords=()=>{
state.tagsshow= 3
const promotionrecords = () => {
state.tagsshow = 3
}
//授课记录列表
const teacherrecordsColumns = ref ([
const teacherrecordsColumns = ref([
{
title: '课程编号',
dataIndex: 'id',
@@ -609,7 +571,7 @@ export default {
customRender: (value) => {
return (
<div>
{value.record.type == 1 || value.record.type == 2||value.record.type == 3
{value.record.type == 1 || value.record.type == 2 || value.record.type == 3
? {
"1": "项目开课",
"2": "路径开课",
@@ -661,37 +623,38 @@ export default {
}
}
])
//授课记录列表数据
const teacherrecordstableData = ref([
//授课记录列表数据
const teacherrecordstableData = ref([
])
const getteacherrecordstableData = () => {
state.teacherrecordsLoading=true
state.teacherrecordsLoading = true
state.loading = true;
// let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
let ids=
{id: "965341999643234304",
pageNo: "1",
pageSize: "10"}
// let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
let ids =
{
id: "965341999643234304",
pageNo: "1",
pageSize: "10"
}
// api接口
getOuterTeacherCourseList(ids).then((res) => {
getOuterTeacherCourseList(ids).then((res) => {
teacherrecordstableData.value = res.data.data
state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading=false
})
state.teacherrecordsLoading = false
})
};
// getpromotionrecordstableData()
//导出功能
const handleExport = ()=>{
const handleExport = () => {
window.open(
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${
state.currentPage1
}&pageSize=${state.pageSize1}&name=${state.searchParam.name ? state.searchParam.name : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}`
);
// this.download('lesson_records/export', {
// ...state.searchParam
// }, `project_${new Date().getTime()}.xlsx` )
}
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.currentPage1
}&pageSize=${state.pageSize1}&name=${state.searchParam.name ? state.searchParam.name : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}`
);
// this.download('lesson_records/export', {
// ...state.searchParam
// }, `project_${new Date().getTime()}.xlsx` )
}
return {
...toRefs(state),
handleExport,
@@ -711,14 +674,14 @@ export default {
createTeacherDialog,
handleOperate,
closehandleOperate,
getTableDate, //list接口数据调用
getTableDate, //list接口数据调用
TeacherSystem,
particulars,
teacherrecords,
promotionrecords,
teacherrecordstableData,
teacherrecordsColumns,
getteacherrecordstableData ,
getteacherrecordstableData,
teacherchangePagination,
// getpromotionrecordstableData
@@ -729,11 +692,11 @@ export default {
<style lang="scss">
//导出按钮icon
.daochu {
width: 16px;
height: 18px;
background-image: url("../../assets/images/coursewareManage/export1.png");
}
width: 16px;
height: 18px;
background-image: url("../../assets/images/coursewareManage/export1.png");
}
//弹窗内详情样式
.display1 {
display: inline-block;

File diff suppressed because it is too large Load Diff

View File

@@ -197,7 +197,7 @@
<a-radio :value="0">未认证</a-radio>
<a-radio :value="1">已认证</a-radio>
</a-radio-group>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.certStatus }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.certStatus==0 ? '未认证':formParam.certStatus==1?'已认证' :'' }}</span>
</div>
<div class="select">
<div style="display:inline-block ;width:5px ;text-align:center ">
@@ -254,10 +254,10 @@
<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"
:options="TeacherExpertiseList.map(pro => ({value:pro }))">
:options="TeacherExpertiseList" @change=changeSelect >
</a-select>
<a-select v-if="teacherdialog1 == 0" style="width: 230px" placeholder="" v-model:value="formParam.getTeacherExpertiseByPid"
:options="getTeacherExpertiseByPidList.map(pid=>({value:pid})) ">
:options="getTeacherExpertiseByPidList">
</a-select>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.expertise }}</span>
</div>
@@ -397,6 +397,7 @@ export default {
},
setup() {
const state = reactive({
byPid:null,
currentPage1: 1,
pageSize1: 10,
promotionrecordsLoading:false , //晋级记录遮罩层
@@ -535,57 +536,53 @@ export default {
//获取讲师父 专长
const TeacherExpertiseList = ref([
{ value: 0, systemName: "讲师体系" },
{ value: 1, systemName: "讲师体系1" },
]);
const getTeacherExpertisea =() => {
// // console.log('点击了LecturerSystemLista')
// getTeacherExpertise().then((res)=>{
// if (res.data.code === 200) {
// let arr = res.data.data;
// let array = TeacherExpertiseList.value;
// arr.map((value) => {
// let obj = {
// value: value.id,
// label: value.name,
// };
// array.push(obj);
// });
// TeacherExpertiseList.value = array;
// }
// })
// getTeacherExpertiseByPida()
// console.log('点击了LecturerSystemLista')
getTeacherExpertise().then((res)=>{
if (res.data.code === 200) {
let arr = res.data.data;
let array = TeacherExpertiseList.value;
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
TeacherExpertiseList.value = array;
}
})
// getTeacherExpertiseByPida()
}
const changeSelect=(val)=>{
state.byPid= val
getTeacherExpertiseByPida(val)
state.formParam.expertise = getTeacherExpertiseByPidList[0]
}
//获取讲师子 专长
const getTeacherExpertiseByPidList = ref([
[ { value: 0, systemName: "讲师体系1" },
{ value: 1, systemName: "讲师体系" },],
[ [ { value: 0, systemName: "讲师1" },
{ value: 1, systemName: "讲师" },],]
]);
const getTeacherExpertiseByPida =() => {
// let pid = {id :29}
// // console.log('点击了LecturerSystemLista')
// getTeacherExpertiseByPid(pid).then((res)=>{
// if (res.data.code === 200) {
// let arr = res.data.data;
// let array = getTeacherExpertiseByPidList.value;
// arr.map((value) => {
// let obj = {
// value: value.id,
// label: value.name,
// };
// array.push(obj);
// });
// getTeacherExpertiseByPidList.value = array;
// }
// })
// let pid = {id :val}
// console.log('点击了LecturerSystemLista')
let id = val
getTeacherExpertiseByPid (state.byPid).then((res)=>{
if (res.data.code === 200) {
let arr = res.data.data;
let array = getTeacherExpertiseByPidList.value;
arr.map((value) => {
let obj = {
value: value.id,
label: value.name,
};
array.push(obj);
});
getTeacherExpertiseByPidList.value = array;
}
})
}
watch(
()=>state.formParam.TeacherExpertise,
val => {
state.formParam.getTeacherExpertiseByPid = state.getTeacherExpertiseByPidList[val][0];
},
)
//新增页面内部姓名
const infoteacherList = ref([
@@ -757,7 +754,14 @@ export default {
// getLevelLista()
// LecturerSystemLista()
// PlaceOfPayLista()
getTableDate();
// getTableDate();
// let obj ={
// id:0
// name :'修改测试'
// }
// updatelnTeacher().then((res)=>{
// message.success('修改成功')
// })
};
//重置
const searchReset = () => {
@@ -1188,6 +1192,7 @@ export default {
}
return {
...toRefs(state),
changeSelect,
handleExport,
LecturerSystemList,
getLevelList,

View File

@@ -140,10 +140,10 @@
</div>
<!-- v-model:value="searchParam.name" -->
<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; "
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.teacher" style="width:200px; height: 40px; "
placeholder="请输入讲师姓名" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.teacher }}</span>
</div>
<!-- 讲师工号 -->
<div class="select">
@@ -210,9 +210,11 @@
/>
</div>
<span style="display:inline-block ;width:125px ;text-align:center ">课程名称 :</span>
<a-select style="width: 200px" placeholder="填写或选择授课记录"
<a-select style="width: 200px"
v-if="teacherdialog1 == 0"
placeholder="填写或选择授课记录"
showSearch
v-model:value="formParam.tsystemName"
v-model:value="formParam.name"
:options="LecturerSystemList">
</a-select>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.defaultTeachingTime }}</span>
@@ -259,19 +261,19 @@
</div>
<!-- v-model:value="searchParam.name" -->
<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; "
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.duration" style="width:200px; height: 40px; "
placeholder="小时 " allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.duration }}</span>
</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.name" style="width:200px; height: 40px; "
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.studys" style="width:200px; height: 40px; "
placeholder="0 " allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.studys }}</span>
</div>
<!-- 评分 -->
<div class="select">
@@ -283,10 +285,10 @@
</div>
<!-- v-model:value="searchParam.name" -->
<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; "
<a-input v-if="teacherdialog1 == 0" v-model:value="formParam.score" style="width:200px; height: 40px; "
placeholder="" allowClear showSearch>
</a-input>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.name }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.score }}</span>
</div>
<!-- 内容分类 -->
<div class="select">
@@ -298,7 +300,7 @@
</div>
<span style="display:inline-block ;width:115px ;text-align:center ">内容分类 :</span>
<a-select style="width: 200px" v-if="teacherdialog1 == 0" v-model:value="formParam.tsystemName"
showSearch :option="LecturerSystemList" placeholder=" " >
showSearch :option="getTeacherExpertiseList" placeholder=" " >
</a-select>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.defaultTeachingTime }}</span>
</div>
@@ -311,10 +313,10 @@
/>
</div>
<span style="display:inline-block ;width:115px ;text-align:center ">授课类型 :</span>
<a-select style="width: 200px" v-if="teacherdialog1 == 0" v-model:value="formParam.tsystemName"
showSearch :option="LecturerSystemList" placeholder="选择授课记录 " >
<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.defaultTeachingTime }}</span>
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.type }}</span>
</div>
<!-- 备注 -->
<div style="width: 834px;height: 1px;"></div>
@@ -370,8 +372,9 @@ import { reactive, toRefs, ref } from "vue";
import { useRouter } from "vue-router";
import Editor from "@/components/project/Editor";
import Upload from "@/components/project/Upload";
import {getTeacherSystemList ,infoteacher, getTeacherExpertise,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, } from "../../api/Lecturer";
import {getNewInTeacherCourseList,getOrganization} from "../../api/Teaching";
import { message } from "ant-design-vue";
import {getTeacherSystemList ,infoteacher, getTeacherExpertise,insertInTeacherCourse,deleteInTeacherCourse,updateInTeacher, } from "../../api/Lecturer";
import {getNewInTeacherCourseList,getOrganization,getTeacherCourseList} from "../../api/Teaching";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
name: "InsideTeaching",
@@ -383,6 +386,8 @@ export default {
setup() {
const router = useRouter();
const state = reactive({
currentPage1: 1,
pageSize1: 10,
tableLoading:false,
delTeacherId:null, //删除id确认
userNoid:null, //详情工号确认
@@ -506,8 +511,8 @@ export default {
},
{
title: '所属组织 ',
dataIndex: 'departId',
key: 'departId',
dataIndex: 'orgName',
key: 'orgName',
elipsis: true,
width: 400,
// customRender: (value, record) => {
@@ -589,18 +594,18 @@ export default {
},
{
title: '开课状态 ',
dataIndex: 'certStatus',
key: 'certStatus',
dataIndex: 'status',
key: 'status',
elipsis: true,
width: 120,
customRender: (value) => {
return (
<div>
{value.record.certStatus == 0 || value.record.certStatus == 1
{value.record.status == 0 || value.record.status == 1
? {
"0": "未开课",
"1": "已开课",
}[value.record.certStatus + ""] || ""
}[value.record.status + ""] || ""
: "-"}
</div>
)
@@ -685,8 +690,10 @@ export default {
// 获取项目列表信息
//let tableData = ref([]);
// // 翻页
const changePagination = (page) => {
const changePagination = (page,pageSize) => {
state.searchParam.pageNo = page;
state.currentPage1 = page;
state.pageSize1 = pageSize;
getTableDate();
};
// 新增讲师
@@ -700,7 +707,7 @@ export default {
getTeacherExpertisea()
}
//修改讲师信息弹窗
//修改信息弹窗
const handleModify = (record) => {
state.teacherdialog1 = 0
state.teacherdialog = true;
@@ -709,45 +716,35 @@ export default {
}
//保存
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) {
updateInTeacher (state.formParam).then(response => {
message.success("修改成功");
});
}
else {
insertInTeacherCourse(state.formParam)
.then((res) => {
message.success("保存成功");
}).catch((err) => {
console.log(err);
});
}
getTableDate();
state.teacherdialog = false
}
//删除弹窗
const deleteModal = (record) => {
state.deleteTeacherdialog = true
state.delTeacherId = record.id
state.delTeacherId = record.offcourseId
};
//确认删除
const closeDeleteTeacher=()=>{
let ids ={
id : state.delTeacherId
}
console.log(ids)
//调用删除接口
deleteTeacher(ids).then((res)=>{
deleteInTeacherCourse(state.delTeacherId).then((res)=>{
if(res.data.code == 200 ){
// message.success("删除成功");
message.success("删除成功");
state.deleteTeacherdialog = false
getTableDate();
}
@@ -767,16 +764,18 @@ export default {
//清空数据
const cancel = () => {
state.formParam ={
name:null,
teacher:null,
userNo:null,
departId:null,
defaultTeachingTime:null,
tlevelName:null,
tsystemName:null,
certStatus:1,
teacherIntrofuce:null,
workHistory:null,
proficientInCourse:null,
name:null,
beginTime:null,
duration:null,
studys:null,
score:null,
type:null,
remark:null,
}
}
@@ -793,21 +792,20 @@ export default {
//表格内查看数据操作
const handleLook = (record) => {
// state.teacherdialog1 = 1
// state.teacherdialog = true;
// state.teacherdialogtitle = '查看详情'
// state.userNoid= record.userNo
// state.lookTeacherId= record.id
state.teacherdialog1 = 1
state.teacherdialog = true;
state.teacherdialogtitle = '查看详情'
state.userNoid= record.userNo
state.lookTeacherId= record.teacherId
// // alert(record.grade)
// // TeacherSystem()
let id = record.userNo
router.push({ path: '/insideteachingdetail', query: { id } })
TeacherSystem()
// let id = record.userNo
// router.push({ path: '/insideteachingdetail', query: { id } })
// router.push({ path: '/InsideTeachingDetail' })
}
//内部讲师详情
const TeacherSystem=()=>{
let ids={userNo : state.userNoid }
getTeacherById(ids).then((res) => {
getTeacherCourseList( state.lookTeacherId).then((res) => {
console.log("内部讲师详情", res.data);
state.formParam= res.data.data
})
@@ -816,16 +814,24 @@ export default {
});
}
//导出功能
// const handleExport = ()=>{
// this.download('lesson_records/export', {
// ...state.searchParam
// }, `project_${new Date().getTime()}.xlsx` )
// }
const handleExport = ()=> {
window.open(
`${process.env.VUE_APP_BASE_API}/lesson_records/export?pageNo=${ state.currentPage1
}&pageSize=${state.pageSize1}
&userNo=${state.searchParam.userNo ? state.searchParam.userNo : "" }
&teacherNo=${ state.searchParam.teacherNo ? state.searchParam.teacherNo : ""}
&departId=${state.searchParam.departId ? state.searchParam.departId : ""}
&systemId=${ state.searchParam.systemId ? state.searchParam.systemId : ""}
&beginTime=${ state.searchParam.beginTime ? state.searchParam.beginTime : "" }
&tlevelName=${state.searchParam.tlevelName ? state.searchParam.tlevelName : ""}
&type=${state.searchParam.type ? state.searchParam.type : ""}
&status=${state.searchParam.status ? state.searchParam.status : ""}`)
}
return {
...toRefs(state),
infoteacherList,
getinfoteacher,
// handleExport,
handleExport,
LecturerSystemList,
getTeacherExpertiseList,
OnTheJobStatusList,

View File

@@ -1,6 +1,7 @@
<!-- 内部授课详情页面 -->
<template>
<div class="InsideTeachingDetail">
<p>ID: {{ $route.query.id }}</p>
<div style="width:100px ; color:black ;margin: 10px ;" @click="handleBack">
返回上一层
</div>
@@ -135,10 +136,10 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref } from "vue";
import { reactive, toRefs, ref ,watch,route } from "vue";
import { useRouter } from "vue-router";
import Editor from "@/components/project/Editor";
import Upload from "@/components/project/Upload";
// import Editor from "@/components/project/Editor";
// import Upload from "@/components/project/Upload";
import {infoteacher,getLevel,deleteTeacher, } from "../../api/Lecturer";
import { getNewInTeacherCourseList} from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu";
@@ -146,13 +147,11 @@ import { getNewInTeacherCourseList} from "../../api/Teaching";
export default {
name: "InsideTeachingDetail",
components: {
// AddTeacher,
Editor,
Upload
},
setup() {
const router = useRouter();
const state = reactive({
id:null, //路径id
tableLoading:false,
delTeacherId:null, //删除id确认
deleteTeacherdialog: false, //删除弹窗
@@ -172,6 +171,14 @@ export default {
pageSize: "10"
},
})
watch(
// console.log($route.query.id)
// '$route.query.id': function(to, from) {
// // 当 id 参数变化时,这里会执行
// state.id = to;
// }
)
//获取内部讲师级别
const getLevelList = ref([
// { value: 0, label: "未定级" },