讲师管理bug

This commit is contained in:
zhangsir
2024-11-19 14:11:24 +08:00
parent 957b8beed7
commit 3d293af18e

View File

@@ -37,7 +37,7 @@
@click="handleup">查看认证资料</a-button> @click="handleup">查看认证资料</a-button>
</span> </span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="授课时长"> <span v-if="formParam.teaching!= null" >{{ (formParam.teaching /60 ).toFixed(2)}}小时</span><span v-else>-</span> <a-descriptions-item label="授课时长"> <span v-if="formParam.teaching!= null" >{{ ((Number(formParam.teaching)+Number(formParam.defaultTeachingTime)) /60 ).toFixed(2)}}小时</span><span v-else>-</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="发薪地 ">{{formParam.salaryName||'-'}}</a-descriptions-item> <a-descriptions-item label="发薪地 ">{{formParam.salaryName||'-'}}</a-descriptions-item>
<!-- 三层 --> <!-- 三层 -->
@@ -80,7 +80,7 @@
<a-tab-pane key="1" tab="授课记录"> <a-tab-pane key="1" tab="授课记录">
<a-table :header-cell-style="{ 'text-align': 'center' }" :columns="teacherrecordsColumns" <a-table :header-cell-style="{ 'text-align': 'center' }" :columns="teacherrecordsColumns"
:data-source="teacherrecordstableData" :loading="teacherrecordsLoading" :scroll="{ x: '1000' }" :pagination="false"> :data-source="teacherrecordstableData" :loading="teacherrecordsLoading" :scroll="{ x: '1000' }" :pagination="pagination">
<!-- <template #bodyCell="{ record, column }" > <!-- <template #bodyCell="{ record, column }" >
<template v-if="column.key === 'remark'"> <template v-if="column.key === 'remark'">
<a-space style="display:flex ;justify-content: space-around; "> <a-space style="display:flex ;justify-content: space-around; ">
@@ -142,6 +142,7 @@ import {getTeacherById ,getTeacherLogList} from "../../api/Lecturer";
import { getNewInTeacherCourseList } from "../../api/Teaching"; import { getNewInTeacherCourseList } from "../../api/Teaching";
// import boe from '@/assets/boe.jpg' // import boe from '@/assets/boe.jpg'
import avatar from '@/assets/avatar.png' import avatar from '@/assets/avatar.png'
import dayjs from "dayjs";
export default{ export default{
name :"LookInsideLecturer", name :"LookInsideLecturer",
components:{ components:{
@@ -157,7 +158,7 @@ export default{
}, },
promotionrecordsLoading: false, //晋级记录遮罩层 promotionrecordsLoading: false, //晋级记录遮罩层
teacherrecordsLoading: false,// 授课记录遮罩层 teacherrecordsLoading: false,// 授课记录遮罩层
teacherrecordstableDataTotal: -1,//授课记录列表总条数 teacherrecordstableDataTotal: 0,//授课记录列表总条数
teacherrepromotableDataTotal: -1,//晋级记录总条数 teacherrepromotableDataTotal: -1,//晋级记录总条数
teacherrecords: { teacherrecords: {
recordType:1, recordType:1,
@@ -231,6 +232,13 @@ export default{
key: 'teachingDate', key: 'teachingDate',
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 120, width: 120,
customRender: (value) => {
return (
<div>
{dayjs(value.record?.teachingDate).format("YYYY-MM-DD HH:mm")}
</div>
);
},
}, },
{ {
title: "内容分类", title: "内容分类",
@@ -288,18 +296,18 @@ export default{
}, },
{ {
title: '开课状态', title: '开课状态',
dataIndex: 'status ', dataIndex: 'courseStatus ',
key: 'status ', key: 'courseStatus ',
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 120, width: 120,
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{value.record.status == 0 || value.record.status == 1 {value.record.courseStatus == 0 || value.record.courseStatus == 1
? { ? {
"0": "未开课", "0": "未开课",
"1": "开课", "1": "开课",
}[value.record.status + ""] || "" }[value.record.courseStatus + ""] || ""
: "-"} : "-"}
</div> </div>
) )
@@ -336,6 +344,19 @@ export default{
}) })
}; };
const pagination = computed(() => ({
total: state.teacherrecordstableDataTotal,
showSizeChanger: true,
showQuickJumper:true,
current: state.teacherrecords.pageNo,
pageSize: state.teacherrecords.pageSize,
onChange: paginationChange,
}));
const paginationChange = (e,pageSize) => {
state.teacherrecords.pageNo = e;
state.teacherrecords.pageSize = pageSize
getteacherrecordstableData();
};
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;
@@ -431,6 +452,8 @@ const handleup = ()=>{
resp, resp,
getteacherrecordstableData, getteacherrecordstableData,
teacherchangePagination, teacherchangePagination,
pagination,
paginationChange,
teacherrepromoPagination, teacherrepromoPagination,
promotionrecordsColumns, promotionrecordsColumns,
promotionrecordstableData, promotionrecordstableData,