授课记录调整

This commit is contained in:
wangxuemei
2024-11-14 18:13:05 +08:00
parent 49a9fd32db
commit 1b2cbe8d7a
7 changed files with 149 additions and 73 deletions

View File

@@ -202,7 +202,7 @@ import {getCookieForName} from "@/api/method";
state.fileList = []; state.fileList = [];
state.uploadpercent = -1; state.uploadpercent = -1;
message.destroy(); message.destroy();
message.error("图片不能超过500KB! 请重新上传"); message.error("文件大小超出500M,请重新上传");
return; return;
} }

View File

@@ -38,6 +38,14 @@
<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"
:data-source="tableData" :loading="tableLoading" @expand="expandTable" :pagination="false"> :data-source="tableData" :loading="tableLoading" @expand="expandTable" :pagination="false">
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'teaching'">
<a-space style="display:flex ;justify-content: space-around; ">
<!-- <template #content>
<p>{{ record.orgName}}</p>
</template> -->
<span>{{ record.teaching }} 分钟</span>
</a-space>
</template>
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space >
<a-button type="link" v-if="record.isPermission==='true'||record.isSuperPermission==='true'" @click="() => handleLook(record, String(record.courseform))">查看</a-button> <a-button type="link" v-if="record.isPermission==='true'||record.isSuperPermission==='true'" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
@@ -100,7 +108,8 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="讲师名称" name="name"> <a-form-item label="讲师名称" name="name">
<a-input v-model:value.trim="formParam.name" class="draitem" :maxlength="20" <a-input v-model:value="formParam.name" class="draitem" :maxlength="20" showCount
@blur="sendName"
placeholder="请输入讲师姓名" allowClear showSearch> placeholder="请输入讲师姓名" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -117,7 +126,7 @@
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="供应商" name="supplier"> <a-form-item label="供应商" name="supplier">
<a-input v-model:value.trim="formParam.supplier" class="draitem" :maxlength="30" <a-input v-model:value="formParam.supplier" class="draitem" :maxlength="30" showCount
placeholder="请输入供应商" allowClear showSearch> placeholder="请输入供应商" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -130,13 +139,13 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="授课时长" name="defaultTeachingTime"> <a-form-item label="初始授课时长" name="teaching">
<a-input v-model:value="formParam.defaultTeachingTime" 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.defaultTeachingTime !== null">{{ (formParam.defaultTeachingTime / 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.defaultTeachingTime === 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>
@@ -159,11 +168,12 @@
<!-- 备注 --> <!-- 备注 -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="备注"> <a-form-item label="备注" style="margin-bottom: 80px;">
<a-textarea <a-textarea
v-model:value="formParam.remark" v-model:value="formParam.remark"
showCount showCount
:maxlength="200" :maxlength="200"
@blur="sendRemark"
style="width: 100%; height: 100px; border-radius: 8px" style="width: 100%; height: 100px; border-radius: 8px"
placeholder="请输入"/> placeholder="请输入"/>
</a-form-item> </a-form-item>
@@ -263,7 +273,7 @@ import { getTeacherList, getTeacherById, deleteInTeacher, updateTeacherState, i
import { fileUp } from "../../api/indexEval"; import { fileUp } from "../../api/indexEval";
import {getCookieForName} from "@/api/method" import {getCookieForName} from "@/api/method"
import SearchTeacher from "@/components/project/SearchTeacher"; import SearchTeacher from "@/components/project/SearchTeacher";
import boe from '@/assets/boe.jpg' import avatar from '@/assets/avatar.png'
export default { export default {
name: "ExternalLecturer", name: "ExternalLecturer",
components: { components: {
@@ -315,9 +325,9 @@ export default {
formParam: { formParam: {
description:"", description:"",
teacherType:'2', teacherType:'2',
photo:'', photo:avatar,
status:1, status:1,
defaultTeachingTime:'', teaching:'',
}, },
vf:true, vf:true,
searchParam: { searchParam: {
@@ -399,11 +409,19 @@ export default {
width: 200, width: 200,
}, },
{ {
title: '授课时长 ', title: '初始授课时长 ',
dataIndex: 'defaultTeachingTime', dataIndex: 'teaching',
key: 'defaultTeachingTime', key: 'teaching',
elipsis: true, align: "center", elipsis: true, align: "center",
width: 200, scopedSlots: { customRender: "teaching" },
width: 400,
// customRender: (value, record) => {
// return (
// <div>
// {value.record.orgName}
// </div>
// )
// }
}, },
{ {
title: '账号状态 ', title: '账号状态 ',
@@ -483,10 +501,11 @@ export default {
cancel() cancel()
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '新增讲师' state.teacherdialogtitle = '新增讲师'
state.formParam.photo =userInfo.value?.avatar // state.formParam.photo =userInfo.value?.avatar
state.formParam.photo = avatar
state.vf = true state.vf = true
state.formParam.status = '1' state.formParam.status = '1'
state.formParam.photo = state.formParam.photo === null ?boe : state.formParam.photo // state.formParam.photo = state.formParam.photo === null ?boe : state.formParam.photo
} }
//修改讲师信息弹窗 //修改讲师信息弹窗
@@ -517,6 +536,7 @@ export default {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
state.formParam.description = repl(state.formParam.description)
state.formParam = {...state.formParam} state.formParam = {...state.formParam}
if (state.vf == false) { if (state.vf == false) {
updateInTeacher(state.formParam).then(response => { updateInTeacher(state.formParam).then(response => {
@@ -613,7 +633,7 @@ export default {
status:1, status:1,
teacherType:2, teacherType:2,
photo:null, photo:null,
defaultTeachingTime:null, teaching:null,
name: null, name: null,
mobile: null, mobile: null,
email: null, email: null,
@@ -675,24 +695,48 @@ export default {
console.log("外部讲师详情", err); console.log("外部讲师详情", err);
}); });
} }
const sendName=()=>{
// const reg = /\s/g;
// if (!state.formParam.name) {
// } else if (!reg.test(state.formParam.name)) {
// state.formParam.mobile='2'
// // state.formParam.mobile = state.formParam.mobile.replace(/\D/g, '');
// }
state.formParam.name = state.formParam.name.replace(/\s/g, '');
}
const sendPhone=()=>{ const sendPhone=()=>{
console.log(state.formParam.mobile) console.log(state.formParam.mobile)
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
// if (!state.formParam.mobile) { if (!state.formParam.mobile) {
// } else if (!reg.test(state.formParam.mobile)) { } else if (!reg.test(state.formParam.mobile)) {
// message.warning( '手机号格式不正确') message.warning( '手机号格式不正确')
// } state.formParam.mobile=''
// state.formParam.mobile = state.formParam.mobile.replace(/\D/g, '');
}
} }
const sendEmail=()=>{ const sendEmail=()=>{
const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/; const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/;
// if (!reg.test(state.formParam.email)) { if (!reg.test(state.formParam.email)) {
// message.warning( '邮箱格式不正确') message.warning( '邮箱格式不正确')
// } state.formParam.email=''
// state.formParam.email = state.formParam.email.replace( /[\u4e00-\u9fa5]/g, '');
}
} }
const clearNonNumber = () => { const clearNonNumber = () => {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, ''); state.formParam.teaching = state.formParam.teaching.replace(/\D/g, '');
// state.formParam.teaching // state.formParam.teaching
} }
const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, '');
}
const repl = (val) => {
if(val){
val = val?.replace(/\s*&nbsp;\s*/g, '')
val = val?.replace(/\s+/g, '')
return val
}
}
// getpromotionrecordstableData() // getpromotionrecordstableData()
//导出功能 //导出功能
const handleExport = () => { const handleExport = () => {
@@ -727,8 +771,11 @@ export default {
rules, rules,
rule, rule,
formRef, formRef,
repl,
sendName,
sendPhone, sendPhone,
sendEmail, sendEmail,
sendRemark,
// managerChange, // managerChange,
headers, headers,
beforeUpload, beforeUpload,

View File

@@ -21,7 +21,7 @@
</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 v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" <a-range-picker v-model:value="searchdate" style="width: 420px" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
separator="至" :placeholder="[' 开始时间', ' 结束时间'] separator="至" :placeholder="[' 开始时间', ' 结束时间']
" "
@@ -151,7 +151,7 @@
<a-row :gutter="16"> <a-row :gutter="16">
<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> <a-input class="draitem" v-model:value="formParam.courseName" :maxlength="20" showCount placeholder="请输入后搜索面授课" @blur="sendName" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -164,7 +164,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 授课日期 beginTime 授课时长defaultTeachingTime--> <!-- 授课日期 teachingDate 授课时长defaultTeachingTime-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate"> <a-form-item label="授课/课程日期 :" name="teachingDate">
@@ -207,6 +207,7 @@
<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"
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>
@@ -386,7 +387,7 @@ export default {
teacherName: [{ required: true, message: '', log: '讲师不能为空' }], teacherName: [{ required: true, message: '', log: '讲师不能为空' }],
courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }], courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
courseName: [{ required: true, message: '', log: '课程名称不能为空' }], courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
courseStatus: [{ required: true, message: '', log: '讲开课状态不能为空' }], courseStatus: [{ required: true, message: '', log: '课状态不能为空' }],
teaching: [{ required: true, message: '', log: '授课时长不能为空' }], teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }], teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
@@ -818,9 +819,17 @@ const enterPressHadlerSearch = e => {
    }     }
}; };
const sendName=()=>{
state.formParam.courseName = state.formParam.courseName.replace(/\s/g, '');
}
const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, '');
}
return { return {
...toRefs(state), ...toRefs(state),
rules, rules,
sendName,
sendRemark,
enterPressHadlerSearch, enterPressHadlerSearch,
treetype, treetype,
clearscoreNumber, clearscoreNumber,

View File

@@ -20,7 +20,7 @@
</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" v-model:value="searchdate"
style="width: 420px" style="width: 420px"
@@ -98,13 +98,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="min-width: 230px ; height: auto ;margin-bottom:20px" v-model:value="searchParam.scoreranges" <a-select style="min-width: 230px ; height: auto ;margin-bottom:20px" v-model:value="searchParam.score"
placeholder="请选择评分" :options="scoreList" allowClear showSearch mode="tags" @change="scoreChange" placeholder="请选择评分" :options="scoreList" allowClear showSearch mode="tags" @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.studysranges" 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>
@@ -167,11 +167,11 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师组织" name="orgName"> <a-form-item label="讲师组织" name="orgName">
<a-popover> <a-popover>
<template #content> <!-- <template #content>
{{ formParam.orgNames }} {{ formParam.orgNames }}
</template> </template> -->
<a-input disabled v-model:value="formParam.orgName" class="draitem" <a-input :title="formParam.orgNames" disabled v-model:value="formParam.orgName" class="draitem"
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch> placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
</a-input> </a-input>
</a-popover> </a-popover>
@@ -220,7 +220,8 @@
</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> <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>
@@ -232,8 +233,6 @@
<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" :show-time="{ format: 'HH:mm' }"
type="datetime" type="datetime"
placeholder="请选择课程日期" /> placeholder="请选择课程日期" />
<!-- <a-time-picker v-model:value="value" format="HH:mm" /> -->
<!-- @change="editTimeChange" -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -283,6 +282,7 @@
<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"
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>
@@ -455,7 +455,7 @@ export default {
pageSize: 10, pageSize: 10,
tableDataTotal: -1,//table列表总条数 tableDataTotal: -1,//table列表总条数
searchdate: undefined, //选择时间 searchdate: undefined, //选择时间
teachingDate: null, //选择时间 teachingDate: undefined, //选择时间
beginTime: null, //开始时间 beginTime: null, //开始时间
endTime: null, //结束时间 endTime: null, //结束时间
tSystemNames:{ tSystemNames:{
@@ -472,7 +472,7 @@ export default {
}, },
startTime:null, startTime:null,
searchParam: searchParam:
{ "recordType": 1, "pageNo": 1, "pageSize": 10, "managerId": null, "name": null, "createFrom": null, "courseStatus": null, "orgId": null, "tSystemId": null, "endTime": null, "beginTime":null, "studysranges": [], "score": null } { "recordType": 1, "pageNo": 1, "pageSize": 10, "managerId": null, "name": null, "createFrom": null, "courseStatus": null, "orgId": null, "tSystemId": null, "endTime": null, "beginTime":null, "studys": [], "score": null }
}) })
// watch(()=>state.formParam.name,(val)=>{ // watch(()=>state.formParam.name,(val)=>{
// state.formParam.teacherName = val?.split('/')[1] // state.formParam.teacherName = val?.split('/')[1]
@@ -773,6 +773,17 @@ export default {
const tableData = ref([ const tableData = ref([
]) ])
const rules = {
// name: [{ required: true, message:'',log: '讲师不能为空' }],
// orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
// tlevelName: [{ required: true, message: '',log:'讲师级别不能为空' }],
// tsystemName: [{ required: true, message: '',log:'讲师体系不能为空' }],
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
teaching: [{ required: true, message:'',log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }],
}
//展开切换 //展开切换
const handlemoreid = () => { const handlemoreid = () => {
if (state.moreid == 1) { if (state.moreid == 1) {
@@ -785,8 +796,8 @@ export default {
state.searchParam.orgId = null state.searchParam.orgId = null
state.searchParam.tSystemId = null state.searchParam.tSystemId = null
state.searchParam.id = null state.searchParam.id = null
state.searchParam.scoreranges = [] state.searchParam.score = []
state.searchParam.studysranges = [] state.searchParam.studys = []
} }
} }
// 搜索 // 搜索
@@ -826,8 +837,8 @@ export default {
tSystemId: null, tSystemId: null,
endTime: null, endTime: null,
beginTime: null, beginTime: null,
studysranges: [], studys: [],
score: null, score: undefined,
status:null, status:null,
}; };
getTableDate(); getTableDate();
@@ -900,13 +911,14 @@ export default {
state.formParam.orgName = reversedParts.join('/'); state.formParam.orgName = reversedParts.join('/');
} }
}) })
//保存 //保存
const createTeacherDialog = async () => { const createTeacherDialog = async () => {
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
state.formParam.teachingDate=state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : " "
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]);
@@ -1151,17 +1163,6 @@ export default {
}) })
} }
const tableDatas = ref([]) const tableDatas = ref([])
const rules = {
name: [{ required: true, message:'',log: '讲师不能为空' }],
orgName: [{ required: true, message: '',log:'讲师组织不能为空' }],
tlevelName: [{ required: true, message: '',log:'讲师级别不能为空' }],
tsystemName: [{ required: true, message: '',log:'讲师体系不能为空' }],
courseTypeId: [{ required: true, message: '',log:'内容分类不能为空' }],
courseName: [{ required: true, message: '',log:'课程名称不能为空' }],
teachingDate: [{ required: true, message: '',log:'授课/课程日期不能为空' }],
teaching: [{ required: true, message:'',log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '',log:'开课状态不能为空' }],
}
// function managerChange(e, l, d, t, orgName) { // function managerChange(e, l, d, t, orgName) {
// console.log(e, l); // console.log(e, l);
@@ -1172,7 +1173,7 @@ 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 : ''}&orgId=${state.searchParam.orgId ? state.searchParam.orgId :''}&courseTypeId=${state.searchParam.courseTypeId ? state.searchParam.courseTypeId : ''}&scoreranges=${state.searchParam.scoreranges ? state.searchParam.scoreranges : ''}&studysranges=${state.searchParam.studysranges ? state.searchParam.studysranges : ' '} `${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 : ''}&orgId=${state.searchParam.orgId ? state.searchParam.orgId :''}&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,'参数')
} }
@@ -1227,8 +1228,16 @@ const enterPressHadlerSearch = e => {
    }     }
}; };
const sendName=()=>{
state.formParam.courseName = state.formParam.courseName.replace(/\s/g, '');
}
const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, '');
}
return { return {
...toRefs(state), ...toRefs(state),
sendName,
sendRemark,
sysTypeOptions, sysTypeOptions,
enterPressHadlerSearch, enterPressHadlerSearch,
treetype, treetype,

View File

@@ -26,9 +26,10 @@ ExternalLecturer
<a-descriptions-item label="讲师姓名">{{formParam.name}}</a-descriptions-item> <a-descriptions-item label="讲师姓名">{{formParam.name}}</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.email}}</a-descriptions-item> <a-descriptions-item label="讲师邮箱">{{formParam.email}}</a-descriptions-item>
<a-descriptions-item label="授课时长" :span="2">{{formParam.defaultteachingtime}} <a-descriptions-item label="授课时长" :span="2">{{formParam.teaching}}
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingtime != null">({{ <span style="margin-left: 5px;" v-if="formParam.teaching != null">分钟</span>
(formParam.defaultteachingtime / 60).toFixed(2) }}小时)</span> <span style="margin-left: 10px ; padding: 2px;" v-if="formParam.teaching != null">({{
(formParam.teaching / 60).toFixed(2) }}小时)</span>
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
<div style="margin-top: 10px;"></div> <div style="margin-top: 10px;"></div>
@@ -37,15 +38,15 @@ ExternalLecturer
<a-descriptions title="其他信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenter" > <a-descriptions title="其他信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenter" >
<!-- 一层 --> <!-- 一层 -->
<a-descriptions-item label="讲师介绍" :span="4" > <a-descriptions-item label="讲师介绍" :span="4" >
<div v-if="formParam.description !=null" style="min-width: 500px;" v-html="formParam.description" > <div v-if="formParam.description !=null&&resp(formParam.description)" style="min-width: 500px;" v-html="formParam.description" ></div>
</div> <div v-else>-</div>
<div v-if="formParam.description ==null || formParam.description =='<p><br></p>'" style="min-width: 500px;">-- </div>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="备注" :span="4"> <a-descriptions-item label="备注" :span="4">
<div v-if="formParam.remark ==null || formParam.remark =='<p><br></p>'" style="min-width: 500px;">-- </div> <div v-if="formParam.remark ==null || formParam.remark =='<p><br></p>'" style="min-width: 500px;">- </div>
<!-- {{ formParam.remark }} -->
<!-- <div> <!-- <div>
<a-tag color="#2db7f5"> --> <a-tag color="#2db7f5"> -->
{{formParam.remark===null?'':formParam.remark}} <div style="min-width: 500px;">{{formParam.remark ===null?'':formParam.remark}}</div>
<!-- </a-tag> <!-- </a-tag>
</div> --> </div> -->
</a-descriptions-item> </a-descriptions-item>
@@ -97,7 +98,8 @@ import { useRouter,useRoute } from "vue-router";
import { reactive, toRefs, ref } from "vue" import { reactive, toRefs, ref } from "vue"
import {getTeacherById} from "../../api/Lecturer"; import {getTeacherById} from "../../api/Lecturer";
import { getNewInTeacherCourseList } from "../../api/Teaching"; import { getNewInTeacherCourseList } from "../../api/Teaching";
import boe from '@/assets/boe.jpg' // import boe from '@/assets/boe.jpg'
import avatar from '@/assets/avatar.png'
export default{ export default{
name :"LookExternalLecturer", name :"LookExternalLecturer",
components:{ components:{
@@ -133,7 +135,7 @@ export default{
getTeacherById({id:state.id}).then((res) => { getTeacherById({id:state.id}).then((res) => {
console.log("内部讲师详情", res.data); console.log("内部讲师详情", res.data);
state.formParam = res.data.data state.formParam = res.data.data
state.formParam.photo = state.formParam.photo ===null ?boe : state.formParam.photo state.formParam.photo = state.formParam.photo ===null ?avatar : state.formParam.photo
getteacherrecordstableData() getteacherrecordstableData()
}) })
.catch((err) => { .catch((err) => {
@@ -279,9 +281,17 @@ export default{
state.teacherrecords.pageNo = page; state.teacherrecords.pageNo = page;
getteacherrecordstableData(); getteacherrecordstableData();
}; };
const resp = (val) => {
if(val){
const reg = /<[^<>]+>/g;
const value = val.replace(reg, "");
return value
}
}
return{ return{
...toRefs(state), ...toRefs(state),
router, router,
resp,
TeacherSystem, TeacherSystem,
handleBack, handleBack,
rowCenter:{"text-align":"center"}, rowCenter:{"text-align":"center"},

View File

@@ -140,7 +140,8 @@ import { reactive, toRefs, ref, computed } from "vue"
import { useStore } from "vuex"; import { useStore } from "vuex";
import {getTeacherById ,getTeacherLogList} from "../../api/Lecturer"; import {getTeacherById ,getTeacherLogList} from "../../api/Lecturer";
import { getNewInTeacherCourseList } from "../../api/Teaching"; import { getNewInTeacherCourseList } from "../../api/Teaching";
import boe from '@/assets/boe.jpg' // import boe from '@/assets/boe.jpg'
import avatar from '@/assets/avatar.png'
export default{ export default{
name :"LookInsideLecturer", name :"LookInsideLecturer",
components:{ components:{
@@ -177,7 +178,7 @@ export default{
let objA= res.data.data let objA= res.data.data
console.log(objA ,'11111111111') console.log(objA ,'11111111111')
state.formParam = objA state.formParam = objA
state.formParam.photo = state.formParam.photo ===null ?boe : state.formParam.photo state.formParam.photo = state.formParam.photo ===null ?avatar : state.formParam.photo
state.teacherrepromo.userId=res.data.data.id state.teacherrepromo.userId=res.data.data.id
console.log(state.teacherrepromo.id); console.log(state.teacherrepromo.id);
getteacherrecordstableData() getteacherrecordstableData()

View File

@@ -3,10 +3,10 @@
<div class="TeachingRecord" > <div class="TeachingRecord" >
<div style="margin: 20px;" > <div style="margin: 20px;" >
<a-tabs v-model:activeKey="activeKey"> <a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="内部授课"> <a-tab-pane key="1" tab="内部讲师授课记录">
<InsideTeaching/> <InsideTeaching/>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="外部授课"> <a-tab-pane key="2" tab="外部讲师授课记录">
<ExternalTeaching/> <ExternalTeaching/>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>