mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
讲师管理接口联调
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
import http from "./config";
|
||||
//外部讲师列表
|
||||
export const getOutTeacherList = (obj) => http.post('/admin/teacher/getOutTeacherList', obj)
|
||||
//外部讲师详情
|
||||
export const getOuterTeacherById = (obj) => http.post('/admin/teacher/getOuterTeacherById', obj)
|
||||
//外部讲师授课记录
|
||||
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)
|
||||
@@ -17,13 +17,13 @@ export const getTeacherPayRollPriceList = (obj) => http.post('/admin/teacher/get
|
||||
//获取内部讲师级别
|
||||
export const getLevel = (obj) => http.post('/admin/teacher/getLevel', obj)
|
||||
//新增内部讲师
|
||||
export const insertTeacher = () => http.post('/admin/teacher/insertInTeacher' ,obj)
|
||||
export const insertTeacher = (obj) => http.post('/admin/teacher/insertInTeacher' ,obj)
|
||||
//修改 内部讲师
|
||||
export const updateInTeacher = () => http.post('/admin/teacher/updateInTeacher' ,obj)
|
||||
export const updateInTeacher = (obj) => http.post('/admin/teacher/updateInTeacher' ,obj)
|
||||
//内部讲师详情
|
||||
export const getTeacherById= (obj) => http.post('/admin/teacher/getTeacherById' ,obj)
|
||||
export const getTeacherById= (obj) => http.post(`/admin/teacher/getTeacherById?userNo=${obj}`)
|
||||
//删除内部讲师
|
||||
export const deleteTeacher = (obj) => http.post('/admin/teacher/deleteInTeacher' ,obj)//
|
||||
export const deleteInTeacher= (obj) => http.post(`/admin/teacher/deleteInTeacher?id=${obj}`)
|
||||
//修改内部讲师状态
|
||||
export const updateTeacherState = (obj) => http.post('/admin/teacher/update-status' ,obj)
|
||||
//获取内部讲师授课记录
|
||||
@@ -38,8 +38,13 @@ export const getTeacherExpertise = (obj) => http.post('/admin/teacher/getTeacher
|
||||
//根据父级教师专长(pid)查找子级教师专长
|
||||
export const getTeacherExpertiseByPid = (obj) => http.post('/admin/teacher/getTeacherExpertiseByPid' ,obj)
|
||||
// 新增页面内部姓名
|
||||
export const infoteacher = (obj) => http.get('/admin/thirdApi/org/info' ,obj)
|
||||
export const infoteacher = (obj) => http.get('/admin/thirdApi/org/info' ,{params: obj})
|
||||
//外部讲师列表
|
||||
export const getOutTeacherList = (obj) => http.post('/admin/teacher/getOutTeacherList', obj)
|
||||
//外部讲师详情
|
||||
export const getOuterTeacherById = (obj) => http.post('/admin/teacher/getOuterTeacherById', obj)
|
||||
export const getOuterTeacherById = (obj) => http.post(`/admin/teacher/getOuterTeacherById?id=${obj}`)
|
||||
//新增外部讲师
|
||||
export const insertTeacherOutSide = (obj) => http.post('/admin/teacher/insertTeacherOutSide', obj)
|
||||
//修改外部讲师
|
||||
export const updateOutTeacher = (obj) => http.post('/admin/teacher/updateOutTeacher', obj)
|
||||
|
||||
|
||||
@@ -8,4 +8,6 @@ export const getexport = (obj) => http.post('/lesson_records/export', obj)
|
||||
//授课记录导入
|
||||
export const importTeacherCourseRecord = (obj) => http.post('/importTeacherCourseRecord', obj)
|
||||
//外部讲师授课记录
|
||||
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)
|
||||
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)
|
||||
//获取所属组织
|
||||
export const getOrganization = (obj) => http.post('/admin/teacher/getOrganization', obj)
|
||||
@@ -122,7 +122,7 @@
|
||||
<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.userNo }}</span>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.mobile }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<div style="display:inline-block ;width:5px ;text-align:center ">
|
||||
@@ -135,14 +135,14 @@
|
||||
<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.departId }}</span>
|
||||
<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.teacherIntrofuce"
|
||||
<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>
|
||||
@@ -151,7 +151,7 @@
|
||||
<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.userNo }}</span>
|
||||
<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>
|
||||
@@ -245,7 +245,8 @@
|
||||
<script lang="jsx">
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import Editor from "@/components/project/Editor";
|
||||
import {getOutTeacherList ,getOuterTeacherById ,getOuterTeacherCourseList,deleteTeacher,updateInTeacher, updateTeacherState} from "../../api/Lecturer";
|
||||
import { message } from "ant-design-vue";
|
||||
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 {
|
||||
@@ -256,6 +257,8 @@ export default {
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
promotionrecordsLoading:false , //晋级记录遮罩层
|
||||
tableLoading:false,
|
||||
tagsshow:"1",
|
||||
@@ -263,6 +266,7 @@ export default {
|
||||
editTeacherid:null,//修改状态id确认
|
||||
userNoid:null, //讲师详情工号确认
|
||||
lookTeacherId:null, //讲师详情id确认
|
||||
newStatus:null , //修改状态码确认
|
||||
deleteTeacherdialog: false, //删除弹窗
|
||||
editTeacher:false , //修改状态弹窗
|
||||
handleOperate1:null, //修改状态弹窗内容
|
||||
@@ -414,6 +418,8 @@ export default {
|
||||
// // 翻页
|
||||
const changePagination = (page) => {
|
||||
state.searchParam.pageNo = page;
|
||||
state.currentPage1 = page;
|
||||
state.pageSize1 = pageSize;
|
||||
getTableDate();
|
||||
};
|
||||
const teacherchangePagination = (page) => {
|
||||
@@ -431,33 +437,41 @@ export default {
|
||||
state.teacherdialog1 = 0
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改信息'
|
||||
state.lookTeacherId= record.id
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
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()
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
state.teacherdialog = false
|
||||
}
|
||||
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;
|
||||
getTableDate();
|
||||
};
|
||||
//删除弹窗
|
||||
const deleteModal = (record) => {
|
||||
state.deleteTeacherdialog = true
|
||||
@@ -467,21 +481,20 @@ export default {
|
||||
const handleOperate = (record) => {
|
||||
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.editTeacher = true
|
||||
};
|
||||
//确认删除
|
||||
const closeDeleteTeacher=()=>{
|
||||
let ids ={
|
||||
id : state.delTeacherId
|
||||
}
|
||||
console.log(ids)
|
||||
|
||||
//确认删除
|
||||
const closeDeleteTeacher=()=>{
|
||||
//调用删除接口
|
||||
deleteTeacher(ids).then((res)=>{
|
||||
deleteInTeacher(state.delTeacherId).then((res)=>{
|
||||
if(res.data.code == 200 ){
|
||||
// message.success("删除成功");
|
||||
state.deleteTeacherdialog = false
|
||||
@@ -493,7 +506,8 @@ export default {
|
||||
const closehandleOperate= ()=>{
|
||||
//调用接口
|
||||
let ids ={
|
||||
id : state.editTeacherid
|
||||
id : state.editTeacherid,
|
||||
newStatus: state.newStatus
|
||||
}
|
||||
console.log(ids)
|
||||
updateTeacherState(ids).then((res) => {
|
||||
@@ -537,8 +551,7 @@ export default {
|
||||
}
|
||||
//外部讲师详情
|
||||
const TeacherSystem=()=>{
|
||||
let ids={userNo : state.userNoid }
|
||||
getOuterTeacherById(ids).then((res) => {
|
||||
getOuterTeacherById(state.lookTeacherId).then((res) => {
|
||||
console.log("外部讲师详情", res.data);
|
||||
state.formParam= res.data.data
|
||||
})
|
||||
@@ -669,14 +682,19 @@ export default {
|
||||
|
||||
// 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` )
|
||||
// }
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
// handleExport,
|
||||
handleExport,
|
||||
AccountStatusList,
|
||||
searchSubmit,
|
||||
searchReset,
|
||||
|
||||
@@ -184,10 +184,10 @@
|
||||
/>
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">讲师等级 :</span>
|
||||
<a-select style="width:200px" v-if="teacherdialog1 == 0" v-model:value="formParam.tlevelName" placeholder="级别"
|
||||
<a-select style="width:200px" v-if="teacherdialog1 == 0" v-model:value="formParam.levelId " placeholder="级别"
|
||||
:options="getLevelList">
|
||||
</a-select>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.tlevelName }}</span>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.levelName }}</span>
|
||||
</div>
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:100px ;text-align:center ">认证状态</span>
|
||||
@@ -207,7 +207,7 @@
|
||||
/>
|
||||
</div>
|
||||
<span style="display:inline-block ;width:80px ;text-align:center ">讲师体系 :</span>
|
||||
<a-select style="width: 230px" v-if="teacherdialog1 == 0" v-model:value="formParam.tsystemName"
|
||||
<a-select style="width: 230px" v-if="teacherdialog1 == 0" v-model:value="formParam.systemId"
|
||||
placeholder="请选择讲师体系" :options="LecturerSystemList">
|
||||
</a-select>
|
||||
<span v-if="teacherdialog1 == 1" class=display1>{{ formParam.tsystemName }}</span>
|
||||
@@ -229,16 +229,16 @@
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ; text-align:center ">讲师介绍 :</span>
|
||||
</div>
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.teacherIntrofuce"
|
||||
<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.teacherIntrofuce }}</span>
|
||||
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.description }}</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.workHistory"
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.workExperience"
|
||||
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
|
||||
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.one }}</span>
|
||||
</div>
|
||||
@@ -247,7 +247,7 @@
|
||||
<div class="select">
|
||||
<span style="display:inline-block ;width:80px ; text-align:center ">擅长课程 :</span>
|
||||
</div>
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.proficientInCourse"
|
||||
<Editor v-if="teacherdialog1 == 0" v-model="formParam.courses"
|
||||
style="width: 500px ;display:inline-block ; margin-top:-50px ;margin-left:80px " />
|
||||
<span v-if="teacherdialog1 == 1" style="display: block; width: 500px;">{{ formParam.one }}</span>
|
||||
</div>
|
||||
@@ -280,6 +280,8 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="tableBox ">
|
||||
<div style="float: right;">
|
||||
<a-pagination
|
||||
v-if="teacherrecordstableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
@@ -291,6 +293,8 @@
|
||||
@change="teacherchangePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 晋级记录 -->
|
||||
<div class="InsideLecturer" v-show="tagsshow==3" style="margin">
|
||||
<div style="padding: 33px">
|
||||
@@ -302,12 +306,26 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="tableBox ">
|
||||
<div style="float: right;">
|
||||
<a-pagination
|
||||
v-if="teacherrepromotableDataTotal > 10"
|
||||
:showSizeChanger="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="teacherrepromo.pageNo"
|
||||
:total="teacherrepromotableDataTotal"
|
||||
class="pagination"
|
||||
@change="teacherrepromoPagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 删除功能弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="deleteTeacherdialog" :footer="null" :closable="close" wrapClassName="canclestu1"
|
||||
<a-modal v-model:visible="deleteInTeacherdialog" :footer="null" :closable="close" wrapClassName="canclestu1"
|
||||
centered="true">
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
@@ -366,7 +384,8 @@
|
||||
import { reactive, toRefs, ref ,watch} from "vue";
|
||||
import Editor from "@/components/project/Editor";
|
||||
import Upload from "@/components/project/Upload";
|
||||
import {getTeacherSystemList , getTeacherList,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, updateTeacherState,getTeacherCourseList , getTeacherExpertise,getTeacherExpertiseByPid ,infoteacher } from "../../api/Lecturer";
|
||||
import { message } from "ant-design-vue";
|
||||
import {getTeacherSystemList , getTeacherList,getTeacherPayRollPriceList, getLevel,insertTeacher,deleteInTeacher,updateInTeacher,getTeacherById, updateTeacherState,getTeacherCourseList , getTeacherExpertise,getTeacherExpertiseByPid ,infoteacher,getTeacherLogList } from "../../api/Lecturer";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
export default {
|
||||
@@ -378,6 +397,8 @@ export default {
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
promotionrecordsLoading:false , //晋级记录遮罩层
|
||||
teacherrecordsLoading:false,// 授课记录遮罩层
|
||||
tableLoading:false,
|
||||
@@ -389,7 +410,7 @@ export default {
|
||||
newStatus:null , //修改状态码确认
|
||||
userNoid:null, //内部讲师详情工号确认
|
||||
lookTeacherId:null, //内部讲师详情id确认
|
||||
deleteTeacherdialog: false, //删除弹窗
|
||||
deleteInTeacherdialog: false, //删除弹窗
|
||||
editTeacher:false , //修改状态弹窗
|
||||
handleOperate1:null, //修改状态弹窗内容
|
||||
teacherdialog1: null,
|
||||
@@ -399,14 +420,20 @@ export default {
|
||||
pageSize: 10,
|
||||
tableDataTotal: -1,//table列表总条数
|
||||
teacherrecordstableDataTotal:-1,//授课记录列表总条数
|
||||
teacherrepromotableDataTotal:-1,//晋级记录总条数
|
||||
formParam: {
|
||||
certStatus : 1 ,//认证状态
|
||||
defaultTeachingTime:'0分钟'
|
||||
},
|
||||
searchParam: {
|
||||
userNo:null,//工号姓名
|
||||
tsystemName:null,//讲师体系
|
||||
payrollPlaceId:null,//发薪地
|
||||
userNo:null,
|
||||
tsystemName:null,
|
||||
tlevelId:null,
|
||||
waitStatus:null,
|
||||
certStatus:null,
|
||||
salaryName:null,
|
||||
payrollPlaceId:null,
|
||||
status:null,
|
||||
pageNo: "1",
|
||||
pageSize: "10"
|
||||
},
|
||||
@@ -415,6 +442,11 @@ export default {
|
||||
pageSize: "10",
|
||||
id:null
|
||||
},
|
||||
teacherrepromo:{
|
||||
pageNo: "1",
|
||||
pageSize: "10",
|
||||
userNo:null
|
||||
},
|
||||
activeName:'first'
|
||||
})
|
||||
const LecturerSystemList = ref([
|
||||
@@ -559,12 +591,12 @@ export default {
|
||||
const infoteacherList = ref([
|
||||
// { value: 0, systemName: "讲师体系" },
|
||||
]);
|
||||
const getinfoteacher = (obj) => {
|
||||
state.tableLoading=true
|
||||
()
|
||||
.then((res) => {
|
||||
infoteacherList.value = res.data.data.records
|
||||
})
|
||||
const getinfoteacher = () => {
|
||||
// state.tableLoading=true
|
||||
// ()
|
||||
// .then((res) => {
|
||||
// infoteacherList.value = res.data.data.records
|
||||
// })
|
||||
};
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -778,14 +810,20 @@ export default {
|
||||
// 获取项目列表信息
|
||||
//let tableData = ref([]);
|
||||
// // 翻页
|
||||
const changePagination = (page) => {
|
||||
const changePagination = (page,pageSize) => {
|
||||
state.searchParam.pageNo = page;
|
||||
state.currentPage1 = page;
|
||||
state.pageSize1 = pageSize;
|
||||
getTableDate();
|
||||
};
|
||||
const teacherchangePagination = (page) => {
|
||||
state.teacherrecords.pageNo = page;
|
||||
getteacherrecordstableData();
|
||||
};
|
||||
const teacherrepromoPagination=(page)=>{
|
||||
state.teacherrecords.pageNo = page;
|
||||
getpromotionrecordstableData();
|
||||
}
|
||||
// 新增讲师
|
||||
const addTeacher = () => {
|
||||
state.teacherdialog1 = 0
|
||||
@@ -802,36 +840,74 @@ export default {
|
||||
state.teacherdialog1 = 0
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改信息'
|
||||
state.userNoid= record.userNo
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
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()
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
state.teacherdialog = false
|
||||
}
|
||||
const createTeacherDialog = () => {
|
||||
console.log(state.formParam);
|
||||
if (state.formParam.userNo != undefined) {
|
||||
updateInTeacher (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 {
|
||||
insertTeacher(state.formParam)
|
||||
.then((res) => {
|
||||
message.success("保存成功");
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
getTableDate();
|
||||
};
|
||||
// const createTeacherDialog =()=>{
|
||||
// //调用新增修改接口
|
||||
// // this.$refs["formParam"].validate(valid => {
|
||||
// // if (valid) {
|
||||
// let objform = {...state.formParam}
|
||||
// insertTeacher(objform).then((res) => {;
|
||||
// message.success("保存成功");
|
||||
// state.teacherdialog = false;
|
||||
// getTableDate()
|
||||
// console.log(res);
|
||||
// })
|
||||
// // if (state.formParam.userNo != undefined) {
|
||||
// // updateInTeacher (objform).then(response => {
|
||||
// // state.$modal.msgSuccess("修改成功");
|
||||
// // state.teacherdialog = false;
|
||||
// // state.getlist()
|
||||
// // });
|
||||
// // }
|
||||
// // else {
|
||||
// // insertTeacher(objform).then((res) => {
|
||||
// // console.log('1')
|
||||
// // message.success("保存成功");
|
||||
// // state.teacherdialog = false;
|
||||
// // getTableDate()
|
||||
// // })
|
||||
// // }
|
||||
// // }
|
||||
// // })
|
||||
// state.teacherdialog = false
|
||||
// }
|
||||
//删除弹窗
|
||||
const deleteModal = (record) => {
|
||||
state.deleteTeacherdialog = true
|
||||
state.deleteInTeacherdialog = true
|
||||
state.delTeacherId = record.id
|
||||
};
|
||||
//修改状态窗口
|
||||
@@ -849,15 +925,11 @@ export default {
|
||||
};
|
||||
//确认删除
|
||||
const closeDeleteTeacher=()=>{
|
||||
let ids ={
|
||||
id : state.delTeacherId
|
||||
}
|
||||
console.log(ids)
|
||||
//调用删除接口
|
||||
deleteTeacher(ids).then((res)=>{
|
||||
deleteInTeacher(state.delTeacherId).then((res)=>{
|
||||
if(res.data.code == 200 ){
|
||||
// message.success("删除成功");
|
||||
state.deleteTeacherdialog = false
|
||||
state.deleteInTeacherdialog = false
|
||||
getTableDate();
|
||||
}
|
||||
})
|
||||
@@ -871,7 +943,7 @@ export default {
|
||||
}
|
||||
console.log(ids)
|
||||
updateTeacherState(ids).then((res) => {
|
||||
// message.success("操作成功");
|
||||
message.success("操作成功");
|
||||
state.editTeacher = false
|
||||
getTableDate();
|
||||
})
|
||||
@@ -883,7 +955,7 @@ export default {
|
||||
state.teacherdialog = false
|
||||
cancel()
|
||||
}
|
||||
state.deleteTeacherdialog = false
|
||||
state.deleteInTeacherdialog = false
|
||||
state.editTeacher = false
|
||||
state.tagsshow= 1
|
||||
};
|
||||
@@ -895,14 +967,15 @@ export default {
|
||||
userNo:null,
|
||||
departId:null,
|
||||
defaultTeachingTime:null,
|
||||
tlevelName:null,
|
||||
levelName:null,
|
||||
leveName:null,
|
||||
systemId:null,
|
||||
tsystemName:null,
|
||||
certStatus:1,
|
||||
teacherIntrofuce:null,
|
||||
workHistory:null,
|
||||
proficientInCourse:null,
|
||||
description:null,
|
||||
workExperience:null,
|
||||
courses:null,
|
||||
}
|
||||
|
||||
}
|
||||
//表格内查看数据操作
|
||||
const handleLook = (record) => {
|
||||
@@ -917,10 +990,10 @@ export default {
|
||||
}
|
||||
//内部讲师详情
|
||||
const TeacherSystem=()=>{
|
||||
let ids={userNo : state.userNoid }
|
||||
getTeacherById(ids).then((res) => {
|
||||
getTeacherById(state.userNoid).then((res) => {
|
||||
console.log("内部讲师详情", res.data);
|
||||
state.formParam= res.data.data
|
||||
// state.formParam=Object.assign({} ,res.data.data)
|
||||
state.formParam=res.data.data
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("内部讲师详情", err);
|
||||
@@ -938,6 +1011,7 @@ export default {
|
||||
const promotionrecords=()=>{
|
||||
state.tagsshow= 3
|
||||
console.log(state.tagsshow)
|
||||
getpromotionrecordstableData()
|
||||
}
|
||||
//授课记录列表
|
||||
const teacherrecordsColumns = ref ([
|
||||
@@ -1037,78 +1111,84 @@ export default {
|
||||
state.teacherrecordsLoading=true
|
||||
state.teacherrecords.id= state.lookTeacherId
|
||||
let objB={...state.teacherrecords}
|
||||
// let ids= {id: "965341999643234304",
|
||||
// pageNo: "1",
|
||||
// pageSize: "10"}
|
||||
|
||||
// api接口
|
||||
getTeacherCourseList(objB).then((res) => {
|
||||
teacherrecordstableData.value = res.data.data.records
|
||||
state.teacherrecordstableDataTotal = Number(res.data.data.total);
|
||||
state.teacherrecordsLoading=false
|
||||
console.log("获取teacherrecordstableData",res.data.data.records);
|
||||
console.log("获取teacherrecordstableData",teacherrecordstableData);
|
||||
})
|
||||
};
|
||||
//晋级记录列表
|
||||
const promotionrecordsColumns = ref ([
|
||||
{
|
||||
title: '变更时间',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
dataIndex: 'operatorTime',
|
||||
key: 'operatorTime',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '变更方式',
|
||||
dataIndex: 'bgfs',
|
||||
key: 'bgfs',
|
||||
dataIndex: 'operatorType',
|
||||
key: 'operatorType',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '变更结果',
|
||||
dataIndex: 'bgjg',
|
||||
key: 'bgjg',
|
||||
dataIndex: 'afterInfo',
|
||||
key: 'afterInfo',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'czr',
|
||||
key: 'czr',
|
||||
dataIndex: 'operatorId',
|
||||
key: 'operatorId',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
])
|
||||
//晋级记录列表数据
|
||||
const promotionrecordstableData = ref([
|
||||
{
|
||||
time:'变更时间',
|
||||
bgfs: '变更方式',
|
||||
bgjg:'变更结果',
|
||||
czr: '操作人'
|
||||
},
|
||||
])
|
||||
// const getpromotionrecordstableData = () => {
|
||||
// state.promotionrecordsLoading=true
|
||||
// state.loading = true;
|
||||
// let ids={userNo : state.userNoid }
|
||||
// // api接口
|
||||
// getTeacherList(ids).then((res) => {
|
||||
// tableData.value = res.data.data.records
|
||||
// state.promotionrecordsLoading=false
|
||||
// })
|
||||
// };
|
||||
const getpromotionrecordstableData = () => {
|
||||
state.promotionrecordsLoading=true
|
||||
state. teacherrepromo.userNo= state.lookTeacherId
|
||||
// api接口
|
||||
let a = {
|
||||
userNo :'00004409',
|
||||
pageNo: "1",
|
||||
pageSize: "10",
|
||||
}
|
||||
getTeacherLogList( a).then((res) => {
|
||||
promotionrecordstableData.value = res.data.data.records
|
||||
state.teacherrepromotableDataTotal = Number(res.data.data.total);
|
||||
})
|
||||
state.promotionrecordsLoading=false
|
||||
};
|
||||
// getpromotionrecordstableData()
|
||||
//导出功能
|
||||
// const handleExport = ()=>{
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
// }, `project_${new Date().getTime()}.xlsx` )
|
||||
// }
|
||||
const handleExport = ()=>{
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${
|
||||
state.currentPage1
|
||||
}&pageSize=${state.pageSize1}&userNo=${
|
||||
state.searchParam.userNo ? state.searchParam.userNo : ""
|
||||
}&tsystemName=${ state.searchParam.tsystemName ? state.searchParam.tsystemName : ""}&tlevelId=${
|
||||
state.searchParam.tlevelId ? state.searchParam.tlevelId : ""
|
||||
}&waitStatus=${ state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${
|
||||
state.searchParam.certStatus ? state.searchParam.certStatus : ""
|
||||
}&salaryName=${state.searchParam.salaryName ? state.searchParam.salaryName : ""}&payrollPlaceId=${state.searchParam.payrollPlaceId ? state.searchParam.payrollPlaceId : ""}&status=${state.searchParam.status ? state.searchParam.status : ""}`
|
||||
);
|
||||
// this.download('lesson_records/export', {
|
||||
// ...state.searchParam
|
||||
// }, `project_${new Date().getTime()}.xlsx` )
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
// handleExport,
|
||||
handleExport,
|
||||
LecturerSystemList,
|
||||
getLevelList,
|
||||
OnTheJobStatusList,
|
||||
@@ -1146,7 +1226,7 @@ export default {
|
||||
teacherchangePagination,
|
||||
promotionrecordsColumns,
|
||||
promotionrecordstableData,
|
||||
|
||||
teacherrepromoPagination,
|
||||
// getpromotionrecordstableData
|
||||
TeacherExpertiseList,
|
||||
getTeacherExpertisea,
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select style="width: 230px" placeholder="请选择所属组织" v-model:value="searchParam.tsystemName"
|
||||
:options="LecturerSystemList">
|
||||
<a-select style="width: 230px" placeholder="请选择所属组织" v-model:value="searchParam.departId"
|
||||
:options="getOrganizationList">
|
||||
</a-select>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select style="width: 230px" placeholder="请选择讲师体系" v-model:value="searchParam.tsystemName"
|
||||
<a-select style="width: 230px" placeholder="请选择讲师体系" v-model:value="searchParam.systemId"
|
||||
:options="LecturerSystemList">
|
||||
</a-select>
|
||||
</div>
|
||||
<div class="select addTimeBox">
|
||||
<div class="addTime">课程日期:</div>
|
||||
<a-date-picker
|
||||
v-model:value="searchParam.valueDate"
|
||||
v-model:value="searchParam.beginTime"
|
||||
style="width: 230px"
|
||||
format="YYYY-MM-DD"
|
||||
separator="至"
|
||||
@@ -39,16 +39,16 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.tlevelName" placeholder="内容分类" :options="getLevelList">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.tlevelName" placeholder="内容分类" :options="getTeacherExpertiseList">
|
||||
</a-select>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.waitStatus" placeholder="课程分类"
|
||||
<a-select style="width: 230px" v-model:value="searchParam.type" placeholder="课程分类"
|
||||
:options="OnTheJobStatusList">
|
||||
</a-select>
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.certStatus" placeholder="开课状态"
|
||||
<a-select style="width: 230px" v-model:value="searchParam.status" placeholder="开课状态"
|
||||
:options="AuthenticationStatusList">
|
||||
</a-select>
|
||||
</div>
|
||||
@@ -242,12 +242,12 @@
|
||||
<span style="display:inline-block ;width:125px ;text-align:center ">授课日期 :</span>
|
||||
<a-date-picker
|
||||
v-if="teacherdialog1 == 0"
|
||||
v-model:value="formParam.valueDate"
|
||||
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">
|
||||
@@ -370,8 +370,8 @@ 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, getLevel,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, } from "../../api/Lecturer";
|
||||
import {getNewInTeacherCourseList} from "../../api/Teaching";
|
||||
import {getTeacherSystemList ,infoteacher, getTeacherExpertise,insertTeacher,deleteTeacher,updateInTeacher,getTeacherById, } from "../../api/Lecturer";
|
||||
import {getNewInTeacherCourseList,getOrganization} from "../../api/Teaching";
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
export default {
|
||||
name: "InsideTeaching",
|
||||
@@ -405,6 +405,29 @@ export default {
|
||||
pageSize: "10"
|
||||
},
|
||||
})
|
||||
//获取所属组织
|
||||
const getOrganizationList = ref([
|
||||
// { value: 0, systemName: "讲师体系" },
|
||||
]);
|
||||
//获取所属组织
|
||||
const getOrganizationLista =() => {
|
||||
// console.log('getOrganizationList')
|
||||
getOrganization().then((res)=>{
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data;
|
||||
let array = getOrganizationList.value;
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
value: value.departId,
|
||||
label: value.orgName,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
getOrganizationList.value = array;
|
||||
}
|
||||
})
|
||||
}
|
||||
getOrganizationLista()
|
||||
const LecturerSystemList = ref([
|
||||
// { value: 0, systemName: "讲师体系" },
|
||||
]);
|
||||
@@ -428,15 +451,15 @@ export default {
|
||||
})
|
||||
}
|
||||
LecturerSystemLista()
|
||||
//获取内部讲师级别
|
||||
const getLevelList = ref([
|
||||
//获取内容分类
|
||||
const getTeacherExpertiseList = ref([
|
||||
// { value: 0, label: "未定级" },
|
||||
])
|
||||
const getLevelLista =() => {
|
||||
getLevel().then((res)=>{
|
||||
const getTeacherExpertiseLista =() => {
|
||||
getTeacherExpertise().then((res)=>{
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data;
|
||||
let array = getLevelList.value;
|
||||
let array = getTeacherExpertiseList.value;
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
value: value.id,
|
||||
@@ -444,14 +467,15 @@ export default {
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
getLevelList.value = array;
|
||||
getTeacherExpertiseList.value = array;
|
||||
}
|
||||
})
|
||||
}
|
||||
getLevelLista()
|
||||
getTeacherExpertiseLista()
|
||||
const OnTheJobStatusList = ref([
|
||||
{ value: 0, label: "分类1" },
|
||||
{ value: 1, label: "分类2" },
|
||||
{ value: 1, label: "项目开课" },
|
||||
{ value: 2, label: "路径开课" },
|
||||
{ value: 3, label: "面授开课" },
|
||||
])
|
||||
const AuthenticationStatusList = ref([
|
||||
{ value: 0, label: "未开课" },
|
||||
@@ -468,8 +492,8 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '讲师姓名 ',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
dataIndex: 'teacher',
|
||||
key: 'teacher',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
@@ -496,29 +520,29 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '讲师体系 ',
|
||||
dataIndex: 'tsystemName',
|
||||
key: 'tsystemName',
|
||||
dataIndex: 'systemName',
|
||||
key: 'systemName',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '课程名称 ',
|
||||
dataIndex: 'tlevelName',
|
||||
key: 'tlevelName',
|
||||
dataIndex: 'name',
|
||||
key: 'name ',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '授课/课程日期 ',
|
||||
dataIndex: 'payrollPlaceName',
|
||||
key: 'payrollPlaceName',
|
||||
dataIndex: 'beginTime',
|
||||
key: 'beginTime',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '授课时长(H) ',
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
dataIndex: 'duration',
|
||||
key: 'duration',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
@@ -531,18 +555,19 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '课程类型 ',
|
||||
dataIndex: 'waitStatus',
|
||||
key: 'waitStatus',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.waitStatus == "0" || value.record.waitStatus == "1"
|
||||
{value.record.type == "1" || value.record.type == "2"|| value.record.type == "3"
|
||||
? {
|
||||
"0": "在线课",
|
||||
"1": "面授课",
|
||||
}[value.record.waitStatus + ""] || ""
|
||||
"1": "项目开课",
|
||||
"2": "路径开课",
|
||||
"3": "面授开课",
|
||||
}[value.record.type + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
)
|
||||
@@ -550,15 +575,15 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '参训学员人数',
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
dataIndex: 'studys',
|
||||
key: 'studys',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '评分',
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
dataIndex: 'score',
|
||||
key: 'score',
|
||||
elipsis: true,
|
||||
width: 120,
|
||||
},
|
||||
@@ -612,8 +637,18 @@ export default {
|
||||
};
|
||||
//重置
|
||||
const searchReset = () => {
|
||||
state.searchParam = { pageNo: 1, pageSize: 10 };
|
||||
// getTableDate();
|
||||
state.searchParam = {
|
||||
pageNo: 1,
|
||||
pageSize: 10 ,
|
||||
name:null,
|
||||
offcourseId :null,
|
||||
departId:null,
|
||||
systemId:null,
|
||||
beginTime:null,
|
||||
type:null,
|
||||
status:null
|
||||
};
|
||||
getTableDate();
|
||||
};
|
||||
// List接口数据
|
||||
const getTableDate = (obj) => {
|
||||
@@ -661,7 +696,7 @@ export default {
|
||||
state.teacherdialogtitle = '添加授课记录'
|
||||
//获取内部讲师级别
|
||||
LecturerSystemLista()
|
||||
getLevelLista()
|
||||
getTeacherExpertiseLista()
|
||||
getTeacherExpertisea()
|
||||
|
||||
}
|
||||
@@ -766,8 +801,8 @@ export default {
|
||||
// // alert(record.grade)
|
||||
// // TeacherSystem()
|
||||
let id = record.userNo
|
||||
// router.push({ path: '/lecturer/InsideTeachingDetail/', query: { id } })
|
||||
router.push({ path: '/InsideTeachingDetail' })
|
||||
router.push({ path: '/insideteachingdetail', query: { id } })
|
||||
// router.push({ path: '/InsideTeachingDetail' })
|
||||
}
|
||||
//内部讲师详情
|
||||
const TeacherSystem=()=>{
|
||||
@@ -792,9 +827,9 @@ export default {
|
||||
getinfoteacher,
|
||||
// handleExport,
|
||||
LecturerSystemList,
|
||||
getLevelList,
|
||||
getTeacherExpertiseList,
|
||||
OnTheJobStatusList,
|
||||
getLevelLista,
|
||||
getTeacherExpertiseLista,
|
||||
AuthenticationStatusList,
|
||||
searchSubmit,
|
||||
searchReset,
|
||||
@@ -813,6 +848,8 @@ export default {
|
||||
// getStu
|
||||
LecturerSystemLista,
|
||||
TeacherSystem,
|
||||
getOrganizationLista,
|
||||
getOrganizationList
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user