From c04c9e91d61585bbfde6160184416152772cd70e Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 23 Jan 2024 17:59:37 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9522?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 2 +- src/components/drawers/AddOpenCourse.vue | 36 ++++++++- .../drawers/router/RouterFaceStu.vue | 33 +++++++-- src/components/project/ProjectLevel.vue | 8 +- src/views/projectcenter/TaskPage.vue | 74 ++++++++++++++++--- 5 files changed, 129 insertions(+), 24 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index ac32f578..24f88d90 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -133,7 +133,7 @@ export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', o //获取用户登录 export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true }) //公共信息--------------------------------------------------- - +export const courseData =(obj)=> http.post("/admin/offcourse/allPlanList",obj); //添加项目学员 export const addStudentProject = (obj) => http.post('/admin/project/addStudent', obj) //添加课程学员 diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index 4bcc0529..95d0ddf9 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -125,7 +125,7 @@ 面授时间
- --> + + + +
@@ -530,12 +552,13 @@ const formDataRule = { const { validate } = Form.useForm(formData, formDataRule); const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间'); function timeChange(time, timeStr) { - formData.value.beginTime = timeStr[0]; - formData.value.endTime = timeStr[1]; + formData.value.beginTime = timeStr; // formData.value.duration = durationText.value // formData.value.duration || (formData.value.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute')) } - +function timeChangeEnd(time,timeStr){ + formData.value.endTime = timeStr; +} function search() { tableRef.value.fetch(); } @@ -569,6 +592,7 @@ const createNewCourse = () => { type: props.type, offcourseId: params.value.offcourseId, draftTaskId: params.value.draftTaskId, + name:courseName.value }); dateTime.value = []; validated.value = 0; @@ -602,6 +626,10 @@ async function coursePlanConfirm() { message.info('讲师费已进入审批阶段,无法编辑') return } + if(dateTime.value.length<2){ + message.info('请选择开始时间和结束时间') + return + } await validate().catch(({ errorFields }) => { message.warning(errorFields[0].errors.join()); throw Error("数据校验不通过"); diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index c9a1cc1f..8ad784fa 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -86,6 +86,7 @@ class="btn btn1" style="margin-right: 20px" @click="qrcodeVisibleSign()" + :class="{ 'notClick': courseSelectRows.length > 0 }" >
签到二维码
@@ -94,6 +95,7 @@ style="margin-right: 20px" v-if="data[coursePlanIndex]?.assessmentId" @click="qrcodeAssement()" + :class="{ 'notClick': courseSelectRows.length > 0 }" >
评估二维码
@@ -101,6 +103,7 @@ class="btn btn1" style="margin-right: 20px" @click="qrcodeVisible()" + :class="{ 'notClick': courseSelectRows.length > 0 }" >
开课二维码
@@ -112,14 +115,14 @@ :infoType="type" @finash="submitCall" > - + 添加学员 -
+
导入学员
@@ -127,18 +130,18 @@
批量签到
-
+
导出签到数据
-
+
导出评估数据
@@ -424,18 +427,21 @@ const qrcodeVisible = () => { const qrcodeVisibleSign = () => { qrCode({ title: "【签到】二维码", - name: openCourseName.value?openCourseName.value:data.value[0]?.name, + name: openCourseName.value?openCourseName.value:data.value[0]?.name + '课程签到', // url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${props.datasource.type}&type=${props.type}`, url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${data.value[coursePlanIndex.value]?.id}&taskType=${2}&type=${3}`, }); }; - const qrcodeAssement = () =>{ + console.log(data,'data') qrCode({ title: "【评估】二维码", - name: data.value[coursePlanIndex.value]?.assessmentName, + // name: data.value[coursePlanIndex.value]?.assessmentName + '课程评估', + name: openCourseName.value?openCourseName.value:data.value[0]?.name + '课程评估', url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${data.value[coursePlanIndex.value]?.id}&type=3&infoId=${data.value[coursePlanIndex.value]?.id}&courseId=${data.value[coursePlanIndex.value].assessmentId}&chapterOrStageId=0`, }); + const a = {url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${data.value[coursePlanIndex.value]?.id}&type=3&infoId=${data.value[coursePlanIndex.value]?.id}&courseId=${data.value[coursePlanIndex.value].assessmentId}&chapterOrStageId=0`} + console.log(a,'aaaa') } const change = (e) => { @@ -449,6 +455,17 @@ const change = (e) => {