Merge remote-tracking branch 'zcwy/zcwy-teacher-manage' into zcwy-teacher-manage

This commit is contained in:
zhangsir
2024-10-15 15:50:31 +08:00
8 changed files with 105 additions and 51 deletions

View File

@@ -22,14 +22,16 @@ export const deleteInTeacher= (obj) => http.post('/admin/teacher/delById',obj)
export const insertTeacher = (obj) => http.post('/admin/teacher/addTeacher' ,obj) export const insertTeacher = (obj) => http.post('/admin/teacher/addTeacher' ,obj)
//修改讲师 //修改讲师
export const updateInTeacher = (obj) => http.post('/admin/teacher/editTeacher' ,obj) export const updateInTeacher = (obj) => http.post('/admin/teacher/editTeacher' ,obj)
//修改讲师状态
export const updateTeacherState = (obj) => http.post('/admin/teacher/updateTeacherStatus' ,obj)
//删除内部讲师 //删除内部讲师
// export const deleteInTeacher= (obj) => http.post(`/admin/teacher/delById?id=${obj}`) // export const deleteInTeacher= (obj) => http.post(`/admin/teacher/delById?id=${obj}`)
//获取内部讲师发薪地 //获取内部讲师发薪地
export const getPayRollPlace = (obj) => http.post('/admin/teacher/getPayRollPlace', obj) export const getPayRollPlace = (obj) => http.post('/admin/teacher/getPayRollPlace', obj)
//修改内部讲师状态
export const updateTeacherState = (obj) => http.post('/admin/teacher/update-status' ,obj)
//获取内部讲师授课记录 //获取内部讲师授课记录
export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList' ,obj) export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList' ,obj)
//获取内部讲师晋升接口 //获取内部讲师晋升接口

View File

@@ -771,12 +771,12 @@
<router-link to="/dictmanage">字典</router-link> <router-link to="/dictmanage">字典</router-link>
</a-menu-item> </a-menu-item>
<a-menu-item key="sub24" @titleClick="titleClick"> <a-menu-item key="sub24" @titleClick="titleClick">
<router-link to="/lecturerlist">讲师列表</router-link> <router-link to="/lecturerlist">讲师</router-link>
</a-menu-item> </a-menu-item>
<a-menu-item key="sub25" @titleClick="titleClick"> <!-- <a-menu-item key="sub25" @titleClick="titleClick">
<router-link to="/teachingrecord">授课记录</router-link> <router-link to="/teachingrecord">授课记录</router-link>
</a-menu-item> </a-menu-item> -->
<a-menu-item key="sub26" @titleClick="titleClick"> <!-- <a-menu-item key="sub26" @titleClick="titleClick">
<router-link to="/lecturerfeemanagement">讲师费管理</router-link> <router-link to="/lecturerfeemanagement">讲师费管理</router-link>
</a-menu-item> </a-menu-item>
<a-menu-item key="sub27" @titleClick="titleClick"> <a-menu-item key="sub27" @titleClick="titleClick">
@@ -787,7 +787,7 @@
</a-menu-item> </a-menu-item>
<a-menu-item key="sub29" @titleClick="titleClick"> <a-menu-item key="sub29" @titleClick="titleClick">
<router-link to="/lecturerSystem">讲师体系管理</router-link> <router-link to="/lecturerSystem">讲师体系管理</router-link>
</a-menu-item> </a-menu-item> -->
</a-menu> </a-menu>
</div> </div>
</div> </div>

View File

@@ -56,18 +56,10 @@
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div class="pa">
<a-pagination <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
v-if="tableDataTotal > 10" :hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
:showSizeChanger="true" class="pagination" @change="changePagination" />
:showQuickJumper="true"
:hideOnSinglePage="true"
:pageSize="searchParam.pageSize"
:current="searchParam.pageNo"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
@@ -524,18 +516,21 @@ export default {
//调用删除接口 //调用删除接口
deleteInTeacher({id:state.delTeacherId}).then((res) => { deleteInTeacher({id:state.delTeacherId}).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
// message.success("删除成功"); message.success("删除成功");
state.deleteTeacherdialog = false state.deleteTeacherdialog = false
getTableDate(); getTableDate();
} }
}) })
.catch((err) => {
state.deleteTeacherdialog = false
});
} }
//确认启用停用 //确认启用停用
const closehandleOperate = () => { const closehandleOperate = () => {
//调用接口 //调用接口
let ids = { let ids = {
id: state.editTeacherid, id: state.editTeacherid,
newStatus: state.newStatus status: state.newStatus
} }
console.log(ids) console.log(ids)
updateTeacherState(ids).then((res) => { updateTeacherState(ids).then((res) => {
@@ -543,6 +538,9 @@ export default {
state.editTeacher = false state.editTeacher = false
getTableDate(); getTableDate();
}) })
.catch((err) => {
state.editTeacher = false
});
} }
//取消按钮 清空输入的数据 //取消按钮 清空输入的数据
const cancelTeacherDialog = () => { const cancelTeacherDialog = () => {

View File

@@ -101,18 +101,10 @@
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div class="pa">
<a-pagination <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
v-if="tableDataTotal > 10" :hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
:showSizeChanger="false" class="pagination" @change="changePagination" />
:showQuickJumper="true"
:hideOnSinglePage="true"
:pageSize="searchParam.pageSize"
:current="searchParam.pageNo"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
@@ -683,7 +675,9 @@ export default {
state.deleteTeacherdialog = false state.deleteTeacherdialog = false
getTableDate(); getTableDate();
} }
}) }).catch((err) => {
state.deleteTeacherdialog = false
});
} }
//获取内容分类 //获取内容分类
const getTeacherExpertiseList = ref([ const getTeacherExpertiseList = ref([
@@ -1178,4 +1172,22 @@ const handleImport = () => {
.ant-col-12{ .ant-col-12{
height:80px; height:80px;
} }
.tableBox {
padding-bottom: 20px;
 margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
display: inline-block;
}
::v-deep .ant-select-selection-item{
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select{
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style> </style>

View File

@@ -105,8 +105,7 @@
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div class="pa">
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false" <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
:hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" :hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
class="pagination" @change="changePagination" /> class="pagination" @change="changePagination" />
@@ -948,6 +947,8 @@ export default {
state.deleteInTeacherdialog = false state.deleteInTeacherdialog = false
getTableDate(); getTableDate();
} }
}).catch((err)=>{
state.deleteInTeacherdialog = false
}) })
} }
//确认启用停用 //确认启用停用
@@ -955,13 +956,15 @@ export default {
//调用接口 //调用接口
let ids = { let ids = {
id: state.editTeacherid, id: state.editTeacherid,
newStatus: state.newStatus status: state.newStatus
} }
console.log(ids) console.log(ids)
updateTeacherState(ids).then((res) => { updateTeacherState(ids).then((res) => {
message.success("操作成功"); message.success("操作成功");
state.editTeacher = false state.editTeacher = false
getTableDate(); getTableDate();
}).catch((err)=>{
state.editTeacher = false
}) })
} }
//取消按钮 清空输入的数据 //取消按钮 清空输入的数据
@@ -1491,4 +1494,22 @@ export default {
::v-deep .ant-modal-close { ::v-deep .ant-modal-close {
display: none; display: none;
} }
</style> .tableBox {
padding-bottom: 20px;
 margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
display: inline-block;
}
::v-deep .ant-select-selection-item{
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select{
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style >

View File

@@ -124,10 +124,10 @@
</div> </div>
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div class="pa">
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="false" :showQuickJumper="true" :hideOnSinglePage="true" <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
:pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" class="pagination" :hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
@change="changePagination" /> class="pagination" @change="changePagination" />
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
@@ -1593,4 +1593,22 @@ export default {
::v-deep .ant-select-multiple .ant-select-selection-item { ::v-deep .ant-select-multiple .ant-select-selection-item {
height: 34px height: 34px
} }
.tableBox {
padding-bottom: 20px;
 margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
display: inline-block;
}
::v-deep .ant-select-selection-item{
margin-left: 3px;
}
::v-deep .ant-pagination-options-size-changer.ant-select{
width: 84px;
}
.pa {
width: 100%;
display: flex;
justify-content: right;
}
}
</style> </style>

View File

@@ -84,7 +84,8 @@ ExternalLecturer
<script lang ="jsx"> <script lang ="jsx">
import { useRouter,useRoute } from "vue-router"; import { useRouter,useRoute } from "vue-router";
import { reactive, toRefs, ref } from "vue" import { reactive, toRefs, ref } from "vue"
import {getTeacherById,getTeacherCourseList } from "../../api/Lecturer"; import {getTeacherById} from "../../api/Lecturer";
import { getNewInTeacherCourseList } from "../../api/Teaching";
export default{ export default{
name :"LookExternalLecturer", name :"LookExternalLecturer",
components:{ components:{
@@ -103,7 +104,7 @@ export default{
teacherrecordstableDataTotal: -1,//授课记录列表总条数 teacherrecordstableDataTotal: -1,//授课记录列表总条数
teacherrepromotableDataTotal: -1,//晋级记录总条数 teacherrepromotableDataTotal: -1,//晋级记录总条数
teacherrecords: { teacherrecords: {
teacherType:'1', teacherType:2,
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
id: null id: null
@@ -121,6 +122,7 @@ export default{
console.log("内部讲师详情", res.data); console.log("内部讲师详情", res.data);
state.formParam = res.data.data state.formParam = res.data.data
state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
getteacherrecordstableData()
}) })
.catch((err) => { .catch((err) => {
console.log("内部讲师详情", err); console.log("内部讲师详情", err);
@@ -235,17 +237,17 @@ export default{
]) ])
const getteacherrecordstableData = () => { const getteacherrecordstableData = () => {
state.teacherrecordsLoading = true state.teacherrecordsLoading = true
state.teacherrecords.id = state.id state.teacherrecords.name = state.formParam.name
let obj = { ...state.teacherrecords } let obj = { ...state.teacherrecords }
// api接口 // api接口
getTeacherCourseList(obj).then((res) => { getNewInTeacherCourseList(obj).then((res) => {
teacherrecordstableData.value = res.data.data.records teacherrecordstableData.value = res.data.data.records
state.teacherrecordstableDataTotal = Number(res.data.data.total); state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading = false state.teacherrecordsLoading = false
}) })
}; };
getteacherrecordstableData() // getteacherrecordstableData()
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;

View File

@@ -128,7 +128,8 @@
import { useRouter,useRoute } from "vue-router"; import { useRouter,useRoute } from "vue-router";
import { reactive, toRefs, ref, computed } from "vue" import { reactive, toRefs, ref, computed } from "vue"
import { useStore } from "vuex"; import { useStore } from "vuex";
import {getTeacherById,getTeacherCourseList ,getTeacherLogList} from "../../api/Lecturer"; import {getTeacherById ,getTeacherLogList} from "../../api/Lecturer";
import { getNewInTeacherCourseList } from "../../api/Teaching";
export default{ export default{
name :"LookInsideLecturer", name :"LookInsideLecturer",
components:{ components:{
@@ -173,6 +174,7 @@ export default{
state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
state.teacherrepromo.userId=res.data.data.id state.teacherrepromo.userId=res.data.data.id
console.log(state.teacherrepromo.id); console.log(state.teacherrepromo.id);
getteacherrecordstableData()
getpromotionrecordstableData() getpromotionrecordstableData()
}) })
.catch((err) => { .catch((err) => {
@@ -291,17 +293,16 @@ export default{
]) ])
const getteacherrecordstableData = () => { const getteacherrecordstableData = () => {
state.teacherrecordsLoading = true state.teacherrecordsLoading = true
state.teacherrecords.id = state.id state.teacherrecords.name = state.formParam.name
let obj = { ...state.teacherrecords } let obj = { ...state.teacherrecords }
// api接口 // api接口
getTeacherCourseList(obj).then((res) => { getNewInTeacherCourseList(obj).then((res) => {
console.log(res); console.log(res);
teacherrecordstableData.value = res.data.data.records teacherrecordstableData.value = res.data.data.records
state.teacherrecordstableDataTotal = Number(res.data.data.total); state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading = false state.teacherrecordsLoading = false
}) })
}; };
getteacherrecordstableData()
//授课翻页 //授课翻页
const teacherchangePagination = (page) => { const teacherchangePagination = (page) => {
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;