mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
讲师管理接口联调
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user