内部授课记录页面调整

This commit is contained in:
wangxuemei
2024-07-26 09:00:40 +08:00
parent 7c3ac81e66
commit 6208ea2028
6 changed files with 799 additions and 1498 deletions

View File

@@ -1,44 +1,34 @@
<!-- 外部讲师页面 -->
<template>
<div class="ExternalLecturer">
<div>
</div>
<!-- 搜索框及按钮 -->
<div class="filter">
<div class="filterItems">
<div class="select">
<div class="filter" style="min-width: 1380px;">
<a-form layout="inline">
<a-form-item class="select">
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.name" style="width: 230px; height: 40px; border-radius: 8px"
placeholder="请输入讲师姓名检索" allowClear showSearch>
</a-input>
</div>
<div class="select">
</a-form-item >
<a-form-item class="select">
<a-select style="width: 230px" v-model:value="searchParam.status" placeholder="账号状态"
:options="AccountStatusList">
</a-select>
</div>
</a-form-item >
<div style="display: flex; margin-bottom: 20px">
<div class="btnn btn1" @click="searchSubmit">
<div class="search"></div>
<div class="btnText">搜索</div>
</div>
<div class="btn btn2" @click="searchReset">
<div class="search"></div>
<div class="btnText">重置</div>
</div>
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
<a-button class="resetbtn " @click="searchReset">重置</a-button>
</div>
</div>
<div style="width: 100%; height: ;"></div>
<div class="btns">
<div class="btn btn3" @click="addTeacher">
<div class="search"></div>
<div class="btnText">新增讲师</div>
</div>
</div>
<div class="btns">
<div class="btn btn3" @click="showEHWorkModal" style="margin-right:20px">
<div class="daochu"></div>
<div class="btnText" @click="handleExport">导出</div>
</a-form>
<div style="width: 100%;"></div>
<div style="display: flex; margin-bottom: 20px">
<a-button @click="addTeacher()" type="primary" class="resetbtn">
<FolderAddOutlined /> 新增讲师
</a-button>
<div style="margin-left: 20px ;">
<a-button @click="handleExport()" class="resetbtn">
<UploadOutlined /> 导出
</a-button>
</div>
</div>
<!-- 表格 -->
@@ -97,13 +87,13 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="name">
<a-tree-select v-model:value="formParam.name" tree-data-simple-mode style=" width:276px ;"
<a-tree-select v-model:value="formParam.name" tree-data-simple-mode class="draitem"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="手机号码" name="mobile">
<a-input v-model:value="formParam.mobile" style="width:276px; height: 40px; "
<a-input v-model:value="formParam.mobile" class="draitem"
placeholder="请输入手机号码" allowClear showSearch>
</a-input>
</a-form-item>
@@ -113,14 +103,14 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="供应商" name="levelId">
<a-input v-model:value="formParam.userNo" style="width:276px; height: 40px; "
<a-input v-model:value="formParam.userNo" class="draitem"
placeholder="请输入供应商" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="讲师邮箱" name="email">
<a-input v-model:value="formParam.email" style="width:276px; height: 40px; "
<a-input v-model:value="formParam.email" class="draitem"
placeholder="请输入讲师邮箱" allowClear showSearch>
</a-input>
</a-form-item>
@@ -145,7 +135,7 @@
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="备注">
<a-textarea v-if="teacherdialog1 == 0"
<a-textarea
v-model:value="formParam.remark"
showCount
:maxlength="200"
@@ -169,8 +159,8 @@
zIndex: 1,
} "
>
<a-button style="margin-right: 8px" @click="cancelTeacherDialog" >取消</a-button>
<a-button type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
</div>
</a-drawer>
@@ -233,6 +223,7 @@
<script lang="jsx">
import { reactive, toRefs, ref } from "vue";
import Editor from "@/components/project/Editor";
import { useRouter } from "vue-router";
import { message } from "ant-design-vue";
import { getOutTeacherList, getOuterTeacherById, getOuterTeacherCourseList, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
// import {getProjSt} from "../../api/indexProjStu";
@@ -244,6 +235,7 @@ export default {
Editor
},
setup() {
const router = useRouter();
const state = reactive({
currentPage1: 1,
pageSize1: 10,
@@ -253,12 +245,11 @@ export default {
delTeacherId: null, //删除id确认
editTeacherid: null,//修改状态id确认
userNoid: null, //讲师详情工号确认
lookTeacherId: null, //讲师详情id确认
id: null, //讲师详情id确认
newStatus: null, //修改状态码确认
deleteTeacherdialog: false, //删除弹窗
editTeacher: false, //修改状态弹窗
handleOperate1: null, //修改状态弹窗内容
teacherdialog1: null,
teacherdialog: false, //控制讲师弹窗
teacherdialogtitle: '',//讲师弹框title内容
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
@@ -280,25 +271,18 @@ export default {
{ value: 1, label: "停用" },
])
const columns = ref([
{
title: '讲师编号 ',
dataIndex: 'userNo',
key: 'userNo',
elipsis: true,
width: 200,
},
{
title: '讲师姓名 ',
dataIndex: 'name',
key: 'name',
elipsis: true,
elipsis: true, align: "center",
width: 200,
},
{
title: '手机号 ',
dataIndex: 'mobile',
key: 'mobile',
elipsis: true,
elipsis: true, align: "center",
width: 400,
// customRender: (value, record) => {
// return (
@@ -312,21 +296,21 @@ export default {
title: '邮箱 ',
dataIndex: 'email',
key: 'email',
elipsis: true,
elipsis: true, align: "center",
width: 200,
},
{
title: '授课时长 ',
dataIndex: 'teaching',
key: 'teaching',
elipsis: true,
elipsis: true, align: "center",
width: 200,
},
{
title: '账号状态 ',
dataIndex: 'status',
key: 'status',
elipsis: true,
elipsis: true, align: "center",
width: 200,
customRender: (value) => {
return (
@@ -346,7 +330,7 @@ export default {
title: '操作 ',
dataIndex: 'operation',
key: 'operation',
elipsis: true,
elipsis: true, align: "center",
width: 300,
scopedSlots: { customRender: "action" },
},
@@ -411,22 +395,16 @@ export default {
state.pageSize1 = pageSize;
getTableDate();
};
const teacherchangePagination = (page) => {
state.searchParam.pageNo = page;
getteacherrecordstableData();
};
// 新增讲师
const addTeacher = () => {
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '新增讲师'
}
//修改讲师信息弹窗
const handleModify = (record) => {
state.teacherdialog1 = 0
state.teacherdialog = true;
state.teacherdialogtitle = '修改信息'
state.lookTeacherId = record.id
state.id = record.id
TeacherSystem(record)
}
//保存
@@ -515,159 +493,36 @@ export default {
}
console.log(state.formParam);
}
const rules = {
name: [{ required: true, message: '讲师不能为空' }],
}
//表格内查看数据操作
const handleLook = (record) => {
state.teacherdialog1 = 1
state.teacherdialog = true;
state.teacherdialogtitle = '查看详情'
state.userNoid = record.userNo
state.lookTeacherId = record.id
// alert(record.grade)
TeacherSystem(record)
let id = record.id
router.push({ path: '/LookExternalLecturer', query: { id } })
}
//外部讲师详情
const TeacherSystem = (record) => {
// getOuterTeacherById(state.lookTeacherId).then((res) => {
// console.log("外部讲师详情", res.data);
// state.formParam = res.data.data
// })
// .catch((err) => {
// console.log("外部讲师详情", err);
// });
state.formParam={
name:record.name,
mobile:record.mobile,
email:record.email,
teacherIntrofuce:record.teacherIntrofuce,
remark:record.remark,
}
if(record.id!=null ){
state.formParam.id = record.id
}
}
// tab 标签切换
const particulars = () => {
state.tagsshow = 1
}
const teacherrecords = () => {
state.tagsshow = 2
getteacherrecordstableData()
}
const promotionrecords = () => {
state.tagsshow = 3
}
//授课记录列表
const teacherrecordsColumns = ref([
{
title: '课程编号',
dataIndex: 'id',
key: 'id',
elipsis: true,
width: 120,
},
{
title: '课程名称',
dataIndex: 'name',
key: 'name',
elipsis: true,
width: 120,
},
{
title: '课程日期',
dataIndex: 'beginTime',
key: 'beginTime',
elipsis: true,
width: 120,
},
{
title: '内容分类',
dataIndex: 'nrfl',
key: 'nrfl',
elipsis: true,
width: 120,
},
{
title: '课程类型',
dataIndex: 'type',
key: 'type',
elipsis: true,
width: 120,
customRender: (value) => {
return (
<div>
{value.record.type == 1 || value.record.type == 2 || value.record.type == 3
? {
"1": "项目开课",
"2": "路径开课",
"3": "面授开课",
}[value.record.type + ""] || ""
: "-"}
</div>
)
}
},
{
title: '学习总人数',
dataIndex: 'xxzrs',
key: 'xxzrs',
elipsis: true,
width: 120,
},
{
title: '授课时长',
dataIndex: 'duration',
key: 'duration',
elipsis: true,
width: 120,
},
{
title: '评分',
dataIndex: 'score ',
key: 'score ',
elipsis: true,
width: 120,
},
{
title: '开课状态',
dataIndex: 'status ',
key: 'status ',
elipsis: true,
width: 120,
customRender: (value) => {
return (
<div>
{value.record.status == 0 || value.record.status == 1
? {
"0": "未开课",
"1": "已开课",
}[value.record.status + ""] || ""
: "-"}
</div>
)
}
}
])
//授课记录列表数据
const teacherrecordstableData = ref([
])
const getteacherrecordstableData = () => {
state.teacherrecordsLoading = true
state.loading = true;
let ids={id: state.lookTeacherId ,pageNo: "1", pageSize: "10" }
// let ids =
// {
// id: "965341999643234304",
// pageNo: "1",
// pageSize: "10"
// }
// api接口
getOuterTeacherCourseList(ids).then((res) => {
teacherrecordstableData.value = res.data.data
state.teacherrecordstableDataTotal = Number(res.data.data.total);
state.teacherrecordsLoading = false
getOuterTeacherById(state.id).then((res) => {
console.log("外部讲师详情", res.data);
state.formParam = res.data.data
})
};
.catch((err) => {
console.log("外部讲师详情", err);
});
// state.formParam={
// name:record.name,
// mobile:record.mobile,
// email:record.email,
// teacherIntrofuce:record.teacherIntrofuce,
// remark:record.remark,
// }
// if(record.id!=null ){
// state.formParam.id = record.id
// }
}
// getpromotionrecordstableData()
//导出功能
const handleExport = () => {
@@ -681,6 +536,7 @@ export default {
}
return {
...toRefs(state),
rules,
handleExport,
AccountStatusList,
searchSubmit,
@@ -700,13 +556,6 @@ export default {
closehandleOperate,
getTableDate, //list接口数据调用
TeacherSystem,
particulars,
teacherrecords,
promotionrecords,
teacherrecordstableData,
teacherrecordsColumns,
getteacherrecordstableData,
teacherchangePagination,
// getpromotionrecordstableData
}
@@ -775,8 +624,7 @@ export default {
text-align: center;
}
.ExternalLecturer {
width: 100%;
.ExternalLecturer { width: 100%;
height: 100%;
display: flex;
flex-direction: column;
@@ -788,277 +636,11 @@ export default {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.filterItems {
display: flex;
flex-wrap: wrap;
.select {
margin-right: 20px;
margin-bottom: 20px;
}
.addTimeBox {
position: relative;
display: flex;
align-items: center;
.addTime {
position: absolute;
z-index: 10;
margin-left: 10px;
color: rgba(0, 0, 0, 0.4);
}
.ant-picker {
padding-left: 85px;
}
.ant-picker-range .ant-picker-active-bar {
margin-left: 85px;
}
}
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #fff;
line-height: 36px;
margin-left: 5px;
}
}
.btnn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search0.png");
}
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset0.png");
}
}
// .btn1:hover {
// background: rgba(64, 158, 255, 0.76);
// .search {
// background-image: url("../../assets/images/courseManage/search0.png");
// }
// .btnText {
// color: #ffffff;
// }
// }
.btn1:active {
background: #0982ff;
}
// .btn2:hover {
// background: rgba(64, 158, 255, 0.1);
// }
.btn2:active {
background: #0982ff;
}
}
.btns {
display: flex;
// flex-wrap: wrap;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: #4ea6ff;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
cursor: pointer;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 36px;
margin-left: 5px;
}
}
.btn3 {
margin-right: 0px;
.search {
width: 17px;
height: 18px;
background-image: url("../../assets/images/courseManage/add0.png");
}
}
// .btn3:hover {
// background: rgba(64, 158, 255, 0.76);
// }
.btn3:active {
background: #0982ff;
}
}
}
.tableBox {
margin: 20px 38px 30px;
.ant-table-thead>tr>th {
background-color: #eff4fc;
}
th {
background-color: #eff4fc !important;
text-align: center !important;
}
}
.tableBox {
padding-bottom: 20px;
.pa {
// position: absolute;
// bottom: 20px;
// left: 0;
width: 100%;
// height: 20px;
// background-color: red;
display: flex;
justify-content: center;
// margin-bottom: 10px;
// position: absolute;
// bottom: -40px;
}
}
.operation {
font-size: 14px;
font-weight: 400;
color: #4ea6ff;
margin-right: -45px;
display: flex;
justify-content: right;
margin-right: 18px;
// line-height: 36px;
.operation1 {
margin-left: 21px;
width: 28px;
display: inline-block;
}
.operation3 {
margin-left: 21px;
width: 70px;
display: inline-block;
text-align: center;
}
.more {
width: 50px;
display: inline-block;
margin-left: 21px;
position: relative;
text-align: left;
// z-index: 99999;
.moreArrow {
width: 13px;
height: 7px;
display: inline-block;
background-image: url("../../assets/images/navtop/down.png");
background-size: 100%;
margin: 2px;
margin-left: 7px;
}
.moreItems {
width: 80px;
padding: 5px;
display: none;
background: #ffffff;
box-shadow: 2px 3px 9px 3px rgba(0, 0, 0, 0.05);
border-radius: 3px;
border: 0px solid #dcdcdc;
position: absolute;
left: 0px;
top: 28px;
z-index: 100;
text-align: center;
}
}
.more:hover .moreArrow {
background-image: url("../../assets/images/navtop/up.png");
}
.more:hover .moreItems {
display: block;
}
}
}
}}
.delete {
z-index: 9999;
@@ -1069,7 +651,7 @@ export default {
position: absolute;
left: 50%;
top: 10%;
transform: translate(-50%, -50%);
// transform: translate(-50%, -50%);
.del_header {
position: absolute;
@@ -1161,64 +743,105 @@ export default {
}
}
}
.CreatePath {
.out {
z-index: 9999;
display: block;
position: absolute;
top: 90px;
width:1000px;
// height: 525px;
background-color: #fff;
.out {
z-index: 9999;
display: block;
position: absolute;
top: 90px;
width: 1080px !important;
height: 650px;
overflow: auto;
background-color: #fff;
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
left: 50%;
top:400px;
transform: translate(-50%, -50%);
box-shadow: 0 0 10px rgba(118, 136, 166, 0.21);
left: 50%;
top: 300px;
transform: translate(-50%, -50%);
.top {
width: 100%;
height: 68px;
.top {
width: 100%;
height: 68px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
display: flex;
align-items: center;
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
display: flex;
align-items: center;
.topimg {
width: 18px;
height: 18px;
margin-left: 27px;
margin-top: -2px;
}
.topimg {
width: 18px;
height: 18px;
margin-left: 27px;
margin-top: -2px;
}
.topc {
color: #000000;
font-size: 16px;
margin-left: 8px;
}
}
.topc {
color: #000000;
font-size: 16px;
margin-left: 8px;
}
}
.mid {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.mid {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.d {
// margin-top: 8px;
// color: #ff4e4e;
margin-left: -5px;
}
}
}
.d {
// margin-top: 8px;
// color: #ff4e4e;
margin-left: -5px;
}
}
}
}
// 重置样式
.resetbtn {
width: 100px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
}
//展开收起样式
.moreidbtn {
border: none;
color: #4ea6ff;
width: 80px
}
//小竖线
.line{
float:left; width: 3px; height: 25px; background: #4ea6ff;border-radius: 30%; margin-right: 5px;
}
</style>
//抽屉功能
.drawaer
/* 改变所有 a-tree-select 输入框的高度 */
.ant-tree-select .ant-select-selection {
height: 40px;
line-height: 40px;
/* 确保文字垂直居中 */
}
.draitem{
width: 100%;
height: 40px !important;
border-radius: 8px;
line-height: 40px;
}
.drabtn{
height:40px;
width:80px;
border-radius:8px;
margin-right:20px
}
</style>