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

This commit is contained in:
zhangsir
2024-11-21 16:32:20 +08:00
2 changed files with 308 additions and 318 deletions

View File

@@ -565,6 +565,13 @@ export default {
key: 'teaching', key: 'teaching',
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 120, width: 120,
customRender: (value) => {
return (
<div>
{(value.record?.teaching/60).toFixed(2)+'小时' || '-' }
</div>
);
},
}, },
{ {
title: '学习总人数', title: '学习总人数',
@@ -812,9 +819,10 @@ export default {
}); });
} }
function managerChange(e, l, d, t, orgName) { function managerChange(e, l, d, t, orgName) {
console.log(e, l,); // console.log(e, l, d, t, orgName,'e, l, d, t, orgName');
state.formParam.mobile=l.mobile state.formParam.mobile=e?l.mobile:''
state.formParam.teacherId=l.id state.formParam.teacherId=e?l.id:''
console.log(state.formParam)
// state.searchParam.userNo = d; // state.searchParam.userNo = d;
// state.searchParam.name = t; // state.searchParam.name = t;
// state.searchParam.trainorgName=orgName // state.searchParam.trainorgName=orgName

View File

@@ -6,7 +6,7 @@
<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 v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px" <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch" > placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item class="select"> <a-form-item class="select">
@@ -20,16 +20,9 @@
</a-form-item> --> </a-form-item> -->
<a-form-item class="select "> <a-form-item class="select ">
<div class="select addTimeBox"> <div class="select addTimeBox">
<div class="addTime" >授课日期</div> <div class="addTime">授课日期</div>
<a-range-picker <a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
v-model:value="searchdate" separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-on:keydown.enter="enterPressHadlerSearch" />
style="width: 420px"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
v-on:keydown.enter="enterPressHadlerSearch"
/>
<!-- @change="searchTimeChange" --> <!-- @change="searchTimeChange" -->
</div> </div>
</a-form-item> </a-form-item>
@@ -54,14 +47,12 @@
<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.createFrom" placeholder="录入类型" <a-select style="width: 230px ;margin-bottom:20px" v-model:value="searchParam.createFrom" placeholder="录入类型"
:options="entryTypeList" allowClear :options="entryTypeList" allowClear v-on:keydown.enter="enterPressHadlerSearch">
v-on:keydown.enter="enterPressHadlerSearch">
</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.courseStatus" placeholder="开课状态" <a-select style="width: 230px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
:options="AuthenticationStatusList" allowClear showSearch :options="AuthenticationStatusList" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
v-on:keydown.enter="enterPressHadlerSearch">
</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">
@@ -72,41 +63,32 @@
</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" placeholder="请选择所属组织" v-model:value="searchParam.sourceBelongId" <a-select style="width: 230px" placeholder="请选择所属组织" v-model:value="searchParam.sourceBelongId"
:options="getOrganizationList" allowClear showSearch :options="getOrganizationList" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
v-on:keydown.enter="enterPressHadlerSearch">
</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-tree-select style="width: 230px" <a-tree-select style="width: 230px" :fieldNames="{
:fieldNames="{
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'code', value: 'code',
}" }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
allow-clear v-model:value="searchParam.courseTypeId" show-search
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
v-model:value="searchParam.courseTypeId" :tree-data="sysTypeOptions" v-on:keydown.enter="enterPressHadlerSearch">
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions"
v-on:keydown.enter="enterPressHadlerSearch">
</a-tree-select> </a-tree-select>
</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="min-width: 230px ; height: auto ;margin-bottom:20px" v-model:value="score" <a-select style="min-width: 230px ; height: auto ;margin-bottom:20px" v-model:value="score" placeholder="请选择评分"
placeholder="请选择评分" :options="scoreList" allowClear showSearch mode="multiple" @change="scoreChange" :options="scoreList" allowClear showSearch mode="multiple" @change="scoreChange"
v-on:keydown.enter="enterPressHadlerSearch"> v-on:keydown.enter="enterPressHadlerSearch">
</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.studys" placeholder="授课人数" :options="studysList" <a-select style="width: 230px" v-model:value="searchParam.studys" placeholder="授课人数" :options="studysList"
allowClear showSearch allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
<!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px" <!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="授课人数" allowClear showSearch> placeholder="授课人数" allowClear showSearch>
@@ -119,7 +101,7 @@
<FolderAddOutlined /> 添加授课记录 <FolderAddOutlined /> 添加授课记录
</a-button> </a-button>
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> --> <!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> -->
<a-button class="resetbtn" @click="handleImport()" > <a-button class="resetbtn" @click="handleImport()">
<DownloadOutlined /> 导入 <DownloadOutlined /> 导入
</a-button> </a-button>
<!-- </a-upload> --> <!-- </a-upload> -->
@@ -135,14 +117,16 @@
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'teaching'"> <template v-if="column.key === 'teaching'">
<a-space style="display:flex ;justify-content: space-around; "> <a-space style="display:flex ;justify-content: space-around; ">
<span>{{ (record?.teaching/60).toFixed(2) || '-' }}</span> <span>{{ (record?.teaching / 60).toFixed(2) +'小时'|| '-' }}</span>
</a-space> </a-space>
</template> </template>
<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))" v-if="record.createFrom == 1 && record.courseStatus == 0 ">编辑 </a-button> <a-button type="link" @click="() => handleModify(record, String(record.courseform))"
<a-button type="link" v-if="record.createFrom == 1 &&record.isSuperPermission==='true'" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> v-if="record.createFrom == 1 && record.courseStatus == 0">编辑 </a-button>
<a-button type="link" v-if="record.createFrom == 1 && record.isSuperPermission === 'true'"
@click="() => deleteModal(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> -->
</a-space> </a-space>
</template> </template>
@@ -165,8 +149,9 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师名称" name="name"> <a-form-item label="讲师名称" name="name">
<SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:id="formParam.teacherId" <SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgNames"
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher> v-model:id="formParam.teacherId" v-model:system="tSystemNames" v-model:level="formParam.tlevelId">
</SearchTeacher>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -187,15 +172,15 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师体系" name="tsystemName"> <a-form-item label="讲师体系" name="tsystemName">
<a-input disabled v-model:value="tSystemNames.systemName" class="draitem" <a-input disabled v-model:value="tSystemNames.systemName" class="draitem" placeholder="自动带出讲师的体系" allowClear
placeholder="自动带出讲师的体系" allowClear showSearch> showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师级别" name="tlevelName"> <a-form-item label="讲师级别" name="tlevelName">
<a-input disabled v-model:value="formParam.tlevelName" class="draitem" <a-input disabled v-model:value="formParam.tlevelName" class="draitem" placeholder="自动带出讲师级别" allowClear
placeholder="自动带出讲师级别" allowClear showSearch> showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -204,29 +189,21 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="内容分类" name="courseTypeId"> <a-form-item label="内容分类" name="courseTypeId">
<a-tree-select <a-tree-select :fieldNames="{
:fieldNames="{
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'code', value: 'code',
}" }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
allow-clear v-model:value="formParam.courseTypeId" show-search
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
v-model:value="formParam.courseTypeId" :tree-data="sysTypeOptions" @change="treetype">
show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="请选择内容分类"
tree-default-expand-all
:tree-data="sysTypeOptions"
@change="treetype"
>
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程名称:" name="courseName"> <a-form-item label="课程名称:" name="courseName">
<a-input class="draitem" v-model:value="formParam.courseName" placeholder="请输入课程名称" allowClear showSearch :maxlength="20" showCount @blur="sendName" <a-input class="draitem" v-model:value="formParam.courseName" placeholder="请输入课程名称" allowClear showSearch
> :maxlength="20" showCount @blur="sendName">
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -235,17 +212,13 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程归属组织" name="sourceBelongId"> <a-form-item label="课程归属组织" name="sourceBelongId">
<OrgClass <OrgClass v-model:value="formParam.sourceBelongId" v-model:name="formParam.sourceBelongFullName"></OrgClass>
v-model:value="formParam.sourceBelongId"
v-model:name="formParam.sourceBelongFullName"
></OrgClass>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate"> <a-form-item label="授课/课程日期 :" name="teachingDate">
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" :show-time="{ format: 'HH:mm' }" <a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm"
type="datetime" :show-time="{ format: 'HH:mm' }" type="datetime" placeholder="请选择课程日期" />
placeholder="请选择课程日期" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -262,9 +235,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="teaching"> <a-form-item label="授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px ; " <a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px ; "
placeholder="0" allowClear showSearch suffix="分钟" placeholder="0" allowClear showSearch suffix="分钟" :maxLength="8" @blur="clearNonNumber">
:maxLength="8"
@blur="clearNonNumber">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60 <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span> ).toFixed(2) }}小时</span>
@@ -294,8 +265,7 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="备注"> <a-form-item label="备注">
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200" <a-textarea v-model:value="formParam.remark" showCount :maxlength="200" @blur="sendRemark"
@blur="sendRemark"
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" /> style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -331,12 +301,13 @@
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="录入方式"> <a-descriptions-item label="录入方式">
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '-' }}</a-descriptions-item> {{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '-' }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '在线课' : formParam.type == 0 ? '面授课' : '' }}</a-descriptions-item> <a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '在线课' : formParam.type == 0 ? '面授课' : ''
}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{ formParam.courseName }}</a-descriptions-item> <a-descriptions-item label="课程名称">{{ formParam.courseName }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0? '未开课' : formParam.courseStatus == 1 <a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0 ? '未开课' : formParam.courseStatus == 1
? '已开课' : '' }}</a-descriptions-item> ? '已开课' : '' }}</a-descriptions-item>
<a-descriptions-item label="授课时长 "> <a-descriptions-item label="授课时长 ">
<span > {{ formParam.teaching }} 分钟</span> <span> {{ formParam.teaching }} 分钟</span>
<span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60 <span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60
).toFixed(2) }}小时)</span> </a-descriptions-item> ).toFixed(2) }}小时)</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item> <a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
@@ -346,7 +317,7 @@
<a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item> <a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item>
</a-descriptions> </a-descriptions>
<div v-if="formParam.createFrom == '0'"> <div v-if="formParam.createFrom == '0'">
<div style="margin-top:20px ;line-height: 24px;" > <div style="margin-top:20px ;line-height: 24px;">
<span class="line"></span> <span class="line"></span>
<span>讲师费发放情况</span> <span>讲师费发放情况</span>
</div> </div>
@@ -360,7 +331,7 @@
</template> </template>
</template> </template>
</a-table> </a-table>
</div> </div>
<div :style="{ <div :style="{
position: 'absolute', position: 'absolute',
right: 0, right: 0,
@@ -408,9 +379,9 @@
</div> </div>
</template> </template>
<script lang="jsx"> <script lang="jsx">
import { reactive, toRefs, ref,computed ,watch ,onMounted} from "vue"; import { reactive, toRefs, ref, computed, watch, onMounted } from "vue";
import moment, { Moment } from 'moment'; import moment, { Moment } from 'moment';
import { useRouter,useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import { import {
RightOutlined, RightOutlined,
UpOutlined, UpOutlined,
@@ -424,7 +395,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { getTeacherSystemList, infoteacher, getTeacherExpertise } from "../../api/Lecturer"; import { getTeacherSystemList, infoteacher, getTeacherExpertise } from "../../api/Lecturer";
import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse, deleteInTeacherCourse } from "../../api/Teaching"; import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse, deleteInTeacherCourse } from "../../api/Teaching";
import{getExpenseByCourseId} from "../../api/lecturerFeeManagement"; import { getExpenseByCourseId } from "../../api/lecturerFeeManagement";
// import AddTeacher from "../../components/drawers/project/AddTeacher" // import AddTeacher from "../../components/drawers/project/AddTeacher"
import ImportWork from "../../components/lecturer/ImportWork.vue"; import ImportWork from "../../components/lecturer/ImportWork.vue";
import { fileUp } from "../../api/Lecturer"; import { fileUp } from "../../api/Lecturer";
@@ -452,7 +423,7 @@ export default {
setup() { setup() {
onMounted(() => { onMounted(() => {
const search = sessionStorage.getItem('searchLecturer') const search = sessionStorage.getItem('searchLecturer')
if(route.query.activeKey == 1){ if (route.query.activeKey == 1) {
state.moreid = 2 state.moreid = 2
state.searchParam = JSON.parse(search) state.searchParam = JSON.parse(search)
} }
@@ -463,7 +434,7 @@ export default {
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
moreid: 1, moreid: 1,
title:'导入内部授课记录', title: '导入内部授课记录',
vf: false, vf: false,
log: false, log: false,
close: false, close: false,
@@ -486,24 +457,25 @@ export default {
teachingDate: undefined, //选择时间 teachingDate: undefined, //选择时间
beginTime: null, //开始时间 beginTime: null, //开始时间
endTime: null, //结束时间 endTime: null, //结束时间
tSystemNames:{ tSystemNames: {
systemName:null, systemName: null,
levelVoList: [] levelVoList: []
}, },
score:undefined, score: undefined,
formParam: { formParam: {
courseStatus: 1, courseStatus: 1,
createFrom: 1, createFrom: 1,
teaching: null, teaching: null,
name:null, name: null,
teacherName: null, teacherName: null,
teachingDate:null, teachingDate: null,
sourceBelongId: null, sourceBelongId: null,
sourceBelongFullName:null, sourceBelongFullName: null,
}, },
startTime:null, startTime: null,
searchParam: searchParam:
{ recordType: 1, {
recordType: 1,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
@@ -513,9 +485,10 @@ export default {
sourceBelongId: null, sourceBelongId: null,
tSystemId: null, tSystemId: null,
endTime: null, endTime: null,
beginTime:null, beginTime: null,
studys: [], studys: [],
score: undefined } score: undefined
}
}) })
// watch(()=>state.formParam.name,(val)=>{ // watch(()=>state.formParam.name,(val)=>{
// state.formParam.teacherName = val?.split('/')[1] // state.formParam.teacherName = val?.split('/')[1]
@@ -528,9 +501,9 @@ export default {
//获取所属组织 //获取所属组织
const getOrganizationLista = () => { const getOrganizationLista = () => {
// console.log('getOrganizationList') // console.log('getOrganizationList')
let obj={ let obj = {
pageNo:1, pageNo: 1,
pageSize:1000 pageSize: 1000
} }
getOrganization(obj).then((res) => { getOrganization(obj).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
@@ -553,9 +526,9 @@ export default {
]); ]);
//获取讲师体系列表 //获取讲师体系列表
const LecturerSystemLista = () => { const LecturerSystemLista = () => {
let obj ={ let obj = {
pageNo:1, pageNo: 1,
pageSize:1000, pageSize: 1000,
} }
getTeacherSystemList(obj).then((res) => { getTeacherSystemList(obj).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
@@ -577,9 +550,9 @@ export default {
//获取内容分类 //获取内容分类
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.content_type); const sysTypeOptions = computed(() => store.state.content_type);
const treetype =(val,lab)=>{ const treetype = (val, lab) => {
console.log(lab) console.log(lab)
state.formParam.courseTypeName =lab.toString() state.formParam.courseTypeName = lab.toString()
} }
const OnTheJobStatusList = ref([ const OnTheJobStatusList = ref([
{ value: 1, label: "项目开课" }, { value: 1, label: "项目开课" },
@@ -588,7 +561,7 @@ export default {
]) ])
const AuthenticationStatusList = ref([ const AuthenticationStatusList = ref([
{ value: '', label: "全部" }, { value: '', label: "全部" },
{ value:0, label: "未开课" }, { value: 0, label: "未开课" },
{ value: 1, label: "已开课" }, { value: 1, label: "已开课" },
]) ])
const entryTypeList = ref([ const entryTypeList = ref([
@@ -614,9 +587,9 @@ export default {
{ value: '0-300', label: "0~300 " }, { value: '0-300', label: "0~300 " },
]) ])
const scoreChange = (e) => { const scoreChange = (e) => {
if(e.length!==0){ if (e.length !== 0) {
e.map((item)=>{ e.map((item) => {
if(item !== ''){ if (item !== '') {
scoreList.value.map((item) => { scoreList.value.map((item) => {
item.disabled = false item.disabled = false
}) })
@@ -627,16 +600,17 @@ export default {
item.disabled = true item.disabled = true
} }
}) })
state.score= '' state.score = ''
} }
} }
)} )
else{ }
else {
scoreList.value.map((item) => { scoreList.value.map((item) => {
item.disabled = false item.disabled = false
}) })
} }
state.searchParam.score= e.toString() state.searchParam.score = e.toString()
} }
const columns = ref([ const columns = ref([
@@ -816,16 +790,16 @@ export default {
]) ])
const rules = { const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }], name: [{ required: true, message: '', log: '讲师不能为空' }],
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }], orgName: [{ required: true, message: '', log: '讲师组织不能为空' }],
tlevelName: [{ required: true, message: '',log:'讲师级别不能为空' }], tlevelName: [{ required: true, message: '', log: '讲师级别不能为空' }],
tsystemName: [{ required: true, message: '',log:'讲师体系不能为空' }], tsystemName: [{ required: true, message: '', log: '讲师体系不能为空' }],
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }], courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }], courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
sourceBelongId: [{ required: true, message: '',log:'课程归属组织不能为空' }], sourceBelongId: [{ required: true, message: '', log: '课程归属组织不能为空' }],
teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }], teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
teaching: [{ required: true, message:'',log: '授课时长不能为空' }], teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }], courseStatus: [{ required: true, message: '', log: '开课状态不能为空' }],
} }
//展开切换 //展开切换
const handlemoreid = () => { const handlemoreid = () => {
@@ -835,7 +809,7 @@ export default {
else if (state.moreid == 2) { else if (state.moreid == 2) {
state.moreid = 1 state.moreid = 1
state.searchParam.createFrom = null state.searchParam.createFrom = null
state.searchParam.courseStatus =null state.searchParam.courseStatus = null
state.searchParam.sourceBelongId = null state.searchParam.sourceBelongId = null
state.searchParam.tSystemId = null state.searchParam.tSystemId = null
state.searchParam.id = null state.searchParam.id = null
@@ -849,16 +823,16 @@ export default {
getTableDate(); getTableDate();
}; };
//修改时间 //修改时间
// function searchTimeChange(time, timeStr) { // function searchTimeChange(time, timeStr) {
// // let startTime = timeStr[0] // // let startTime = timeStr[0]
// // let endTime = timeStr[1] ; // // let endTime = timeStr[1] ;
// // state.startTime = new Date(startTime).getTime(); // // state.startTime = new Date(startTime).getTime();
// // state.endTime = new Date(endTime).getTime(); // // state.endTime = new Date(endTime).getTime();
// // // state.searchParam.beginTime = new Date(beginTime).getTime() ; // // // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// // // state.searchParam.endTime = new Date(endTime).getTime() ; // // // state.searchParam.endTime = new Date(endTime).getTime() ;
// // state.searchParam.beginTime = state.startTime ? state.startTime : null, // // state.searchParam.beginTime = state.startTime ? state.startTime : null,
// // state.searchParam.endTime = state.endTime ? state.endTime : null // // state.searchParam.endTime = state.endTime ? state.endTime : null
// } // }
// const editTimeChange = (e, date) => { // const editTimeChange = (e, date) => {
// console.log(date); // console.log(date);
@@ -867,7 +841,7 @@ export default {
// }; // };
//重置 //重置
const searchReset = () => { const searchReset = () => {
state.searchdate= undefined, state.searchdate = undefined,
state.score = undefined state.score = undefined
state.searchParam = { state.searchParam = {
recordType: 1, recordType: 1,
@@ -875,16 +849,16 @@ export default {
pageSize: 10, pageSize: 10,
managerId: null, managerId: null,
name: null, name: null,
courseName:null, courseName: null,
createFrom: null, createFrom: null,
courseStatus:null, courseStatus: null,
sourceBelongId: null, sourceBelongId: null,
tSystemId: null, tSystemId: null,
endTime: null, endTime: null,
beginTime: null, beginTime: null,
studys: [], studys: [],
score: undefined, score: undefined,
status:null, status: null,
}; };
getTableDate(); getTableDate();
}; };
@@ -950,7 +924,7 @@ export default {
} }
watch(() => state.formParam.orgNames, (val) => { watch(() => state.formParam.orgNames, (val) => {
console.log(val, 'orgName') console.log(val, 'orgName')
if(val){ if (val) {
const parts = val.split('/'); const parts = val.split('/');
const reversedParts = parts.reverse(); const reversedParts = parts.reverse();
state.formParam.orgName = reversedParts.join('/'); state.formParam.orgName = reversedParts.join('/');
@@ -961,19 +935,19 @@ export default {
const createTeacherDialog = async () => { const createTeacherDialog = async () => {
state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "" state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
state.formParam.teacherName = state.formParam.name?.split('/')[0] state.formParam.teacherName = state.formParam.name?.split('/')[0]
state.formParam.userNo =state.formParam.name?.split('/')[1] state.formParam.userNo = state.formParam.name?.split('/')[1]
state.formParam.tsystemName = state.tSystemNames.systemName state.formParam.tsystemName = state.tSystemNames.systemName
state.formParam.tsystemId = state.tSystemNames?.systemId state.formParam.tsystemId = state.tSystemNames?.systemId
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for (let i = 0; i < formItemNames.length; i++) {
const result = await validateField(formItemNames[i]); const result = await validateField(formItemNames[i]);
if (result) { if (result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
state.formParam.orgName = state.formParam.orgNames state.formParam.orgName = state.formParam.orgNames
state.formParam = {...state.formParam,...state.tSystemNames} state.formParam = { ...state.formParam, ...state.tSystemNames }
console.log( state.formParam) console.log(state.formParam)
if (state.vf == false) { if (state.vf == false) {
updateInTeacherCourse(state.formParam).then(response => { updateInTeacherCourse(state.formParam).then(response => {
message.success("编辑成功"); message.success("编辑成功");
@@ -1033,26 +1007,26 @@ export default {
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
recordType: 1, recordType: 1,
courseStatus:1, courseStatus: 1,
teacher: null, teacher: null,
orgName: null, orgName: null,
tsystemName: null, tsystemName: null,
tlevelId: null, tlevelId: null,
courseName: null, courseName: null,
teaching:null, teaching: null,
studys: null, studys: null,
score: null, score: null,
type: null, type: null,
remark: null, remark: null,
sourceBelongId:null, sourceBelongId: null,
sourceBelongFullName:null, sourceBelongFullName: null,
offcourseId: null, offcourseId: null,
createFrom: null, createFrom: null,
teachingDate:null, teachingDate: null,
} }
state.teachingDate=null state.teachingDate = null
state.tSystemNames = { state.tSystemNames = {
systemName:null, systemName: null,
levelVoList: [] levelVoList: []
} }
} }
@@ -1112,7 +1086,7 @@ export default {
// } // }
//内部授课详情 //内部授课详情
const TeacherSystem1 = (record) => { const TeacherSystem1 = (record) => {
getTeacherCourseList({id:record.id}).then((res) => { getTeacherCourseList({ id: record.id }).then((res) => {
state.formParam = res.data.data state.formParam = res.data.data
state.tSystemNames.systemName = res.data.data.tsystemName state.tSystemNames.systemName = res.data.data.tsystemName
state.tSystemNames.systemId = res.data.data.tsystemId state.tSystemNames.systemId = res.data.data.tsystemId
@@ -1121,12 +1095,12 @@ export default {
state.tSystemNames.levelVoList = res.data.data.levelVoList state.tSystemNames.levelVoList = res.data.data.levelVoList
state.formParam.tlevelName = res.data.data.tlevelName state.formParam.tlevelName = res.data.data.tlevelName
state.formParam.tlevelId = res.data.data.tlevelId state.formParam.tlevelId = res.data.data.tlevelId
state.formParam.name = res.data.data.teacherName+'/'+res.data.data.userNo state.formParam.name = res.data.data.teacherName + '/' + res.data.data.userNo
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item })) state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item => ({ name: item }))
state.teachingDate=dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm' ), state.teachingDate = dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm'),
state.formParam.orgNames = state.formParam.orgName state.formParam.orgNames = state.formParam.orgName
state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "" state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
console.log( state.formParam); console.log(state.formParam);
}) })
.catch((err) => { .catch((err) => {
}); });
@@ -1208,7 +1182,7 @@ export default {
console.log(res) console.log(res)
tableDatas.value = res.data.data.records tableDatas.value = res.data.data.records
state.tableDataTotal = Number(res.data.data.total); state.tableDataTotal = Number(res.data.data.total);
}).catch(err=>{ }).catch(err => {
message.destroy() message.destroy()
}) })
} }
@@ -1223,9 +1197,9 @@ export default {
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
window.open( window.open(
`${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacherRecord?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&recordType=1&name=${state.searchParam.name ? state.searchParam.name :''}&courseName=${state.searchParam.courseName ? state.searchParam.courseName :''}&createFrom=${state.searchParam.createFrom ? state.searchParam.createFrom : ''}&courseStatus=${state.searchParam.courseStatus ? state.searchParam.courseStatus :''}&tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ''}&beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ''}&endTime=${state.searchParam.endTime ? state.searchParam.endTime : ''}&sourceBelongId=${state.searchParam.sourceBelongId ? state.searchParam.sourceBelongId :''}&courseTypeId=${state.searchParam.courseTypeId ? state.searchParam.courseTypeId : ''}&score=${state.searchParam.score ? state.searchParam.score : ''}&studys=${state.searchParam.studys ? state.searchParam.studys : ' '} `${process.env.VUE_APP_BASE_API}/admin/export/exportInTeacherRecord?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&recordType=1&name=${state.searchParam.name ? state.searchParam.name : ''}&courseName=${state.searchParam.courseName ? state.searchParam.courseName : ''}&createFrom=${state.searchParam.createFrom ? state.searchParam.createFrom : ''}&courseStatus=${state.searchParam.courseStatus ? state.searchParam.courseStatus : ''}&tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ''}&beginTime=${state.searchParam.beginTime ? state.searchParam.beginTime : ''}&endTime=${state.searchParam.endTime ? state.searchParam.endTime : ''}&sourceBelongId=${state.searchParam.sourceBelongId ? state.searchParam.sourceBelongId : ''}&courseTypeId=${state.searchParam.courseTypeId ? state.searchParam.courseTypeId : ''}&score=${state.searchParam.score ? state.searchParam.score : ''}&studys=${state.searchParam.studys ? state.searchParam.studys : ' '}
`) `)
console.log(state.searchParam.name,state.searchParam,'参数') console.log(state.searchParam.name, state.searchParam, '参数')
} }
const handleImport = () => { const handleImport = () => {
state.showWork = true state.showWork = true
@@ -1271,17 +1245,17 @@ export default {
state.formParam.studys = state.formParam.studys.replace(/\D/g, ''); state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
} }
//回车 //回车
const enterPressHadlerSearch = e => { const enterPressHadlerSearch = e => {
  console.log("e",e); console.log("e", e);
    if (e.keyCode === 13) { if (e.keyCode === 13) {
      searchSubmit() searchSubmit()
    } }
}; };
const sendName=()=>{ const sendName = () => {
state.formParam.courseName = state.formParam.courseName.replace(/\s/g, ''); state.formParam.courseName = state.formParam.courseName.replace(/\s/g, '');
} }
const sendRemark=()=>{ const sendRemark = () => {
state.formParam.remark = state.formParam.remark.replace(/\s/g, ''); state.formParam.remark = state.formParam.remark.replace(/\s/g, '');
} }
return { return {
@@ -1365,10 +1339,12 @@ const sendName=()=>{
::v-deep .ant-picker-range .ant-picker-active-bar { ::v-deep .ant-picker-range .ant-picker-active-bar {
margin-left: 85px !important; margin-left: 85px !important;
} }
} }
.addTimeBox .ant-picker{
.addTimeBox .ant-picker {
padding-left: 85px; padding-left: 85px;
} }
//导出按钮icon //导出按钮icon
.daochu { .daochu {
width: 16px; width: 16px;
@@ -1703,25 +1679,31 @@ const sendName=()=>{
::v-deep .ant-select-multiple .ant-select-selection-item { ::v-deep .ant-select-multiple .ant-select-selection-item {
height: 34px height: 34px
} }
.tableBox { .tableBox {
padding-bottom: 20px; padding-bottom: 20px;
margin: 20px 38px 30px; margin: 20px 38px 30px;
::v-deep .ant-select-dropdown{
::v-deep .ant-select-dropdown {
display: inline-block; 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;
}
} }
::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;
}
}
.item_inp .i_upload_img[data-v-6b882d01] { .item_inp .i_upload_img[data-v-6b882d01] {
border-radius:50% border-radius: 50%
} }
</style> </style>