mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
面授课bug
This commit is contained in:
@@ -134,10 +134,18 @@
|
||||
<span style="margin-right: 3px">面授时长:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 364px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="duration"
|
||||
style="width: 384px; height: 32px"
|
||||
/>
|
||||
></a-input-number>
|
||||
<span style="margin-left: 5px; width: 30px">分钟</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -172,31 +180,30 @@
|
||||
<div class="timerbox">
|
||||
<span>开始前:</span>
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="30"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 88px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
:v-model:value="beforeStartValue"
|
||||
></a-input-number>
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden; "
|
||||
v-model:value="before"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
<div class="timerbox">
|
||||
<span>开始后:</span>
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="30"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 88px;
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;"
|
||||
:value="afterStartValue"
|
||||
v-model:value="afterStartValue"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
@@ -233,7 +240,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-checkbox v-model:checked="innerPersion" @click="innerPersion=!innerPersion">允许项目内人员临时到场参加</a-checkbox>
|
||||
<a-checkbox v-model:checked="outPerson" @click="outPerson=!outPerson">允许项目外人员临时到场参加</a-checkbox>
|
||||
<a-checkbox v-model:checked="outPersion" @click="outPersion=!outPersion">允许项目外人员临时到场参加</a-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -348,7 +355,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";、
|
||||
@@ -432,8 +439,8 @@ export default {
|
||||
courseName: "",
|
||||
duration:null,
|
||||
address: null,
|
||||
beforeStartValue:20,
|
||||
afterStartValue:10,
|
||||
before:null,
|
||||
afterStartValue:null,
|
||||
description: "",
|
||||
chooseTime: [],
|
||||
fileList: [],
|
||||
@@ -443,7 +450,10 @@ export default {
|
||||
EditWorkId:null,
|
||||
assessmentVisible:false,
|
||||
needEval:false,
|
||||
|
||||
onlySign:false,
|
||||
completeLeave:false,
|
||||
innerPersion:false,
|
||||
outPersion:false,
|
||||
|
||||
});
|
||||
const clear = () => {
|
||||
@@ -451,21 +461,21 @@ export default {
|
||||
state.memberValue = null;
|
||||
state.duration = null;
|
||||
state.address = null;
|
||||
state.beforeStart = 0;
|
||||
state.afterStartValue =0;
|
||||
state.before=null;
|
||||
state.afterStartValue=null;
|
||||
state.chooseTime = [];
|
||||
state.description ="";
|
||||
state.onlySign =false;
|
||||
state.completeLeave =false;
|
||||
state.projectMember =false;
|
||||
state.noProjectMember =false;
|
||||
state.innerPersion =false;
|
||||
state.outPersion =false;
|
||||
state.chooseCourse = null;
|
||||
state.EditTestId =null;
|
||||
state.assessmentId=null;
|
||||
state.EditWorkId=null;
|
||||
state.EditEvalId=null;
|
||||
state.applyFlag="";
|
||||
console.log("state.afterStart",state.afterStartValue);
|
||||
state.needEval=false;
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addfaceteachVisible", false);
|
||||
@@ -512,7 +522,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;
|
||||
@@ -529,63 +539,67 @@ export default {
|
||||
state.chooseTime = [];
|
||||
}
|
||||
state.address = result.address;
|
||||
state.beforeStart = result.beforeStart;
|
||||
state.before =result.beforeStart;
|
||||
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.chooseCourse =result.offcourseId;
|
||||
state.projectMember = result.projectMember.split(",")[0]=="1"?true:false;
|
||||
state.noProjectMember = result.projectMember.split(",")[1]=="1"?true:false;
|
||||
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.needEval = result.evaluateId;
|
||||
|
||||
console.log("state=======",state);
|
||||
});
|
||||
};
|
||||
|
||||
//新建或编辑面授
|
||||
// 新增任务
|
||||
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 ||s
|
||||
state.chooseCourse == null ||
|
||||
state.memberValue == "" ||
|
||||
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 obj = {
|
||||
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.beforeStart,
|
||||
afterStart:state.afterStartValue || 0,
|
||||
beforeStart:state.before || 0,
|
||||
beginTime: parseInt( new Date(state.chooseTime[0].$d).getTime() / 1000),
|
||||
completeType: state.onlySign? "1,":"0," + state.completeLeave?"1":"0",
|
||||
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,
|
||||
homeWorkId: state.EditWorkId,
|
||||
name: state.courseName,
|
||||
projectMember:state.innerPersion?"1,":"0," + state.outPerson?"1":"0",
|
||||
projectMember:p.concat(p1),
|
||||
offcourseId:state.chooseCourse,
|
||||
offcoursePlanId:props.EditFaceId >0 ? props.EditFaceId : 0,
|
||||
testId: state.EditTestId
|
||||
};
|
||||
|
||||
console.log("obj============",obj,"6"+"9");
|
||||
|
||||
editPlan(obj)
|
||||
.then((res) => {
|
||||
console.log("更新任务s's");
|
||||
|
||||
Reference in New Issue
Block a user