@@ -2,7 +2,7 @@
< template >
< div >
<!-- 搜索框及按钮 -- >
< div class = "filter" >
< div class = "filter" >
< a-form layout = "inline" style = "min-width: 1380px;" >
< a-form-item class = "select" >
<!-- v - model : value = "searchParam.name" -- >
@@ -10,24 +10,18 @@
placeholder = "请输入工号/讲师姓名进行检索" allowClear showSearch >
< / a-input > -- >
< a-input style = "width: 276px; height: 40px; border-radius: 8px" placeholder = "请输入工号/讲师姓名进行检索" showSearch
allowClear v -model :courseNam e = "searchParam.courseN ame" > < / a-input >
allowClear v -model :valu e = "searchParam.n ame" > < / a-input >
< / a-form-item >
< a-form-item class = "select" >
< a-input v -model :value = "searchParam.n ame" style = "width: 276px; height: 40px; border-radius: 8px"
< a-input v -model :value = "searchParam.courseN ame" style = "width: 276px; height: 40px; border-radius: 8px"
placeholder = "请输入课程名称进行搜索" allowClear showSearch >
< / a-input >
< / a-form-item >
< a-form-item class = "select " >
< div class = "select addTimeBox" >
< div class = "addTime" > 创建时间 : < / div >
< a-range-picker
v -model :value = "searchdate"
style = "width: 420px"
format = "YYYY-MM-DD"
valueFormat = "YYYY-MM-DD"
separator = "至"
: placeholder = "[' 开始时间', ' 结束时间']"
/ >
< div class = "addTime" > 创建时间 : < / div >
< a-range-picker v -model :value = "searchdate" style = "width: 420px" format = "YYYY-MM-DD" valueFormat = "YYYY-MM-DD"
separator = "至" : placeholder = "[' 开始时间', ' 结束时间']" / >
< / div >
< / a-form-item >
< div style = "display: flex; margin-bottom: 20px" >
@@ -51,24 +45,17 @@
< div style = "width:100%" > < / div >
< a-form-item class = "select" v-if = "moreid == 2" >
< a -select style = "width: 230px ;margin-bottom:20px" v -model :value = "searchParam.entryType" placeholder = "录入类型"
:options = "entryTypeList" allowClear >
:options = "entryTypeList" allowClear >
< / a-select >
< / a-form-item >
< a-form-item class = "select" v-if = "moreid == 2" >
< a -tree -select
style = "width: 230px"
: fieldNames = "{
< a -tree -select style = "width: 230px" : fieldNames = "{
children: 'children',
label: 'name',
value: 'code',
} "
all ow -cl ear
: getPopupContainer = "triggerNode => triggerNode.parentNode || document.body"
v -model :value = "searchParam.courseTypeId"
show -search
: dropdown -style = " { maxHeight : ' 400px ' , overflow : ' auto ' } "
placeholder = "请选择内容分类"
tree -default -expand -all
}" allow -clear : getPopupContainer = "triggerNode => triggerNode.parentNode || document.body "
v -model :value = "searchParam.courseTypeId" sh ow -s earch
: dropdown -style = " { maxHeight : ' 400px ' , overflow : ' auto ' } " placeholder = "请选择内容分类" tree -default -expand -all
:tree-data = "sysTypeOptions" >
< / a-tree-select >
< / a-form-item >
@@ -88,7 +75,7 @@
< UploadOutlined / > 一键生成讲师费
< / a-button >
< / div > -- >
< a-button class = "resetbtn" @click ="handleImport()" >
< a-button class = "resetbtn" @click ="handleImport()" >
< DownloadOutlined / > 导入
< / a-button >
< a-button @click ="handleExport()" class = "resetbtn" >
@@ -98,10 +85,11 @@
<!-- 表格 -- >
< div style = "padding: 10px 0" >
< 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 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 ="() => handleModify(record, String(record.courseform))" > 修改 < / a -button >
< a-button type = "link" @click ="() => deleteModal(record, String(record.courseform))" > 删除 < / a -button >
@@ -114,41 +102,38 @@
< / div >
< div class = "tableBox " >
< div class = "pa" >
< a-pagination v-if = "tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
:hideOnSinglePage = "true" : pageSize = "searchParam.pageSize" :current = "searchParam.pageNo" :total = "tableDataTotal"
class = "pagination" @change ="changePagination" / >
< a-pagination v-if = "tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false" :hideOnSinglePage="true"
:pageSize = "searchParam.pageSize" :current = "searchParam.pageNo" :total = "tableDataTotal" class = "pagination"
@change ="changePagination" / >
< / div >
< / div >
<!-- 弹窗组件 -- >
< a-drawer v -model :visible = "teacherdialog" placement = "right" @closa ="cancelTeacherDialog" :maskClosable = "true" width = "60%" :title = "teacherdialogtitle" >
< a-drawer v -model :visible = "teacherdialog" placement = "right" @closa ="cancelTeacherDialog" :maskClosable = "true"
width = "60%" :title = "teacherdialogtitle" >
< a-form :model = "formParam" :rules = "rules" layout = "vertical" ref = "formRef" >
<!-- 讲师名称 teacherName 内容分类 coursetypeid -- >
< a-row :gutter = "16" >
< a-col :span = "12" >
<!-- < ProjectManagerOutTeacher v -model :value = "formParam.name"
< a-form-item label = "讲师名称" name = "teacherName" >
< ProjectManagerOutTeacher v -model :value = "formParam.name"
v -model :name = "formParam.teacherName"
placeholder = "请输入工号/讲师姓名进行检索"
@onChange ="managerChange" > < / ProjectManagerOutTeacher > - - >
< a-form-item label = "讲师名称" name = "teacherName" >
< a-input v -model :value = "formParam.teacherName" allowClear
showSearch class = "draitem" placeholder= "请输入讲师姓名" > < / a-input >
@onChange ="managerChange" > < / ProjectManagerOutTeacher >
< ! - - < a -input v -model :value = "formParam.teacherName" allowClear showSearch class = "draitem"
placeholder = "请输入讲师姓名" > < / a-input > -- >
< / a-form-item >
< / a-col >
< a-col :span = "12" >
< a-form-item label = "内容分类" name = "courseTypeId" >
< a-tree-select
: fieldNames = "{
< a-tree-select : fieldNames = "{
children: 'children',
label: 'name',
value: 'code',
} "
all ow -cl ear
: getPopupContainer = "triggerNode => triggerNode.parentNode || document.body"
v -model :value = "formParam.courseTypeId"
show -search
: dropdown -style = " { maxHeight : ' 400px ' , overflow : ' auto ' } "
placeholder = "请选择内容分类"
tree -default -expand -all
}" allow -clear : getPopupContainer = "triggerNode => triggerNode.parentNode || document.body "
v -model :value = "formParam.courseTypeId" sh ow -s earch
: dropdown -style = " { maxHeight : ' 400px ' , overflow : ' auto ' } " placeholder = "请选择内容分类" tree -default -expand -all
:tree-data = "sysTypeOptions" >
< / a-tree-select >
< / a-form-item >
@@ -158,8 +143,7 @@
< a-row :gutter = "16" >
< a-col :span = "12" >
< 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 >
< / a-input >
< / a-form-item >
< / a-col >
@@ -182,8 +166,8 @@
< / a-col >
< a-col :span = "12" >
< a-form-item label = "授课时长" name = "teaching" >
< a-input v -model :value = "formParam.teaching" style = "width:80%; height: 40px; border-radius: 8px; " placeholder = "0"
allowClear showSearch suffix = "分钟" @blur ="clearNonNumber" >
< a-input v -model :value = "formParam.teaching" style = "width:80%; height: 40px; border-radius: 8px; "
placeholder = "0" allowClear showSearch suffix = "分钟" @blur ="clearNonNumber" >
< / a -input >
< span style = "margin-left: 5px ;" v-if = "formParam.teaching != null" > {{ ( formParam.teaching / 60
) .toFixed ( 2 ) }} 小时 < / span >
@@ -195,13 +179,15 @@
< a-row :gutter = "16" >
< a-col :span = "12" >
< a-form-item label = "参训人数" name = "studys" >
< a-input v -model :value = "formParam.studys" class = "draitem" placeholder = "0 " allowClear showSearch @blur ="clearstudysNumber" >
< a-input v -model :value = "formParam.studys" class = "draitem" placeholder = "0 " allowClear showSearch
@blur ="clearstudysNumber" >
< / a -input >
< / a-form-item >
< / a-col >
< a-col :span = "12" >
< a-form-item label = "评分" name = "score" >
< a-input v -model :value = "formParam.score" class = "draitem" placeholder = "0 " allowClear showSearch @blur ="clearscoreNumber" >
< a-input v -model :value = "formParam.score" class = "draitem" placeholder = "0 " allowClear showSearch
@blur ="clearscoreNumber" >
< / a -input >
< / a-form-item >
< / a-col >
@@ -238,7 +224,8 @@
< a-descriptions bordered :column = "2" :contentStyle = "rowCenter" :labelStyle = "rowCenter" >
< a-descriptions-item label = "讲师名称" > { { formParam . teacherName } } < / a-descriptions-item >
< a-descriptions-item label = "手机号码" > { { formParam . mobile } } < / 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 . status == 0 ? '未开课' : formParam . status == 1
? '已开课' : '' } } < / a-descriptions-item >
@@ -276,7 +263,7 @@
< div class = "del_header" > < / div >
< div class = "del_main" >
< div class = "header" >
< img src = "@/assets/images/coursewareManage/QR.png" alt = "" style = "margin-right:10px" / >
< img src = "@/assets/images/coursewareManage/QR.png" alt = "" style = "margin-right:10px" / >
< span > 提示 < / span >
< / div >
< div class = "body" >
@@ -295,11 +282,11 @@
< / a-modal >
< / div >
<!-- < div > < ImageUpload / > < / div > -- >
< ImportWork v -model :showWork = "showWork" :url = "'/admin/export/importOutTeacherRecord'" : title= "title " > < / ImportWork >
< ImportWork v -model :showWork = "showWork" :url = "'/admin/export/importOutTeacherRecord'" : title= "title" > < / ImportWork >
< / div >
< / template >
< script lang = "jsx" >
import { reactive , toRefs , ref , computed } from "vue" ;
import { reactive , toRefs , ref , computed } from "vue" ;
import { useRouter } from "vue-router" ;
import { useStore } from "vuex" ;
import {
@@ -314,7 +301,7 @@ import { message } from "ant-design-vue";
import ProjectManager from "@/components/project/ProjectManagerNew" ;
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher" ;
import dayjs from "dayjs" ;
import { getTeacherCourseList , updateInTeacherCourse , getNewInTeacherCourseList , deleteInTeacherCourse , insertInTeacherCourse } from "../../api/Teaching" ;
import { getTeacherCourseList , updateInTeacherCourse , getNewInTeacherCourseList , deleteInTeacherCourse , insertInTeacherCourse } from "../../api/Teaching" ;
// import {getProjSt} from "../../api/indexProjStu";
// import AddTeacher from "../../components/drawers/project/AddTeacher"
export default {
@@ -337,7 +324,7 @@ export default {
vf : false ,
showWork : false ,
moreid : 1 ,
title : "导入外部授课记录" ,
title : "导入外部授课记录" ,
tableLoading : false ,
delTeacherId : null , //删除id确认
userNoid : null , //详情工号确认
@@ -354,14 +341,14 @@ export default {
tableDataTotal : - 1 , //table列表总条数
formParam : {
status : 1 ,
entryType : 1 ,
teaching : null ,
teachingDate : null ,
entryType : 1 ,
teaching : null ,
teachingDate : null ,
} ,
searchdate : undefined , //选择时间
searchParam : {
name : null ,
recordType : 2 ,
name : null ,
recordType : 2 ,
pageNo : 1 ,
pageSize : 10 ,
teacherName : null ,
@@ -370,28 +357,28 @@ export default {
status : null ,
beginTime : null ,
endTime : null ,
entryType : null ,
entryType : null ,
} ,
} )
// function searchTimeChange(time, timeStr) {
// let startTime = timeStr[0]
// let endTime = timeStr[1] ;
// state.startTime = new Date(startTime).getTime();
// state.endTime = new Date(endTime).getTime();
// // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// // state.searchParam.endTime = new Date(endTime).getTime() ;
// state.searchParam.beginTime = state.startTime ? state.startTime : null,
// state.searchParam.endTime = state.endTime ? state.endTime : null
// }
// function searchTimeChange(time, timeStr) {
// let startTime = timeStr[0]
// let endTime = timeStr[1] ;
// state.startTime = new Date(startTime).getTime();
// state.endTime = new Date(endTime).getTime();
// // state.searchParam.beginTime = new Date(beginTime).getTime() ;
// // state.searchParam.endTime = new Date(endTime).getTime() ;
// state.searchParam.beginTime = state.startTime ? state.startTime : null,
// state.searchParam.endTime = state.endTime ? state.endTime : null
// }
const AddressList = ref ( [
] ) ;
const rules = {
name : [ { required : true , message : '' , log : '讲师不能为空' } ] ,
courseTypeId : [ { required : true , message : '' , log : '内容分类不能为空' } ] ,
courseName : [ { required : true , message : '' , log : '课程名称不能为空' } ] ,
status : [ { required : true , message : '' , log : '讲开课状态不能为空' } ] ,
teaching : [ { required : true , message : '' , log : '授课时长不能为空' } ] ,
teachingDate : [ { required : true , message : '' , log : '授课日期不能为空' } ] ,
name : [ { required : true , message : '' , log : '讲师不能为空' } ] ,
courseTypeId : [ { required : true , message : '' , log : '内容分类不能为空' } ] ,
courseName : [ { required : true , message : '' , log : '课程名称不能为空' } ] ,
status : [ { required : true , message : '' , log : '讲开课状态不能为空' } ] ,
teaching : [ { required : true , message : '' , log : '授课时长不能为空' } ] ,
teachingDate : [ { required : true , message : '' , log : '授课日期不能为空' } ] ,
}
//获取开课场地
@@ -407,9 +394,9 @@ export default {
{ value : 0 , label : "未开课" } ,
{ value : 1 , label : "已开课" } ,
] )
const entryTypeList = ref ( [
{ value : 0 , label : "系统生成" } ,
{ value : 1 , label : "手动录入" } ,
const entryTypeList = ref ( [
{ value : 0 , label : "系统生成" } ,
{ value : 1 , label : "手动录入" } ,
] )
const columns = ref ( [
@@ -582,7 +569,7 @@ export default {
] )
const getSysTypeMap = ( code ) => {
if ( code == "" ) return
if ( code == "" ) return
// console.log(store.state.sysTypeMap,'map集合');
return store . state . sysTypeMap . get ( code )
}
@@ -593,21 +580,21 @@ export default {
} ;
//重置
const searchReset = ( ) => {
state . searchdate = null ,
state . searchdate = null ,
state . searchParam = {
recordType : 2 ,
recordType : 2 ,
pageNo : 1 ,
pageSize : 10 ,
managerId : null ,
name : null ,
manager : null ,
manager : null ,
entryType : null ,
status : 1 ,
entryType : null ,
systemId : null ,
endTime : null ,
beginTime : null ,
entryType : null
entryType : null ,
systemId : null ,
endTime : null ,
beginTime : null ,
entryType : null
} ;
getTableDate ( ) ;
} ;
@@ -647,7 +634,7 @@ export default {
state . teacherdialog = true ;
state . teacherdialogtitle = '修改授课记录'
state . lookTeacherId = record . id
state . formParam . recordType = '1'
state . formParam . recordType = '1'
state . vf = false
TeacherSystem ( )
}
@@ -664,16 +651,16 @@ export default {
}
//保存
const createTeacherDialog = async ( ) => {
state . formParam . teachingDate = state . teachingDate ? dayjs ( state . teachingDate ) . format ( "YYYY-MM-DD" ) . toString ( ) : ""
console . log ( state . formParam )
state . formParam . teachingDate = state . teachingDate ? dayjs ( state . teachingDate ) . format ( "YYYY-MM-DD" ) . toString ( ) : ""
console . log ( state . formParam )
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 ] ) ;
if ( result ) {
return message . error ( rules [ formItemNames [ i ] ] [ 0 ] . log )
}
}
state. formParam = { ...state. formParam}
state. formParam = { ... state. formParam }
if ( state . vf == false ) {
updateInTeacherCourse ( state . formParam ) . then ( response => {
message . success ( "修改成功" ) ;
@@ -734,7 +721,7 @@ export default {
const cancel = ( ) => {
state . formParam = {
status : 1 ,
recordType : 2 ,
recordType : 2 ,
teacherName : null ,
mobile : null ,
name : null ,
@@ -742,9 +729,9 @@ export default {
teaching : null ,
score : null ,
remark : null ,
teachingDate : null
teachingDate : null
}
state . teachingDate = null
state . teachingDate = null
}
//展开切换
const handlemoreid = ( ) => {
@@ -756,7 +743,7 @@ export default {
state . searchParam . type = null
state . searchParam . status = null
state . searchParam . id = null
state . searchParam . entryType = null
state . searchParam . entryType = null
}
}
//表格内查看数据操作
@@ -774,10 +761,11 @@ export default {
}
//外部授课详情
const TeacherSystem = ( ) => {
getTeacherCourseList ( { id : state . lookTeacherId } ) . then ( ( res ) => {
getTeacherCourseList ( { id : state . lookTeacherId } ) . then ( ( res ) => {
state . formParam = res . data . data
state . teachingDate = dayjs ( res . data . data . teachingDate , 'YYYY-MM-DD' ) ,
console . log ( state . formParam ) ;
state . teachingDate = dayjs ( res . data . data . teachingDate , 'YYYY-MM-DD' ) ,
state . formParam . name = state . formParam . teacherName
console . log ( state . formParam ) ;
} )
. catch ( ( err ) => {
} ) ;
@@ -788,13 +776,13 @@ export default {
state . searchParam . name = t ;
// state.searchParam.trainorgName=orgName
}
const clearNonNumber = ( ) => {
const clearNonNumber = ( ) => {
state . formParam . teaching = state . formParam . teaching . replace ( /\D/g , '' ) ;
}
//导入功能
const handleImport = ( ) => {
}
//导入功能
const handleImport = ( ) => {
state . showWork = true
}
}
//导出功能
const handleExport = ( ) => {
window . open (
@@ -880,7 +868,8 @@ const handleImport = () => {
: : v - deep . ant - picker - range . ant - picker - active - bar {
margin - left : 85 px ! important ;
}
}
}
//导出按钮icon
. daochu {
width : 16 px ;
@@ -1192,29 +1181,36 @@ const handleImport = () => {
border - radius : 8 px ;
margin - right : 20 px
}
: : v - deep . ant - select : not ( . ant - select - customize - input ) . ant - select - selector {
border - radius : 8 px ;
height : 40 px ;
: : v - deep . ant - select : not ( . ant - select - customize - input ) . ant - select - selector {
border - radius : 8 px ;
height : 40 px ;
}
. ant - col - 12 {
height : 80 px ;
. ant - col - 12 {
height : 80 px ;
}
. tableBox {
padding - bottom : 20 px ;
margin : 20 px 38 px 30 px ;
: : v - deep . ant - select - dropdown {
padding - bottom : 20 px ;
margin : 20 px 38 px 30 px ;
: : v - deep . ant - select - dropdown {
display : inline - block ;
}
: : v - deep . ant - select - selection - item {
margin - lef t : 3 px ;
}
: : v - deep . ant - pagination - options - size - changer . ant - select {
width : 84 px ;
}
. pa {
width : 100 % ;
display : flex ;
justify - content : right ;
}
}
: : v - deep . ant - se lec t- selection - item {
margin - left : 3 px ;
}
: : v - deep . ant - pagination - options - size - changer . ant - select {
width : 84 px ;
}
. pa {
width : 100 % ;
display : flex ;
justify - content : right ;
}
}
< / style >