面授课

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

View File

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

View File

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