diff --git a/.env.boe b/.env.boe index 69282fff..9ba68cc4 100644 --- a/.env.boe +++ b/.env.boe @@ -2,10 +2,7 @@ NODE_ENV=boe VUE_APP_BASE=/manage VUE_APP_BASE_API=/manageApi VUE_APP_LOGIN_URL=//u-pre.boe.com/web?returnUrl= -# VUE_APP_BOE_API_URL=//u-pre.boe.com - -VUE_APP_BOE_API_URL=//pretest.zcwytd.com - +VUE_APP_BOE_API_URL=//u-pre.boe.com # 导入学员模板 VUE_APP_UP_LOAD_STUDENT_TEMPLATE=coursefile/导入学员模版-1677140876274.xlsx # 外部考试导入成绩模板 @@ -15,4 +12,5 @@ VUE_APP_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id= VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= VUE_APP_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id= # 批量面授报名模板 -VUE_APP_FACE_STUDENT_TEMPLATE=coursefile/批量面授报名模版-1679595849719.xlsx \ No newline at end of file +VUE_APP_FACE_STUDENT_TEMPLATE=coursefile/批量面授报名模版-1679595849719.xlsx +VUE_APP_FILE_PATH=/upload/boe/file/ \ No newline at end of file diff --git a/src/api/ThirdApi.js b/src/api/ThirdApi.js index d80b9d2f..5ea7e50a 100644 --- a/src/api/ThirdApi.js +++ b/src/api/ThirdApi.js @@ -18,4 +18,4 @@ export const REFRESH_TOKEN_API = "/userbasic/refreshToken"; export const COURSE_AUDIT = "/systemapi/xboe/m/course/manage/audit post formData"; export const OTHER_AUDIT = "/systemapi/xboe/m/course/audit/appoint post formData"; -export const ONLINE_COURSE_DEL = (id, courseId,studentId) => `/systemapi/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId}&studentId=${studentId} post`; \ No newline at end of file +export const ONLINE_COURSE_DEL = (id, courseId,studentId) => `/systemapi/xboe/school/study/course/delete-signup?id=${id}&courseId=${courseId}&studentId=${studentId} post`; \ No newline at end of file diff --git a/src/api/request.js b/src/api/request.js index d3bf1e52..f86752b1 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -501,9 +501,6 @@ export async function request(_url, params) { if (res.code === 0 || res.code === 200 || res.status === 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 5199af81..c1f87c43 100644 --- a/src/components/BreadCrumb.vue +++ b/src/components/BreadCrumb.vue @@ -574,7 +574,7 @@ { name: "感恩教师", }, { - name:'认证讲师库(2023)' + name:'认证讲师库' } ]; } diff --git a/src/components/NavLeft.vue b/src/components/NavLeft.vue index f3a4bf34..4c8d43f8 100644 --- a/src/components/NavLeft.vue +++ b/src/components/NavLeft.vue @@ -394,7 +394,7 @@ circle: selectedKeys[0] === 'sub22-4' ? false : true, }" > - 认证讲师库(2023) + 认证讲师库 +
+ + +
+
+
+
+ {{ + codeInfo.title ? codeInfo.title : "" + }} +
+
+
+
+
+
+ {{ codeInfo.name ? codeInfo.name : "" }} +
+
+ 开课:{{ codeInfo.name ? codeInfo.name : "" }} +
+
+ 讲师:{{ codeInfo.teacherName ? codeInfo.teacherName : "" }} +
+
+ +
+
+
+ + + +
复制链接
+
+ +
+
+
+ +
+ + + diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index b5e80e40..d15c5f38 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -487,20 +487,19 @@ const columns = ref([ key: "teacher", width: "20%", align: "center", - ellipsis: true, customRender: ({ record }) => { - // const teachers = record.offteachers; - // return teachers.map((teacher, index) => { - // // 如果需要显示为列表形式 - // return ( - //
- // {teacher.teacherName} - // {index !== teachers.length - 1 && ', '} - //
- // ); - // }); - return record.offteachers.map(item=>item.teacherName).join(',') - }, + // 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/router/RouterExaminationManage.vue b/src/components/drawers/router/RouterExaminationManage.vue index 24726938..8f3fc07d 100644 --- a/src/components/drawers/router/RouterExaminationManage.vue +++ b/src/components/drawers/router/RouterExaminationManage.vue @@ -442,10 +442,6 @@ 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/project/NameInput.vue b/src/components/project/NameInput.vue index 12159b8a..69ba025c 100644 --- a/src/components/project/NameInput.vue +++ b/src/components/project/NameInput.vue @@ -71,6 +71,7 @@ const rulesRef = ref({ Form.useForm(modelV, rulesRef, { debounce: { wait: 800 } }); onMounted(() => { + validateValue() if(props.onceName==modelV.value.value){ isExistName.value = false; }else{ @@ -90,10 +91,11 @@ watch(props, () => { watch(() => modelV.value.value, () => { emit("update:validated", 1); emit("update:value", modelV.value.value); -}); +},{immediate: true}); async function validateValue() { if (!modelV.value.value) { + emit("update:validated", 2); return Promise.reject("请输入名称"); } return validateName({ name: modelV.value.value, type: props.type, id: props.id }).then(res => { diff --git a/src/components/project/NameInputNew.vue b/src/components/project/NameInputNew.vue index 523192c9..5a8b56a4 100644 --- a/src/components/project/NameInputNew.vue +++ b/src/components/project/NameInputNew.vue @@ -125,7 +125,16 @@ watch(() => modelV.value.value, () => { emit("update:validated", 1); emit("update:value", modelV.value.value); }); - +const timer = ref(null) +watch(()=>props.validated, (val)=>{ + if(val===1){ + timer.value = setTimeout(() => { + emit("update:validated", 2); + }, 10000); + }else{ + clearTimeout(timer.value) + } +}) async function validateValue() { if (!modelV.value.value) { return Promise.reject("请输入名称"); @@ -138,7 +147,10 @@ async function validateValue() { emit("update:validated", 2); return Promise.resolve(); } - ); + ).catch(err => { + emit("update:validated", 2); + return Promise.resolve(); + }) } \ No newline at end of file diff --git a/src/components/student/CommonStudent.vue b/src/components/student/CommonStudent.vue index b1cfe0e7..c27fb880 100644 --- a/src/components/student/CommonStudent.vue +++ b/src/components/student/CommonStudent.vue @@ -500,13 +500,21 @@ const audiColums = ref([ ellipsis: true, }, { - title: "人数", + title: "总人数", dataIndex: "totalMember", key: "totalMember", width: 30, align: "center", className: "h", }, + { + title: "在职人数", + dataIndex: "workMember", + key: "workMember", + width: 30, + align: "center", + className: "h", + }, ]); const orgSelectKeys = ref([]); const auditTableRef = ref(); @@ -612,7 +620,7 @@ const submitAuth = () => { function handleDialogOk() { if (auditSelectRowKeys.value.length || deptList.value.length) { - dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk }); + dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!(本次添加只添加在职人员)", ok: handleStageOk }); return; } handleStageOk(); diff --git a/src/components/student/OnlineClassModelStudent.vue b/src/components/student/OnlineClassModelStudent.vue index fc4dd63f..c6ed39aa 100644 --- a/src/components/student/OnlineClassModelStudent.vue +++ b/src/components/student/OnlineClassModelStudent.vue @@ -91,6 +91,11 @@ 导出 + + + 导出详细学习记录 + +
@@ -467,7 +467,7 @@ const tablecolumns = ref([ title: "姓名", dataIndex: "studentName", key: "studentName", - width: "10%", + width: "80px", align: "left", className: "h", ellipsis: true, @@ -496,7 +496,7 @@ const tablecolumns = ref([ title: "工号", dataIndex: "studentUserNo", key: "studentUserNo", - width: "20%", + width: "60px", align: "center", className: "h", ellipsis: true, @@ -505,12 +505,13 @@ const tablecolumns = ref([ title: "部门", dataIndex: "studentDepartName", key: "studentDepartName", - width: "15%", + width: "120px", align: "center", className: "h", - ellipsis: true, + customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}}, customRender: ({ record: { studentOrgName, studentDepartName } }) => - allDepartShow(studentOrgName), + // {allDepartShow(studentOrgName)} + {studentDepartName} }, { title: "所属小组", @@ -522,10 +523,10 @@ const tablecolumns = ref([ ellipsis: true, }, { - title: "加入方式", + title: "报名方式", dataIndex: "source", key: "source", - width: "10%", + width: "60px", align: "center", customRender: ({ record: { source } }) => // ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]), @@ -535,8 +536,9 @@ const tablecolumns = ref([ 2: "手动加入", 3: "手动加入", 4: "导入", - 5: "报名", + 5: "自主报名", 6: "导入", + 8: "扫码报名", }[source]), }, ...props.columns, @@ -544,7 +546,8 @@ const tablecolumns = ref([ title: "操作", dataIndex: "operation", key: "operation", - width: 260, + width: '120px', + fixed: "right", align: "center", slots: { customRender: "action" }, }, @@ -559,7 +562,10 @@ function allDepartShow(a, b) { : a; let depart = b == "" || b == null || b == undefined ? (b = "") : b; let allname = org == "" && depart == "" ? "-" : org + depart; - return allname; + const parts = allname.split('/'); + const reversedParts = parts.reverse(); + const reversedStr = reversedParts.join('/'); + return reversedStr; } const tableParam = ref({ @@ -618,7 +624,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}` ); } @@ -858,7 +864,9 @@ const exportHomeWorkShow = () => { // message.success("导出作业成功"); exportHomeWorkV.value = true; downloadUrl.value = res.data.data; - }); + }).catch(err=>{ + // message.error(err.data.msg) + }) }; // //导出作业 // const exportHomeWork = () => { diff --git a/src/main.js b/src/main.js index 6eda4d84..0ebeba8f 100644 --- a/src/main.js +++ b/src/main.js @@ -131,5 +131,6 @@ async function init() { initDict("course_pic"); //课程封面 initDict("job_type"); //岗位 initDict("band"); //band - initDict("examine_cover") + initDict("examine_cover") //讲师认证封面图 + initDict("project_number") //项目编号 } \ No newline at end of file diff --git a/src/utils/zipdownload.js b/src/utils/zipdownload.js index af64a373..55d06244 100644 --- a/src/utils/zipdownload.js +++ b/src/utils/zipdownload.js @@ -5,7 +5,16 @@ const mimeMap = { xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip' } - +export function downLoadXlsx(str, filename) { + axios({ + method: 'get', + url: str, + responseType: 'blob', + headers: { 'Authorization': 'Bearer ' + getCookieForName("token") } + }).then(res => { + resolveBlob(res, mimeMap.xlsx,filename) + }) +} const baseUrl = process.env.VUE_APP_ACT_API export function downLoadZip(str, filename) { var url = baseUrl + str diff --git a/src/views/audience/audienceManage.vue b/src/views/audience/audienceManage.vue index 1b24164e..e053dc92 100644 --- a/src/views/audience/audienceManage.vue +++ b/src/views/audience/audienceManage.vue @@ -693,7 +693,7 @@ const column = [ }, }, { - title: "人数", + title: "总人数", dataIndex: "members", key: "members", width: "5%", @@ -704,6 +704,18 @@ const column = [ return text ? text : "-"; }, }, + { + title: "在职人数", + dataIndex: "workMembers", + key: "workMembers", + width: "5%", + align: "center", + ellipsis: true, + className: "h", + customRender: ({ text }) => { + return text ? text : "-"; + }, + }, { title: "状态", dataIndex: "state", diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 1c25f33d..0d629b99 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -10,6 +10,7 @@ v-model:value="createName" style="width: 200px; height: 40px; border-radius: 8px" placeholder="请输入创建人" + @pressEnter="handleSearch1" />
@@ -17,6 +18,7 @@ v-model:value="name" style="width: 200px; height: 40px; border-radius: 8px" placeholder="请输入名称" + @pressEnter="handleSearch1" />
@@ -24,6 +26,7 @@ v-model:value="projectName" style="width: 200px; height: 40px; border-radius: 8px" placeholder="请输入所属项目" + @pressEnter="handleSearch1" />
@@ -679,9 +682,8 @@ -
+
@@ -788,12 +801,12 @@
-
+
+
+ 评估码 +
- 签到 + 签到码
更多 - +
+
@@ -884,7 +905,7 @@
- +
- 考勤设置: + 签到时间
-
签到
- 开始前: + 开始前 分钟
- 开始后: + 开始后
+
+
+ 签到设置 +
+
+ + 是否允许未报名的学员签到、评估 + +
+
报名设置 @@ -1124,18 +1154,25 @@
-
- 签到设置 + 结业设置
- - 是否允许未报名的学员签到 + + 是否允许自动结业 + 面授时间结束后 + +
- +
评估设置 @@ -1292,20 +1329,19 @@
- {{ currentPlanItem.name }}课程-第1期- - {{ currentPlanItem.createTime }} + {{ currentPlanItem.name }}课程-第1期 已开课 {{ - currentPlanItem.courseScore !== -1 - ? currentPlanItem.courseScore.toFixed(2) + (currentPlanItem?.score !== 0&& currentPlanItem?.score!==-1) + ? currentPlanItem.score?.toFixed(2) : "-" }}
时间: - {{ currentPlanItem.endTime }} + {{currentPlanItem.beginTime}} ~ {{ currentPlanItem.endTime }}
地点: @@ -1313,7 +1349,7 @@
授课教师: - + {{ currentPlanItem.offteachers.map(item=>item.teacherName).join(',') }}
@@ -1805,7 +1838,7 @@ import ProjectManager from "@/components/project/ProjectManagerNewTeacher"; import SeeModal from "./components/seeModal.vue"; import CourseModal from "./courseModal.vue"; import * as moment from "moment"; -import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue"; +import TwoDimensionalCode from "../../components/TwoDimensionalCodeNew.vue"; import { codeUrl, toDate } from "@/api/method"; import { queryWorkDetailById } from "@/api/indexWork"; import { queryExaminationDetailById } from "@/api/indexExam"; @@ -1819,10 +1852,15 @@ import DropDown from "@/components/common/DropDown"; import { checkPer, checkOwner } from "@/utils/utils"; import dayjs from "dayjs"; import {duration} from "moment"; -import { DeleteOutlined } from '@ant-design/icons-vue'; +import { DeleteOutlined,DownOutlined } from '@ant-design/icons-vue'; //列表表格 - +const moreLine = (item) => { + item.map(val => { + return (val.line = val.teacherName + " 权重 " + val.weight + '%') + }) + return item.map(i => i.line).join('\n') +} //列表操作在线面授管理 const columns2 = [ { @@ -1964,82 +2002,34 @@ const columns6 = [ // }, // }, { - title: "课程名称", + title: "开课名称", dataIndex: "organization", key: "organization", width: "15%", align: "center", - ellipsis: true, + customCell:() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer',padding:'0px 10px'}}}, customRender: ({ text }) => { - return text ? text : "-"; + return {text ? text : "-"} }, }, { - title: "场地", - dataIndex: "address", - key: "saddress", - width: "15%", - align: "center", - ellipsis: true, - customRender: ({ text }) => { - return text ? text : "-"; - }, - }, - { - title: "教师名称", + title: "授课教师", dataIndex: "teacher", key: "teacher", - width: "8%", + width: "30%", align: "center", ellipsis: true, - customRender: ({ record }) => { - // const teachers = record.offteachers; - // return teachers.map((teacher, index) => { - // // 如果需要显示为列表形式 - // return ( - //
- // {teacher.teacherName} - // {index !== teachers.length - 1 && ', '} - //
- // ); - // }); - return record.offteachers.map(item=>item.teacherName).join(',') - } + slots: { customRender: "teacherName" }, }, - { - title: "开始时间", + title: "面授时间", dataIndex: "starttime", key: "starttime", - width: "12%", + width: "40%", ellipsis: true, align: "center", - customRender: ({ text }) => { - // return text ? getdateToTime(text * 1000) : "-"; - return text ? text : "-"; - }, - }, - { - title: "创建时间", - dataIndex: "createtime", - key: "createtime", - width: "12%", - ellipsis: true, - align: "center", - customRender: ({ text }) => { - // return text ? getdateToTime(text * 1000) : "-"; - return text ? text : "-"; - }, - }, - { - title: "创建人", - dataIndex: "createName", - key: "createName", - width: "8%", - align: "center", - ellipsis: true, - customRender: ({ text }) => { - return text ? text : "-"; + customRender: ( text ) => { + return text.record.beginTime + ' ~ ' + text.record.endTime }, }, { @@ -2049,19 +2039,94 @@ const columns6 = [ width: 100, align: "center", ellipsis: true, + customRender: ( text ) => { + return( +
+ {text.record.studentCnt || '0'} +
downStudent(text.record)} title="导出学员信息">
+
+ ) + }, + }, + { + title: "评分", + dataIndex: "studentCnt", + key: "studentCnt", + width: 100, + align: "center", + ellipsis: true, + customRender: ( text ) => { + return( + text.record && text.record?.score != 0 && text.record?.score != -1 ? +
+ {(text.record.score?.toFixed(2) || '0.00')} +
downPin(text.record)} title="导出评估信息">
+
+ : '-' + ) + }, + }, + { + title: "时长", + dataIndex: "duration", + key: "duration", + width: "12%", + ellipsis: true, + align: "center", customRender: ({ text }) => { - return text ? text : "0"; + return text ? text : "-"; + }, + }, + { + title: "创建人", + dataIndex: "createName", + key: "createName", + width: "10%", + align: "center", + ellipsis: true, + customRender: ( text ) => { + return {text.record.createName} + }, + }, + { + title: "地点", + dataIndex: "address", + key: "saddress", + width: "30%", + align: "center", + customCell:() => {return {style: {maxWidth: '200px',minWidth: '100px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer',padding:'0px 10px'}}}, + customRender: ( {text} ) => { + return {text ? text : "-"} }, }, { title: "操作", - width: 200, + width: 300, dataIndex: "operation", key: "operation", align: "center", + fixed: "right", slots: { customRender: "action" }, }, ]; +const downStudent = (val) => { + if (val.id != undefined) { + window.open( + `${ + process.env.VUE_APP_BASE_API + }/admin/student/exportTaskStudent?type=${3}&pid=${val.id}&thirdType=2` + ); + } +} +const downPin = (val) => { + if (val.id != undefined) { + window.open( + `${ + process.env.VUE_APP_BASE_API + }/admin/assessment/manage/exportCoursePlanAssessmentMessage?type=3&pid=${val.id}&courseId=${val.assessmentId}&taskId=${val.id}&taskType=11` + ); + } +} //开课学员管理 const columns7 = [ //// { @@ -2244,15 +2309,20 @@ export default defineComponent({ // }, addOnlineCourse, TwoDimensionalCode, - DeleteOutlined + DeleteOutlined, + DownOutlined }, setup() { const CourseModalRef = ref(null); const store = useStore(); const sysTypeOptions = computed(() => store.state.content_type); - const durationText = computed(() => state.xjkkinputV3?.length?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute'):'请输入持续时间'); + const durationText = computed(() => state.xjkkinputV3?.length==2?dayjs(state.xjkkinputV3[1]).diff(dayjs(state.xjkkinputV3[0]),'minute')|| '请输入持续时间':'请输入持续时间'); const state = reactive({ + tableStudentChange: null, + isAssessmentId: null, + isHomeWorkId: null, + tableCoursePlanLoading: false, permissions:null, createId:null, workInfo: {}, @@ -2285,7 +2355,7 @@ export default defineComponent({ align: "left", customCell :() => {return {style: {maxWidth: '200px',overflow: 'hidden',whiteSpace: 'nowrap',textOverflow:'ellipsis',cursor:'pointer'}}}, customRender: ({ text }) => { - return {text ? text : "-"} + return {text ? text : "-"} }, }, { @@ -2682,6 +2752,8 @@ export default defineComponent({ kkinputV2: "", //新建开课 xjkkradioV1: false, + xjkkradioVEnd: false, + xjkkradioVEndTime: null, completeType: "", xjkkinputV1: "", onceName: "", @@ -2699,7 +2771,7 @@ export default defineComponent({ scoreId: null, //录入成绩id isgetStudent: false, //是否重新获取学员 //结业 - jyradioV1: "", + jyradioV1: 1, imageUrl: "", imgList: [], @@ -2714,6 +2786,7 @@ export default defineComponent({ pageSize222: 10, currentPage222: 1, tableDataTotal222: 0, + kk_inputV0: '', kk_inputV1: "", kk_inputV2: "", selectTime: "", @@ -2901,6 +2974,10 @@ export default defineComponent({ watch(durationText,(val)=>{ nums.value++ if(nums.value>1){ + if(val == '请输入持续时间'){ + state.duration = null; + return + } state.duration = val; } }) @@ -3200,7 +3277,7 @@ function onFocusEnd(){ "Y-M-D" ); } - let res = await list({ + await list({ pageNo: state.currentPage1, pageSize: state.pageSize1, auditStatus: state.auditStatus, @@ -3211,11 +3288,17 @@ function onFocusEnd(){ createName: state.createName, endTime: endTime, beginTime: startTime, - }); - const { rows, total } = res.data.data; - state.tableData1 = rows; - state.tableDataTotal1 = total; - state.tableLoading = false; + }).then(res=>{ + const { rows, total } = res.data.data; + state.tableData1 = rows; + state.tableDataTotal1 = total; + state.tableLoading = false; + }).catch(err=>{ + state.tableData1 = []; + state.tableLoading = false; + state.tableDataTotal1 = 0; + message.error(err.message=='timeout of 15000ms exceeded'?'系统超时,请稍后再试':err.data.msg) + }) // itm.pageNo = pageNo; // itm.contentTxt = findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-"; console.log("state.tableData1", state.tableData1); @@ -3228,6 +3311,7 @@ function onFocusEnd(){ getTableDate(); }; const handleSearch1 = () => { + state.currentPage1 = 1; getTableDate(); }; const handleRest1 = () => { @@ -3237,6 +3321,7 @@ function onFocusEnd(){ state.auditStatus = null; state.sysTypeId = null; state.projectTime = ""; + state.currentPage1 = 1; getTableDate(); }; @@ -3556,7 +3641,9 @@ function onFocusEnd(){ // }; // 渲染开课操作 const getTableDate3 = async (type) => { + state.tableData6 = [] state.tableLoading = true; + state.tableCoursePlanLoading = true // let datas = state.tableData6; let beginTime = ""; let endTime = ""; @@ -3578,13 +3665,28 @@ function onFocusEnd(){ pageNo: type?state.currentPage2:state.currentPage222, pageSize: state.pageSize222, createName: state.kk_inputV1, - // teacher: state.kk_inputV2, + teacher: state.kk_inputV2, + name: state.kk_inputV0, beginTime: beginTime, endTime: endTime, offcourseId: state.offcourseId, }; console.log("获取开obj", obj, state.selectTime); - let res = await planList(obj); + let res = null + await planList(obj).then(rs=>{ + res = rs + }).catch(err=>{ + message.error(err.message=='timeout of 15000ms exceeded'?'系统超时,请稍后再试':err.data.msg) + state.tableCoursePlanLoading = false + res ={ + data:{data:{ + "pageNo": "1", + "pageSize": "10", + "total": "0", + "pages": "0", + "rows": [] + }}} + }) state.tableLoading = false; console.log("开课res", res); const { rows, total, pageNo } = res.data.data; @@ -3611,6 +3713,7 @@ function onFocusEnd(){ itm.pageNo = pageNo; }); state.tableData6 = datas; + state.tableCoursePlanLoading = false console.log("state.tableData6", state.tableData6); }; @@ -3821,7 +3924,7 @@ function onFocusEnd(){ const stm_exit = () => { state.stm_hs = false; handleCancelStu(); - handleRestTable(); + // handleRestTable(); }; const createkk = () => { state.xjkkinputV1 = state.newCourseName @@ -3844,6 +3947,8 @@ function onFocusEnd(){ state.kk_eidt = false; state.xjkkradioV1 = false; + state.xjkkradioVEnd = false; + state.xjkkradioVEndTime = null; state.completeType = ""; // state.xjkkinputV1 = ""; state.onceName = ""; @@ -3905,11 +4010,13 @@ function onFocusEnd(){ completeType: type, endTime: endTime, evalFlag: Number(state.assessmentId) > 0 && state.checked4 ? 1 : 0, - assessmentId: Number(state.assessmentId), + assessmentId: state.checked4==1?Number(state.assessmentId):0, testId: state.examInfo.examinationName ? state.EditTestId : null, homeWorkId: state.EditWorkId, name: state.xjkkinputV1, signFlag: state.xjkkradioV1 ? 1 : 0, //是否允许未报名的签到:1是0否 + autoGraduateEnabled: state.xjkkradioVEnd ? 1 : 0, + autoGraduateDays: state.xjkkradioVEndTime, // signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否 // teacherId: state.member.value, // teacher: state.member.name, @@ -3952,6 +4059,16 @@ function onFocusEnd(){ message.error('权重值不能为0%') return } + if(state.xjkkradioVEnd && (state.xjkkradioVEndTime==null||state.xjkkradioVEndTime==''||state.xjkkradioVEndTime<=0)){ + message.error('请填写结业时间') + return + } + if(state.checked4 && (!state.assessmentId || state.assessmentId == '0' || state.assessmentId == 'null')){ + return message.error('请选择评估'); + } + if(!state.xjkkradioVEnd){ + state.xjkkradioVEndTime = null + } console.log(postData,'传输的数据') // if(!postData.duration){ // return message.error("请输入持续时间"); @@ -4028,10 +4145,14 @@ function onFocusEnd(){ state.onceName = item.name; state.beforeValue = item.beforeStart; //考勤 开始前 state.afterStartValue = item.afterStart; //考勤 开始后 + state.xjkkradioVEndTime = item.autoGraduateDays; if (item.signFlag === 1) { //是否允许未报名的签到:1是0否 state.xjkkradioV1 = true; } + if(item.autoGraduateEnabled === 1){ + state.xjkkradioVEnd = true; + } // state.member = { value: item.teacherId, name: item.teacher }; state.offteachers = [...item.offteachers] state.cstm_hs = true; @@ -4041,43 +4162,44 @@ function onFocusEnd(){ console.log("itm", itm); //新加 state.stuColumns = [ - { - title: "岗位", - width: "8%", - dataIndex: "studentJobName", - key: "7", - align: "center", - customRender: (text) => { - return ( -
- - {text && text.record.studentJobName - ? text.record.studentJobName - : "-"} - -
- ); - }, - }, - { - title: "Band", - width: "8%", - dataIndex: "studentBandDesc", - key: "7", - align: "center", - customRender: (text) => { - return ( -
- - {text.record.studentBandDesc ? text.record.studentBandDesc : "-"} - -
- ); - }, - }, + // { + // title: "岗位", + // width: "100px", + // dataIndex: "studentJobName", + // key: "7", + // align: "center", + // customRender: (text) => { + // return ( + //
+ // + // {text && text.record.studentJobName + // ? text.record.studentJobName + // : "-"} + // + //
+ // ); + // }, + // }, + // { + // title: "Band", + // width: "80px", + // dataIndex: "studentBandDesc", + // key: "7", + // align: "center", + // ellipsis: true, + // customRender: (text) => { + // return ( + //
+ // + // {text.record.studentBandDesc ? text.record.studentBandDesc : "-"} + // + //
+ // ); + // }, + // }, { title: "报名状态", - width: "8%", + width: "60px", dataIndex: "status", key: "5", align: "center", @@ -4095,7 +4217,7 @@ function onFocusEnd(){ { title: "签到状态", - width: "8%", + width: "60px", dataIndex: "signstatus", key: "7", align: "center", @@ -4104,23 +4226,24 @@ function onFocusEnd(){ }, { title: "评估状态", - width: "8%", + width: "60px", dataIndex: "evastatus", key: "8", align: "center", customRender: ({ record }) => - record.assessmentStatus?"已评估" : "未评估", + state.isAssessmentId&&state.isAssessmentId!='0' ? record.assessmentStatus?"已评估" : "未评估":'-', }, { title: "评分", - width: "8%", + width: "60px", dataIndex: "studentScore", key: "8", align: "center", + ellipsis: true, customRender: ({ record }) => { return (
- {record.assessmentScore || "-"} + {record.assessmentScore && record.assessmentScore!=0 && record.assessmentScore!=-1 ? record.assessmentScore?.toFixed(2) : "-"}
); // switch (String(record.status)) { @@ -4142,61 +4265,88 @@ function onFocusEnd(){ // } }, }, + // { + // title: "作业成绩", + // width: "8%", + // dataIndex: "workScore", + // key: "7", + // align: "center", + // customRender: ({ record }) => { + // return ( + //
+ // {record.workStatus? record.workScore?{record.workScore || '-'}: + // handlJoinStu(record)}> + // 成绩录入 + // + // : - + // } + //
+ // ); + // // switch (String(record.status)) { + // // case "0": + // // return ( + // // { + // // handlJoinStu(record); + // // }} + // // > + // // 成绩录入 + // // + // // ); + // // case "1": + // // return "-"; + // // case "2": + // // return "-"; + // // } + // }, + // }, { - title: "作业成绩", - width: "8%", - dataIndex: "workScore", - key: "7", + title: "作业状态", + width: "60px", + dataIndex: "workStatus", + key: "5", align: "center", customRender: ({ record }) => { - return ( -
- {record.workStatus? record.workScore?{record.workScore || '-'}: - handlJoinStu(record)}> - 成绩录入 - - : - - } -
- ); - // switch (String(record.status)) { + // switch (String(record.workStatus)) { + // case "null": + // return "未提交"; // case "0": - // return ( - // { - // handlJoinStu(record); - // }} - // > - // 成绩录入 - // - // ); + // return "未提交"; // case "1": - // return "-"; + // return "已提交"; // case "2": - // return "-"; + // return "未提交"; // } + const status = String(record.workStatus); + if (state.isHomeWorkId) { + return ["null", "0", "2"].includes(status) ? "未提交" : "已提交"; + } else { + return '-'; + } }, }, { title: "考试成绩", - width: "8%", + width: "60px", dataIndex: "examinationScore", key: "8", align: "center", + customRender: ({ record }) => + record.examinationScore ? record.examinationScore : "-", + }, { title: "结业状态", - width: "15%", + width: "60px", dataIndex: "completionStatus", key: "8", align: "center", customRender: ({ record }) => { return (
- {record.finishStatus == 1 && - record.workScore != -2 && - record.signStatus == 1 ? ( + { + record.signStatus == 1 && record.completionStatus != 1 && record.completionStatus != 2 ? (
{ @@ -4207,6 +4357,8 @@ function onFocusEnd(){
) : record.completionStatus == 1 ? (
已结业
+ ) : record.completionStatus == 2 ?( +
不结业
) : (
-
)} @@ -4236,6 +4388,8 @@ function onFocusEnd(){ state.currentPlanItem = itm; state.newCourseName = itm.name; + state.isAssessmentId = itm.assessmentId; + state.isHomeWorkId = itm.homeWorkId; console.log(89877766666); console.log(state.currentPlanItem); @@ -4289,6 +4443,7 @@ function onFocusEnd(){ const graduate_exit = () => { state.graduate_hs = false; state.addLoading = false; + state.jyradioV1 = 1; }; const agreereject_exit = () => { state.agreereject_hs = false; @@ -4308,6 +4463,7 @@ function onFocusEnd(){ state.rg_hs = false; state.graduate_hs = false; state.addLoading = false; + state.jyradioV1 = 1; }; const handleRejectExit = (id, index, record) => { dialog({ @@ -4360,13 +4516,14 @@ function onFocusEnd(){ // console.log("state.studentItem.id", state.studentItem.id); api1 .batchUpdateStatus({ - completionStatus: 1, + completionStatus: state.jyradioV1, ids: [state.studentItem?.id], // status: 1, }) .then((res) => { if (res.data.code === 200) { - getTableDate2(); + // getTableDate2(); + state.tableStudentChange.getStuList() delete_exit1(); } }); @@ -4424,8 +4581,13 @@ function onFocusEnd(){ if (res.data.code === 200) { getTableDate3(); delete_exit1(); + }else{ + message.error(res.data.msg) } - }); + }).catch(err=>{ + message.destroy() + message.error(err.data.msg) + }) } else if (state.offcourseId) { handle({ offcourseId: state.offcourseId, @@ -4769,7 +4931,8 @@ function onFocusEnd(){ state.offcourseId = item.id; state.newCourseName = item.name; state.permissions = item.permissions; - getTableDate3(1); + // getTableDate3(1); + handleRestTable() state.stm_hs = true; }; @@ -4793,20 +4956,22 @@ function onFocusEnd(){ console.log(state.kk_inputV1); console.log(state.kk_inputV2); console.log(state.selectTime); - state.pageSize222 = 10 - state.currentPage1 = 1 - getTableDate(); + // state.pageSize222 = 10 + // state.currentPage1 = 1 + // getTableDate(); + state.currentPage2 = 1; getTableDate3(); }; const handleRestTable = () => { + state.kk_inputV0 = ''; state.kk_inputV1 = ""; state.kk_inputV2 = ""; state.selectTime = ""; state.currentPage2 = 1; state.tableDataTotal2 = []; - state.pageSize222 = 10 - state.currentPage1 = 1 - getTableDate(); + // state.pageSize222 = 10 + // state.currentPage1 = 1 + // getTableDate(); getTableDate3(); }; @@ -5112,21 +5277,22 @@ function onFocusEnd(){ const qrcodeVisible = (record, type) => { // `${location.protocol}//${location.host}${import.meta.env.VUE_APP_BASE_API}/stu/project/redirectDetail?courseId=${record.id}` state.codevisible = true; - let teacherNames = record.offteachers?.filter(teacher => teacher.teacherName !== null).map(teacher => teacher.teacherName); + let teacherNames = record.offteachers?.filter(teacher => teacher.name !== null).map(teacher => teacher.name); state.codeInfo = { - title: type == 1 ? "【课程】二维码" : "【签到】二维码", - name: record.name ? record.name+'签到' : "", - teacherName: teacherNames.length > 0 ? teacherNames.join(' ') : "", + title: type == 1 ? "【课程】二维码" : type == 2 ? "【签到】二维码" : "【评估】二维码", + name: record.name, + teacherName: teacherNames.length > 3 ? teacherNames.slice(0,3).join(',')+'...' : teacherNames.join(','), url: type == 1 ? process.env.VUE_APP_BASE_API + `/stu/project/redirectDetail?courseId=${record.id}` - : process.env.VUE_APP_BASE_API + + : type == 2 ? process.env.VUE_APP_BASE_API + `/admin/student/studentSign?taskId=${ record.id }&taskType=${2}&type=${3}&openCourseId=${ record.id - }`, + }` : `${location.protocol}//${location.host}/student-h5/investigatpage?id=${record.id}&type=3&infoId=${record.id}&courseId=${record.assessmentId}&chapterOrStageId=0&level=${record.name}`, + titleTeacherName: moreLine(record.offteachers), }; console.log("codeInfo", state.codeInfo, record); state.codeIndex = 0; @@ -5171,6 +5337,7 @@ function onFocusEnd(){ handleEdit, handleDelete, changevalue, + moreLine, columns2, columns4, columns6, @@ -5286,12 +5453,28 @@ function onFocusEnd(){ inputWeightChange, totalWeightSum, inputAdd, - inputRemove + inputRemove, + downStudent, + downPin }; }, });