面授课

This commit is contained in:
zhangyc
2022-11-29 09:46:37 +08:00
parent edcb32e563
commit 07bdd37d5f
3 changed files with 57 additions and 31 deletions

View File

@@ -181,7 +181,7 @@
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
" "
:v-model:value="beforeStart" :v-model:value="beforeStartValue"
></a-input-number> ></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
</div> </div>
@@ -195,9 +195,8 @@
width: 88px; width: 88px;
height: 32px; height: 32px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;"
" :value="afterStartValue"
:v-model:value="afterStart"
></a-input-number> ></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
</div> </div>
@@ -223,7 +222,7 @@
<span style="margin-right: 3px">其他设置:</span> <span style="margin-right: 3px">其他设置:</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-checkbox v-model:checked="complete_leave" @click="complete_leave=!complete_leave" <a-checkbox v-model:checked="completeLeave" @click="completeLeave=!completeLeave"
>学员请假后记为任务完成</a-checkbox >学员请假后记为任务完成</a-checkbox
> >
</div> </div>
@@ -408,6 +407,11 @@ export default {
type: Number, type: Number,
default: null, default: null,
}, },
projectTemplateId:{
type: Number,
default: null,
},
}, },
setup(props, ctx) { setup(props, ctx) {
const options = ref([]); const options = ref([]);
@@ -426,10 +430,10 @@ export default {
memberId: 0, memberId: 0,
pageSize: 10, pageSize: 10,
courseName: "", courseName: "",
duration: "", duration:null,
address: null, address: null,
beforeStart: null, beforeStartValue:20,
afterStart: null, afterStartValue:10,
description: "", description: "",
chooseTime: [], chooseTime: [],
fileList: [], fileList: [],
@@ -443,14 +447,14 @@ export default {
}); });
const clear = () => { const clear = () => {
state.courseName = null; state.courseName = "";
state.memberValue = null; state.memberValue = null;
state.duration = null; state.duration = null;
state.address = null; state.address = null;
state.beforeStart = null; state.beforeStart = 0;
state.afterStart = null; state.afterStartValue =0;
state.chooseTime = []; state.chooseTime = [];
state.description = null; state.description ="";
state.onlySign =false; state.onlySign =false;
state.completeLeave =false; state.completeLeave =false;
state.projectMember =false; state.projectMember =false;
@@ -459,7 +463,9 @@ export default {
state.EditTestId =null; state.EditTestId =null;
state.assessmentId=null; state.assessmentId=null;
state.EditWorkId=null; state.EditWorkId=null;
state.EditEvalId=null;
state.applyFlag="";
console.log("state.afterStart",state.afterStartValue);
}; };
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addfaceteachVisible", false); ctx.emit("update:addfaceteachVisible", false);
@@ -506,6 +512,7 @@ export default {
//查询面授 //查询面授
const queryFaceTeach = () => { const queryFaceTeach = () => {
console.log("props.EditFaceI========d",props.EditFaceId);
queryFaceDetailById(props.EditFaceId).then((res) => { queryFaceDetailById(props.EditFaceId).then((res) => {
console.log("获取到了面授课开课详情", res.data.data); console.log("获取到了面授课开课详情", res.data.data);
let result = res.data.data; let result = res.data.data;
@@ -523,14 +530,15 @@ export default {
} }
state.address = result.address; state.address = result.address;
state.beforeStart = result.beforeStart; state.beforeStart = result.beforeStart;
state.afterStart = result.afterStart; state.afterStartValue = result.afterStart;
console.log("编辑========",state.afterStartValue);
state.fileList = JSON.parse(result.attach); state.fileList = JSON.parse(result.attach);
state.EditWorkId = result.homeWorkId; state.EditWorkId = result.homeWorkId;
state.onlySign = result.completeType.split(",")[0]==1?true:false; state.onlySign = result.completeType.split(",")[0]=="1"?true:false;
state.completeLeave =result.completeType.split(",")[1]==1?true:false; state.completeLeave =result.completeType.split(",")[1]=="1"?true:false;
state.chooseCourse =result.offcourseId; state.chooseCourse =result.offcourseId;
state.projectMember = result.projectMember.split(",")[0]==1?true:false; state.projectMember = result.projectMember.split(",")[0]=="1"?true:false;
state.noProjectMember = result.projectMember.split(",")[1]==1?true:false; state.noProjectMember = result.projectMember.split(",")[1]=="1"?true:false;
state.EditTestId = result.testId; state.EditTestId = result.testId;
state.EditWorkId=result.homeWorkId; state.EditWorkId=result.homeWorkId;
state.assessmentId =result.evaluateId; state.assessmentId =result.evaluateId;
@@ -540,13 +548,18 @@ export default {
//新建或编辑面授 //新建或编辑面授
// 新增任务 // 新增任务
const updateFaceTeach = () => { const updateFaceTeach = () => {
console.log("v",state.beforeStart,"v",state.afterStartValue,"v",
state.applyFlag,"v",state.evalFlag,"v",state.completeType,"state.address",state.address);
if ( if (
/*
state.courseName == "" || state.courseName == "" ||
state.chooseCourse == null || state.chooseCourse == null ||s
state.memberValue == "" || state.memberValue == "" ||
state.chooseTime == [] || state.chooseTime == [] ||
state.duration == "" || state.duration == "" ||
*/
state.address == "" state.address == ""
) { ) {
message.destroy(); message.destroy();
return message.warning("请输入必填字段"); return message.warning("请输入必填字段");
@@ -555,27 +568,27 @@ export default {
teacherId:state.memberValue.value, teacherId:state.memberValue.value,
teacher:state.memberValue.label, teacher:state.memberValue.label,
address:state.address, address:state.address,
applyFlag: 1, applyFlag: state.applyFlag,
attach: JSON.stringify(state.fileList), attach: JSON.stringify(state.fileList),
afterStart: state.afterStart || 0, afterStart:state.afterStartValue ||0,
beforeStart: state.beforeStart || 0, beforeStart:state.beforeStart,
beginTime: parseInt( new Date(state.chooseTime[0].$d).getTime() / 1000), beginTime: parseInt( new Date(state.chooseTime[0].$d).getTime() / 1000),
completeType: state.onlySign? "1,":"0," + state.completeLeave?"1":"0", completeType: state.onlySign? "1,":"0," + state.completeLeave?"1":"0",
description: state.description, description: state.description,
endTime: parseInt(new Date(state.chooseTime[1].$d).getTime() / 1000), endTime: parseInt(new Date(state.chooseTime[1].$d).getTime() / 1000),
evalFlag: state.needEval?1:0, evalFlag:state.needEval?1:0,
evaluateId:state.assessmentId, evaluateId:state.assessmentId,
homeWorkId: state.EditWorkId, homeWorkId: state.EditWorkId,
name: state.courseName, name: state.courseName,
projectMember:state.innerPersion?"1":"0" + state.outPerson?"1":"0", projectMember:state.innerPersion?"1,":"0," + state.outPerson?"1":"0",
offcourseId:state.chooseCourse, offcourseId:state.chooseCourse,
offcoursePlanId:props.EditFaceId >0 ? props.EditFaceId : 0, offcoursePlanId:props.EditFaceId >0 ? props.EditFaceId : 0,
signFlag: 0,
testId: state.EditTestId testId: state.EditTestId
}; };
editPlan(obj) editPlan(obj)
.then((res) => { .then((res) => {
console.log("更新任务s's");
updateTask(res); updateTask(res);
closeDrawer(); closeDrawer();
}).catch((err) => { }).catch((err) => {
@@ -589,6 +602,7 @@ export default {
//更新任务列表 //更新任务列表
// 新增编辑或新增项目任务 // 新增编辑或新增项目任务
const updateTask = (res) => { const updateTask = (res) => {
console.log("props.isLevel=====",props.isLevel);
if (props.isLevel == 1) { if (props.isLevel == 1) {
let editObj1 = { let editObj1 = {
chapterId: props.isactive, chapterId: props.isactive,
@@ -611,7 +625,7 @@ export default {
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
let editObj = { let editObj = {
courseId: res.data.data.offcoursePlanId, courseId: res.data.data.offcoursePlanId,
duration: 0, duration: res.data.data.duration,
name: res.data.data.name, name: res.data.data.name,
projectId: props.projectId, projectId: props.projectId,
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
@@ -630,11 +644,12 @@ export default {
message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`); message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
console.log("dddddddddddd33333333");
addTempTask({ addTempTask({
courseId: res.data.data.offcoursePlanId, courseId: res.data.data.offcoursePlanId,
name: res.data.data.name, name: res.data.data.name,
duration: res.data.data.duration, duration: res.data.data.duration,
projectTemplateId: props.projectTemplateId, projectTemplateId:props.projectTemplateId,
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,
type: 2, type: 2,

View File

@@ -392,7 +392,7 @@ export default {
setup(props, ctx) { setup(props, ctx) {
const formState = reactive({ const formState = reactive({
examinationName: "", examinationName: "",
examinationDuration: "", examinationDuration:0,
examinationLimit: "", examinationLimit: "",
passLine:null, passLine:null,
examinationEndTime: "", examinationEndTime: "",

View File

@@ -196,7 +196,13 @@
<div> <div>
<add-faceteach <add-faceteach
v-model:addfaceteachVisible="addfaceteachvisible" v-model:addfaceteachVisible="addfaceteachvisible"
v-model:EditEvalId="EditEvalId" @changeData="updateTableData"
:isLevel="isLevel"
v-model:edit="edit"
v-model:projectTemplateId="projectTemplateId"
v-model:chooseStageId="chooseStageId"
v-model:projectTaskId="projectTaskId"
v-model:EditFaceId="EditFaceId"
/> />
</div> </div>
<!-- 添加面授侧弹窗 --> <!-- 添加面授侧弹窗 -->
@@ -1126,7 +1132,7 @@ export default {
EditTestId: null, // 要编辑的考试id EditTestId: null, // 要编辑的考试id
EditCaseId: null, //要编辑的案例id EditCaseId: null, //要编辑的案例id
EditOnlineId: null, //要编辑的在线id EditOnlineId: null, //要编辑的在线id
EditFaceTeach: null, EditFaceId: null,
EditEvalId: null, EditEvalId: null,
EditInvistId: null, EditInvistId: null,
EditVoteId: null, //编辑需要投票的id EditVoteId: null, //编辑需要投票的id
@@ -1770,8 +1776,11 @@ export default {
state.EditOnlineId = id; state.EditOnlineId = id;
state.projectTaskId = eleId; state.projectTaskId = eleId;
}; };
const showDrawerFaceteach = () => { const showDrawerFaceteach = (id, eleId) => {
state.addfaceteachvisible = true; state.addfaceteachvisible = true;
console.log("id==========",id);
state.EditFaceId = id;
state.projectTaskId = eleId;
}; };
const showDrawerAddCase = (id, eleId) => { const showDrawerAddCase = (id, eleId) => {
state.addcasevisible = true; state.addcasevisible = true;
@@ -1972,6 +1981,8 @@ export default {
showDrawerAddTest(id, eleId); showDrawerAddTest(id, eleId);
} else if (type == "在线") { } else if (type == "在线") {
showDrawerOnline(id, eleId); showDrawerOnline(id, eleId);
}else if (type == "面授") {
showDrawerFaceteach(id, eleId);
} }
}; };
const showdeAll = () => { const showdeAll = () => {