From 479b633ec2ff19c409b98fa7f5492a72f60e9476 Mon Sep 17 00:00:00 2001 From: Pengxiansen <2422914688@qq.com> Date: Tue, 25 Feb 2025 13:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configGrowth.js | 4 +- src/components/common/BaseTable.vue | 2 +- .../growthpath/GrowthActiveAttendance.vue | 53 ++++---- src/components/growthpath/GrowthEval.vue | 15 ++- src/components/growthpath/GrowthFaceStu.vue | 33 ++++- .../growthpath/GrowthFaceTaskManage.vue | 125 +++++++++--------- .../growthpath/GrowthOnlineManage.vue | 8 +- src/components/growthpath/GrowthRef.vue | 2 +- src/views/growthpath/GrowthAddPath.vue | 11 +- src/views/growthpath/GrowthPath.vue | 5 +- src/views/growthpath/PathManage.vue | 2 +- vue.config.js | 16 +-- 12 files changed, 155 insertions(+), 121 deletions(-) diff --git a/src/api/configGrowth.js b/src/api/configGrowth.js index ab3fedbe..2f010b28 100644 --- a/src/api/configGrowth.js +++ b/src/api/configGrowth.js @@ -18,8 +18,8 @@ import { boeRequest } from "@/api/request"; // "application/x-www-form-urlencoded"; axios.defaults.withCredentials = true; const http = axios.create({ - // baseURL: '/growth', - baseURL: process.env.VUE_APP_BASE_API_GROWTH, + baseURL: '/growth', + // baseURL: process.env.VUE_APP_BASE_API_GROWTH, timeout: 1000 * 15, // headers: { "Content-Type": "multipart/form-data" }, headers: { "Content-Type": "application/json" }, diff --git a/src/components/common/BaseTable.vue b/src/components/common/BaseTable.vue index 8aa0c665..bed88aee 100644 --- a/src/components/common/BaseTable.vue +++ b/src/components/common/BaseTable.vue @@ -195,6 +195,6 @@ const fetch = () => nextTick(onFetch); - defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove , params }); + defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove , params,data }); diff --git a/src/components/growthpath/GrowthActiveAttendance.vue b/src/components/growthpath/GrowthActiveAttendance.vue index 43f85b32..e7d17197 100644 --- a/src/components/growthpath/GrowthActiveAttendance.vue +++ b/src/components/growthpath/GrowthActiveAttendance.vue @@ -24,9 +24,7 @@ datasource.info.liveStartTime || datasource.info.activityStartTime }} ~ - {{ - datasource.info.liveStartTime || datasource.info.activityEndTime - }} + {{ datasource.info.liveEndTime || datasource.info.activityEndTime }}
@@ -76,11 +74,7 @@
-
+
签到二维码
@@ -381,17 +375,25 @@ export default { let startTime = props.datasource.info.liveStartTime || props.datasource.info.activityStartTime; + // 开始时间 + let endTime = + props.datasource.info.liveEndTime || + props.datasource.info.activityEndTime; // 开始前签到时间 let afterSignIn = props.datasource.info.afterSignIn; // 结束后签到时间 let beforeSignIn = props.datasource.info.beforeSignIn; - state.beginTime = dayjs(startTime) - .subtract(afterSignIn, "minute") - .format("YYYY-MM-DD HH:mm:ss"); - state.endTime = dayjs(startTime) - .add(beforeSignIn, "minute") - .format("YYYY-MM-DD HH:mm:ss"); + state.beginTime = afterSignIn + ? dayjs(startTime) + .subtract(afterSignIn, "minute") + .format("YYYY-MM-DD HH:mm:ss") + : startTime; + state.endTime = beforeSignIn + ? dayjs(startTime) + .add(beforeSignIn, "minute") + .format("YYYY-MM-DD HH:mm:ss") + : endTime; }; const afterVisibleChange = (bol) => { @@ -645,7 +647,7 @@ export default { width: 100, align: "center", customRender: (value) => { - return checkPer(props.permissions, props.createId) ? ( + return (
请假
- ) : ( - "" ); }, }, @@ -810,15 +810,18 @@ export default { props.datasource ); console.log("props.datasource", props.datasource); - if (props.types == 2) { - window.open( - `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + window.open( + `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` ); - } else { - window.open( - `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` - ); - } + // if (props.types == 2) { + // window.open( + // `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=2&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + // ); + // } else { + // window.open( + // `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=0&type=1&pid=${props.datasource.growthId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + // ); + // } // api // .exportTaskStudent({ diff --git a/src/components/growthpath/GrowthEval.vue b/src/components/growthpath/GrowthEval.vue index e3683592..83543452 100644 --- a/src/components/growthpath/GrowthEval.vue +++ b/src/components/growthpath/GrowthEval.vue @@ -190,8 +190,6 @@ const rulesRef = ref({ ], }); -let validate = Form.useForm(formData.value.info, rulesRef).validate; - const closeDrawer = () => { if (step.value > 1) { step.value = step.value - 1; @@ -230,7 +228,8 @@ function delTag() { formData.value.info.evaluationTypeId = ""; formData.value.info.evaluationTypeName = ""; } - +// 验证方法 +let validate = null; async function confirm() { await validate().catch(({ errorFields }) => { message.warning(errorFields[0].errors.join()); @@ -262,12 +261,14 @@ async function confirm() { function openDrawer(row) { row && (formData.value = row); - row && - (dateTime.value = [ + if (row && row.info.evaluationEndTime) { + dateTime.value = [ dayjs(row.info.evaluationStartTime, "YYYY-MM-DD HH:mm"), dayjs(row.info.evaluationEndTime, "YYYY-MM-DD HH:mm"), - ]); - row && (validate = Form.useForm(formData.value.info, rulesRef).validate); + ]; + } + + validate = Form.useForm(formData.value.info, rulesRef).validate; visible.value = true; } diff --git a/src/components/growthpath/GrowthFaceStu.vue b/src/components/growthpath/GrowthFaceStu.vue index 4f87a23f..2b057b2a 100644 --- a/src/components/growthpath/GrowthFaceStu.vue +++ b/src/components/growthpath/GrowthFaceStu.vue @@ -310,7 +310,7 @@ const props = defineProps({ }, }, }); -const params = ref({ pid: 0, type: 18 }); +const params = ref({ pid: 0, type: 3 }); const courseSelectRows = ref([]); const infoId = computed(() => props.datasource.growthId); @@ -328,7 +328,7 @@ const addUserConfirm = (stuSelectRows, projectSelectRows) => { } saveStu({ targetId: data.value[coursePlanIndex.value]?.id, - type: data.value[coursePlanIndex.value].type, + type: 3, studentList: stuSelectRows, projectList: projectSelectRows, }).then(() => { @@ -341,7 +341,8 @@ const planParams = computed(() => ({ type: props.type, offcourseId: props.datasource?.taskId, })); -const columns = ref([ + +const columns2 = [ { title: "工号", dataIndex: "studentUserNo", @@ -450,6 +451,9 @@ const columns = ref([ ), }, +]; +const columns = ref(); +const columns1 = [ { title: "考勤情况", ellipsis: true, @@ -497,7 +501,7 @@ const columns = ref([ ), }, -]); +]; const { data = [], loading, @@ -509,7 +513,13 @@ watch( () => { coursePlanIndex.value = 0; params.value.pid = data.value[coursePlanIndex.value]?.id || 0; + if (data.value[coursePlanIndex.value].type !== 4) { + columns.value = [...columns2]; + } else { + columns.value = [...columns2, ...columns1]; + } tableRef.value.fetch(); + console.log(1111111); } ); @@ -517,6 +527,11 @@ watch( const openCourseName = ref(""); const ChoiceCourse = (n) => { openCourseName.value = data.value[n].name; + if (data.value[n].type !== 4) { + columns.value = [...columns2]; + } else { + columns.value = [...columns2, ...columns1]; + } coursePlanIndex.value = n; params.value.pid = data.value[n].id; tableRef.value.fetch(); @@ -571,6 +586,10 @@ const batchSign = () => { }); }; const batchSignAll = () => { + if (!tableRef.value.data || !tableRef.value.data.length) { + message.warning("当前课程没有分配学员,请先分配学员"); + return; + } dialog({ content: "确定全部签到吗?", ok: () => { @@ -599,7 +618,7 @@ function stuSign(text) { courseId: offcoursePlanId.value, ids: [text.record.studentId], studentName: text.record.studentName, - taskId: props.datasource.id, + // taskId: props.datasource.id, taskType: props.datasource.taskType, type: 3, }); @@ -608,7 +627,7 @@ function stuSign(text) { courseId: offcoursePlanId.value, ids: [text.record.studentId], studentName: text.record.studentName, - taskId: props.datasource.id, + // taskId: props.datasource.id, taskType: props.datasource.taskType, type: 3, }); @@ -629,7 +648,7 @@ function submitCall(flag) { // 导出数据 function exportTaskStu() { window.open( - `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=4&pid=${offcoursePlanId.value}&thirdType=2` + `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2` ); } diff --git a/src/components/growthpath/GrowthFaceTaskManage.vue b/src/components/growthpath/GrowthFaceTaskManage.vue index cd3bd37f..1b2680fe 100644 --- a/src/components/growthpath/GrowthFaceTaskManage.vue +++ b/src/components/growthpath/GrowthFaceTaskManage.vue @@ -122,13 +122,13 @@
催促学习
-
批量标注完成
-
+ -->
{ delete params.value.status; } }; -const params = ref({ pid: 0, type: 4 }); +const params = ref({ pid: 0, type: 3 }); const courseSelectRows = ref([]); const planParams = computed(() => ({ type: props.type, @@ -406,59 +406,59 @@ const columns = ref([ ), }, - { - title: "操作", - ellipsis: true, - className: "h", - dataIndex: "opacation", - key: "opacation", - width: 100, - align: "center", - customRender: ({ - record: { - workStatus, - answerId, - examinationScore, - studentId, - finishStatus, - }, - }) => ( -
- {examinationScore ? ( - examinationScore && showExamAnswer(answerId)} - > - 查看答卷 - - ) : ( - "" - )} - {workStatus ? ( - workStatus && showCWvisible(studentId)} - > - 查看作业 - - ) : ( - "" - )} - {finishStatus != 1 ? ( - finishTask(studentId)}> - 标记为完成 - - ) : ( - "" - )} -
- ), - }, + // { + // title: "操作", + // ellipsis: true, + // className: "h", + // dataIndex: "opacation", + // key: "opacation", + // width: 100, + // align: "center", + // customRender: ({ + // record: { + // workStatus, + // answerId, + // examinationScore, + // studentId, + // finishStatus, + // }, + // }) => ( + //
+ // {examinationScore ? ( + // examinationScore && showExamAnswer(answerId)} + // > + // 查看答卷 + // + // ) : ( + // "" + // )} + // {workStatus ? ( + // workStatus && showCWvisible(studentId)} + // > + // 查看作业 + // + // ) : ( + // "" + // )} + // {finishStatus != 1 ? ( + // finishTask(studentId)}> + // 标记为完成 + // + // ) : ( + // "" + // )} + //
+ // ), + // }, ]); watch( () => data.value, @@ -556,17 +556,18 @@ function exportTaskStu() { } const hasten = () => { - message.success("催促成功"); - console.log(data.value[coursePlanIndex.value]); + if(!tableRef.value.data || !tableRef.value.data.length){ + message.warning("当前课程没有可催促的学员"); + return + } batchSendMessage({ // courseId: props.datasource.courseId,//任务的Id courseId: data.value[coursePlanIndex.value].id, //任务的Id - courseName: props.datasource.name, //任务的名称 - logo: props.type, //项目或径的标识 1-项目 2-路径图 3面授课 - targetId: infoId.value, //路径图的就是routerId,项目的是projectId;根据这张图来看的话 + courseName: props.datasource.taskName, //任务的名称 + logo: 3, //项目或径的标识 1-项目 2-路径图 3面授课 taskType: props.datasource.taskType, //催促的任务的类型 - chapterId: props.datasource.stageId, //阶段或关卡Id }); + message.success("催促成功"); }; function afterVisibleChange(bool) { diff --git a/src/components/growthpath/GrowthOnlineManage.vue b/src/components/growthpath/GrowthOnlineManage.vue index 2bc14506..fffdb292 100644 --- a/src/components/growthpath/GrowthOnlineManage.vue +++ b/src/components/growthpath/GrowthOnlineManage.vue @@ -91,7 +91,7 @@
导出数据
-