diff --git a/src/api/Teaching.js b/src/api/Teaching.js index cd56100e..c44fbe60 100644 --- a/src/api/Teaching.js +++ b/src/api/Teaching.js @@ -12,7 +12,8 @@ export const updateInTeacherCourse = (obj) => http.post('/admin/teacherRecord/ed export const getTeacherCourseList = (obj) => http.get('/admin/teacherRecord/queryById', {params: obj}) //获取培训组织 export const getOrganization = (obj) => http.get ('/admin/affiliation/list', {params: obj}) - +//供应商数据 +export const selectSupplier = (obj) => http.get('/admin/teacher/selectSupplier', {params: obj}) //授课记录导出 export const getexport = (obj) => http.post('/lesson_records/export', obj) diff --git a/src/components/lecturer/ImportWork.vue b/src/components/lecturer/ImportWork.vue index cf292b80..30e51dbe 100644 --- a/src/components/lecturer/ImportWork.vue +++ b/src/components/lecturer/ImportWork.vue @@ -67,16 +67,16 @@ -
+ +
@@ -201,14 +201,13 @@ import {getCookieForName} from "@/api/method"; } } let isLt1M = info.file.size < 512000000; - console.log(info.file.size, isLt1M) - if (!isLt1M) { - state.fileList = []; - state.uploadpercent = -1; - message.destroy(); - message.error("文件大小超出500M,请重新上传"); - return; - } + if (!isLt1M) { + state.fileList = []; + state.uploadpercent = -1; + message.destroy(); + message.error("文件大小超出500M,请重新上传"); + return; + } state.addLoading = true; state.uploadpercent = parseInt(info.file.percent); @@ -220,16 +219,25 @@ import {getCookieForName} from "@/api/method"; } if (status === "done") { state.fileName = info.file.name; - if(!info.file.response.data){ - message.error(`${info.file.name}上传失败`); + if(info.file.response.code == 200){ + state.succNum = Number(info.file.response.data.success); + state.errNum = Number(info.file.response.data.failed); + state.downloadErrUrl = info.file.response.data.path; + }else{ + state.uploadErr = true; + state.fileList = []; + state.uploadpercent = -1 + message.destroy(); + message.error(info.file.response.msg); } - let i = 0; - let timeouts = setTimeout(() => { - // clearInterval(timer) - state.addLoading = false; - message.destroy(); - message.error(`文件导入超时`); - }, 30000); + + // let i = 0; + // let timeouts = setTimeout(() => { + // // clearInterval(timer) + // state.addLoading = false; + // message.destroy(); + // message.error(`文件导入超时`); + // }, 30000); // let timer = setInterval(() => { // let uid = info.file.response.data; // api diff --git a/src/components/project/AddOrgContent.vue b/src/components/project/AddOrgContent.vue index 911ca8e7..7ec7505d 100644 --- a/src/components/project/AddOrgContent.vue +++ b/src/components/project/AddOrgContent.vue @@ -141,7 +141,7 @@ import * as lecturerApi from "@/api/Lecturer.js"; }) } const orgLists = ref([]) - const onCheck = async (checkedKeys, {checked: bool, checkedNodes, node, event}) => { + const onCheck = async (checkedKey, {checked: bool, checkedNodes, node, event}) => { // "965356037047586816" let length = treeAddData.value.length if(checkedNodes.length > length){ @@ -154,7 +154,7 @@ import * as lecturerApi from "@/api/Lecturer.js"; message.error('获取被占用组织失败,请重新尝试') }) } - treeAddData.value = checkedNodes.map(item => { + const checkLists = checkedNodes.map(item => { if (!item || !item.id) { return item; } @@ -176,6 +176,14 @@ import * as lecturerApi from "@/api/Lecturer.js"; return item; } }); + const endLists = [...checkLists,...orgLists.value] + const seen = new Set(); + const uniqueEndLists = endLists.filter(item => { + const isDuplicate = seen.has(item.orgId); + seen.add(item.orgId); + return !isDuplicate; + }); + treeAddData.value = uniqueEndLists?.filter(item => checkedKeys.value?.checked?.includes(item.orgId)); // treeAddData.value = checkedNodes; console.log(treeAddData.value,'checkedNodes',orgLists.value) } @@ -193,6 +201,13 @@ import * as lecturerApi from "@/api/Lecturer.js"; clearTree() }; const queryCreate = () => { + treeAddData.value?.map(item=>{ + props?.AddContentList?.map(i=>{ + if(item.orgId === i.orgId){ + item.affiliationOrgId = i.affiliationOrgId + } + }) + }) emit("update:AddContentList", treeAddData.value); closeCodeModal() } diff --git a/src/components/project/LookExternalLecturer.vue b/src/components/project/LookExternalLecturer.vue index f82ab7e2..76e8e085 100644 --- a/src/components/project/LookExternalLecturer.vue +++ b/src/components/project/LookExternalLecturer.vue @@ -19,7 +19,7 @@
- +
-
+
查看讲师
- + @@ -185,7 +185,7 @@ export default{ state.formParam = objA state.formParam.photo = state.formParam.photo ==null ? state.formParam.gender == 1 ? Avatarman : - state.formParam.gender ==2 ? Avatarwoman : avatar : state.formParam.photo + state.formParam.gender ==2 ? Avatarwoman : Avatarman : (state.formParam.photo.includes('upload')?state.formParam.photo:'/upload'+state.formParam.photo) state.teacherrepromo.userId=res.data.data.id console.log(state.teacherrepromo.id); isOrgNames(state.formParam.orgName) @@ -507,7 +507,13 @@ const handleup = ()=>{ } //小竖线 .line{ - float:left; width: 3px; height: 25px; background: #4ea6ff;border-radius: 30%; margin-right: 5px; + float:left; + width: 3px; + height: 16px; + background: #4ea6ff; + border-radius: 30%; + margin-left: -10px; + margin-top: 5px; } ::v-deep .ant-descriptions-header{ margin-bottom: 18px ; diff --git a/src/components/project/OrgClass.vue b/src/components/project/OrgClass.vue index 56653ed1..b9287a59 100644 --- a/src/components/project/OrgClass.vue +++ b/src/components/project/OrgClass.vue @@ -30,6 +30,7 @@ :disabled="disabled" @change="change" dropdownClassName="treeDropdown" + @keydown.enter="keydownEnter" > @@ -57,7 +58,11 @@ const { data: options, loading: orgLoading } = useArrayRequest( ORG_LIST, { keyword: "" }, ); - +const keydownEnter = (e) => { + if(e.keyCode == 13){ + emit('enter',true) + } +} watch(props, () => { stuTreeExpandedKeys.value = []; if (labelValue.value.value !== props.value) { diff --git a/src/components/project/ProjectManagerOutTeacher.vue b/src/components/project/ProjectManagerOutTeacher.vue index 66c1e201..db2050a9 100644 --- a/src/components/project/ProjectManagerOutTeacher.vue +++ b/src/components/project/ProjectManagerOutTeacher.vue @@ -79,7 +79,7 @@ const getOutTeacher = () => { const options = computed(() => userList.value.map(e => ({ // label: e.name + '(' + e.userNo + ')' + e.organizationName, - label:e.name, + label:e.name+ '(' +e.supplier + ')', value: e.name, ...e, audienceList: null diff --git a/src/components/project/SearchTeacher.vue b/src/components/project/SearchTeacher.vue index 944be65c..4c57d866 100644 --- a/src/components/project/SearchTeacher.vue +++ b/src/components/project/SearchTeacher.vue @@ -1,6 +1,10 @@