diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index 26e2741f..164f6081 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -549,6 +549,7 @@ const formData = useResetRef({ afterStartValue: "", applyFlag: 0, projectSignFlag: 0, + outSignFlag:0, signFlag: 0, evalFlag: 0, assessmentName: "", @@ -649,11 +650,13 @@ function timeChange(timeStr) { function onDateSelect(date) { const month = String(date.$M+1).padStart(2, '0') const day = String(date.$D).padStart(2, '0') - dateTime.value[0]=date.$y+'-'+month+'-'+day+' '+date.$H+':'+date.$m + const hour = String(date.$D).padStart(2, '0') + const minute = String(date.$D).padStart(2, '0') + dateTime.value[0]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute } function onBlurStart(){ - + console.log(dateTime.value[0],'111') } function onFocusStart(){ if(!dateTime.value[0]){ @@ -671,7 +674,9 @@ function timeChangeEnd(timeStr){ function onDateEnd(date) { const month = String(date.$M+1).padStart(2, '0') const day = String(date.$D).padStart(2, '0') - dateTime.value[1]=date.$y+'-'+month+'-'+day+' '+date.$H+':'+date.$m + const hour = String(date.$D).padStart(2, '0') + const minute = String(date.$D).padStart(2, '0') + dateTime.value[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute } function onFocusEnd(){ if(!dateTime.value[1]){ @@ -771,13 +776,20 @@ async function coursePlanConfirm() { message.warning(errorFields[0].errors.join()); throw Error("数据校验不通过"); }); + inputWeightChange() if(formData.value.offteachers.length==1&& totalWeightSum.value!=100){ message.error('单名教师您设置的权重应该是100%') return }else if(formData.value.offteachers.length>1&& totalWeightSum.value!=100){ + console.log(totalWeightSum.value,'权重值不为100%') message.error('多名教师权重合计值为100%') return } + const teacherNames = new Set(formData.value.offteachers.map(item => item.teacherName)); + if (teacherNames.size !== formData.value.offteachers.length) { + message.error('教师重复,请检查'); + return; + } if(formData.value.offteachers.some(item => item.weight==0)){ message.error('权重值不能为0%') return @@ -828,6 +840,7 @@ function planEdit(record) { } onceName.value = record.name; formData.value = { ...record }; + formData.value.duration = '' console.log({ ...record },'{ ...record }') validated.value = 0; formData.value.homeWorkId && request(WORK_DETAIL(formData.value.homeWorkId), {}).then(res => formData.value.workInfo = res.data); diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index b2222c63..499da2e2 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -449,12 +449,11 @@ const qrcodeVisible = () => { }; // 签到二维码 const qrcodeVisibleSign = () => { - console.log(data.value[0],'data') qrCode({ title: "【签到】二维码", courseName: props.courseName + '项目', - createName: data.value[0].offteachers.map(teacher => teacher.teacherName).join(', '), - name: openCourseName.value?openCourseName.value:data.value[0]?.name + '课程签到', + createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '), + name: openCourseName.value?openCourseName.value:data.value[coursePlanIndex.value]?.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}`, }); @@ -463,13 +462,11 @@ const qrcodeAssement = () =>{ qrCode({ title: "【评估】二维码", courseName: props.courseName + '项目', - createName: data.value[0].offteachers.map(teacher => teacher.teacherName).join(', '), + createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '), // name: data.value[coursePlanIndex.value]?.assessmentName + '课程评估', - name: openCourseName.value?openCourseName.value:data.value[0]?.name + '课程评估', + name: openCourseName.value?openCourseName.value:data.value[coursePlanIndex.value]?.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) => { diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 10469460..ced9b988 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -2894,7 +2894,9 @@ export default defineComponent({ function onDateSelect(date) { const month = String(date.$M+1).padStart(2, '0') const day = String(date.$D).padStart(2, '0') - state.xjkkinputV3[0]=date.$y+'-'+month+'-'+day+' '+date.$H+':'+date.$m + const hour = String(date.$D).padStart(2, '0') + const minute = String(date.$D).padStart(2, '0') + state.xjkkinputV3[0]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute } function onBlurStart(){ onFocusStart() @@ -2916,7 +2918,9 @@ function onFocusStart(){ function onDateEnd(date) { const month = String(date.$M+1).padStart(2, '0') const day = String(date.$D).padStart(2, '0') - state.xjkkinputV3[1]=date.$y+'-'+month+'-'+day+' '+date.$H+':'+date.$m + const hour = String(date.$D).padStart(2, '0') + const minute = String(date.$D).padStart(2, '0') + state.xjkkinputV3[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute } function onFocusEnd(){ if(!state.xjkkinputV3[1]){ @@ -3886,6 +3890,7 @@ function onFocusEnd(){ if(state.offteachers.some(item => !item.teacherName)){ return message.error("请填写教师名称和设置权重"); } + inputWeightChange() if(state.offteachers.length==1&& totalWeightSum.value!=100){ message.error('单名教师您设置的权重应该是100%') return @@ -3893,6 +3898,11 @@ function onFocusEnd(){ message.error('多名教师权重合计值为100%') return } + const teacherNames = new Set(state.offteachers.map(item => item.teacherName)); + if (teacherNames.size !== state.offteachers.length) { + message.error('教师重复,请检查'); + return; + } if(state.offteachers.some(item => item.weight==0)){ message.error('权重值不能为0%') return @@ -3945,7 +3955,7 @@ function onFocusEnd(){ // } console.log("获取面授课开课详情", item); state.xjkkinputV2 = item.address; - state.duration = item.duration; + // state.duration = item.duration; state.checked1 = item.applyFlag === 1 ? true : false; state.attach = item.attach; diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 532a51b3..5e5487f4 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -672,7 +672,7 @@
开课 @@ -2444,9 +2444,9 @@ export default { window.open(`${process.env.VUE_APP_BASE_API}/admin/assessment/manage/export?assessmentIds=${item.assessmentIds}&pid=${item.id}`) }; const coursePlanRef = ref(); - const openCourse = async (item) => { + const openCourse = async (item,index) => { await apitl.getDraftTask({projectId: item.projectId}).then((item)=>{ - coursePlanRef.value.openDrawer(item.data.data.stageList[0].taskDraftDtoList[0]); + coursePlanRef.value.openDrawer(item.data.data.stageList[0].taskDraftDtoList[index]); }) } const qrCodeItems = ref([]);