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

# Conflicts:
#	src/views/lecturer/InsideTeaching.vue
This commit is contained in:
zhangsir
2024-08-19 14:11:50 +08:00
5 changed files with 491 additions and 346 deletions

View File

@@ -17,7 +17,7 @@ export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/insertIn
//修改内部讲师授课记录 //修改内部讲师授课记录
export const updateInTeacherCourse = (obj) => http.post('/admin/teacher/updateInTeacherCourse', obj) export const updateInTeacherCourse = (obj) => http.post('/admin/teacher/updateInTeacherCourse', obj)
//删除讲师授课记录 //删除讲师授课记录
export const deleteInTeacherCourse= (obj) => http.post(`/admin/teacher/deleteInTeacherCourse?offcourseId=${obj}`) export const deleteInTeacherCourse= (obj) => http.post('/admin/teacher/deleteInTeacherCourse' ,obj)
//外部讲师授课记录 //外部讲师授课记录
export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj) export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj)
//获取外部授课记录详情 //获取外部授课记录详情

View File

@@ -281,7 +281,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher"; import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer"; import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
import { getOuterTeacherCourseList, getAddress, updateInTeacherCourse, deleteInTeacherCourse, insertOutTeaherCourse,getOuterTeacherCourseDetail } from "../../api/Teaching"; import { getOuterTeacherCourseList, getAddress, updateInTeacherCourse, deleteInTeacherCourse, insertInTeacherCourse,getOuterTeacherCourseDetail } from "../../api/Teaching";
// import {getProjSt} from "../../api/indexProjStu"; // import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
export default { export default {
@@ -600,6 +600,7 @@ export default {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改授课记录' state.teacherdialogtitle = '修改授课记录'
state.lookTeacherId = record.teacherId state.lookTeacherId = record.teacherId
state.formParam.teacherType='1'
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
} }
@@ -611,7 +612,7 @@ export default {
}); });
} }
else { else {
insertOutTeaherCourse(state.formParam) insertInTeacherCourse(state.formParam)
.then((res) => { .then((res) => {
message.success("保存成功"); message.success("保存成功");
}).catch((err) => { }).catch((err) => {
@@ -631,7 +632,11 @@ export default {
//确认删除 //确认删除
const closeDeleteTeacher = () => { const closeDeleteTeacher = () => {
//调用删除接口 //调用删除接口
deleteInTeacherCourse(state.delTeacherId).then((res) => { let obj ={
offcourseId :state.delTeacherId,
teacherType:'1'
}
deleteInTeacherCourse(obj).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
message.success("删除成功"); message.success("删除成功");
state.deleteTeacherdialog = false state.deleteTeacherdialog = false

View File

@@ -177,10 +177,11 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师级别" name="tlevelId"> <a-form-item label="讲师级别" name="tlevelId" ><div @click="handlesel">
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear <a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear
:disabled="getLevelList.length !== 0 ? false : true" :options="getLevelList"> :disabled="getLevelList.length !== 0 ? false : true" :options="getLevelList" >
</a-select> </a-select>
</div>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -1137,7 +1138,7 @@ export default {
state.log = true state.log = true
message.warning( '讲师不能为空') message.warning( '讲师不能为空')
} }
if (state.formParam.newdepartId==null){ if (state.formParam.departId==null){
state.log = true state.log = true
message.warning( '组织不能为空') message.warning( '组织不能为空')
} }
@@ -1197,6 +1198,12 @@ export default {
// const customPreview =(e)=>{ // const customPreview =(e)=>{
// e.stopPropagation() // e.stopPropagation()
// } // }
const handlesel=()=>{
console.log( '请下选择讲师体系')
if (state.formParam.tsystemId == undefimed) {
message.warning( '请下选择讲师体系')
}
}
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
window.open ( window.open (
@@ -1217,6 +1224,7 @@ export default {
...toRefs(state), ...toRefs(state),
rules, rules,
rule, rule,
handlesel,
// customPreview, // customPreview,
clearNonNumber, clearNonNumber,
// managerChange, // managerChange,

View File

@@ -5,7 +5,8 @@
<div class="filter"> <div class="filter">
<a-form layout="inline" style="min-width: 1380px;"> <a-form layout="inline" style="min-width: 1380px;">
<a-form-item class="select"> <a-form-item class="select">
<a-input style="width: 276px; height: 40px; border-radius: 8px" placeholder="请输入工号/讲师姓名进行检索" showSearch allowClear v-model:name="searchParam.teacherNameOrUserNo"></a-input> <a-input style="width: 276px; height: 40px; border-radius: 8px" placeholder="请输入工号/讲师姓名进行检索" showSearch
allowClear v-model:name="searchParam.teacherNameOrUserNo"></a-input>
<!-- <div style="width: 276px; height: 40px; border-radius: 8px" > <!-- <div style="width: 276px; height: 40px; border-radius: 8px" >
<ProjectManager v-model:value="searchParam.userNo" <ProjectManager v-model:value="searchParam.userNo"
v-model:name="searchParam.teacher" v-model:name="searchParam.teacher"
@@ -68,13 +69,13 @@
</a-form-item> </a-form-item>
<div style="width: 100%;"></div> <div style="width: 100%;"></div>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.id" placeholder="请选择授课满意度" <a-select style="min-width: 230px ; height: auto ;margin-bottom:20px" v-model:value="searchParam.scoreranges"
:options="getTeacherExpertiseList" allowClear showSearch > placeholder="请选择授课满意度" :options="scoreList" allowClear showSearch mode="tags" @change="scoreChange">
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 230px" v-model:value="searchParam.id" placeholder="授课人数" <a-select style="width: 230px" v-model:value="searchParam.studysranges" placeholder="授课人数" :options="studysList"
:options="getTeacherExpertiseList" allowClear showSearch> allowClear showSearch>
</a-select> </a-select>
<!-- <a-input v-model:value="searchParam.name" style="width: 260px; height: 40px; border-radius: 8px" <!-- <a-input v-model:value="searchParam.name" style="width: 260px; height: 40px; border-radius: 8px"
placeholder="授课人数" allowClear showSearch> placeholder="授课人数" allowClear showSearch>
@@ -91,12 +92,7 @@
<UploadOutlined /> 一键生成讲师费 <UploadOutlined /> 一键生成讲师费
</a-button> </a-button>
</div> --> </div> -->
<a-upload <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2">
multiple
:headers="headers"
:show-upload-list="false"
:before-upload="beforeUpload2"
>
<a-button class="resetbtn"> <a-button class="resetbtn">
<DownloadOutlined /> 导入 <DownloadOutlined /> 导入
</a-button> </a-button>
@@ -108,10 +104,11 @@
<!-- 表格 --> <!-- 表格 -->
<div style="padding: 10px 0"> <div style="padding: 10px 0">
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns" <a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="columns"
:scroll="{ x: 1500 }" :data-source="tableData" :loading="tableLoading" @expand="expandTable" :pagination="false"> :scroll="{ x: 1500 }" :data-source="tableData" :loading="tableLoading" @expand="expandTable"
:pagination="false">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space>
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button> <a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">修改</a-button> <a-button type="link" @click="() => handleModify(record, String(record.courseform))">修改</a-button>
<a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
@@ -124,32 +121,22 @@
</div> </div>
<div class="tableBox "> <div class="tableBox ">
<div style="float: right;"> <div style="float: right;">
<a-pagination <a-pagination v-if="tableDataTotal > 10" :showSizeChanger="false" :showQuickJumper="true" :hideOnSinglePage="true"
v-if="tableDataTotal > 10" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" class="pagination"
:showSizeChanger="false" @change="changePagination" />
:showQuickJumper="true"
:hideOnSinglePage="true"
:pageSize="searchParam.pageSize"
:current="searchParam.pageNo"
:total="tableDataTotal"
class="pagination"
@change="changePagination"
/>
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" dropdown-style="drawaer" <a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
width="60%" :title="teacherdialogtitle"> dropdown-style="drawaer" width="60%" :title="teacherdialogtitle">
<a-form :model="formParam" :rules="rules" layout="vertical"> <a-form :model="formParam" :rules="rules" layout="vertical">
<!-- 讲师姓名 name 组织 departId--> <!-- 讲师姓名 teacher 组织 departId-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师名称" name="teacher"> <a-form-item label="讲师名称" name="teacher">
<ProjectManager v-model:value="formParam.userNo" <SearchTeacher v-model:value="formParam.teacher" v-model:lable="formParam.orgName"
v-model:name="formParam.teacher" v-model:newlable="formParam.neworgName"></SearchTeacher>
placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange" mode="multiple"></ProjectManager>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -193,8 +180,7 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程名称:" name="name"> <a-form-item label="课程名称:" name="name">
<a-input class="draitem" v-model:value="formParam.name" <a-input class="draitem" v-model:value="formParam.name" placeholder="请输入后搜索面授课" allowClear showSearch>
placeholder="请输入后搜索面授课" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -203,8 +189,8 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课/课程日期 :" name="beginTime"> <a-form-item label="授课/课程日期 :" name="beginTime">
<a-date-picker class="draitem" v-model:value="formParam.beginTime" style="width: 200px" <a-date-picker class="draitem" v-model:value="formParam.beginTime" style="width: 200px" format="YYYY-MM-DD"
format="YYYY-MM-DD" placeholder="请选择课程日期" /> placeholder="请选择课程日期" @change="editTimeChange" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -220,16 +206,16 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="duration"> <a-form-item label="授课时长" name="duration">
<a-input v-model:value="formParam.duration" style="width:80%; height: 40px; border-radius: 8px ; " placeholder="0" <a-input v-model:value="formParam.duration" style="width:80%; height: 40px; border-radius: 8px ; "
allowClear showSearch suffix="分钟" @blur="clearNonNumber"> placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.duration!= null">{{ (formParam.duration /60 ).toFixed(2)}}小时</span> <span style="margin-left: 5px ;" v-if="formParam.duration != null">{{ (formParam.duration / 60
).toFixed(2) }}小时</span>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item label="评分" name="score">
<a-input class="draitem" v-model:value="formParam.score" placeholder="" allowClear <a-input class="draitem" v-model:value="formParam.score" placeholder="" allowClear showSearch>
showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -238,8 +224,7 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="参训人数" name="studys"> <a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem" <a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch>
placeholder="0 " allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -270,35 +255,41 @@
</a-button> </a-button>
</div> </div>
</a-drawer> </a-drawer>
<!--查看授课详情 --> <!--查看授课详情 -->
<a-drawer v-model:visible="teachingdialog" placement="right" <a-drawer v-model:visible="teachingdialog" placement="right" @closa="cancelTeachingDialog" :maskClosable="true"
@closa="cancelTeachingDialog" :maskClosable="true" width="60%" title="查看讲师授课记录"> width="60%" title="查看讲师授课记录">
<span class="line"></span>
<span>讲师信息</span>
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="讲师名称">{{formParam.teacher}}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{formParam.userNo}}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{formParam.departId}}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{formParam.systemId}}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{formParam.levelId }}</a-descriptions-item>
<a-descriptions-item label="录入方式">
{{formParam.entryType==0?'系统生成' :formParam.entryType==1 ?'手动录入':''}}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{formParam.type==1?'项目开课' :formParam.type==2 ?'路径开课':formParam.type==3 ?'面授开课':''}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{formParam.name}}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{formParam.status==0?'未开课' :formParam.status==1 ?'已开课':''}}</a-descriptions-item>
<a-descriptions-item label="授课时长 "><span style="margin-left: 5px ;" v-if="formParam.duration!= null">{{ (formParam.duration /60 ).toFixed(2)}}小时</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{formParam.beginTime}}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{formParam.studys}}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{formParam.score}}</a-descriptions-item>
<a-descriptions-item label="内容分类 ">{{formParam.id}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark}}</a-descriptions-item>
</a-descriptions>
<span class="line"></span> <span class="line"></span>
<span>讲师费发放情况</span> <span>讲师信息</span>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="column" :data-source="tableDatas" :loading="tableLoadings" :pagination="false"> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="讲师名称">{{ formParam.teacher }}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{ formParam.userNo }}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.departId }}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{ formParam.systemId }}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{ formParam.levelId }}</a-descriptions-item>
<a-descriptions-item label="录入方式">
{{ formParam.entryType == 0 ? '系统生成' : formParam.entryType == 1 ? '手动录入' : '' }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '项目开课' : formParam.type == 2 ? '路径开课' : formParam.type == 3
? '面授开课' : '' }}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{ formParam.name }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.status == 0 ? '未开课' : formParam.status == 1
? '已开课' : '' }}</a-descriptions-item>
<a-descriptions-item label="授课时长 "><span style="margin-left: 5px ;" v-if="formParam.duration != null">{{
(formParam.duration / 60).toFixed(2) }}小时</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.beginTime }}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{ formParam.studys }}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
<a-descriptions-item label="内容分类 ">{{ formParam.id }}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item>
</a-descriptions>
<div style="margin-top:20px ;line-height: 24px;" >
<span class="line"></span>
<span>讲师费发放情况</span>
</div>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe" :columns="column"
:data-source="tableDatas" :loading="tableLoadings" :pagination="false">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space>
<!-- <a-button type="link" @click="() => handleLooka(record, String(record.courseform))">查看</a-button> --> <!-- <a-button type="link" @click="() => handleLooka(record, String(record.courseform))">查看</a-button> -->
</a-space> </a-space>
</template> </template>
@@ -319,7 +310,7 @@
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回 <a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回
</a-button> </a-button>
</div> </div>
</a-drawer> </a-drawer>
<!-- 删除功能弹窗 --> <!-- 删除功能弹窗 -->
<div> <div>
<a-modal v-model:visible="deleteTeacherdialog" :footer="null" :closable="close" wrapClassName="canclestu1" <a-modal v-model:visible="deleteTeacherdialog" :footer="null" :closable="close" wrapClassName="canclestu1"
@@ -328,7 +319,7 @@
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
<div class="header"> <div class="header">
<img src="@/assets/images/coursewareManage/QR.png" alt="" style="margin-right:10px"/> <img src="@/assets/images/coursewareManage/QR.png" alt="" style="margin-right:10px" />
<span>提示</span> <span>提示</span>
</div> </div>
<div class="body"> <div class="body">
@@ -365,11 +356,12 @@ import dayjs from "dayjs";
// import Editor from "@/components/project/Editor"; // import Editor from "@/components/project/Editor";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { getTeacherSystemList, infoteacher, getTeacherExpertise, deleteInTeacherCourse } from "../../api/Lecturer"; import { getTeacherSystemList, infoteacher, getTeacherExpertise } from "../../api/Lecturer";
import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse ,getCharges} from "../../api/Teaching"; import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse, getCharges, deleteInTeacherCourse } from "../../api/Teaching";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
import ImportWork from "../../components/project/ImportWork.vue"; import ImportWork from "../../components/project/ImportWork.vue";
import { fileUp } from "../../api/Lecturer"; import { fileUp } from "../../api/Lecturer";
import SearchTeacher from "@/components/project/SearchTeacher";
export default { export default {
name: "InsideTeaching", name: "InsideTeaching",
components: { components: {
@@ -377,6 +369,7 @@ export default {
// Editor, // Editor,
// Upload, // Upload,
ImportWork, ImportWork,
SearchTeacher,
// Editor, // Editor,
// ImageUpload // ImageUpload
ProjectManager, ProjectManager,
@@ -389,8 +382,10 @@ export default {
setup() { setup() {
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
moreid:1, moreid: 1,
vf:false, vf: false,
log: false,
close: false,
showWork: false, showWork: false,
currentPage1: 1, currentPage1: 1,
pageSize1: 10, pageSize1: 10,
@@ -402,31 +397,32 @@ export default {
teacherdialog1: null, teacherdialog1: null,
teacherdialog: false, //控制讲师弹窗 teacherdialog: false, //控制讲师弹窗
teacherdialogtitle: '',//讲师弹框title内容 teacherdialogtitle: '',//讲师弹框title内容
teachingdialog:false,//控制查看抽屉 teachingdialog: false,//控制查看抽屉
pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条 pageSizeOptions: ['10', '20', '30', '50'], //下拉选择每页显示多少条
pageSize: 10, pageSize: 10,
tableDataTotal: -1,//table列表总条数 tableDataTotal: -1,//table列表总条数
searchdate: null, //选择时间 searchdate: null, //选择时间
startTime: null, //开始时间 startDate: null, //开始时间
endTime: null, //结束时间 endDate: null, //结束时间
formParam: { formParam: {
status: 1, status: 1,
entryType:1, entryType: 1,
duration:0 duration: 0
}, },
searchParam: { searchParam: {
teacherType:'0', teacherType: '0',
// userNo: null,//工号姓名 // userNo: null,//工号姓名
// teacher:null, // teacher:null,
teacherNameOrUserNo:null, teacherNameOrUserNo: null,
name: null,//课程编号 name: null,//课程编号
tsystemName: null,//讲师体系 tsystemName: null,//讲师体系
payrollPlaceName: null,//发薪地 payrollPlaceName: null,//发薪地
entryType:null, entryType: null,
pageNo: "1", pageNo: "1",
pageSize: "10", pageSize: "10",
startDate: null, startDate: null,
endDate: null, endDate: null,
beginTime: null,
}, },
}) })
@@ -506,10 +502,61 @@ export default {
{ value: 0, label: "未开课" }, { value: 0, label: "未开课" },
{ value: 1, label: "已开课" }, { value: 1, label: "已开课" },
]) ])
const entryTypeList= ref([ const entryTypeList = ref([
{ value:0 ,label:"系统生成"}, { value: 0, label: "系统生成" },
{ value:1 ,label:"手动录入"}, { value: 1, label: "手动录入" },
]) ])
const scoreList = ref([
{ value: '', label: "全部" },
{ value: '90-100', label: "90~100" },
{ value: '80-90', label: "80~90" },
{ value: '70-80', label: "70~80" },
{ value: '60-70', label: "60~70" },
{ value: '10-50', label: "10~50" },
])
const studysList = ref([
{ value: '0-30', label: "0~30" },
{ value: '0-50', label: "0~50" },
{ value: '0-70', label: "0~70" },
{ value: '0-100', label: "0~100" },
{ value: '0-150', label: "0~150" },
{ value: '0-200', label: "0~200" },
{ value: '0-300', label: "0~300 " },
])
const scoreChange = (e) => {
if(e.length!==0){
e.map((item)=>{
if(item !== ''){
scoreList.value.map((item) => {
item.disabled = false
})
}
else {
scoreList.value.map((item) => {
if (item.value !== '') {
item.disabled = true
}
})
}
})}
else{
scoreList.value.map((item) => {
item.disabled = false
})
}
// if (e == '0') {
// scoreList.value.map((item) => {
// if (item.value !== '0') {
// item.disabled = true
// }
// })
// }
// else {
// scoreList.value.map((item) => {
// item.disabled = false
// })
// }
}
const columns = ref([ const columns = ref([
{ {
@@ -692,6 +739,8 @@ export default {
state.searchParam.trainorgId = null state.searchParam.trainorgId = null
state.searchParam.systemId = null state.searchParam.systemId = null
state.searchParam.id = null state.searchParam.id = null
state.searchParam.scoreranges = null
state.searchParam.studysranges = []
} }
} }
// 搜索 // 搜索
@@ -700,30 +749,37 @@ export default {
}; };
//修改时间 //修改时间
const searchTimeChange = (e, date) => { const searchTimeChange = (e, date) => {
let startTime = date[0] + " 00:00:00"; let startDate = date[0] + " 00:00:00";
let endTime = date[1] + " 23:59:59"; let endDate = date[1] + " 23:59:59";
state.startTime = new Date(startTime).getTime(); state.startDate = new Date(startDate).getTime();
state.endTime = new Date(endTime).getTime(); state.endDate = new Date(endDate).getTime();
// state.searchParam.startDate = new Date(startDate).getTime() ; // state.searchParam.startDate = new Date(startDate).getTime() ;
// state.searchParam.endDate = new Date(endDate).getTime() ; // state.searchParam.endDate = new Date(endDate).getTime() ;
state.searchParam.startDate = state.startTime ? state.startTime : null, state.searchParam.startDate = state.startDate ? state.startDate : null,
state.searchParam.endDate = state.endTime ? state.endTime : null state.searchParam.endDate = state.endDate ? state.endDate : null
};
const editTimeChange = (e, date) => {
console.log(date);
state.beginTime = date;
// console.log(date, state.searchParam.startDate, state.searchParam.endDate);
}; };
//重置 //重置
const searchReset = () => { const searchReset = () => {
state.searchParam = { state.searchParam = {
teacherType:'0', teacherType: '0',
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
teacherNameOrUserNo: null, teacherNameOrUserNo: null,
entryType: null, entryType: null,
status: null, status: null,
trainorgId:null, trainorgId: null,
systemId:null, systemId: null,
endDate:null, endDate: null,
startDate:null, startDate: null,
entryType:null entryType: null,
studysranges: [],
score: null
}; };
getTableDate(); getTableDate();
}; };
@@ -767,7 +823,12 @@ export default {
} }
//保存 //保存
const createTeacherDialog = () => { const createTeacherDialog = () => {
if (state.vf==false) { rule()
if (state.log = true) {
state.teacherdialog = true;
}
else {
if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => { updateInTeacherCourse(state.formParam).then(response => {
message.success("修改成功"); message.success("修改成功");
}); });
@@ -784,6 +845,7 @@ export default {
getTableDate(); getTableDate();
state.teacherdialog = false state.teacherdialog = false
} }
}
//删除弹窗 //删除弹窗
const deleteModal = (record) => { const deleteModal = (record) => {
state.deleteTeacherdialog = true state.deleteTeacherdialog = true
@@ -794,7 +856,11 @@ export default {
//确认删除 //确认删除
const closeDeleteTeacher = () => { const closeDeleteTeacher = () => {
//调用删除接口 //调用删除接口
deleteInTeacherCourse(state.delTeacherId).then((res) => { let obj = {
offcourseId: state.delTeacherId,
teacherType: '0'
}
deleteInTeacherCourse(obj).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
message.success("删除成功"); message.success("删除成功");
state.deleteTeacherdialog = false state.deleteTeacherdialog = false
@@ -815,20 +881,21 @@ export default {
//清空数据 //清空数据
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
name: null, teacherType: '0',
teacher: null,
departId: null, departId: null,
systemId:null, systemId: null,
levelId: null, levelId: null,
name:null, name: null,
duration:0, duration: 0,
endDate:null, endDate: null,
startDate:null, startDate: null,
studys: null, studys: null,
score: null, score: null,
type: null, type: null,
remark: null, remark: null,
offcourseId: null, offcourseId: null,
entryType:null entryType: null
} }
} }
@@ -862,7 +929,7 @@ export default {
// router.push({ path: '/insideteachingdetail', query: { id } }) // router.push({ path: '/insideteachingdetail', query: { id } })
// router.push({ path: '/InsideTeachingDetail' }) // router.push({ path: '/InsideTeachingDetail' })
} }
const cancelTeachingDialog =()=>{ const cancelTeachingDialog = () => {
state.teachingdialog = false; state.teachingdialog = false;
} }
//内部授课详情 //内部授课详情
@@ -875,10 +942,11 @@ export default {
// console.log("内部授课详情", err); // console.log("内部授课详情", err);
// }); // });
state.formParam = { state.formParam = {
name: record.name, teacherType: '0',
teacher: record.teacher,
userNo: record.userNo, userNo: record.userNo,
departId:record.departId, departId: record.departId,
systemId:record.systemId, systemId: record.systemId,
levelId: record.levelId, levelId: record.levelId,
type: record.type, type: record.type,
name: record.name, name: record.name,
@@ -890,11 +958,11 @@ export default {
score: record.score, score: record.score,
studys: record.studys, studys: record.studys,
remark: record.remark, remark: record.remark,
entryType:record.entryType entryType: record.entryType
} }
console.log(state.formParam) console.log(state.formParam)
} }
const column = ref([ { const column = ref([{
title: '基准课酬 ', title: '基准课酬 ',
dataIndex: 'levelPay', dataIndex: 'levelPay',
key: 'levelPay', key: 'levelPay',
@@ -923,7 +991,7 @@ export default {
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{value.record.status == "A10" || value.record.status == "A20" ||value.record.status == "A30" ||value.record.status == "E10"||value.record.status == "S20" {value.record.status == "A10" || value.record.status == "A20" || value.record.status == "A30" || value.record.status == "E10" || value.record.status == "S20"
? { ? {
"A10": "待审核", "A10": "待审核",
"A20": "已提交", "A20": "已提交",
@@ -945,8 +1013,8 @@ export default {
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]) ])
const gettableDatas =(record)=>{ const gettableDatas = (record) => {
getCharges({kid:record.kid}) getCharges({ kid: record.kid })
.then((res) => { .then((res) => {
console.log(res) console.log(res)
tableDatas.value = res.data.data.records tableDatas.value = res.data.data.records
@@ -963,15 +1031,48 @@ export default {
name: [{ required: true, message: '课程名称不能为空' }], name: [{ required: true, message: '课程名称不能为空' }],
beginTime: [{ required: true, message: '授课/课程日期不能为空' }], beginTime: [{ required: true, message: '授课/课程日期不能为空' }],
duration: [{ required: true, message: '授课时长不能为空' }], duration: [{ required: true, message: '授课时长不能为空' }],
certStatus: [{ required: true, message: '认证状态不能为空' }], status: [{ required: true, message: '开课状态不能为空' }],
} }
function managerChange(e, l, d, t, orgName) { const rule = () => {
console.log(e, l); if (state.formParam.teacher == null) {
state.searchParam.userNo = d; state.log = true
state.searchParam.name = t; message.warning('讲师不能为空')
// state.searchParam.trainorgName=orgName
} }
if (state.formParam.departId == null) {
state.log = true
message.warning('组织不能为空')
}
if (state.formParam.tlevelId == null) {
state.log = true
message.warning('讲师级别不能为空')
}
if (state.formParam.tsystemId == null) {
state.log = true
message.warning('讲师体系不能为空')
}
if (state.formParam.name == null) {
state.log = true
message.warning('课程名称不能为空')
}
if (state.formParam.beginTime == null) {
state.log = true
message.warning('授课/课程日期不能为空')
}
if (state.formParam.defaultteachingTime == null) {
state.log = true
message.warning('授课时长不能为空')
}
if (state.formParam.status == null) {
state.log = true
message.warning('开课状态不能为空')
}
}
// function managerChange(e, l, d, t, orgName) {
// console.log(e, l);
// state.searchParam.userNo = d;
// state.searchParam.name = t;
// // state.searchParam.trainorgName=orgName
// }
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
window.open( window.open(
@@ -986,13 +1087,15 @@ export default {
&entryType=${state.searchParam.entryType ? state.searchParam.entryType : ""} &entryType=${state.searchParam.entryType ? state.searchParam.entryType : ""}
&id=${state.searchParam.id ? state.searchParam.id : ""} &id=${state.searchParam.id ? state.searchParam.id : ""}
&type=${state.searchParam.type ? state.searchParam.type : ""} &type=${state.searchParam.type ? state.searchParam.type : ""}
&status=${state.searchParam.status ? state.searchParam.status : ""}`) &status=${state.searchParam.status ? state.searchParam.status : ""}
&studysranges=${state.searchParam.studysranges ? state.searchParam.studysranges : ""}
&scoreranges=${state.searchParam.scoreranges ? state.searchParam.scoreranges : ""}
`)
} }
const handleImport = () => { const handleImport = () => {
state.showWork = true state.showWork = true
} }
const beforeUpload2 = (file) => { const beforeUpload2 = (file) => {
console.log(6765555);
console.log(file); console.log(file);
const fileType = [ const fileType = [
"xls", "xls",
@@ -1022,15 +1125,16 @@ export default {
}); });
return false; return false;
}; };
const clearNonNumber=()=>{ const clearNonNumber = () => {
state.formParam.defaultteachingTime = state.formParam.defaultteachingTime.replace(/\D/g, ''); state.formParam.defaultteachingTime = state.formParam.defaultteachingTime.replace(/\D/g, '');
} }
return { return {
...toRefs(state), ...toRefs(state),
managerChange, // managerChange,
clearNonNumber, clearNonNumber,
beforeUpload2, beforeUpload2,
rules, rules,
rule,
column, column,
tableDatas, tableDatas,
gettableDatas, gettableDatas,
@@ -1039,6 +1143,8 @@ export default {
handleImport, handleImport,
LecturerSystemList, LecturerSystemList,
getTeacherExpertiseList, getTeacherExpertiseList,
scoreList,
studysList,
OnTheJobStatusList, OnTheJobStatusList,
getTeacherExpertiseLista, getTeacherExpertiseLista,
AuthenticationStatusList, AuthenticationStatusList,
@@ -1061,8 +1167,10 @@ export default {
LecturerSystemLista, LecturerSystemLista,
TeacherSystem, TeacherSystem,
getOrganizationLista, getOrganizationLista,
getOrganizationList,searchTimeChange, getOrganizationList, searchTimeChange,
cancelTeachingDialog cancelTeachingDialog,
editTimeChange,
scoreChange
} }
}, },
}; };
@@ -1185,10 +1293,8 @@ export default {
position: absolute; position: absolute;
width: calc(100%); width: calc(100%);
height: 40px; height: 40px;
background: linear-gradient( background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0.2) 0%, rgba(78, 166, 255, 0) 100%);
rgba(78, 166, 255, 0) 100%
);
} }
.del_main { .del_main {
@@ -1275,7 +1381,8 @@ export default {
} }
} }
} }
} }
.CreatePath { .CreatePath {
.out { .out {
z-index: 9999; z-index: 9999;
@@ -1375,9 +1482,7 @@ export default {
} }
//抽屉功能 //抽屉功能
.drawaer .drawaer // /* 改变所有 a-tree-select 输入框的高度 */
// /* 改变所有 a-tree-select 输入框的高度 */
// ::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{ // ::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
// height: 40px; // height: 40px;
// line-height: 40px; // line-height: 40px;
@@ -1385,29 +1490,41 @@ export default {
// /* 确保文字垂直居中 */ // /* 确保文字垂直居中 */
// } // }
::v-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector{ ::v-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
height: 40px !important; height: 40px !important;
line-height: 40px; line-height: 40px;
border-radius: 8px border-radius: 8px
} }
// 抽屉内样式 // 抽屉内样式
.draitem{ .draitem {
width: 100%; width: 100%;
height: 40px !important; height: 40px !important;
border-radius: 8px; border-radius: 8px;
line-height: 40px; line-height: 40px;
} }
.drabtn{
height:40px; .drabtn {
width:80px; height: 40px;
border-radius:8px; width: 80px;
margin-right:20px border-radius: 8px;
margin-right: 20px
} }
::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
border-radius:8px; ::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector {
height:40px; border-radius: 8px;
height: 40px;
} }
.ant-col-12{
height:90px; .ant-col-12 {
height: 90px;
}
::v-deep .ant-select-selection-overflow-item {
margin-top: -2px;
}
::v-deep .ant-select-multiple .ant-select-selection-item {
height: 34px
} }
</style> </style>

View File

@@ -32,7 +32,12 @@
<!-- 二层 --> <!-- 二层 -->
<a-descriptions-item label="讲师级别">{{formParam.tlevelName <a-descriptions-item label="讲师级别">{{formParam.tlevelName
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="认证状态">{{ formParam.certStatus==0?'未认证' :formParam.certStatus==1 ?'已认证':''}}</a-descriptions-item> <a-descriptions-item label="认证状态">{{ formParam.certStatus==0?'未认证' :formParam.certStatus==1 ?'已认证':''}}
<span>
<a-button type="text" class="moreidbtn" v-if="formParam.certStatus == 1"
@click="handleup">查看认证资料</a-button>
</span>
</a-descriptions-item>
<a-descriptions-item label="授课时长"> <span v-if="formParam.defaultTeachingTime!= null" >{{ (formParam.defaultTeachingTime /60 ).toFixed(2)}}小时</span> <a-descriptions-item label="授课时长"> <span v-if="formParam.defaultTeachingTime!= null" >{{ (formParam.defaultTeachingTime /60 ).toFixed(2)}}小时</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="发薪地 ">{{formParam.payrollPlaceName}}</a-descriptions-item> <a-descriptions-item label="发薪地 ">{{formParam.payrollPlaceName}}</a-descriptions-item>
@@ -353,7 +358,7 @@ export default{
const goback = ()=>{ const goback = ()=>{
router.back() router.back()
} }
// const store = useStore(); const store = useStore();
// // 内容分类 // // 内容分类
// const sysTypeOptions = computed(() => {return store.state.content_type;}); // const sysTypeOptions = computed(() => {return store.state.content_type;});
// //内容分类 // //内容分类
@@ -364,11 +369,16 @@ export default{
// } // }
// getSysTypeMap() // getSysTypeMap()
// getpromotionrecordstableData() const handleup = ()=>{
window.open (
`${process.env.VUE_APP_BASE_API}/teacherUpload/teacherDownload?teacherId= ${state.id}`
);
}
return{ return{
...toRefs(state), ...toRefs(state),
router, router,
goback, goback,
handleup,
// getSysTypeMap, // getSysTypeMap,
// sysTypeOptions, // sysTypeOptions,
TeacherSystem, TeacherSystem,
@@ -444,4 +454,9 @@ export default{
font-size: 14px; font-size: 14px;
} }
} }
.moreidbtn {
border: none;
color: #4ea6ff;
width: 80px
}
</style> </style>