授课记录调整

This commit is contained in:
wangxuemei
2024-10-28 17:32:12 +08:00
parent 1cc6a79e58
commit 5b4f649fa7
3 changed files with 123 additions and 107 deletions

View File

@@ -98,7 +98,8 @@
<!-- 表格 --> <!-- 表格 -->
<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 >
@@ -120,18 +121,18 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" <a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" style="min-width: 1380px"
dropdown-style="drawaer" width="60%" :title="teacherdialogtitle"> dropdown-style="drawaer" width="60%" :title="teacherdialogtitle">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> <a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<!--讲师名称 teachername 内容分类 coursetypeid --> <!--讲师名称 teacherName 内容分类 coursetypeid -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<!-- <ProjectManagerOutTeacher v-model:value="formParam.name" <!-- <ProjectManagerOutTeacher v-model:value="formParam.name"
v-model:name="formParam.teachername" v-model:name="formParam.teacherName"
placeholder="请输入工号/讲师姓名进行检索" placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange"></ProjectManagerOutTeacher> --> @onChange="managerChange"></ProjectManagerOutTeacher> -->
<a-form-item label="讲师名称" name="teacherName"> <a-form-item label="讲师名称" name="teacherName">
<a-input v-model:name="formParam.teacherName" allowClear <a-input v-model:value="formParam.teacherName" allowClear
showSearch class="draitem" placeholder="请输入讲师姓名"></a-input> showSearch class="draitem" placeholder="请输入讲师姓名"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -182,13 +183,13 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="duration"> <a-form-item label="授课时长" name="teaching">
<a-input v-model:value="formParam.duration" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0" <a-input v-model:value="formParam.teaching" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0"
allowClear showSearch suffix="分钟" @blur="clearNonNumber"> allowClear showSearch suffix="分钟" @blur="clearNonNumber">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.duration != null">{{ (formParam.duration / 60 <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span> ).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.duration == null">0.00小时</span> <span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -196,13 +197,13 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="参训人数" name="studys"> <a-form-item label="参训人数" name="studys">
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch> <a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch @blur="clearstudysNumber">
</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="score"> <a-form-item label="评分" name="score">
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch> <a-input v-model:value="formParam.score" class="draitem" placeholder="0 " allowClear showSearch @blur="clearscoreNumber">
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -237,17 +238,16 @@
<a-drawer v-model:visible="teachingdialog" placement="right" @closa="cancelTeachingDialog" :maskClosable="true" <a-drawer v-model:visible="teachingdialog" placement="right" @closa="cancelTeachingDialog" :maskClosable="true"
width="60%" title="查看讲师授课记录"> width="60%" title="查看讲师授课记录">
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="讲师名称">{{ formParam.teachername }}</a-descriptions-item> <a-descriptions-item label="讲师名称">{{ formParam.teacherName }}</a-descriptions-item>
<a-descriptions-item label="手机号码">{{ formParam.mobile }}</a-descriptions-item> <a-descriptions-item label="手机号码">{{ formParam.mobile }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '项目开课' : formParam.type == 2 ? '路径开课' : formParam.type == 3 <a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '在线课' : formParam.type == 0 ? '面授课' : '' }}</a-descriptions-item>
? '面授开课' : '' }}</a-descriptions-item> <a-descriptions-item label="课程名称">{{ formParam.coursename }}</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 label="开课状态">{{ formParam.status == 0 ? '未开课' : formParam.status == 1
? '已开课' : '' }}</a-descriptions-item> ? '已开课' : '' }}</a-descriptions-item>
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeId }}</a-descriptions-item> <a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName }}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.beginTime }}</a-descriptions-item> <a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">{{ formParam.duration }} <a-descriptions-item label="授课时长 ">{{ formParam.teaching }}
<span style="margin-left: 5px ;" v-if="formParam.duration != null">({{ (formParam.duration / 60 <span style="margin-left: 5px ;" v-if="formParam.teaching != null">({{ (formParam.teaching / 60
).toFixed(2) }}小时)</span> ).toFixed(2) }}小时)</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item> <a-descriptions-item label="评分 ">{{ formParam.score }}</a-descriptions-item>
@@ -357,7 +357,7 @@ export default {
formParam: { formParam: {
status: 1, status: 1,
entryType:1, entryType:1,
duration:null teaching:null
}, },
searchdate: undefined, //选择时间 searchdate: undefined, //选择时间
searchParam: { searchParam: {
@@ -365,7 +365,7 @@ export default {
recordType:2, recordType:2,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
teachername: null, teacherName: null,
name: null, name: null,
address: null, address: null,
status: null, status: null,
@@ -391,7 +391,7 @@ export default {
courseTypeId: [{ required: true, message:'',log: '内容分类不能为空' }], courseTypeId: [{ required: true, message:'',log: '内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }], courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
status: [{ required: true, message:'',log: '讲开课状态不能为空' }], status: [{ required: true, message:'',log: '讲开课状态不能为空' }],
duration: [{ required: true, message: '',log:'授课时长不能为空' }], teaching: [{ required: true, message: '',log:'授课时长不能为空' }],
teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }], teachingDate: [{ required: true, message:'',log: '授课日期不能为空' }],
} }
@@ -426,29 +426,28 @@ export default {
dataIndex: 'teacherName', dataIndex: 'teacherName',
key: 'teacherName', key: 'teacherName',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
}, },
{ {
title: '手机号码 ', title: '手机号码 ',
dataIndex: 'mobile', dataIndex: 'mobile',
key: 'mobile', key: 'mobile',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
}, },
{ {
title: '课程类型 ', title: '课程类型 ',
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{value.record.type == "1" || value.record.type == "2" || value.record.type == "3" {value.record.type == "1" || value.record.type == "0"
? { ? {
"1": "项目开课", "1": "在线课",
"2": "路径开课", "0": "面授课",
"3": "面授开课",
}[value.record.type + ""] || "" }[value.record.type + ""] || ""
: "-"} : "-"}
</div> </div>
@@ -460,14 +459,14 @@ export default {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
}, },
{ {
title: '录入类型', title: '录入类型',
dataIndex: 'entryType', dataIndex: 'entryType',
key: 'entryType', key: 'entryType',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
@@ -486,7 +485,7 @@ export default {
dataIndex: 'beginTime', dataIndex: 'beginTime',
key: 'beginTime', key: 'beginTime',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
}, },
// { // {
// title: '开课场地 ', // title: '开课场地 ',
@@ -500,7 +499,7 @@ export default {
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
@@ -529,31 +528,31 @@ export default {
// }, // },
{ {
title: '内容分类', title: '内容分类',
dataIndex: 'courseTypeId', dataIndex: 'courseTypeName',
key: 'courseTypeId', key: 'courseTypeName',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 120,
}, },
{ {
title: '授课时长(H) ', title: '授课时长(H) ',
dataIndex: 'duration', dataIndex: 'teaching',
key: 'duration', key: 'teaching',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 100, width: 120,
}, },
{ {
title: '学习总人数', title: '学习总人数',
dataIndex: 'studys', dataIndex: 'studys',
key: 'studys', key: 'studys',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 80, width: 120,
}, },
{ {
title: '评分', title: '评分',
dataIndex: 'score', dataIndex: 'score',
key: 'score', key: 'score',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 80, width: 120,
}, },
{ {
@@ -563,7 +562,7 @@ export default {
elipsis: true, elipsis: true,
align: "right", align: "right",
fixed: "right", fixed: "right",
width: 200, width: 400,
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
]) ])
@@ -646,7 +645,7 @@ export default {
const handleModify = (record) => { const handleModify = (record) => {
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '修改授课记录' state.teacherdialogtitle = '修改授课记录'
state.lookTeacherId = record.teacherId state.lookTeacherId = record.id
state.formParam.recordType='1' state.formParam.recordType='1'
state.vf = false state.vf = false
TeacherSystem() TeacherSystem()
@@ -665,6 +664,7 @@ export default {
//保存 //保存
const createTeacherDialog = async () => { const createTeacherDialog = async () => {
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : "" state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD").toString() : ""
console.log( state.formParam)
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]);
@@ -734,11 +734,11 @@ export default {
state.formParam = { state.formParam = {
status: 1, status: 1,
recordType:2, recordType:2,
teachername: null, teacherName: null,
mobile: null, mobile: null,
name: null, name: null,
type: null, type: null,
duration: null, teaching: null,
score: null, score: null,
remark: null, remark: null,
teachingDate:null teachingDate:null
@@ -787,7 +787,7 @@ export default {
// state.searchParam.trainorgName=orgName // state.searchParam.trainorgName=orgName
} }
const clearNonNumber=()=>{ const clearNonNumber=()=>{
state.formParam.duration = state.formParam.duration.replace(/\D/g, ''); state.formParam.teaching = state.formParam.teaching.replace(/\D/g, '');
} }
//导入功能 //导入功能
const handleImport = () => { const handleImport = () => {
@@ -807,9 +807,17 @@ const handleImport = () => {
&status=${state.searchParam.status ? state.searchParam.status : ""}` &status=${state.searchParam.status ? state.searchParam.status : ""}`
); );
} }
const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
}
const clearscoreNumber = () => {
state.formParam.score = state.formParam.score.replace(/\D/g, '');
}
return { return {
...toRefs(state), ...toRefs(state),
rules, rules,
clearscoreNumber,
clearstudysNumber,
validateField, validateField,
sysTypeOptions, sysTypeOptions,
formRef, formRef,

View File

@@ -1051,38 +1051,38 @@ export default {
// certStatus: [{ required: true, message: '认证状态不能为空' }], // certStatus: [{ required: true, message: '认证状态不能为空' }],
} }
const rule = () => { // const rule = () => {
if (state.formParam.name == null) { // if (state.formParam.name == null) {
state.log = true // state.log = true
message.warning('讲师不能为空') // message.warning('讲师不能为空')
return // return
} // }
if (state.formParam.departId == null) { // if (state.formParam.departId == null) {
state.log = true // state.log = true
message.warning('组织不能为空') // message.warning('组织不能为空')
return // return
} // }
if (state.formParam.tlevelId == null) { // if (state.formParam.tlevelId == null) {
state.log = true // state.log = true
message.warning('讲师级别不能为空') // message.warning('讲师级别不能为空')
return // return
} // }
if (state.formParam.tsystemName == null) { // if (state.formParam.tsystemName == null) {
state.log = true // state.log = true
message.warning('讲师体系不能为空') // message.warning('讲师体系不能为空')
return // return
} // }
if (state.formParam.defaultteachingTime == null) { // if (state.formParam.defaultteachingTime == null) {
state.log = true // state.log = true
message.warning('授课时长不能为空') // message.warning('授课时长不能为空')
return // return
} // }
if (state.formParam.certStatus == null) { // if (state.formParam.certStatus == null) {
state.log = true // state.log = true
message.warning('认证状态不能为空') // message.warning('认证状态不能为空')
return // return
} // }
} // }
// //表格内查看数据操作 // //表格内查看数据操作
const handleLook = (record) => { const handleLook = (record) => {
@@ -1161,7 +1161,7 @@ export default {
...toRefs(state), ...toRefs(state),
lecturerAdmin, lecturerAdmin,
rules, rules,
rule, // rule,
formRef, formRef,
// handlesearchlevel, // handlesearchlevel,
handleformlevel, handleformlevel,

View File

@@ -145,7 +145,7 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" <a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true" style="min-width: 1380px"
dropdown-style="drawaer" width="60%" :title="teacherdialogtitle"> dropdown-style="drawaer" width="60%" :title="teacherdialogtitle">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> <a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<!-- 讲师姓名 teacher 组织 orgName--> <!-- 讲师姓名 teacher 组织 orgName-->
@@ -227,22 +227,22 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="开课状态"> <a-form-item label="开课状态">
<a-radio-group v-model:value="formParam.courseStatus" class="draitem"> <a-radio-group v-model:value="formParam.courseStatus" class="draitem">
<a-radio :value="0">未开课</a-radio> <a-radio value="1">未开课</a-radio>
<a-radio :value="1">已开课</a-radio> <a-radio value="0">已开课</a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 授课时长defaultTeachingTime 评分 score--> <!-- 授课时长 teaching 评分 score-->
<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="teaching">
<a-input v-model:value="formParam.duration" 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="分钟" @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 <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span> ).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.duration == null">0.00小时</span> <span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -294,24 +294,25 @@
<span class="line"></span> <span class="line"></span>
<span>讲师信息</span> <span>讲师信息</span>
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="讲师名称">{{ formParam.name }}</a-descriptions-item> <a-descriptions-item label="讲师名称">{{ formParam.teacherName }}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{ formParam.userNo }}</a-descriptions-item> <a-descriptions-item label="讲师工号">{{ formParam.userNo }}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.organizationName }}</a-descriptions-item> <a-descriptions-item label="讲师组织" :span="2">{{ formParam.organizationName }}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{ formParam.systemName }}</a-descriptions-item> <a-descriptions-item label="讲师体系">{{ formParam.tsystemName }}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{ formParam.sLevelName }}</a-descriptions-item> <a-descriptions-item label="讲师级别">{{ formParam.tlevelName
}}</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 == 2 ? '路径开课' : formParam.type == 3 <a-descriptions-item label="课程类型">{{ formParam.type == 1 ? '项目开课' : formParam.type == 2 ? '路径开课' : formParam.type == 3
? '面授开课' : '' }}</a-descriptions-item> ? '面授开课' : '' }}</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 == 1? '未开课' : formParam.courseStatus == 0
? '已开课' : '' }}</a-descriptions-item> ? '已开课' : '' }}</a-descriptions-item>
<a-descriptions-item label="授课时长 "><span style="margin-left: 5px ;" v-if="formParam.duration != null">{{ <a-descriptions-item label="授课时长 "><span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{
(formParam.duration / 60).toFixed(2) }}小时</span> </a-descriptions-item> (formParam.teaching / 60).toFixed(2) }}小时</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.beginTime }}</a-descriptions-item> <a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate }}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{ formParam.studys }}</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.score }}</a-descriptions-item>
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeId }}</a-descriptions-item> <a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName }}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item> <a-descriptions-item label="备注 ">{{ formParam.remark }}</a-descriptions-item>
</a-descriptions> </a-descriptions>
<div style="margin-top:20px ;line-height: 24px;" > <div style="margin-top:20px ;line-height: 24px;" >
@@ -390,7 +391,8 @@ import dayjs from "dayjs";
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 } from "../../api/Lecturer"; import { getTeacherSystemList, infoteacher, getTeacherExpertise } from "../../api/Lecturer";
import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse, getCharges, deleteInTeacherCourse } from "../../api/Teaching"; import { getNewInTeacherCourseList, getOrganization, getTeacherCourseList, insertInTeacherCourse, updateInTeacherCourse, deleteInTeacherCourse } from "../../api/Teaching";
import{getTeacherFeeDetail} 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";
@@ -448,7 +450,7 @@ export default {
formParam: { formParam: {
courseStatus: 1, courseStatus: 1,
createFrom: 1, createFrom: 1,
duration: null, teaching: null,
name:null, name:null,
teacherName: null teacherName: null
}, },
@@ -691,15 +693,15 @@ export default {
}, },
{ {
title: '内容分类', title: '内容分类',
dataIndex: 'courseTypeId', dataIndex: 'courseTypeName',
key: 'courseTypeId', key: 'courseTypeName',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 120,
}, },
{ {
title: '授课时长(H) ', title: '授课时长(H) ',
dataIndex: 'duration', dataIndex: 'teaching',
key: 'duration', key: 'teaching',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 120, width: 120,
}, },
@@ -940,7 +942,7 @@ export default {
tsystemName: null, tsystemName: null,
levelId: null, levelId: null,
courseName: null, courseName: null,
duration:null, teaching:null,
studys: null, studys: null,
score: null, score: null,
type: null, type: null,
@@ -1001,7 +1003,7 @@ export default {
// beginTime: dayjs(record.beginTime, 'YYYY-MM-DD'), // beginTime: dayjs(record.beginTime, 'YYYY-MM-DD'),
// // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')), // // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')),
// // record.beginTime, // // record.beginTime,
// duration: record.duration, // teaching: record.teaching,
// score: record.score, // score: record.score,
// studys: record.studys, // studys: record.studys,
// remark: record.remark, // remark: record.remark,
@@ -1014,9 +1016,14 @@ export default {
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.systemCode = res.data.data.systemCode state.tSystemNames.systemCode = res.data.data.systemCode
state.tSystemNames.systemId = res.data.data.systemId state.tSystemNames.systemId = res.data.data.systemId
state.tSystemNames.levelVoList = res.data.data.levelVoList state.tSystemNames.levelVoList = res.data.data.levelVoList
state.formParam.tlevelName = res.data.data.tlevelName
state.formParam.tlevelId = res.data.data.tlevelId
state.formParam.name = res.data.data.teacherName+'/'+res.data.data.userNo
state.formParam.orgLists = res.data.data.expertiseNames?.split(',').map(item=>({ name: item }))
console.log( state.formParam); console.log( state.formParam);
}) })
.catch((err) => { .catch((err) => {
@@ -1034,7 +1041,7 @@ export default {
// beginTime:record.beginTime, // beginTime:record.beginTime,
// // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')), // // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')),
// // record.beginTime, // // record.beginTime,
// duration: record.duration, // teaching: record.teaching,
// score: record.score, // score: record.score,
// studys: record.studys, // studys: record.studys,
// remark: record.remark, // remark: record.remark,
@@ -1094,7 +1101,7 @@ export default {
}, },
]) ])
const gettableDatas = (record) => { const gettableDatas = (record) => {
getCharges({ id: record.id }) getTeacherFeeDetail({ id: record.id })
.then((res) => { .then((res) => {
console.log(res) console.log(res)
tableDatas.value = res.data.data.records tableDatas.value = res.data.data.records
@@ -1110,7 +1117,7 @@ export default {
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }], courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }], courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
teachingDate: [{ required: true, message: '',log:'授课/课程日期不能为空' }], teachingDate: [{ required: true, message: '',log:'授课/课程日期不能为空' }],
duration: [{ required: true, message:'',log: '授课时长不能为空' }], teaching: [{ required: true, message:'',log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }], courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }],
} }
@@ -1122,6 +1129,7 @@ export default {
// } // }
const handleformlevel = (val) => { const handleformlevel = (val) => {
state.formParam.tlevelName = state.tSystemNames.levelVoList.find(item=>item.id===val)?.levelName state.formParam.tlevelName = state.tSystemNames.levelVoList.find(item=>item.id===val)?.levelName
state.formParam.tlevelId = state.tSystemNames.levelVoList.find(item=>item.id===val)?.id
} }
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
@@ -1177,8 +1185,8 @@ export default {
return false; return false;
}; };
const clearNonNumber = () => { const clearNonNumber = () => {
state.formParam.duration = state.formParam.duration.replace(/\D/g, ''); state.formParam.teaching = state.formParam.teaching.replace(/\D/g, '');
// state.formParam.duration // state.formParam.teaching
} }
const clearscoreNumber = () => { const clearscoreNumber = () => {
state.formParam.score = state.formParam.score.replace(/\D/g, ''); state.formParam.score = state.formParam.score.replace(/\D/g, '');