diff --git a/src/api/request.js b/src/api/request.js index 0a6584b0..7a3b42bd 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -374,7 +374,9 @@ export function usePage(_url, params, init = true,listing = false) { state.totalPage = r.data.total/10 || 1; state.total = r.data.total; state.loading = false; - }); + }).catch(err => { + state.loading = false; + }) } init && fetch(); @@ -498,6 +500,9 @@ export async function request(_url, params) { if (res.code === 0 || res.code === 200) { return res; } + if (res.code === 4 ){ + return Promise.reject(res); + } if (res.code === 1000 || res.code === 1002) { window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) localStorage.removeItem('refreshPage') diff --git a/src/components/BreadCrumb.vue b/src/components/BreadCrumb.vue index 89a8cff9..6eb02a31 100644 --- a/src/components/BreadCrumb.vue +++ b/src/components/BreadCrumb.vue @@ -491,7 +491,7 @@ { name: "感恩教师", }, { - name:'认证讲师库(2023)' + name:'认证讲师库' } ]; } diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index d957ca22..7dd8f75c 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -394,7 +394,7 @@ circle: selectedKeys[0] === 'sub22-4' ? false : true, }" > - 认证讲师库(2023) + 认证讲师库 { - const teachers = record.offteachers; - return teachers.map((teacher, index) => { - // 如果需要显示为列表形式 - return ( -
- {teacher.teacherName} - {index !== teachers.length - 1 && ', '} -
- ); - }); - }, + // const teachers = record.offteachers; + // return teachers.map((teacher, index) => { + // // 如果需要显示为列表形式 + // return ( + //
+ // {teacher.teacherName} + // {index !== teachers.length - 1 && ', '} + //
+ // ); + // }); + return record.offteachers.map(item=>item.teacherName).join(',') + }, }, { diff --git a/src/components/drawers/project/ProjectOnlineManage.vue b/src/components/drawers/project/ProjectOnlineManage.vue index 88ba7427..e24bef5b 100644 --- a/src/components/drawers/project/ProjectOnlineManage.vue +++ b/src/components/drawers/project/ProjectOnlineManage.vue @@ -189,7 +189,7 @@ export default { pageSize: 10, currentPage: 1, tableDataTotal: 0, - projectName: undefined, + projectName: null, projectNameListNot: [ { id: 1, @@ -377,7 +377,7 @@ export default { ctx.emit("update:Tvisible", false); state.currentPage = 1; state.name = ""; - state.projectName = undefined; + state.projectName = null; state.tabledata = []; }; const afterVisibleChange = (bol) => { @@ -389,6 +389,9 @@ export default { }; const selectProjectName = (value) => { state.projectName = value; + if(value === undefined){ + state.projectName = null; + } }; //催促 const godie = () => { @@ -515,7 +518,7 @@ export default { state.tableDataTotalLoading = true; state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = null; getData(); } diff --git a/src/components/drawers/router/RouterCommonManage.vue b/src/components/drawers/router/RouterCommonManage.vue index 4a4778c3..3cc3ec1c 100644 --- a/src/components/drawers/router/RouterCommonManage.vue +++ b/src/components/drawers/router/RouterCommonManage.vue @@ -192,7 +192,7 @@ export default { pageSize: 10, currentPage: 1, tableDataTotal: 0, - projectName: undefined, + projectName: null, projectNameListNot: [ { id: 1, @@ -384,7 +384,7 @@ export default { ctx.emit("update:CommonModelVisible", false); state.currentPage = 1; state.name = ""; - state.projectName = undefined; + state.projectName = null; state.tabledata = []; }; const afterVisibleChange = (bol) => { @@ -396,6 +396,9 @@ export default { }; const selectProjectName = (value) => { state.projectName = value; + if(value === undefined){ + state.projectName = null; + } }; //催促 const godie = () => { @@ -523,7 +526,7 @@ export default { state.tableDataTotalLoading = true; state.currentPage = 1; state.name = ""; - state.projectName = undefined; + state.projectName = null; getData(); } diff --git a/src/components/drawers/router/RouterExaminationManage.vue b/src/components/drawers/router/RouterExaminationManage.vue index 8f3fc07d..24726938 100644 --- a/src/components/drawers/router/RouterExaminationManage.vue +++ b/src/components/drawers/router/RouterExaminationManage.vue @@ -442,6 +442,10 @@ export default { {/* 导出数据 */ } function exportData() { + if(state.tabledata.length==0){ + message.error("没有数据可以导出"); + return + } // window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`) diff --git a/src/components/student/TableStudent.vue b/src/components/student/TableStudent.vue index 001f2e2d..1f3fb378 100644 --- a/src/components/student/TableStudent.vue +++ b/src/components/student/TableStudent.vue @@ -618,7 +618,7 @@ function exportTaskStu() { window.open( `${ process.env.VUE_APP_BASE_API - }/admin/student/exportTaskStudent?type=${1}&pid=${props.id}` + }/admin/student/exportTaskStudent?type=${1}&pid=${props.id}&studentName=${tableParam.value.studentName === null ?'':tableParam.value.studentName}&studentDepartName=${tableParam.value.studentDepartName===null?'':tableParam.value.studentDepartName}&topFlag=${tableParam.value.topFlag===null?'':tableParam.value.topFlag}` ); } diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 57a45c0a..3056eecf 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -2001,16 +2001,17 @@ const columns6 = [ align: "center", ellipsis: true, customRender: ({ record }) => { - const teachers = record.offteachers; - return teachers.map((teacher, index) => { - // 如果需要显示为列表形式 - return ( -
- {teacher.teacherName} - {index !== teachers.length - 1 && ', '} -
- ); - }); + // const teachers = record.offteachers; + // return teachers.map((teacher, index) => { + // // 如果需要显示为列表形式 + // return ( + //
+ // {teacher.teacherName} + // {index !== teachers.length - 1 && ', '} + //
+ // ); + // }); + return record.offteachers.map(item=>item.teacherName).join(',') } }, @@ -2277,6 +2278,7 @@ export default defineComponent({ const durationText = computed(() => state.xjkkinputV3?.length?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute'):'请输入持续时间'); const state = reactive({ + tableCoursePlanLoading: false, permissions:null, createId:null, workInfo: {}, @@ -3581,6 +3583,7 @@ function onFocusEnd(){ // 渲染开课操作 const getTableDate3 = async (type) => { state.tableLoading = true; + state.tableCoursePlanLoading = true // let datas = state.tableData6; let beginTime = ""; let endTime = ""; @@ -3635,6 +3638,7 @@ function onFocusEnd(){ itm.pageNo = pageNo; }); state.tableData6 = datas; + state.tableCoursePlanLoading = false console.log("state.tableData6", state.tableData6); }; diff --git a/src/views/report/Operational.vue b/src/views/report/Operational.vue index 922be08a..30ab9171 100644 --- a/src/views/report/Operational.vue +++ b/src/views/report/Operational.vue @@ -1635,7 +1635,7 @@ export default { var day = dayjs(new Date()).date(); console.log("initTime year:",year,"month:",month,"day:",day); var year1 = year; - var month1 = parseInt(month) - 5; + var month1 = parseInt(month) - 1; if(month1<=0){ year1 = parseInt(year1) - 1; month1 = 12 - (Math.abs(month1)%12);