diff --git a/src/components/drawers/AddFaceteach.vue b/src/components/drawers/AddFaceteach.vue
index 6ba63ad6..b3bc50a6 100644
--- a/src/components/drawers/AddFaceteach.vue
+++ b/src/components/drawers/AddFaceteach.vue
@@ -1,49 +1,30 @@
-
+
-

+
课程名称:
-

+
选择课程:
@@ -51,19 +32,16 @@
-
+
-
+
@@ -72,100 +50,59 @@
面授说明:
-

+
授课教师:
-

+
面授时间:
-

+
面授时长:
-
+ " v-model:value="duration">
分钟
-

+
上课地址:
@@ -174,42 +111,32 @@
开始前:
-
+ overflow: hidden; " v-model:value="before">
分钟
开始后:
-
+ overflow: hidden;" v-model:value="afterStartValue">
分钟
-
+
@@ -217,11 +144,11 @@
完成标准设置:
-
-
-
仅签到
-
-
+
+
+
仅签到
+
+
@@ -229,9 +156,8 @@
其他设置:
-
学员请假后记为任务完成
+
学员请假后记为任务完成
@@ -239,8 +165,9 @@
现场参与:
-
允许项目内人员临时到场参加
-
允许项目外人员临时到场参加
+
允许项目内人员临时到场参加
+
允许项目外人员临时到场参加
@@ -248,24 +175,21 @@
评估:
-
+
@@ -326,13 +245,8 @@
附件:
@@ -341,7 +255,7 @@
-
+
@@ -355,7 +269,7 @@ import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
import { getMemberInfo } from "@/api/index1";
import { debounce } from "lodash-es";
-import { queryFaceDetailById,editPlan } from "../../api/indexFace";
+import { queryFaceDetailById, editPlan } from "../../api/indexFace";
import dayjs from "dayjs";
import AssessmentList from "../drawers/ AssessmentList.vue";
// import { toDate } from "../../api/method";、
@@ -414,11 +328,11 @@ export default {
type: Number,
default: null,
},
- projectTemplateId:{
+ projectTemplateId: {
type: Number,
default: null,
},
-
+
},
setup(props, ctx) {
const options = ref([]);
@@ -427,8 +341,8 @@ export default {
addhomeworkvisible: false,
addtestvisible: false,
memberValue: {
- value:"",
- label:""
+ value: "",
+ label: ""
},
fetching: false,
totalPages: 0,
@@ -437,45 +351,45 @@ export default {
memberId: 0,
pageSize: 10,
courseName: "",
- duration:null,
+ duration: null,
address: null,
- before:null,
- afterStartValue:null,
+ before: null,
+ afterStartValue: null,
description: "",
chooseTime: [],
fileList: [],
chooseCourse: null, //选择的在线课程
- assessmentId:null,
- EditTestId:null,
- EditWorkId:null,
- assessmentVisible:false,
- needEval:false,
- onlySign:false,
- completeLeave:false,
- innerPersion:false,
- outPersion:false,
-
+ assessmentId: null,
+ EditTestId: null,
+ EditWorkId: null,
+ assessmentVisible: false,
+ needEval: false,
+ onlySign: false,
+ completeLeave: false,
+ innerPersion: false,
+ outPersion: false,
+
});
const clear = () => {
state.courseName = "";
state.memberValue = {};
state.duration = null;
state.address = null;
- state.before=null;
- state.afterStartValue=null;
+ state.before = null;
+ state.afterStartValue = null;
state.chooseTime = [];
- state.description ="";
- state.onlySign =false;
- state.completeLeave =false;
- state.innerPersion =false;
- state.outPersion =false;
+ state.description = "";
+ state.onlySign = false;
+ state.completeLeave = false;
+ state.innerPersion = false;
+ state.outPersion = false;
state.chooseCourse = null;
- state.EditTestId =null;
- state.assessmentId=null;
- state.EditWorkId=null;
- state.EditEvalId=null;
- state.applyFlag="";
- state.needEval=false;
+ state.EditTestId = null;
+ state.assessmentId = null;
+ state.EditWorkId = null;
+ state.EditEvalId = null;
+ state.applyFlag = "";
+ state.needEval = false;
};
const closeDrawer = () => {
ctx.emit("update:addfaceteachVisible", false);
@@ -487,24 +401,24 @@ export default {
if (bool && props.edit) {
// 该页面显示同时 edit为true 时,发送查询请求,
queryFaceTeach();
-
+
}
};
- const logC= e => {
- state.chooseCourse=null;
+ const logC = e => {
+ state.chooseCourse = null;
console.log(e);
};
const logW = e => {
- state.EditWorkId=null;
+ state.EditWorkId = null;
console.log(e);
};
- const logT= e => {
- state.EditTestId=null;
+ const logT = e => {
+ state.EditTestId = null;
console.log(e);
};
- const logA= e => {
- state.EditEvalId=null;
+ const logA = e => {
+ state.EditEvalId = null;
console.log(e);
};
@@ -513,7 +427,7 @@ export default {
};
const showDrawerAddHomework = () => {
state.addhomeworkvisible = true;
-
+
};
const showDrawerAddTest = () => {
state.addtestvisible = true;
@@ -522,14 +436,14 @@ export default {
//查询面授
const queryFaceTeach = () => {
-
+
queryFaceDetailById(props.EditFaceId).then((res) => {
console.log("获取到了面授课开课详情", res.data.data);
let result = res.data.data;
state.courseName = result.name;
state.description = result.description;
- state.memberValue= {value:result.teacherId,label:result.teacher}
- state.duration =result.duration;
+ state.memberValue = { value: result.teacherId, label: result.teacher }
+ state.duration = result.duration;
if (result.beginTime && result.endTime) {
state.chooseTime = [
dayjs(result.beginTime, "YYYY-MM-DD"),
@@ -539,21 +453,21 @@ export default {
state.chooseTime = [];
}
state.address = result.address;
- state.before =result.beforeStart;
+ state.before = result.beforeStart;
state.afterStartValue = result.afterStart;
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.chooseCourse =result.offcourseId;
- state.innerPersion = result.projectMember.split(",")[0]=="1"?true:false;
- state.outPersion = result.projectMember.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.innerPersion = result.projectMember.split(",")[0] == "1" ? true : false;
+ state.outPersion = result.projectMember.split(",")[1] == "1" ? true : false;
state.EditTestId = result.testId;
- state.EditWorkId=result.homeWorkId;
- state.assessmentId =result.evaluateId;
+ state.EditWorkId = result.homeWorkId;
+ state.assessmentId = result.evaluateId;
state.needEval = result.evaluateId;
- console.log("state=======",state);
+ console.log("state=======", state);
});
};
@@ -565,7 +479,7 @@ export default {
//新建或编辑面授
// 新增任务
const updateFaceTeach = () => {
-
+
if (
state.courseName == "" ||
state.chooseCourse == null ||
@@ -573,50 +487,50 @@ export default {
state.chooseTime == [] ||
state.duration == "" ||
state.address == ""
-
+
) {
message.destroy();
return message.warning("请输入必填字段");
} else {
- let type =state.onlySign ? "1,":"0,";
- let t = state.completeLeave?"1":"0";
- let p=state.innerPersion?"1,":"0,";
- let p1=state.outPersion?"1":"0";
+ let type = state.onlySign ? "1," : "0,";
+ let t = state.completeLeave ? "1" : "0";
+ let p = state.innerPersion ? "1," : "0,";
+ let p1 = state.outPersion ? "1" : "0";
let obj = {
- teacherId:state.memberValue.value,
- teacher:state.memberValue.label,
- address:state.address,
+ teacherId: state.memberValue.value,
+ teacher: state.memberValue.label,
+ address: state.address,
applyFlag: state.applyFlag,
attach: JSON.stringify(state.fileList),
- afterStart:state.afterStartValue || 0,
- beforeStart:state.before || 0,
- beginTime: parseInt( new Date(state.chooseTime[0].$d).getTime() / 1000),
- completeType:type.concat(t),
+ afterStart: state.afterStartValue || 0,
+ beforeStart: state.before || 0,
+ beginTime: parseInt(new Date(state.chooseTime[0].$d).getTime() / 1000),
+ completeType: type.concat(t),
description: state.description,
endTime: parseInt(new Date(state.chooseTime[1].$d).getTime() / 1000),
- evalFlag:state.needEval?1:0,
- evaluateId:state.assessmentId,
+ evalFlag: state.needEval ? 1 : 0,
+ evaluateId: state.assessmentId,
homeWorkId: state.EditWorkId,
name: state.courseName,
- projectMember:p.concat(p1),
- offcourseId:state.chooseCourse,
- offcoursePlanId:props.EditFaceId >0 ? props.EditFaceId : 0,
+ projectMember: p.concat(p1),
+ offcourseId: state.chooseCourse,
+ offcoursePlanId: props.EditFaceId > 0 ? props.EditFaceId : 0,
testId: state.EditTestId
};
- console.log("obj============",obj,"6"+"9");
-
+ console.log("obj============", obj, "6" + "9");
+
editPlan(obj)
- .then((res) => {
- message.destroy();
- message.error(`添加成功`);
- updateTask(res);
- ctx.emit("changeData", false);
- closeDrawer();
- }).catch(() => {
- message.destroy();
- message.error(`添加失败`);
- });
-
+ .then((res) => {
+ message.destroy();
+ message.error(`添加成功`);
+ updateTask(res);
+ ctx.emit("changeData", false);
+ closeDrawer();
+ }).catch(() => {
+ message.destroy();
+ message.error(`添加失败`);
+ });
+
}
};
@@ -624,7 +538,7 @@ export default {
//更新任务列表
// 新增编辑或新增项目任务
const updateTask = (res) => {
- console.log("props.isLevel=====",props.isLevel);
+ console.log("props.isLevel=====", props.isLevel);
if (props.isLevel == 1) {
let editObj1 = {
chapterId: props.isactive,
@@ -637,7 +551,7 @@ export default {
RouterEditTask(editObj1)
.then(() => {
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
-
+
// state.addLoading = false;
closeDrawer();
})
@@ -657,8 +571,8 @@ export default {
// 新增编辑或新增项目
ProjectEditTask(editObj)
.then(() => {
- message.success( `${props.EditFaceId ? "编辑" : "新增"}阶段任务成功` );
-
+ message.success(`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功`);
+
})
.catch(() => {
//message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
@@ -669,14 +583,14 @@ export default {
courseId: res.data.data.offcoursePlanId,
name: res.data.data.name,
duration: res.data.data.duration,
- projectTemplateId:props.projectTemplateId,
+ projectTemplateId: props.projectTemplateId,
projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0,
type: 2,
})
.then(() => {
//message.success(`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功` );
-
+
})
.catch(() => {
//message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
@@ -792,6 +706,7 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
+
.addfaceteachDrawer {
.drawerMain {
.header {
@@ -801,6 +716,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
+
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -809,14 +725,17 @@ export default {
margin-left: 24px;
}
}
+
.contentMain {
display: flex;
justify-content: space-between;
+
.main_left {
height: 1080px;
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
+
.main_item {
display: flex;
align-items: center;
@@ -909,14 +828,14 @@ export default {
.xkbtn {
cursor: pointer;
- width: 130px;
+ width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
border: 0;
margin-right: 16px 8px 32px 0;
color: #fff;
-
+
}
}
}
@@ -930,16 +849,19 @@ export default {
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
+
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
}
+
.btnbox {
display: flex;
flex: 1;
align-items: center;
+
.xkbtn {
cursor: pointer;
width: 130px;
@@ -954,6 +876,7 @@ export default {
}
}
}
+
.main_btns {
height: 72px;
width: 100%;
@@ -963,6 +886,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
+
.btn1 {
width: 100px;
height: 40px;
@@ -972,6 +896,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
+
.btn2 {
cursor: pointer;
width: 100px;
diff --git a/src/components/drawers/AddLive.vue b/src/components/drawers/AddLive.vue
index 851b7d88..39870031 100644
--- a/src/components/drawers/AddLive.vue
+++ b/src/components/drawers/AddLive.vue
@@ -33,7 +33,7 @@
@@ -45,7 +45,7 @@