diff --git a/src/components/drawers/AddCase.vue b/src/components/drawers/AddCase.vue index 9941c82c..c2e38b3f 100644 --- a/src/components/drawers/AddCase.vue +++ b/src/components/drawers/AddCase.vue @@ -46,7 +46,7 @@
-
-
- -
+
+ +
+
@@ -171,7 +171,7 @@ export default { time: undefined, caseId: null, caseName: "", - isClick: false + isClick: false, }); const closeDrawer = () => { ctx.emit("update:addcaseVisible", false); @@ -202,13 +202,13 @@ export default { width: "200px", align: "center", }, - // { - // title: "导入时间", - // dataIndex: "time", - // key: "time", - // width: "400px", - // align: "center", - // }, + // { + // title: "导入时间", + // dataIndex: "time", + // key: "time", + // width: "400px", + // align: "center", + // }, ]; return columns; }; @@ -218,6 +218,7 @@ export default { } state.selectedRowKeys = selectedRowKeys; state.apiTaskList = selectedRows; + console.log("selectedRows", selectedRows); }; const handelChangePage = (page, pageSize) => { state.selectedRowKeys = []; @@ -276,16 +277,16 @@ export default { }; const updateTask = () => { if (props.isLevel == 1) { - if(!props.isactive){ + if (!props.isactive) { message.destroy(); return message.warning("请先选中关卡"); } - if(state.isClick){ - message.destroy(); - message.error('请勿频繁点击') - return - } - state.isClick = true; + if (state.isClick) { + message.destroy(); + message.error("请勿频繁点击"); + return; + } + state.isClick = true; for (let i = 0; i < state.apiTaskList.length; i++) { RouterEditTask({ chapterId: props.isactive, @@ -308,12 +309,12 @@ export default { }); } } else if (props.isLevel == 2) { - if(state.isClick){ - message.destroy(); - message.error('请勿频繁点击') - return - } - state.isClick = true; + if (state.isClick) { + message.destroy(); + message.error("请勿频繁点击"); + return; + } + state.isClick = true; for (let i = 0; i < state.apiTaskList.length; i++) { apiTask .addTask({ @@ -338,19 +339,21 @@ export default { }); } } else if (props.isLevel == 3) { - if(state.isClick){ - message.destroy(); - message.error('请勿频繁点击') - return - } - state.isClick = true; + if (state.isClick) { + message.destroy(); + message.error("请勿频繁点击"); + return; + } + state.isClick = true; for (let i = 0; i < state.apiTaskList.length; i++) { apiTask .addTaskTemplate({ courseId: Number(state.apiTaskList[i].casesId), name: state.apiTaskList[i].title, projectTaskId: props.projectTaskId, - projectTemplateId: Number(localStorage.getItem("projectTemplateId")), + projectTemplateId: Number( + localStorage.getItem("projectTemplateId") + ), stageId: Number(props.chooseStageId) || 0, type: 3, }) @@ -432,7 +435,7 @@ export default { .main_items { margin-top: 32px; display: flex; - + margin-bottom: 12px; flex-wrap: wrap; .mi_ipts { diff --git a/src/components/drawers/AddOnline.vue b/src/components/drawers/AddOnline.vue index f22ce374..963c697c 100644 --- a/src/components/drawers/AddOnline.vue +++ b/src/components/drawers/AddOnline.vue @@ -1,34 +1,46 @@ \ No newline at end of file diff --git a/src/components/drawers/AddTest.vue b/src/components/drawers/AddTest.vue index 3315950c..3bcce3ed 100644 --- a/src/components/drawers/AddTest.vue +++ b/src/components/drawers/AddTest.vue @@ -1,15 +1,23 @@ \ No newline at end of file diff --git a/src/components/drawers/EvList.vue b/src/components/drawers/EvList.vue index f62a8e6c..1054c356 100644 --- a/src/components/drawers/EvList.vue +++ b/src/components/drawers/EvList.vue @@ -24,7 +24,7 @@
@@ -54,20 +54,21 @@ onChange: onSelectChange, }" /> -
-
- -
+
+
+ +
+
@@ -131,20 +132,20 @@ export default { align: "center", ellipsis: true, }, - // { + // { // title: "状态", - // width: "13%", - // dataIndex: "status", - // key: "status", - // align: "center", - // }, - // { + // width: "13%", + // dataIndex: "status", + // key: "status", + // align: "center", + // }, + // { // title: "价格", // width: "13%", // dataIndex: "quiz_price", - // key: "price", - // align: "center", - // }, + // key: "price", + // align: "center", + // }, { title: "可答题人数", width: "20%", @@ -161,7 +162,7 @@ export default { } state.selectedRowKeys = selectedRowKeys; state.evListData = selectedRows[0] ? selectedRows[0] : {}; - console.log("state.evListData",state.evListData); + console.log("state.evListData", state.evListData); }; const closeDrawer = () => { state.selectedRowKeys = []; @@ -229,13 +230,13 @@ export default { //获取测评列表 const getAllEvalText = () => { let objael = { - keyword:state.inputV1, - + keyword: state.inputV1, }; api .choiceEvaluation(objael) .then((res) => { - state.tableDataTotal=9; + state.tableDataTotal = 9; + // console.log("测评列表", res.data.data); getTableDataList(res.data.data); }) .catch(() => {}); @@ -311,7 +312,7 @@ export default { } .mi_btns { display: flex; - + cursor: pointer; .btn { padding: 0px 26px 0px 26px; diff --git a/src/components/student/CommonStudent.vue b/src/components/student/CommonStudent.vue index 4dfb47b0..7767d488 100644 --- a/src/components/student/CommonStudent.vue +++ b/src/components/student/CommonStudent.vue @@ -4,11 +4,11 @@
-
+
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || "" }} @@ -19,10 +19,8 @@ @click="closeDrawer" />
-
-
+
+
@@ -175,7 +173,7 @@
-
+
已选
@@ -663,179 +661,178 @@ watch(visiable, () => { .ant-tabs { overflow: visible; } -} -.right1 { - border-left: 1px solid #f2f6fe; - width: 100%; - margin-left: 20px; - .onerow { - display: flex; - justify-content: space-between; - align-items: center; - margin-right: 40px; - flex-wrap: wrap; - - width: 100%; - - .onleft { + .right1 { + border-left: 1px solid #f2f6fe; + margin-left: 20px; + .onerow { display: flex; - text-align: center; + justify-content: space-between; + align-items: center; + margin-right: 40px; + flex-wrap: wrap; - .already { - color: rgba(51, 51, 51, 1); - font-size: 16px; - font-weight: 500; - margin-left: 32px; - white-space: nowrap; - // margin-bottom: 20px; + width: 100%; + + .onleft { + display: flex; + text-align: center; + + .already { + color: rgba(51, 51, 51, 1); + font-size: 16px; + font-weight: 500; + margin-left: 32px; + white-space: nowrap; + // margin-bottom: 20px; + } + + .count { + color: #4ea6ff; + font-size: 16px; + margin: 0 6px; + } + + .peo { + color: rgba(51, 51, 51, 1); + font-size: 16px; + font-weight: 500; + } } - - .count { + .clbox { + margin-right: 50px; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + width: 104px; + height: 32px; + border-radius: 4px; + background: #4ea6ff; + .colose { + width: 16px; + height: 16px; + // border-radius: 8px; + // background: #ffffff; + // position: relative; + background-image: url(../../assets/images/basicinfo/ch.png); + background-size: 100%; + margin-right: 4px; + } + .allclear { + color: rgba(255, 255, 255, 1); + font-size: 14px; + } + } + } + .selecteds { + display: flex; + flex-wrap: wrap; + margin-left: 32px; + .person { + width: 100%; + margin-top: 20px; + border-top: 1px solid #f2f6fe; + } + .chose { + width: 64px; + height: 24px; + margin-top: 25px; + margin-right: 25px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 2px; + border: 1px solid rgba(56, 139, 225, 1); + color: rgba(56, 139, 225, 1); + font-size: 12px; + position: relative; + .ch { + position: absolute; + width: 18px; + height: 18px; + background-image: url(../../assets/images/basicinfo/ch.png); + right: -8px; + top: -8px; + } + } + .ifsw { + display: flex; + align-items: end; + justify-content: center; color: #4ea6ff; - font-size: 16px; - margin: 0 6px; } - - .peo { - color: rgba(51, 51, 51, 1); - font-size: 16px; - font-weight: 500; + .sw { + display: flex; + align-items: center; + justify-content: center; + text-align: justify; + color: #4ea6ff; + margin-top: 23px; + margin-left: 10px; } - } - .clbox { - margin-right: 50px; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - width: 104px; - height: 32px; - border-radius: 4px; - background: #4ea6ff; - .colose { - width: 16px; - height: 16px; - // border-radius: 8px; - // background: #ffffff; - // position: relative; - background-image: url(../../assets/images/basicinfo/ch.png); - background-size: 100%; - margin-right: 4px; + .dept { + width: 100%; + margin-top: 30px; + border-top: 1px solid #f2f6fe; } - .allclear { - color: rgba(255, 255, 255, 1); - font-size: 14px; + .chose1 { + //width: 90px; + height: 24px; + margin-top: 25px; + margin-right: 25px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 2px; + border: 1px solid rgba(56, 139, 225, 1); + color: rgba(56, 139, 225, 1); + font-size: 12px; + position: relative; + .span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .ch1 { + position: absolute; + width: 18px; + height: 18px; + background-image: url(../../assets/images/basicinfo/ch.png); + right: -8px; + top: -8px; + } } - } - } - .selecteds { - display: flex; - flex-wrap: wrap; - margin-left: 32px; - .person { - width: 100%; - margin-top: 20px; - border-top: 1px solid #f2f6fe; - } - .chose { - width: 64px; - height: 24px; - margin-top: 25px; - margin-right: 25px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 2px; - border: 1px solid rgba(56, 139, 225, 1); - color: rgba(56, 139, 225, 1); - font-size: 12px; - position: relative; - .ch { - position: absolute; - width: 18px; - height: 18px; - background-image: url(../../assets/images/basicinfo/ch.png); - right: -8px; - top: -8px; + .group { + width: 100%; + margin-top: 30px; + border-top: 1px solid #f2f6fe; } - } - .ifsw { - display: flex; - align-items: end; - justify-content: center; - color: #4ea6ff; - } - .sw { - display: flex; - align-items: center; - justify-content: center; - text-align: justify; - color: #4ea6ff; - margin-top: 23px; - margin-left: 10px; - } - .dept { - width: 100%; - margin-top: 30px; - border-top: 1px solid #f2f6fe; - } - .chose1 { - //width: 90px; - height: 24px; - margin-top: 25px; - margin-right: 25px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 2px; - border: 1px solid rgba(56, 139, 225, 1); - color: rgba(56, 139, 225, 1); - font-size: 12px; - position: relative; - .span { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .ch1 { - position: absolute; - width: 18px; - height: 18px; - background-image: url(../../assets/images/basicinfo/ch.png); - right: -8px; - top: -8px; - } - } - .group { - width: 100%; - margin-top: 30px; - border-top: 1px solid #f2f6fe; - } - .chose2 { - //width: 120px; - height: 24px; - margin-top: 25px; - margin-right: 25px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 2px; - border: 1px solid rgba(56, 139, 225, 1); - color: rgba(56, 139, 225, 1); - font-size: 12px; - position: relative; - .span { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .ch2 { - position: absolute; - width: 18px; - height: 18px; - background-image: url(../../assets/images/basicinfo/ch.png); - right: -8px; - top: -8px; + .chose2 { + //width: 120px; + height: 24px; + margin-top: 25px; + margin-right: 25px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 2px; + border: 1px solid rgba(56, 139, 225, 1); + color: rgba(56, 139, 225, 1); + font-size: 12px; + position: relative; + .span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .ch2 { + position: absolute; + width: 18px; + height: 18px; + background-image: url(../../assets/images/basicinfo/ch.png); + right: -8px; + top: -8px; + } } } } diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 631f72f6..28cc9c2d 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -143,7 +143,6 @@ placeholder="请输入课程名称" v-model:value="xzinputV1" v-model:validate="validate" - :maxlength="20" show-count :type="2" @@ -226,7 +225,8 @@
-
+ +
{{ currentPlanItem.teacher }}
- + @@ -3732,7 +3735,7 @@ export default defineComponent({ codevisible: false, //二维码弹窗 codeInfo: null, //二维码内容 codeUrl: codeUrl, - + // 课程三级分类 options2222: [ { @@ -4658,7 +4661,6 @@ export default defineComponent({ } console.log("state.validate", state.validate); - if (!state.validate) { message.destroy(); diff --git a/src/views/learningpath/LevelAddDetail.vue b/src/views/learningpath/LevelAddDetail.vue index ea31729e..e1788227 100644 --- a/src/views/learningpath/LevelAddDetail.vue +++ b/src/views/learningpath/LevelAddDetail.vue @@ -4,7 +4,7 @@
关卡
-
+
添加关卡
@@ -206,7 +206,8 @@
返回
@@ -688,7 +689,7 @@
- {{ element.cretime }}分钟 + {{ element.cretime ? element.cretime + "分钟" : "-" }}
{ console.log("删除关卡失败", err); @@ -1418,13 +1418,16 @@ export default { state.chooseProjectList = JSON.stringify(state.level[i].taskList); console.log("state.level[i].taskList", state.level[i].taskList); state.level[i].taskList.forEach((element) => { - // console.log("element", element); + console.log("element", element); let obj = { id: element.routerTaskId, key: element.routerTaskId, lei: checkType(element.type), creater: element.name, - cretime: element.duration, + cretime: + element.duration || element.duration == 0 + ? element.duration + : "-", checked1: element.flag, routerTaskId: element.routerTaskId, courseId: element.courseId, @@ -1466,7 +1469,7 @@ export default { ? JSON.parse(localStorage.getItem("chapterId")) : null; console.log("chapter", chapter); - if (chapter >0) { + if (chapter > 0) { dataAssignment(chapter); //用哪个的任务表 state.isactive = chapter; //哪个亮 } else { @@ -1535,13 +1538,13 @@ export default { align: "center", className: "h", }, - // { - // title: "岗位", - // dataIndex: "gang", - // key: "gang", - // width: 110, - // align: "center", - // className: "h", + // { + // title: "岗位", + // dataIndex: "gang", + // key: "gang", + // width: 110, + // align: "center", + // className: "h", // }, { title: "当前关卡", @@ -1551,14 +1554,14 @@ export default { align: "center", className: "h", }, - { - title: "进度", - dataIndex: "jin", - key: "jin", - width: 110, - align: "center", - className: "h", - }, + { + title: "进度", + dataIndex: "jin", + key: "jin", + width: 110, + align: "center", + className: "h", + }, { title: "开始时间", dataIndex: "time", @@ -1853,7 +1856,7 @@ export default { let obj = { chapterId: ele.chapterId, courseId: ele.courseId, - duration: ele.cretime, + duration: ele.cretime == "-" ? 0 : ele.cretime, flag: ele.checked1, name: ele.creater, routerId: ele.routerId, @@ -2667,7 +2670,7 @@ export default { box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07); display: flex; justify-content: center; - min-height:512px; + min-height: 512px; .boomcen { width: 95%; // height: 100%; diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 9dd953d3..6caa1c9a 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -316,7 +316,7 @@
- - -
+ -->
@@ -632,7 +630,11 @@
- {{ element.cretime }}分钟 + {{ + element.cretime + ? element.cretime + "分钟" + : "-" + }}
- {{level.length==1?"当前阶段为第一阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?":"您确定要删除此阶段"}} + {{level.length==1?"当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?":"您确定要删除此阶段"}}
@@ -1082,7 +1084,7 @@ export default { AddTest, AddLive, AddRef, - // AddDiscuss, + // AddDiscuss, AddActive, AddEval, AddInvist, @@ -1094,8 +1096,9 @@ export default { const route = useRoute(); const state = reactive({ projectId: route.query.projectId, - chooseStageId: null, + chooseStageId: null, removeStageId: null, + onceChoice: true, edit: false, isLevel: 2, //学习路径1项目2模板库3 // isRefEdit: 1, //外链编辑 @@ -1222,7 +1225,8 @@ export default { ? "投票" : "-", creater: value.name, - cretime: value.duration ? value.duration : "-", + cretime: + value.duration || value.duration == 0 ? value.duration : "-", checked1: value.flag ? true : false, checked: false, //是否选中类型 courseId: value.courseId, @@ -1253,7 +1257,8 @@ export default { array.push(obj); } }); - state.level = array; + console.log(array) + state.level = array.sort((a,b)=>{ return a.id - b.id }); }; const tableDataFunc = () => { @@ -1391,12 +1396,26 @@ export default { }; await api.getTask(obj).then((res) => { console.log("22222", res.data.data.stageList); + + if(state.onceChoice){ + let data = res.data.data.stageList; + state.onceChoice = false; + let arraynew = [] + for(let i=0;i { state.deleteStageId = id; state.deleteStageModal = true; - console.log(state.level) + console.log(state.level); }; //关闭删除阶段弹窗 const closeDeleteStage = () => { @@ -1759,35 +1778,35 @@ export default { // 删除所有阶段 const removeAllLevel = () => { // state.cancelModal = false; - console.log(state.level) + console.log(state.level); let removeArr = state.level; - for(let i=0;i { - console.log("删除阶段成功", res); - if(removeArr.length-1==i){ - message.destroy(); - message.success("删除全部阶段成功"); - closeDeleteStage(); - localStorage.setItem("stageId", ""); - getTask(); - state.cancelModal = false; - } - }) - .catch((err) => { - if(removeArr.length-1==i){ - console.log("删除阶段失败", err); - message.destroy(); - message.success("删除全部阶段失败"); - state.cancelModal = false; - } - }); + .deleteStage(obj) + .then((res) => { + console.log("删除阶段成功", res); + if (removeArr.length - 1 == i) { + message.destroy(); + message.success("删除全部阶段成功"); + closeDeleteStage(); + localStorage.setItem("stageId", ""); + getTask(); + state.cancelModal = false; + } + }) + .catch((err) => { + if (removeArr.length - 1 == i) { + console.log("删除阶段失败", err); + message.destroy(); + message.success("删除全部阶段失败"); + state.cancelModal = false; + } + }); } - } + }; //选择单个任务 const changeRow = (e) => { @@ -1993,7 +2012,7 @@ export default { temporaryStorage, submitStorage, cancelStorage, - removeAllLevel + removeAllLevel, }; }, }; diff --git a/src/views/projectcenter/temTask.vue b/src/views/projectcenter/temTask.vue index d6abd7e7..d2a2d504 100644 --- a/src/views/projectcenter/temTask.vue +++ b/src/views/projectcenter/temTask.vue @@ -329,7 +329,7 @@
- -
@@ -649,7 +648,7 @@
- {{ element.cretime }}分钟 + {{ element.cretime ? element.cretime + "分钟" : "-" }}
0 ? value.duration : "-", + cretime: value.duration || value.duration == 0 ? value.duration : "-", checked1: value.flag ? true : false, checked: false, //是否选中类型 courseId: value.courseId, @@ -1402,12 +1401,16 @@ export default { state.tableData = array; console.log("state.tableData", state.tableData); }; - //把阶段放到level里 - const getStageData = (tableData) => { + //把阶段放到level里 + const getStageData = (tableData) => { let data = tableData; let array = []; data.map((value) => { - console.log("dd",Number(value.templateStageId) ,Number(value.templateStageId) > 0); + console.log( + "dd", + Number(value.templateStageId), + Number(value.templateStageId) > 0 + ); if (Number(value.templateStageId) > 0) { let obj = { id: value.templateStageId, @@ -1624,19 +1627,18 @@ export default { }); };*/ - //获取任务列表 - const getTask = async () => { - - await api - .templateDetail(localStorage.getItem("projectTemplateId")).then((res) => { - console.log("22222", res.data.data.stageList); - state.projectTitle = res.data.data.projectTemplateInfo.name; - state.picUrl = res.data.data.projectTemplateInfo.picUrl; - state.stageList = res.data.data.stageList; - getStageData(res.data.data.stageList); - updateStageChoosd(); - - }); + //获取任务列表 + const getTask = async () => { + await api + .templateDetail(localStorage.getItem("projectTemplateId")) + .then((res) => { + console.log("22222", res.data.data.stageList); + state.projectTitle = res.data.data.projectTemplateInfo.name; + state.picUrl = res.data.data.projectTemplateInfo.picUrl; + state.stageList = res.data.data.stageList; + getStageData(res.data.data.stageList); + updateStageChoosd(); + }); }; function updateStageChoosd() { @@ -1659,9 +1661,15 @@ export default { getTableData(state.stageList[0].taskList); return; } - console.log(state.chooseStageId,state.stageList.find((e) => e.templateStageId == state.chooseStageId)?.taskList,state.stageList); + console.log( + state.chooseStageId, + state.stageList.find((e) => e.templateStageId == state.chooseStageId) + ?.taskList, + state.stageList + ); getTableData( - state.stageList.find((e) => e.templateStageId == state.chooseStageId)?.taskList + state.stageList.find((e) => e.templateStageId == state.chooseStageId) + ?.taskList ); } @@ -1956,10 +1964,9 @@ export default { console.log("state.level", id, state.level); state.chooseStageId = id; let final = state.level.find((item) => item.id === id); - if(final !=null){ + if (final != null) { getTableData(final.taskList); } - }; //选择单个任务