diff --git a/src/components/drawers/ AssessmentList.vue b/src/components/drawers/ AssessmentList.vue index d5268f12..1ebebd8d 100644 --- a/src/components/drawers/ AssessmentList.vue +++ b/src/components/drawers/ AssessmentList.vue @@ -110,7 +110,7 @@ export default { }; const afterVisibleChange = (bool) => { console.log("state getAllInvistText", bool,"======",props.titleTag); - if (props.assessmentVisible) { + if (props.assessmentVisible&&bool) { getAllInvistText(); } }; diff --git a/src/components/drawers/AddFaceteach.vue b/src/components/drawers/AddFaceteach.vue index e736d368..1fd54db4 100644 --- a/src/components/drawers/AddFaceteach.vue +++ b/src/components/drawers/AddFaceteach.vue @@ -242,7 +242,7 @@ 评估:
- 需要评估
@@ -437,7 +437,8 @@ export default { assessmentId:null, EditTestId:null, EditWorkId:null, - assessmentVisible: false, + assessmentVisible:false, + needEval:false, }); diff --git a/src/components/drawers/AddInvist.vue b/src/components/drawers/AddInvist.vue index dacc9d0b..70c89a89 100644 --- a/src/components/drawers/AddInvist.vue +++ b/src/components/drawers/AddInvist.vue @@ -276,7 +276,6 @@ export default { afterVisibleChange, closeDrawer, updateTask, - AssessmentList, checkAssDrawer, getCheckedAss, }; diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue index 53c00b89..ba3d4bf4 100644 --- a/src/components/drawers/AddLive.vue +++ b/src/components/drawers/AddLive.vue @@ -121,39 +121,44 @@ > -
-
- 直播封面: -
-
- - avatar -
- - -
Upload
-
-
-
支持图片格式为jpg/jpeg/png 图片最大为2MB
-
-
+
+
+
+ +
+ 直播封面 +
+
+ + + avatar +
+
+
+
+
+
+
+
+
支持图片格式为jpg/jpeg/png 图片最大为2MB
+
+
+
+
直播链接: @@ -174,7 +179,7 @@
-
+
回放链接: @@ -189,33 +194,34 @@
-
+
- 评价: + 评估:
-
- 需要评估 +
+ 需要评估
-
-
+
+
+
- + +
+ + 删除评估 +
+ +
+ +
考勤设置: @@ -327,6 +333,9 @@ import { RouterEditTask } from "@/api/indexTask"; import { addTempTask } from "../../api/indexTaskadd"; import { getMemberInfo } from "@/api/index1"; import dayjs from "dayjs"; +import { fileUp } from "../../api/indexEval"; +import AssessmentList from "../drawers/ AssessmentList.vue"; + import { debounce } from "lodash-es"; // import { useRouter } from "vue-router"; function getBase64(img, callback) { @@ -337,6 +346,9 @@ function getBase64(img, callback) { export default { name: "AddLive", + components:{ + AssessmentList + }, props: { addliveVisible: { type: Boolean, @@ -419,6 +431,9 @@ export default { obj: {}, //要传的obj数据 assessment: [], //评估信息 assessmentvalue: null, + needEval:false, + otherSettings:false, + assessmentVisible:false, }); const closeDrawer = () => { ctx.emit("update:addliveVisible", false); @@ -437,12 +452,14 @@ export default { state.textV1 = ""; state.switchC1 = ""; state.imageUrl = ""; + state.needEval=false; + state.otherSettings; ctx.emit("changeData", false); localStorage.setItem("stageId", props.chooseStageId); localStorage.setItem("chapterId", props.isactive); }; - const afterVisibleChange = () => { - if (props.edit) { + const afterVisibleChange = (bool) => { + if (props.edit&&bool) { queryLive(); } api @@ -492,6 +509,7 @@ export default { }); }; + const cloradio1 = (value) => { if (state.radioV1 === value.target._value) { state.radioV1 = ""; @@ -519,24 +537,7 @@ export default { message.error("upload error"); } }; - const beforeUpload = (file) => { - const isJpgOrPng = - file.type === "image/jpeg" || - file.type === "image/png" || - file.type === "image/jpg"; - if (!isJpgOrPng) { - message.error("You can only upload JPG file!"); - } - - const isLt2M = file.size / 1024 / 1024 < 2; - - if (!isLt2M) { - message.error("Image must smaller than 2MB!"); - } - - return isJpgOrPng && isLt2M; - }; const updateTask = (res) => { if (props.isLevel == 1) { RouterEditTask({ @@ -593,6 +594,11 @@ export default { }); } }; + const showAssessment = () => { + + state.assessmentVisible = true; + console.log("hshs======",state.assessmentVisible); + }; //创建直播 const updateLiveBroadcast = () => { if (!state.inputV1) { @@ -638,9 +644,10 @@ export default { livePlayback: state.playback ? "true" : "false", livePlaybackLink: state.playback ? state.inputV5 : "", liveTeacherId: state.inputV3, - otherSettings: 0, //1或0 + otherSettings: state.otherSettings, //1或0 signOutTime: state.inputV8, standardSettings: state.radioV1, //1或2 + isEvaluate:state.eedEval ? "1":"0", }; if (props.edit) { api @@ -662,6 +669,42 @@ export default { .catch(() => {}); } }; + const beforeUpload = (file) => { + return new Promise((resolve, reject) => { + const isJpgOrPng = + file.type === "image/jpg" || + file.type === "image/jpeg" || + file.type === "image/png" || + file.type === "image/svg" || + file.type === "image/bmp" || + file.type === "image/gif"; + if (!isJpgOrPng) { + message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!"); + return reject(false); + } + + let reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + const image = new Image(); + image.src = reader.result; + image.onload = () => { + const formData = new FormData(); + formData.append("file", file); + console.log(file); + fileUp(formData).then((res) => { + if (res.data.code === 200) { + state.imageUrl = res.data.data; + } + }); + return resolve(true); + }; + }; + + return reject(false); + }); + }; + const templateScroll = (e) => { console.log("滚动", e); const { target } = e; @@ -728,9 +771,7 @@ export default { state.discussSettings = "false"; } }; - const handleChangeAssessment = (option) => { - state.assessmentId = option.assessmentId; - }; + return { ...toRefs(state), afterVisibleChange, @@ -743,10 +784,10 @@ export default { handleChange2, options, checkRadio, - handleChangeAssessment, queryMember, templateScroll, handleSearch, + showAssessment, }; }, }; @@ -874,6 +915,63 @@ export default { } } } + .mbl_items2 { + display: flex; + align-items: start; + margin-top: 10px; + margin-bottom: 10px; + .i_bottom{ + margin-bottom: 30px; + } + .item_nam { + width: 100px; + display: flex; + align-items: center; + justify-content: flex-end; + white-space: nowrap; + .asterisk_icon { + width: 10px; + height: 10px; + margin-right: 5px; + margin-top: -15px; + } + } + .item_inp { + flex: 1; + .i_upload_img { + width: 100px; + height: 100px; + border-radius: 8px; + } + .i_upload { + width: 100px; + height: 100px; + border: 1px solid #4ea6ff; + border-radius: 8px; + text-align: center; + align-items: center; + cursor: pointer; + .addimg { + position: relative; + .heng { + position: absolute; + top: 50px; + left: 25px; + width: 50px; + border: 1px solid #4ea6ff; + } + .shu { + position: absolute; + top: 25px; + left: 50px; + height: 50px; + border: 1px solid #4ea6ff; + } + } + } + } + } + } } .main_btns { diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 3ffa6b65..4b436ec2 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -370,12 +370,7 @@ 封面图
- + 完成规则
- - - - 报名即完成 - - - - - 签到即完成 - - - - 请假算完成 - - + + 报名即完成 + + + 签到即完成 + + + 请假算完成 + +
@@ -3340,7 +3330,7 @@ export default defineComponent({ kkinputV2: "", //新建开课 xjkkradioV1: "", - xjkkradioV2: "", + completeType: "", xjkkinputV1: "", xjkkinputV2: "", xjkkinputV3: "", @@ -3376,7 +3366,9 @@ export default defineComponent({ checked4: false, offcoursePlanId: 0, filesList: [], - + signCom:false , + regisCom:false, + comLeave:false, studentId: 0, studentItem: {}, addOnlineCoursevisible: false, //新建面授弹窗 @@ -4104,7 +4096,7 @@ export default defineComponent({ state.cstm_hs = false; state.kk_eidt = false; state.xjkkradioV1 = ""; - state.xjkkradioV2 = ""; + state.completeType = ""; state.xjkkinputV1 = ""; state.xjkkinputV2 = ""; state.xjkkinputV3 = ""; @@ -4127,12 +4119,12 @@ export default defineComponent({ applyFlag: state.checked1 ? 1 : 0, attach: state.filesList.length ? state.filesList.join(",") : "", beginTime: startTime, - completeType: state.xjkkradioV2, + completeType: state.regisCom?"1,":"0,"+state.signCom?"1,":"0,"+state.comLeave?"1":"0", endTime: endTime, evalFlag: state.checked4 ? 1 : 0, name: state.xjkkinputV1, signFlag: state.xjkkradioV1 === 0 ? 1 : 0, //是否允许未报名的签到:1是0否 - signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否 + // signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否 teacherId: state.xjkkinputV4 ? state.xjkkinputV4 : 1, }; console.log(postData); @@ -4175,13 +4167,17 @@ export default defineComponent({ dayjs(item.endTime, "YYYY/MM/DD"), ]; options4CurId.value = item.teacherId; - state.xjkkradioV2 = item.completeType; + state.regisCom = item.completeType.split(",")[0]==1?true:false, + state.signCom = item.completeType.split(",")[1]==1?true:false, + state.comLeave = item.completeType.split(",")[2]==1?true:false, + state.completeType = state.regisCom?"1,":"0,"+state.signCom?"1,":"0,"+state.comLeave?"1":"0", state.checked4 = item.evalFlag === 1 ? true : false; state.xjkkinputV1 = item.name; if (item.signFlag === 1) { //是否允许未报名的签到:1是0否 state.xjkkradioV1 = 0; } + /* if (item.signWordFlag === 1) { //签到是否需要口令:1是0否 state.xjkkradioV1 = 1; @@ -4189,6 +4185,7 @@ export default defineComponent({ if (item.signFlag === 0 && item.signWordFlag === 0) { state.xjkkradioV1 = ""; } + */ state.xjkkinputV4 = item.teacherId; getTea(); @@ -4396,7 +4393,7 @@ export default defineComponent({ evalFlag: item.evalFlag, name: item.name, signFlag: item.signFlag, //是否允许未报名的签到:1是0否 - signWordFlag: item.signWordFlag, //签到是否需要口令:1是0否 + //signWordFlag: item.signWordFlag, //签到是否需要口令:1是0否 teacherId: item.teacherId, }; console.log(obj); diff --git a/src/views/projectcenter/LibraryAdd.vue b/src/views/projectcenter/LibraryAdd.vue index abf93946..3a68a7b1 100644 --- a/src/views/projectcenter/LibraryAdd.vue +++ b/src/views/projectcenter/LibraryAdd.vue @@ -901,6 +901,7 @@ export default defineComponent({ state.projectInfo.status = res.data.data.projectTemplateInfo.status state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl let data = res.data.data.stageList; + console.log("data=====",data); for(let i in data) { state.taskSyllabus.push({text: data[i].name,children:[]}); for(let j in data[i].taskList) { @@ -939,8 +940,8 @@ export default defineComponent({ "notice": state.projectInfo.notice, "noticeFlag": 0, "projectTemplateId": localStorage.getItem('projectTemplateId'), - "remark": "", - "status": 0, + "remark": state.projectInfo.remark, + "status": state.projectInfo.status, }; api.templateEdit(obj).then(res => { message.success("公告发布成功") diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 8881bd3f..54b2ed42 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -1,4 +1,4 @@ - +img