diff --git a/package-lock.json b/package-lock.json index 9ecda927..b5f3909e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,9 +83,9 @@ } }, "node_modules/@ant-design/icons-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.2.1.tgz", - "integrity": "sha512-EB0iwlKDGpG93hW8f85CTJTs4SvMX7tt5ceupvhALp1IF44SeUFOMhKUOYqpsoYWQKAOuTRDMqn75rEaKDp0Xw==" + "version": "4.4.2", + "resolved": "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz", + "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "node_modules/@ant-design/icons-vue": { "version": "6.1.0", @@ -12570,9 +12570,9 @@ } }, "@ant-design/icons-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.2.1.tgz", - "integrity": "sha512-EB0iwlKDGpG93hW8f85CTJTs4SvMX7tt5ceupvhALp1IF44SeUFOMhKUOYqpsoYWQKAOuTRDMqn75rEaKDp0Xw==" + "version": "4.4.2", + "resolved": "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz", + "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "@ant-design/icons-vue": { "version": "6.1.0", diff --git a/src/api/index.js b/src/api/index.js index 215b7666..f3f684d2 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -53,6 +53,7 @@ export const getProjectList = (obj) => http.post('/admin/project/list', obj) // 获取项目详情信息(包含阶段及任务列表) export const getProjectDetail = (obj) => http.get('/admin/project/detail', {params: obj}) +export const getDraftTask = (obj) => http.get('/admin/project/detailDraft', { params: obj }) //发布项目 export const releaseProject = (obj) => http.post('/admin/project/publish', obj) //获取项目学员 diff --git a/src/api/index1.js b/src/api/index1.js index ac32f578..fd519e53 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) //添加课程学员 @@ -178,6 +178,7 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork', export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj }) //签到 export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj) +export const attendanceSignAll = (obj) => http.post('/stu/task/all/sign', obj) //请假 export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj) diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index 6d09f7d9..95df1ef7 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -374,6 +374,234 @@ textarea { } } + .drawerMain { + .header { + height: 73px; + border-bottom: 1px solid #e8e8e8; + display: flex; + justify-content: space-between; + align-items: center; + + .headerTitle { + font-size: 18px; + font-weight: 600; + color: #333333; + line-height: 25px; + margin-left: 24px; + } + } + + .contentMain { + .main_items { + display: flex; + + margin-bottom: 12px; + margin-top: 32px; + flex-wrap: wrap; + + .mi_ipts { + display: flex; + margin-bottom: 20px; + + .mii_ipt { + display: flex; + align-items: center; + margin-right: 24px; + + .ipt_name { + white-space: nowrap; + } + } + } + + .mi_btns { + display: flex; + margin-left: 38px; + margin-bottom: 20px; + cursor: pointer; + + .btn { + padding: 0px 26px 0px 26px; + height: 38px; + border-radius: 8px; + border: 1px solid rgba(64, 158, 255, 1); + display: flex; + align-items: center; + justify-content: center; + margin-left: 14px; + flex-shrink: 0; + + .search { + background-size: 100%; + } + + .btnText { + font-size: 14px; + font-weight: 400; + line-height: 36px; + margin-left: 5px; + } + } + + .btn1 { + background: rgb(64, 158, 255); + + .search { + width: 15px; + height: 17px; + background-image: url("@/assets/images/coursewareManage/search0.png"); + } + + .btnText { + color: rgb(255, 255, 255); + } + } + + .btn2 { + background: rgb(255, 255, 255); + + .search { + width: 15px; + height: 17px; + background-image: url("@/assets/images/coursewareManage/reset1.png"); + } + + .btnText { + color: rgb(64, 158, 255); + } + } + + .btn1:hover { + background: rgb(255, 255, 255); + + .search { + background-image: url("@/assets/images/courseManage/search1.png"); + } + + .btnText { + color: #4ea6ff; + } + } + + .btn2:hover { + background: rgba(64, 158, 255, 1); + + .search { + background-image: url("@/assets/images/courseManage/reset0.png"); + } + + .btnText { + color: #ffffff; + } + } + } + } + + .main_notice { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 32px; + height: 40px; + background-color: #e9f6fe; + + .mntc_left { + display: flex; + align-items: center; + + .title { + color: rgba(0, 0, 0, 0.65); + margin-right: 17px; + } + + .data { + color: #4ea6ff; + } + + .notice_icon { + width: 14px; + height: 14px; + margin-right: 9px; + margin-left: 9px; + background-image: url(@/assets/images/coursewareManage/gan.png); + background-size: 100% 100%; + } + } + + .mntc_right { + cursor: pointer; + } + } + } + + .main_table { + position: relative; + padding-bottom: 80px; + + .ant-checkbox-wrapper { + align-items: center; + margin-top: -2px; + } + + .ant-table-selection-column { + padding: 0px !important; + padding-left: 5px !important; + } + + .ant-table-thead>tr>th { + background-color: rgba(239, 244, 252, 1); + } + + th.h { + background-color: #eff4fc !important; + } + + .ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td { + background: #f6f9fd; + } + + .pa { + left: 0; + width: 100%; + display: flex; + justify-content: center; + position: absolute; + bottom: 20px; + } + } + + .main_btns { + height: 72px; + width: 100%; + bottom: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); + + .btn1 { + width: 100px; + height: 40px; + border: 1px solid #4ea6ff; + border-radius: 8px; + color: #4ea6ff; + background-color: #fff; + cursor: pointer; + } + + .btn2 { + cursor: pointer; + width: 100px; + height: 40px; + background: #4ea6ff; + border-radius: 8px; + border: 0; + margin-left: 15px; + color: #fff; + } + } + } } //抽屉-------------------------------------------------------- diff --git a/src/components/TwoDimensionalCode.vue b/src/components/TwoDimensionalCode.vue index 4000fa25..20b1dbe0 100644 --- a/src/components/TwoDimensionalCode.vue +++ b/src/components/TwoDimensionalCode.vue @@ -21,8 +21,16 @@
-
- {{ codeInfo.name ? codeInfo.name : "" }} +
+
+ {{ codeInfo.name ? codeInfo.name : "" }} +
+
+ 开课:{{ codeInfo.name ? codeInfo.name : "" }} +
+
+ 讲师:{{ codeInfo.teacherName ? codeInfo.teacherName : "" }} +
-
{{ name }}
+
+
项目:{{ courseName }}
+
开课:{{ name }}
+
讲师:{{ createName }}
+
@@ -65,6 +69,8 @@ const props = defineProps({ default: 800 }, name: String, + createName: String, + courseName: String, title: { type: String, default: "二维码" @@ -162,15 +168,23 @@ function copyUrl() { display: flex; flex-direction: column; align-items: center; - + .qrm_body_info{ + width: 100%; + margin-left: 278px; + } .codename { font-size: 18px; font-weight: 400; color: #333333; line-height: 25px; - margin-bottom: 20px; + margin-bottom: 5px; margin-left: 20px; margin-right: 20px; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 300px; } } diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue index f1620f61..54941def 100644 --- a/src/components/drawers/AddOpenCourse.vue +++ b/src/components/drawers/AddOpenCourse.vue @@ -89,8 +89,8 @@
面授名称:{{ courseName }}
-
-
+
+
@@ -125,7 +126,7 @@ 面授时间
- --> + + + + +
-
-
+
+
授课教师
-
- +
+
+ + + 权重 +
+ + +
+
+ +
@@ -262,13 +309,15 @@
- 允许项目内人员临时到场参加(不在本场次培训的人员可以临时签到参加) + :un-check-value="0" + @change="toggleCheckboxes('projectSignFlag')"> + 允许项目内人员临时到场参加(不在本场次培训的人员可以临时签到评估) + :un-check-value="0" + @change="toggleCheckboxes('outSignFlag')"> 允许项目外人员临时到场参加
@@ -370,31 +419,46 @@ @@ -1132,7 +1443,35 @@ defineExpose({ openDrawer }); margin: auto; align-items: center; margin-bottom: 23px; - + .teacher_input{ + .ant-input-number{ + width: 15%; + height: 40px !important; + border-radius: 8px !important; + border: 1px solid #C7CBD2 !important; + margin: 0 10px 0 10px; + padding-top: 3px; + } + } + .btn-add{ + margin: 0 10px 0 10px; + } + .btn-circle{ + text-align: center; + line-height: 100%; + margin-top: 5px; + .custom-icon{ + font-size: 20px; + svg{ + margin: auto; + } + } + span{ + width: 100%; + height: 100%; + font-size: 33px; + } + } .signbox { display: flex; justify-content: end; diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index 3c10f798..2203721c 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -37,7 +37,7 @@
- {{ item.teacher }} + {{ item.offteachers.map(item => item.teacherName).join(',') }}
@@ -81,11 +81,12 @@
-
+
签到二维码
@@ -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,13 @@ :infoType="type" @finash="submitCall" > - - - 添加学员 - +
+
+
添加学员
+
-
+
导入学员
@@ -127,18 +129,21 @@
批量签到
-
+
+
全部签到
+
+
导出签到数据
-
+
导出评估数据
@@ -180,6 +185,11 @@ const signOptions = ref([ value: 0, label: "请假", }, + { + id: 3, + value: 2, + label: "未签到", + }, ]); const props = defineProps({ type: { @@ -198,6 +208,10 @@ const props = defineProps({ type: Boolean, default: false, }, + courseName:{ + type: String, + default: null, + }, datasource: { type: Object, default: function() { @@ -277,7 +291,7 @@ const columns = ref([ ellipsis: true, className: "h", customRender: (text) => - {text.record.signStatus ? "签到" : text.record.leaveStatus ? "请假" : inAttendanceTime.value ? "-" : "缺勤"} + {text.record.signStatus ? "签到" : text.record.leaveStatus ? "请假" : inAttendanceTime.value ? "未签到" : "缺勤"} }, { title: "签到状态", @@ -288,7 +302,7 @@ const columns = ref([ ellipsis: true, className: "h", customRender: (text) => - {(text.record.signStatus || text.record.leaveStatus) ? "正常" : inAttendanceTime.value ? "-" : "异常"} + {(text.record.signStatus || text.record.leaveStatus) ? "正常" : inAttendanceTime.value ? "未签到" : "异常"} }, { title: "考勤情况", @@ -333,14 +347,22 @@ const ChoiceCourse = (n) => { coursePlanIndex.value = n; params.value.pid = data.value[n].id; tableRef.value.fetch(); + tableRef.value.resetSelected(); }; - +watch(()=>params.value.finishStatus,()=>{ + if(params.value.finishStatus==undefined){ + params.value.finishStatus='' + } +}) const removeStu=(id)=> dialog({ content: "确定删除该学员吗?", ok: () => delStudentList({ ids: [id] }).then(() => fetchData()) }) -const closeDrawer = () => emit("update:FSvisible", false); +const closeDrawer = () => { + emit("update:FSvisible", false) + tableRef.value.resetSelected(); +}; //批量签到 const batchSign = () => { if (!courseSelectRows.value.length) { @@ -362,7 +384,19 @@ const batchSign = () => { }, }); }; - +const batchSignAll = () => { + dialog({ + content: "确定全部签到吗?", + ok: async () => { + message.success("全部签到成功"); + tableRef.value.toLoading(); + await api.attendanceSignAll({ + courseId: offcoursePlanId.value + }); + tableRef.value.fetch(); + }, + }); +}; function stuSign(text) { text.record.signStatus = !text.record.signStatus; text.record.leaveStatus = !text.record.signStatus; @@ -387,7 +421,10 @@ function stuSign(text) { } //搜索学员 -const searchTaskList = () => tableRef.value.fetch(); +const searchTaskList = () => { + tableRef.value.fetch() + tableRef.value.resetSelected(); +}; //添加学员 function submitCall(flag) { @@ -439,7 +476,7 @@ const qrcodeVisible = () => { url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, }); } - + // qrCode({ // title: "【开课】二维码", // name: openCourseName.value?openCourseName.value:data.value[0]?.name, @@ -469,9 +506,10 @@ const qrcodeVisibleSign = () => { return; } if (taskId && signName) { + props.courseName?props.courseName + '项目':'' qrCode({ title: "【签到】二维码", - courseName: props.courseName + '项目', + courseName: props.courseName, createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '), name: signName + '课程签到', url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${taskId}&taskType=${2}&type=${3}`, @@ -484,12 +522,15 @@ const qrcodeVisibleSign = () => { // 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 = () =>{ + const courseName = props.courseName?props.courseName + '项目':0 qrCode({ title: "【评估】二维码", - name: data.value[coursePlanIndex.value]?.assessmentName, - 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`, + courseName, + createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '), + // name: data.value[coursePlanIndex.value]?.assessmentName + '课程评估', + 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&level=${courseName}`, }); } @@ -504,6 +545,17 @@ const change = (e) => { \ No newline at end of file diff --git a/src/components/project/ProjectLevel.vue b/src/components/project/ProjectLevel.vue index cb184737..b8f6233c 100644 --- a/src/components/project/ProjectLevel.vue +++ b/src/components/project/ProjectLevel.vue @@ -45,13 +45,20 @@ const id = computed(() => { }); const emit = defineEmits({}); - -const options = computed(() => - store.state.project_level.map((e) => ({ +const secondItem = store.state.project_level.find((e, index) => index === 1); +const options = computed(() =>{ + const projectLevels = store.state.project_level.slice(); + const lastItem = projectLevels.pop(); + projectLevels.unshift(lastItem); + if (projectLevels.length >= 3) { + const thirdItem = projectLevels.splice(1, 1)[0]; + projectLevels.splice(2, 0, thirdItem); + } + return projectLevels.map((e) => ({ value: parseInt(e.value), label: e.name, - })) -); + })); +}); function change(key) { emit("update:value", key); diff --git a/src/components/project/ProjectManagerNewTeacher.vue b/src/components/project/ProjectManagerNewTeacher.vue new file mode 100644 index 00000000..70e0393f --- /dev/null +++ b/src/components/project/ProjectManagerNewTeacher.vue @@ -0,0 +1,121 @@ + + diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index b6d61c56..c966bf8d 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -907,8 +907,8 @@
面授名称:{{ newCourseName }}
-
-
+
+
开课名称
- + :changeName="changeName" + >
@@ -942,8 +943,8 @@
面授时间
-
- + + + +
@@ -983,8 +1017,8 @@
-
-
+
+
授课教师
-
- + +
+ + + 权重 +
+ + +
+
+ +
@@ -1264,7 +1313,7 @@
授课教师: - {{ currentPlanItem.teacher }} +
{ - return text ? text : "-"; - }, + customRender: ({ record }) => { + const teachers = record.offteachers; + return teachers.map((teacher, index) => { + // 如果需要显示为列表形式 + return ( +
+ {teacher.teacherName} + {index !== teachers.length - 1 && ', '} +
+ ); + }); + } }, { @@ -2176,19 +2236,21 @@ export default defineComponent({ AddHomework, AddTest, NameInput, + NameInputNew, TableStudent, // VNodes: (_, {attrs}) => { // return attrs.vnodes; // }, addOnlineCourse, TwoDimensionalCode, + DeleteOutlined }, 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 state = reactive({ permissions:null, createId:null, @@ -2402,11 +2464,16 @@ export default defineComponent({ addLoading: false, currentPlanItem: {}, teacherId: null, - teacher: null, + // teacher: null, selectedRowKeys7: [], auditDescription: "", isEdit: 0, member: { name: "", value: "" }, + offteachers:[{ + teacherId: "", + teacherName: "", + weight: '', + }], //列表表格 tableData1: [ // { @@ -2617,9 +2684,10 @@ export default defineComponent({ completeType: "", xjkkinputV1: "", onceName: "", + changeName:false, xjkkinputV2: "", duration: "", - xjkkinputV3: "", + xjkkinputV3: [], xjkkinputV4: null, beforeValue: null, //考勤 开始前 afterStartValue: null, //考勤 开始后 @@ -2828,9 +2896,108 @@ export default defineComponent({ codeType: null, //二维码类型 }); - - function timeChange(time, timeStr) { - // state.duration || (state.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute')) + const nums = ref(0) + watch(durationText,(val)=>{ + nums.value++ + if(nums.value>1){ + state.duration = val; + } + }) + // function timeChange(time, timeStr) { + // // state.duration || (state.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute')) + // } +// function timeChange(timeStr) { +// console.log(timeStr,'timeStr') +// formData.value.beginTime = timeStr; +// } + function onDateSelect(date) { + const month = String(date.$M+1).padStart(2, '0') + const day = String(date.$D).padStart(2, '0') + const hour = String(date.$H).padStart(2, '0') + const minute = String(date.$m).padStart(2, '0') + state.xjkkinputV3[0]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute + } + const openStart = ref(false) +const onOkStart = ()=>{ + openStart.value = false +} +function onBlurStart(e){ + state.xjkkinputV3[0]=e.target.value + openStart.value = false +} +function onFocusStart(){ + openStart.value = true + // if(!state.xjkkinputV3[0]){ + // let now=new Date() + // let start=new Date(now.setFullYear(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0)) + // state.xjkkinputV3 = [ + // moment(start).format('YYYY-MM-DD HH:mm'), + // state.xjkkinputV3[1] + // ]; + // } +} +// function timeChangeEnd(timeStr){ +// formData.value.endTime = timeStr; +// } +function onDateEnd(date) { + const month = String(date.$M+1).padStart(2, '0') + const day = String(date.$D).padStart(2, '0') + const hour = String(date.$H).padStart(2, '0') + const minute = String(date.$m).padStart(2, '0') + state.xjkkinputV3[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute + if(state.xjkkinputV3[0]==state.xjkkinputV3[1]){ + const minute = String(date.$m+1).padStart(2, '0') + state.xjkkinputV3[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute + } + } + const openEnd = ref(false) +const onOkEnd = ()=>{ + openEnd.value = false +} +function onBlurEnd(e){ + state.xjkkinputV3[1]=e.target.value + openEnd.value = false +} +function onFocusEnd(){ + openEnd.value = true + // if(!state.xjkkinputV3[1]){ + // let now=new Date() + // let start=new Date() + // let end=new Date(now.setFullYear(now.getFullYear())) + // state.xjkkinputV3 = [ + // state.xjkkinputV3[0], + // moment(end).format('YYYY-MM-DD HH:mm') + // ]; + // } +} + const totalWeightSum = ref(0) + function inputWeightChange(index) { + let totalWeight = 0 + state.offteachers.forEach(item => { + totalWeight += Number(item.weight); + }); + if (totalWeight > 100) { + message.info("权重值最大为100%"); + state.offteachers[index].weight -= totalWeight - 100; + totalWeight = 100; + } + totalWeightSum.value = totalWeight + } + function inputAdd() { + state.offteachers.push({ + teacherId: "", + teacherName: "", + weight: '', + }); + } + function inputRemove(index) { + dialog({ + content: "确定删除此授课教师吗?", + ok: async () => { + state.offteachers.splice(index, 1); + message.success("删除成功"); + }, + }); } function findClassFullName(list, classify, name = "") { @@ -3223,6 +3390,7 @@ export default defineComponent({ }; const removePG = () => { console.log("11111"); + state.changeName = false state.assessmentId = null; state.assessmentName = ""; // state.isEvaluate = "0"; @@ -3239,7 +3407,7 @@ export default defineComponent({ const rest = () => { options4CurName.value = ""; options4CurId.value = ""; - state.teacher = null; + // state.teacher = null; state.teacherId = null; }; const handleChangeTea1 = (val) => { @@ -3409,7 +3577,7 @@ export default defineComponent({ pageNo: type?state.currentPage2:state.currentPage222, pageSize: state.pageSize222, createName: state.kk_inputV1, - teacher: state.kk_inputV2, + // teacher: state.kk_inputV2, beginTime: beginTime, endTime: endTime, offcourseId: state.offcourseId, @@ -3655,9 +3823,17 @@ export default defineComponent({ handleRestTable(); }; const createkk = () => { + state.xjkkinputV1 = state.newCourseName state.offcoursePlanId = null; state.itemType = 3; state.member = {}; + state.offteachers = [{ + teacherId: "", + teacherName: "", + weight: '', + }] + state.changeName = true + state.xjkkinputV3 = [moment().format('YYYY-MM-DD HH:mm'),''] state.cstm_hs = true; }; const handleCancelStu = () => { @@ -3668,11 +3844,11 @@ export default defineComponent({ state.kk_eidt = false; state.xjkkradioV1 = false; state.completeType = ""; - state.xjkkinputV1 = ""; + // state.xjkkinputV1 = ""; state.onceName = ""; state.xjkkinputV2 = ""; state.duration = ""; - state.xjkkinputV3 = ""; + // state.xjkkinputV3 = []; state.xjkkinputV4 = null; state.checked1 = false; state.checked4 = false; @@ -3696,7 +3872,7 @@ export default defineComponent({ } let startTime, endTime = 0; - if (state.xjkkinputV3) { + if (state.xjkkinputV3.length!=0) { startTime = dayjs(state.xjkkinputV3[0]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000); endTime = dayjs(state.xjkkinputV3[1]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000); } @@ -3734,8 +3910,9 @@ export default defineComponent({ name: state.xjkkinputV1, signFlag: state.xjkkradioV1 ? 1 : 0, //是否允许未报名的签到:1是0否 // signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否 - teacherId: state.member.value, - teacher: state.member.name, + // teacherId: state.member.value, + // teacher: state.member.name, + offteachers: state.offteachers, workInfo: state.workInfo, //提交的作业信息 examInfo: state.examInfo, //提交的考试信息 beforeStart: state.beforeValue, //考勤 开始前 @@ -3745,15 +3922,36 @@ export default defineComponent({ if(!postData.name){ return message.error("请输入开课名称"); } - if(!postData.beginTime){ - return message.error("请选择开课时间"); + if(!state.xjkkinputV3[0]){ + return message.error("开始时间未填写"); } - if(!postData.endTime){ - return message.error("请选择结束时间"); + if(!state.xjkkinputV3[1]){ + return message.error("结束时间未填写"); } - if(!postData.teacherId){ - return message.error("请选择授课老师"); + if(durationText.value<0){ + return message.error("结束时间不能小于开始时间,请重新填写"); } + if(state.offteachers.some(item => !item.teacherName)){ + return message.error("请填写教师名称和设置权重"); + } + inputWeightChange() + if(state.offteachers.length==1&& totalWeightSum.value!=100){ + message.error('单名教师您设置的权重应该是100%') + return + }else if(state.offteachers.length>1&& totalWeightSum.value!=100){ + 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 + } + console.log(postData,'传输的数据') // if(!postData.duration){ // return message.error("请输入持续时间"); // } @@ -3775,6 +3973,7 @@ export default defineComponent({ let editBeginClass = ref(false) //编辑开课 const handelEditStu = async (item) => { + nums.value = 0 editBeginClass.value = false if (item.expenseStatus && item.expenseStatus !== 'A10' && item.expenseStatus !== 'S00') { editBeginClass.value = true @@ -3827,7 +4026,8 @@ export default defineComponent({ //是否允许未报名的签到:1是0否 state.xjkkradioV1 = true; } - state.member = { value: item.teacherId, name: item.teacher }; + // state.member = { value: item.teacherId, name: item.teacher }; + state.offteachers = [...item.offteachers] state.cstm_hs = true; state.kk_eidt = true; }; @@ -4417,10 +4617,11 @@ export default defineComponent({ state.chang_jin = String(item.sceneId); state.tags_val = item.tips ? item.tips.split(",") : []; //state.qdms_inputV5 = item.teacherId; - state.teacher = item.teacher; - state.teacherId = item.teacherId; + // state.teacher = item.teacher; + // state.teacherId = item.teacherId; state.qdms_inputV6 = item.intro; - state.member = { value: item.teacherId, name: item.teacher }; + // state.member = { value: item.teacherId, name: item.teacher }; + state.offteachers = [...item.offteachers] if (item.attach == "") { state.imgList = []; } else { @@ -4882,16 +5083,19 @@ export default defineComponent({ getTableDate(); }; const disabledDate = (current) => { - // Can not select days before today and today - return current && current < dayjs().startOf("day"); + // current && current < dayjs(state.xjkkinputV3[0]) }; const disabledDateTime = () => { - return { - disabledHours: () => range(0, 24).splice(4, 20), - disabledMinutes: () => range(30, 60), - disabledSeconds: () => [55, 56], - }; + // const dateOnlyStart = new Date(state.xjkkinputV3[0].split(' ')[0]); + // const dateOnlyEnd = new Date(state.xjkkinputV3[1].split(' ')[0]); + // if(dateOnlyStart.getTime()==dateOnlyEnd.getTime()){ + // const currentMinute = dayjs(state.xjkkinputV3[0]).minute(); + // return { + // disabledHours: () => range(0, dayjs(state.xjkkinputV3[0]).hour()).splice(0, dayjs(state.xjkkinputV3[0]).hour()), + // disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1), + // }; + // } }; function auditStudent(record) { @@ -4902,9 +5106,11 @@ export default defineComponent({ 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); state.codeInfo = { title: type == 1 ? "【课程】二维码" : "【签到】二维码", - name: record.name ? record.name : "", + name: record.name ? record.name+'签到' : "", + teacherName: teacherNames.length > 0 ? teacherNames.join(' ') : "", url: type == 1 ? process.env.VUE_APP_BASE_API + @@ -4980,6 +5186,7 @@ export default defineComponent({ om_exit, ckxq_hs, durationText, + nums, ftsr_exit, stm_exit, ft_exit_see, @@ -5054,8 +5261,24 @@ export default defineComponent({ logW, logT, qrcodeVisible, - timeChange, - editBeginClass + // timeChange, + editBeginClass, + + onDateSelect, + onOkStart, + openStart, + onBlurStart, + onFocusStart, + // timeChangeEnd, + onDateEnd, + onOkEnd, + onFocusEnd, + openEnd, + onBlurEnd, + inputWeightChange, + totalWeightSum, + inputAdd, + inputRemove }; }, }); @@ -5560,6 +5783,35 @@ export default defineComponent({ margin: auto; align-items: center; margin-bottom: 23px; + .teacher_input{ + .ant-input-number{ + width: 15%; + height: 40px !important; + border-radius: 8px !important; + border: 1px solid #C7CBD2 !important; + margin: 0 10px 0 10px; + padding-top: 3px; + } + .btn-add{ + margin: 0 10px 0 10px; + } + .btn-circle{ + text-align: center; + line-height: 100%; + margin-top: 5px; + .custom-icon{ + font-size: 20px; + svg{ + margin: auto; + } + } + span{ + width: 100%; + height: 100%; + font-size: 33px; + } + } + } .signbox { display: flex; diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index e453e75e..6e59bef2 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -437,8 +437,8 @@ {{ item.type==2 ? item.createTime !== null ? item.createTime : "-" : item.startTime !== null ? item.startTime : "-" }}
-
-
+
+ +
+ {{ item.averageScore}}分 +
+
+
+ + + + +
+ 开课 +
+