From c04c9e91d61585bbfde6160184416152772cd70e Mon Sep 17 00:00:00 2001 From: zhangsir Date: Tue, 23 Jan 2024 17:59:37 +0800 Subject: [PATCH 01/41] =?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) => { \ No newline at end of file diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 4537af8e..b512855d 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -918,7 +918,7 @@ 开课名称
- + :changeName="changeName" + >
@@ -1764,6 +1765,7 @@ import addOnlineCourse from "../../components/Modals/addOnlineCourse.vue"; import ProjOwnerShip from "../../components/drawers/ProjectOwn"; import NameInput from "../../components/project/NameInput"; +import NameInputNew from "../../components/project/NameInputNew"; import ProjPowerList from "../../components/drawers/ProjPowerList"; import ProjCheckShip from "../../components/drawers/ProjCheckPower"; import AssessmentList from "../../components/drawers/AssessmentList.vue"; @@ -2231,6 +2233,7 @@ export default defineComponent({ AddHomework, AddTest, NameInput, + NameInputNew, TableStudent, // VNodes: (_, {attrs}) => { // return attrs.vnodes; @@ -2678,6 +2681,7 @@ export default defineComponent({ completeType: "", xjkkinputV1: "", onceName: "", + changeName:false, xjkkinputV2: "", duration: "", xjkkinputV3: [], @@ -3373,6 +3377,7 @@ function onFocusEnd(){ }; const removePG = () => { console.log("11111"); + state.changeName = false state.assessmentId = null; state.assessmentName = ""; // state.isEvaluate = "0"; @@ -3814,6 +3819,7 @@ function onFocusEnd(){ teacherName: "", weight: '', }] + state.changeName = true state.xjkkinputV3 = [moment().format('YYYY-MM-DD HH:mm'),''] state.cstm_hs = true; }; @@ -3825,7 +3831,7 @@ function onFocusEnd(){ state.kk_eidt = false; state.xjkkradioV1 = false; state.completeType = ""; - state.xjkkinputV1 = ""; + // state.xjkkinputV1 = ""; state.onceName = ""; state.xjkkinputV2 = ""; state.duration = ""; diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index b590f78f..8ec4d2d3 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -667,7 +667,7 @@
-
+ @@ -738,7 +739,8 @@ const projectInfo = ref({}); const emit = defineEmits(['call-parent-method']); const confirm = async()=>{ closeDrawer(); - await api.getDraftTask({projectId: route.query.projectId}).then((res) => { + if(route.query.projectId){ + await api.getDraftTask({projectId: route.query.projectId}).then((res) => { projectInfo.value = res.data.data }); request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value }); @@ -746,6 +748,8 @@ const confirm = async()=>{ request(PROJECT_RELEASE, {projectId: route.query.projectId}) } emit('call-parent-method'); + } + } const createNewCourse = () => { @@ -861,14 +865,17 @@ async function coursePlanConfirm() { formData.value.beginTime = dateTime.value[0] formData.value.endTime = dateTime.value[1] await request(COURSE_PLAN_EDIT, { ...formData.value }); - await api.getDraftTask({projectId: route.query.projectId}).then((res) => { - projectInfo.value = res.data.data - }); - request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value }); - if(projectInfo.value.projectInfo.status==3){ - request(PROJECT_RELEASE, {projectId: route.query.projectId}) + if(route.query.projectId){ + await api.getDraftTask({projectId: route.query.projectId}).then((res) => { + projectInfo.value = res.data.data + }); + request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value }); + if(projectInfo.value.projectInfo.status==3){ + request(PROJECT_RELEASE, {projectId: route.query.projectId}) + } + emit('call-parent-method'); + } - emit('call-parent-method'); handleCancelStu(); tableRef.value.fetch(); } diff --git a/src/components/project/NameInputNew.vue b/src/components/project/NameInputNew.vue index d2c81885..88549bd1 100644 --- a/src/components/project/NameInputNew.vue +++ b/src/components/project/NameInputNew.vue @@ -8,12 +8,13 @@ @focus="onFocus" @blur="onBlur" /> -
- 名称重复,请重新输入 +
+ + 开课名称已自动带入,请自行修改
-
+