diff --git a/src/api/Lecturer.js b/src/api/Lecturer.js index 4cc1139b..a4dec238 100644 --- a/src/api/Lecturer.js +++ b/src/api/Lecturer.js @@ -7,23 +7,27 @@ import http from "./config"; * @FilePath: /fe-manage/src/api/indexProjStu.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ -// 获取内部讲师体系列表 +// 获取讲师体系列表 //VUE_APP_BASE_API /manageApi -export const getTeacherSystemList = (obj) => http.post('/admin/teacher/getSystem', obj) -// 获取内部讲师列表 -export const getTeacherList = (obj) => http.post('/admin/teacher/getInTeacherList', obj) +export const getTeacherSystemList = (obj) => http.get( '/admin/ststem/list', {params: obj}) +//获取讲师级别 +export const getLevel = (obj) => http.get('/admin/ststem/getLevelList', {params: obj}) +// 获取讲师列表 +export const getTeacherList = (obj) => http.get('/admin/teacher/list' ,{params: obj}) +//讲师详情 +export const getTeacherById= (obj) => http.get('/admin/teacher/queryById',{params: obj}) +//删除讲师 +export const deleteInTeacher= (obj) => http.post('/admin/teacher/delById',obj) +//新增讲师 +export const insertTeacher = (obj) => http.post('/admin/teacher/addTeacher' ,obj) +//修改讲师 +export const updateInTeacher = (obj) => http.post('/admin/teacher/editTeacher' ,obj) + +//删除内部讲师 +// export const deleteInTeacher= (obj) => http.post(`/admin/teacher/delById?id=${obj}`) //获取内部讲师发薪地 export const getPayRollPlace = (obj) => http.post('/admin/teacher/getPayRollPlace', obj) -//获取内部讲师级别 -export const getLevel = (obj) => http.post('/admin/teacher/getNewLevel', obj) -//新增内部讲师 -export const insertTeacher = (obj) => http.post('/admin/teacher/insertInTeacher' ,obj) -//修改 内部讲师 -export const updateInTeacher = (obj) => http.post('/admin/teacher/updateInTeacher' ,obj) -//内部讲师详情 -export const getTeacherById= (obj) => http.post(`/admin/teacher/getTeacherById?id=${obj}`) -//删除内部讲师 -export const deleteInTeacher= (obj) => http.post(`/admin/teacher/deleteInTeacher?id=${obj}`) + //修改内部讲师状态 export const updateTeacherState = (obj) => http.post('/admin/teacher/update-status' ,obj) //获取内部讲师授课记录 diff --git a/src/api/Teaching.js b/src/api/Teaching.js index 969d75f5..2238518d 100644 --- a/src/api/Teaching.js +++ b/src/api/Teaching.js @@ -1,24 +1,25 @@ import http from "./config"; import {getCookieForName} from "@/api/method"; -//列表查询内部讲师授课记录 -export const getNewInTeacherCourseList = (obj) => http.post('/admin/teacher/getNewInTeacherCourseList', obj) -//内部讲师授课记录详情 -// export const getTeacherCourseList = (obj) => http.post(`/admin/teacher/getTeacherCourseList?id=${obj}`) -export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList', obj) +//列表查询授课记录 +export const getNewInTeacherCourseList = (obj) => http.get('/admin/teacherRecord/list', {params: obj}) +//新增授课记录 +export const insertInTeacherCourse = (obj) => http.post('/admin/teacherRecord/addTeacher', obj) +//删除讲师授课记录 +export const deleteInTeacherCourse= (obj) => http.post('/admin/teacherRecord/delById' ,obj) +//修改讲师授课记录 +export const updateInTeacherCourse = (obj) => http.post('/admin/teacherRecord/editTeacher', obj) +//讲师授课记录详情 +export const getTeacherCourseList = (obj) => http.get('/admin/teacherRecord/queryById', {params: obj}) +//获取培训组织 +export const getOrganization = (obj) => http.get ('/admin/affiliation/list', {params: obj}) + + //授课记录导出 export const getexport = (obj) => http.post('/lesson_records/export', obj) //授课记录导入 export const importTeacherCourseRecord = (obj) => http.post('/importTeacherCourseRecord', obj) -//获取所属组织 -export const getOrganization = (obj) => http.post('/admin/teacher/getOrganization', obj) //获取开课场地 export const getAddress = (obj) => http.post('/admin/teacher/getAddress', obj) -//新增内部授课记录 -export const insertInTeacherCourse = (obj) => http.post('/admin/teacher/insertInTeacherCourse', obj) -//修改内部讲师授课记录 -export const updateInTeacherCourse = (obj) => http.post('/admin/teacher/updateInTeacherCourse', obj) -//删除讲师授课记录 -export const deleteInTeacherCourse= (obj) => http.post('/admin/teacher/deleteInTeacherCourse' ,obj) //外部讲师授课记录 export const getOuterTeacherCourseList = (obj) => http.post('/admin/teacher/getOuterTeacherCourseList', obj) //获取外部授课记录详情 diff --git a/src/views/lecturer/ExternalLecturer.vue b/src/views/lecturer/ExternalLecturer.vue index 4ad8c0e4..ddba1785 100644 --- a/src/views/lecturer/ExternalLecturer.vue +++ b/src/views/lecturer/ExternalLecturer.vue @@ -11,7 +11,7 @@ - @@ -44,8 +44,10 @@ @click="() => handleOperate(record, String(record.courseform))">停用 启用 - 删除 + 删除 + @@ -57,7 +59,7 @@
- avatar -
-
-
-
+ avatar +
+
+
+
+
-
@@ -254,7 +256,7 @@ import { FolderAddOutlined } from '@ant-design/icons-vue'; import ProjectManager from "@/components/project/ProjectManagerNew"; -import { getOutTeacherList, getOuterTeacherById, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer"; +import { getTeacherList, getTeacherById, deleteInTeacher, updateTeacherState, insertTeacher, updateInTeacher } from "../../api/Lecturer"; import { fileUp } from "../../api/indexEval"; import {getCookieForName} from "@/api/method" import SearchTeacher from "@/components/project/SearchTeacher";; @@ -295,11 +297,12 @@ export default { teacherrecordstableDataTotal: -1,//授课记录列表总条数 formParam: { description:"", - teacherType:'1', + teacherType:'2', photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' }, vf:true, searchParam: { + teacherType:2, teacherNameOrMobel: null,//姓名 status: null,//状态 pageNo: "1", @@ -322,12 +325,12 @@ export default { return false; } - let isLt1M = file.size < 2000000; - console.log(file.size, isLt1M) - if (!isLt1M) { - message.error("图片大小超过2MB!"); - return false; - } + let isLt1M = file.size < 500000; + console.log(file.size, isLt1M) + if (!isLt1M) { + message.error("图片不能超过500KB! 请重新上传"); + return false; + } const formDatas = new FormData(); formDatas.append("file", file); @@ -425,17 +428,18 @@ export default { state.searchParam = { pageNo: 1, pageSize: 10, + teacherType:2, teacherNameOrMobel: null, status: null }; getTableDate(); }; // List接口数据 - const getTableDate = (obj) => { + const getTableDate = () => { state.tableLoading = true state.loading = true; let objA = { ...state.searchParam }; - getOutTeacherList(objA) + getTeacherList(objA) .then((res) => { tableData.value = res.data.data.records state.tableDataTotal = Number(res.data.data.total); @@ -445,7 +449,7 @@ export default { }; getTableDate() // // 翻页 - const changePagination = (page) => { + const changePagination = (page,pageSize) => { state.searchParam.pageNo = page; state.searchParam.pageSize = pageSize; getTableDate(); @@ -473,7 +477,7 @@ export default { .validate() .then(() => { if (state.vf == false) { - updateOutTeacher(state.formParam).then(response => { + updateInTeacher(state.formParam).then(response => { message.success("修改成功"); state.teacherdialog = false; cancel() @@ -481,7 +485,7 @@ export default { }); } else { - insertTeacherOutSide(state.formParam) + insertTeacher(state.formParam) .then((res) => { message.success("保存成功"); state.teacherdialog = false; @@ -518,7 +522,7 @@ export default { //确认删除 const closeDeleteTeacher = () => { //调用删除接口 - deleteInTeacher(state.delTeacherId).then((res) => { + deleteInTeacher({id:state.delTeacherId}).then((res) => { if (res.data.code == 200) { // message.success("删除成功"); state.deleteTeacherdialog = false @@ -562,7 +566,7 @@ export default { //清空数据 const cancel = () => { state.formParam = { - teacherType:'1', + teacherType:2, photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png', name: null, mobile: null, @@ -600,7 +604,7 @@ export default { } //外部讲师详情 const TeacherSystem = () => { - getOuterTeacherById(state.id).then((res) => { + getTeacherById({id:state.id}).then((res) => { console.log("外部讲师详情", res.data); state.formParam = res.data.data state.formParam.description = state.formParam.description === null ? '' : state.formParam.description diff --git a/src/views/lecturer/ExternalTeaching.vue b/src/views/lecturer/ExternalTeaching.vue index 49ba1ac8..24321186 100644 --- a/src/views/lecturer/ExternalTeaching.vue +++ b/src/views/lecturer/ExternalTeaching.vue @@ -298,7 +298,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher"; import dayjs from "dayjs"; import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer"; -import { getTeacherCourseList, getAddress, updateInTeacherCourse, deleteInTeacherCourse, insertInTeacherCourse,getOuterTeacherCourseDetail } from "../../api/Teaching"; +import { getTeacherCourseList, getAddress, updateInTeacherCourse,getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse } from "../../api/Teaching"; // import {getProjSt} from "../../api/indexProjStu"; // import AddTeacher from "../../components/drawers/project/AddTeacher" export default { @@ -341,7 +341,7 @@ export default { searchdate: null, //选择时间 searchParam: { teacherNameOrUserNo:null, - teacherType:'1', + teacherType:2, pageNo: 1, pageSize: 10, teacher: null, @@ -583,7 +583,7 @@ export default { const searchReset = () => { state.searchdate= null, state.searchParam = { - teacherType:'1', + teacherType:2, pageNo: 1, pageSize: 10, managerId: null, @@ -605,7 +605,7 @@ export default { let objA = { ...state.searchParam }; objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "", objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "", - getTeacherCourseList(objA) + getNewInTeacherCourseList(objA) .then((res) => { tableData.value = res.data.data.records state.tableDataTotal = Number(res.data.data.total); @@ -675,7 +675,7 @@ export default { //调用删除接口 let obj ={ offcourseId :state.delTeacherId, - teacherType:'1' + teacherType:2 } deleteInTeacherCourse(obj).then((res) => { if (res.data.code == 200) { @@ -759,7 +759,7 @@ export default { } //外部授课详情 const TeacherSystem = () => { - getOuterTeacherCourseDetail(state.lookTeacherId).then((res) => { + getTeacherCourseList({id:state.lookTeacherId}).then((res) => { state.formParam = res.data.data console.log( state.formParam); }) diff --git a/src/views/lecturer/InsideLecturer.vue b/src/views/lecturer/InsideLecturer.vue index 858a060d..5458e9cd 100644 --- a/src/views/lecturer/InsideLecturer.vue +++ b/src/views/lecturer/InsideLecturer.vue @@ -6,18 +6,18 @@ - - - @@ -75,7 +75,7 @@ @expand="expandTable" :pagination="false">
@@ -145,7 +146,7 @@ + v-model:system="formParam.tSystemName" v-model:level="formParam.tLevelId"> @@ -174,8 +175,8 @@ - - + @@ -412,18 +413,19 @@ export default { tableDataTotal: -1,//table列表总条数 vf: false, formParam: { - teachenType: '0', name: null, certStatus: 0,//认证状态 defaultteachingTime: null, + teacherType:1, photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' }, searchParam: { + teacherType:1, pageNo: 1, // pageSize1: "10", - teacherNameOrUserNo: null, + name: null, tSystemName: null, - sLevelName: null, + tLevelId: null, waitStatus: null, certStatus: null, courses: null, @@ -433,7 +435,8 @@ export default { teacherrepromo: { pageNo: "1", pageSize: "10", - userNo: null + userNo: null, + teacherType:1 }, activeName: 'first' }) @@ -528,14 +531,17 @@ export default { ]); //获取讲师体系列表 const LecturerSystemLista = () => { - // console.log('点击了LecturerSystemLista') - getTeacherSystemList().then((res) => { + let obj ={ + pageNo:1, + pageSize:1000, + } + getTeacherSystemList(obj).then((res) => { if (res.data.code === 200) { - let arr = res.data.data; + let arr = res.data.data.records; let array = []; arr.map((value) => { let obj = { - value: value.kid, + value: value.id, label: value.systemName, }; array.push(obj); @@ -554,31 +560,6 @@ export default { } const AddContentList = (data) => { console.log(data, 'treedatalist') - - //组件获取返回的所有值,调用以前接口,现环境不可用,示例: - // [{ - // "id": "966459050400600064", - // "sysCreateAid": "952948872212635648", - // "sysCreateBy": "董瑞华", - // "sysCreateTime": "2022-04-20 22:03:13", - // "sysUpdateTime": "2022-04-20 22:03:13", - // "sysUpdateBy": "董瑞华", - // "sysVersion": 0, - // "deleted": false, - // "name": "研发", - // "parentId": "966458733088919552", - // "filter": true, - // "orderIndex": 2, - // "origin": 2, - // "status": 1, - // "total": 0, - // "sysResType": 1, - // "children": "", - // "parentName": "专业力", - // "resDataManager": "", - // "code": "966459050400600064", - // "value": "966459050400600064" - // }] } LecturerSystemLista() //获取内部讲师级别 @@ -586,7 +567,7 @@ export default { ]) const changetlevel = (val) => { console.log("讲师体系id" + val); - getLevel({ kid: val }).then((res) => { + getLevel({ id: val }).then((res) => { if (res.data.code === 200) { let arr = res.data.data; let array = []; @@ -612,27 +593,27 @@ export default { { value: 0, label: "未认证" }, { value: 1, label: "已认证" }, ]) - const PlaceOfPayList = ref([ - // { value: 0, label: "发薪地B1" }, - ]) + // const PlaceOfPayList = ref([ + // // { value: 0, label: "发薪地B1" }, + // ]) //获取讲师发薪地列表 - const PlaceOfPayLista = () => { - getPayRollPlace().then((res) => { - if (res.data.code === 200) { - let arr = res.data.data; - let array = []; - arr.map((value) => { - let obj = { - value: value.id, - label: value.name, - }; - array.push(obj); - }); - PlaceOfPayList.value = array; - } - }) - } - PlaceOfPayLista() + // const PlaceOfPayLista = () => { + // getPayRollPlace().then((res) => { + // if (res.data.code === 200) { + // let arr = res.data.data; + // let array = []; + // arr.map((value) => { + // let obj = { + // value: value.id, + // label: value.name, + // }; + // array.push(obj); + // }); + // PlaceOfPayList.value = array; + // } + // }) + // } + // PlaceOfPayLista() const AccountStatusList = ref([ { value: 1, label: "启用" }, { value: 2, label: "停用" }, @@ -806,13 +787,14 @@ export default { }; //重置 const searchReset = () => { + LecturerSystemLista() state.searchParam = { - + teacherType:1, name: null, userNo: null, newdepartId: null, tsystemname: null, - sLevelName: null, + tLevelId: null, waitStatus: null, certStatus: null, salaryName: null, @@ -825,20 +807,21 @@ export default { getTableDate(); }; // List接口数据 - const getTableDate = (obj) => { - state.tableLoading = true + const getTableDate = () => { + // state.tableLoading = true let objA = { ...state.searchParam }; getTeacherList(objA) .then((res) => { - // tableData.value = res.data.data.records - let objA = res.data.data.records - objA.map((item) => { - if (item.organizationName !== null) { - item.neworganizationName = item.organizationName.split('/') - item.neworganizationName = item.neworganizationName[item.neworganizationName.length - 1] - } - }) - tableData.value = objA + tableData.value = res.data.data.records + console.log(tableData.value,'tableData.value') + // let objA = res.data.data.records + // objA.map((item) => { + // if (item.organizationName !== null) { + // item.neworganizationName = item.organizationName.split('/') + // item.neworganizationName = item.neworganizationName[item.neworganizationName.length - 1] + // } + // }) + // tableData.value = objA state.tableDataTotal = Number(res.data.data.total); state.tableLoading = false }) @@ -959,7 +942,7 @@ export default { //确认删除 const closeDeleteTeacher = () => { //调用删除接口 - deleteInTeacher(state.delTeacherId).then((res) => { + deleteInTeacher({id:state.delTeacherId}).then((res) => { if (res.data.code == 200) { message.success("删除成功"); state.deleteInTeacherdialog = false @@ -1004,9 +987,9 @@ export default { status: null, teacherType: '0', photo: null, - teacherNameOrUserNo: null, + name: null, newdepartId: null, - sLevelName: null, + tLevelId: null, defaultteachingTime:null, tSystemName: null, certStatus: 0, @@ -1021,7 +1004,7 @@ export default { const rules = { name: [{ required: true, message: '讲师不能为空' }], newdepartId: [{ required: true, message: '组织不能为空' }], - sLevelName: [{ required: true, message: '讲师级别不能为空' }], + tLevelId: [{ required: true, message: '讲师级别不能为空' }], tSystemName: [{ required: true, message: '讲师体系不能为空' }], defaultteachingTime: [{ required: true, message: '' }], certStatus: [{ required: true, message: '认证状态不能为空' }], @@ -1038,7 +1021,7 @@ export default { message.warning('组织不能为空') return } - if (state.formParam.sLevelName == null) { + if (state.formParam.tLevelId == null) { state.log = true message.warning('讲师级别不能为空') return @@ -1067,7 +1050,8 @@ export default { } //内部讲师详情 const TeacherSystem = () => { - getTeacherById(state.id).then((res) => { + console.log(state.id) + getTeacherById({id:state.id}).then((res) => { if (res.data.code === 200) { // let objA= res.data.data[0] // if( objA.orgName !==null ){ @@ -1075,7 +1059,7 @@ export default { // objA.neworgName= objA.neworgName[objA.neworgName.length-1] // } - state.formParam = res.data.data[0] + state.formParam = res.data.data state.formParam.description = state.formParam.description === null ? '' : state.formParam.description state.formParam.workExp0erience = state.formParam.workExperience === null ? '' : state.formParam.workExperience state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses @@ -1106,14 +1090,14 @@ export default { // } const handleformlevel = () => { console.log('请先选择讲师体系') - if (state.formParam.systemId == undefined) { + if (state.formParam.tSystemId == undefined) { message.warning('请先选择讲师体系') } } //导出功能 const handleExport = () => { window.open( - `${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&teacherNameOrUserNo=${state.searchParam.teacherNameOrUserNo ? state.searchParam.teacherNameOrUserNo : ""}&systemId=${state.searchParam.systemId ? state.searchParam.systemId : ""}&sLevelName=${state.searchParam.sLevelName ? state.searchParam.sLevelName : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}` + `${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.pageNo}&pageSize=${state.searchParam.pageSize}&name=${state.searchParam.name ? state.searchParam.name : ""}&tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ""}&tLevelId=${state.searchParam.tLevelId ? state.searchParam.tLevelId : "" }&waitStatus=${state.searchParam.waitStatus ? state.searchParam.waitStatus : ""}&certStatus=${state.searchParam.certStatus ? state.searchParam.certStatus : ""}&courses=${state.searchParam.courses ? state.searchParam.courses : ""}` ); // this.download('lesson_records/export', { // ...state.searchParam @@ -1144,9 +1128,9 @@ export default { getLevelList, OnTheJobStatusList, changetlevel, - PlaceOfPayLista, + // PlaceOfPayLista, AuthenticationStatusList, - PlaceOfPayList, + // PlaceOfPayList, AccountStatusList, searchSubmit, searchReset, diff --git a/src/views/lecturer/InsideTeaching.vue b/src/views/lecturer/InsideTeaching.vue index 666aa189..8c06a734 100644 --- a/src/views/lecturer/InsideTeaching.vue +++ b/src/views/lecturer/InsideTeaching.vue @@ -5,17 +5,17 @@
- - @@ -52,7 +52,7 @@
- @@ -62,12 +62,12 @@ - - @@ -86,7 +86,7 @@ - @@ -239,7 +239,8 @@ - + @@ -276,13 +277,13 @@ 讲师信息 - {{ formParam.teacherName }} + {{ formParam.name }} {{ formParam.userNo }} {{ formParam.organizationName }} {{ formParam.systemName }} {{ formParam.sLevelName }} - {{ formParam.entryType == 0 ? '系统生成' : formParam.entryType == 1 ? '手动录入' : '' }} + {{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '' }} {{ formParam.type == 1 ? '项目开课' : formParam.type == 2 ? '路径开课' : formParam.type == 3 ? '面授开课' : '' }} {{ formParam.coursename }} @@ -423,13 +424,13 @@ export default { endDate: null, //结束时间 formParam: { status: 1, - entryType: 1, + createFrom: 1, duration: null, }, startTime:null, startDate:null, searchParam: - { "teacherType": "0", "pageNo": 1, "pageSize": 10, "managerId": null, "teacherNameOrUserNo": null, "entryType": null, "status": null, "trainorgId": null, "systemId": null, "endDate": null, "startDate":null, "studysranges": [], "score": null } + { "teacherType": 1, "pageNo": 1, "pageSize": 10, "managerId": null, "name": null, "createFrom": null, "status": null, "orgId": null, "tSystemId": null, "endDate": null, "startDate":null, "studysranges": [], "score": null } }) //获取所属组织 @@ -439,13 +440,17 @@ export default { //获取所属组织 const getOrganizationLista = () => { // console.log('getOrganizationList') - getOrganization().then((res) => { + let obj={ + pageNo:1, + pageSize:1000 + } + getOrganization(obj).then((res) => { if (res.data.code === 200) { - let arr = res.data.data; + let arr = res.data.data.records; let array = []; arr.map((value) => { let obj = { - value: value.trainorgId, + value: value.id, label: value.trainOrgName, }; array.push(obj); @@ -460,14 +465,17 @@ export default { ]); //获取讲师体系列表 const LecturerSystemLista = () => { - // console.log('点击了LecturerSystemLista') + let obj ={ + pageNo:1, + pageSize:1000, + } getTeacherSystemList().then((res) => { if (res.data.code === 200) { - let arr = res.data.data; + let arr = res.data.data.records; let array = []; arr.map((value) => { let obj = { - value: value.kid, + value: value.id, label: value.systemName, }; array.push(obj); @@ -567,8 +575,8 @@ export default { { title: '讲师姓名 ', - dataIndex: 'teacherName', - key: 'teacherName', + dataIndex: 'name', + key: 'name', elipsis: true, align: "center", width: 120, }, @@ -602,18 +610,18 @@ export default { }, { title: '数据来源', - dataIndex: 'entryType', - key: 'entryType', + dataIndex: 'createFrom', + key: 'createFrom', elipsis: true, align: "center", width: 120, customRender: (value) => { return (
- {value.record.entryType == "1" || value.record.entryType == "2" + {value.record.createFrom == "1" || value.record.createFrom == "2" ? { "0": "系统生成", "1": "手动录入", - }[value.record.entryType + ""] || "" + }[value.record.createFrom + ""] || "" : "-"}
) @@ -740,10 +748,10 @@ export default { } else if (state.moreid == 2) { state.moreid = 1 - state.searchParam.entryType = null + state.searchParam.createFrom = null state.searchParam.status = '0' - state.searchParam.trainorgId = null - state.searchParam.systemId = null + state.searchParam.orgId = null + state.searchParam.tSystemId = null state.searchParam.id = null state.searchParam.scoreranges = [] state.searchParam.studysranges = [] @@ -774,18 +782,17 @@ export default { const searchReset = () => { state.searchdate= null, state.searchParam = { - teacherType: '0', + teacherType: 1, pageNo: 1, pageSize: 10, managerId: null, - teacherNameOrUserNo: null, - entryType: null, + name: null, + createFrom: null, status: '0', - trainorgId: null, - systemId: null, + orgId: null, + tSystemId: null, endDate: null, startDate: null, - entryType: null, studysranges: [], score: null }; @@ -797,7 +804,7 @@ export default { let objA = { ...state.searchParam }; objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "", objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "", - getTeacherCourseList(objA) + getNewInTeacherCourseList(objA) .then((res) => { tableData.value = res.data.data.records state.tableDataTotal = Number(res.data.data.total); @@ -870,7 +877,7 @@ export default { //调用删除接口 let obj = { offcourseId: state.delTeacherId, - teacherType: '0' + teacherType: 1 } deleteInTeacherCourse(obj).then((res) => { if (res.data.code == 200) { @@ -896,7 +903,7 @@ export default { //清空数据 const cancel = () => { state.formParam = { - teacherType: '0', + teacherType: 1, teacher: null, orgName: null, tSystemName: null, @@ -910,7 +917,7 @@ export default { type: null, remark: null, offcourseId: null, - entryType: null + createFrom: null } } @@ -948,8 +955,8 @@ export default { //内部授课详情 const TeacherSystem = (record) => { state.formParam = { - teacherType: '0', - teacherName: record.teacherName, + teacherType: 1, + name: record.name, userNo: record.userNo, orgName: record.orgName, tSystemName: record.tSystemName, @@ -964,31 +971,37 @@ export default { score: record.score, studys: record.studys, remark: record.remark, - entryType: record.entryType + createFrom: record.createFrom } console.log(state.formParam) } //内部授课详情 const TeacherSystem1 = (record) => { - state.formParam = { - teacherType: '0', - teacherName: record.teacherName, - userNo: record.userNo, - organizationName: record.organizationName, - systemName: record.systemName, - sLevelName: record.sLevelName, - type: record.type, - courseName: record.courseName, - status:record.status, - beginTime:record.beginTime, - // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')), - // record.beginTime, - duration: record.duration, - score: record.score, - studys: record.studys, - remark: record.remark, - entryType: record.entryType - } + getTeacherCourseList({id:record.id}).then((res) => { + state.formParam = res.data.data + console.log( state.formParam); + }) + .catch((err) => { + }); + // state.formParam = { + // teacherType: 1, + // name: record.name, + // userNo: record.userNo, + // organizationName: record.organizationName, + // systemName: record.systemName, + // sLevelName: record.sLevelName, + // type: record.type, + // courseName: record.courseName, + // status:record.status, + // beginTime:record.beginTime, + // // ref< moment.Moment >(moment(record.beginTime,'YYYY-MM-DD')), + // // record.beginTime, + // duration: record.duration, + // score: record.score, + // studys: record.studys, + // remark: record.remark, + // createFrom: record.createFrom + // } console.log(state.formParam) } const column = ref([{ @@ -1107,20 +1120,20 @@ export default { window.open( `${process.env.VUE_APP_BASE_API}/lesson_records/export?pageNo=${state.searchParam.currentPage }&pageSize=${state.searchParam.pageSize} - &userNo=${state.searchParam.userNo ? state.searchParam.userNo : ""} + &name=${state.searchParam.name ? state.searchParam.name : ""} &courseName=${state.searchParam.courseName ? state.searchParam.courseName : ""} &departId=${state.searchParam.departId ? state.searchParam.departId : ""} - &systemId=${state.searchParam.systemId ? state.searchParam.systemId : ""} + &tSystemId=${state.searchParam.tSystemId ? state.searchParam.tSystemId : ""} &startDate=${state.searchParam.startDate ? state.searchParam.startDate : ""} &endDate=${state.searchParam.endDate ? state.searchParam.endDate : ""} - &entryType=${state.searchParam.entryType ? state.searchParam.entryType : ""} + &createFrom=${state.searchParam.createFrom ? state.searchParam.createFrom : ""} &id=${state.searchParam.id ? state.searchParam.id : ""} &type=${state.searchParam.type ? state.searchParam.type : ""} &status=${state.searchParam.status ? state.searchParam.status : ""} &studysranges=${state.searchParam.studysranges ? state.searchParam.studysranges : ""} &scoreranges=${state.searchParam.scoreranges ? state.searchParam.scoreranges : ""} `) - console.log(state.searchParam.userNo,state.searchParam,'参数') + console.log(state.searchParam.name,state.searchParam,'参数') } const handleImport = () => { state.showWork = true @@ -1162,11 +1175,15 @@ export default { const clearscoreNumber = () => { state.formParam.score = state.formParam.score.replace(/\D/g, ''); } + const clearstudysNumber = () => { + state.formParam.studys = state.formParam.studys.replace(/\D/g, ''); + } return { ...toRefs(state), // managerChange, clearNonNumber, clearscoreNumber, + clearstudysNumber, beforeUpload2, rules, rule, diff --git a/src/views/lecturer/LecturerFee.vue b/src/views/lecturer/LecturerFee.vue index 0a576a91..7e48d3f5 100644 --- a/src/views/lecturer/LecturerFee.vue +++ b/src/views/lecturer/LecturerFee.vue @@ -13,7 +13,7 @@ -
+
- + @@ -17,7 +17,7 @@ import { reactive, toRefs, ref, watch } from "vue"; import LecturerFee from "../lecturer/LecturerFee.vue" import LecturerApproval from "../lecturer/LecturerApproval.vue" - export default { + export default { name: "LecturerFeeManagement", components: { LecturerFee, diff --git a/src/views/lecturer/LookExternalLecturer.vue b/src/views/lecturer/LookExternalLecturer.vue index 3b26cc89..59ec47f9 100644 --- a/src/views/lecturer/LookExternalLecturer.vue +++ b/src/views/lecturer/LookExternalLecturer.vue @@ -117,9 +117,9 @@ export default{ //外部讲师详情 const TeacherSystem = () => { - getTeacherById(state.id).then((res) => { + getTeacherById({id:state.id}).then((res) => { console.log("内部讲师详情", res.data); - state.formParam = res.data.data[0] + state.formParam = res.data.data state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo }) .catch((err) => { diff --git a/src/views/lecturer/LookInsideLecturer.vue b/src/views/lecturer/LookInsideLecturer.vue index eab8536e..0c6f293e 100644 --- a/src/views/lecturer/LookInsideLecturer.vue +++ b/src/views/lecturer/LookInsideLecturer.vue @@ -161,17 +161,17 @@ export default{ //内部讲师详情 const TeacherSystem = () => { - getTeacherById(state.id).then((res) => { - let objA= res.data.data[0] - if( objA.orgName !==null ){ - objA.neworgName=objA.orgName.split('/') + getTeacherById({id:state.id}).then((res) => { + let objA= res.data.data + console.log(objA ,'11111111111') + // if( objA.orgName !==null ){ + // objA.neworgName=objA.orgName.split('/') - objA.neworgName= objA.neworgName[objA.neworgName.length-1] - } - // console.log(objA ,'11111111111') + // objA.neworgName= objA.neworgName[objA.neworgName.length-1] + // } state.formParam = objA state.formParam.photo = state.formParam.photo ===null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo - state.teacherrepromo.userId=res.data.data[0].id + state.teacherrepromo.userId=res.data.data.id console.log(state.teacherrepromo.id); getpromotionrecordstableData() }) diff --git a/src/views/lecturer/Organization.vue b/src/views/lecturer/Organization.vue index ed7fcd03..b759d392 100644 --- a/src/views/lecturer/Organization.vue +++ b/src/views/lecturer/Organization.vue @@ -87,13 +87,13 @@ - +