Merge remote-tracking branch 'origin/master'

This commit is contained in:
yujicun
2023-01-19 09:10:51 +08:00
5 changed files with 47 additions and 26 deletions

View File

@@ -335,6 +335,7 @@
v-model:addtestVisible="addtestvisible"
v-model:EditTestId="EditTestId"
v-model:testName="testName"
v-model:offCourseId="offCourseId"
:faceLevel="true"
/>
</div>
@@ -498,6 +499,7 @@ export default {
assessmentName: null,
isClick: false,
attach:"",
offCourseId:props.EditFaceId,
});
const clear = () => {
@@ -586,6 +588,7 @@ export default {
const queryFaceTeach = () => {
queryFaceDetailById(props.EditFaceId).then((res) => {
console.log("获取到了面授课开课详情", res.data.data);
state.offCourseId = props.EditFaceId;
let result = res.data.data;
state.courseName = result.name;
state.description = result.description;

View File

@@ -309,8 +309,8 @@ import {message} from "ant-design-vue";
import {
createExamination,
queryExaminationDetailById,
updateExamination,
} from "@/api/indexExam";
// updateExamination,
import STest from "./SelectTest.vue";
import {ProjectEditTask, RouterEditTask} from "@/api/indexTask";
import {addTempTask} from "../../api/indexTaskadd";
@@ -379,6 +379,10 @@ export default {
type: String,
default: null,
},
offCourseId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const state = reactive({
@@ -456,7 +460,7 @@ export default {
console.log("props", props);
if (props.addtestVisible && props.EditTestId && props.EditTestId >0) {
// 该页面显示同时 edit为true 时,发送查询请求,
queryTest();
// queryTest();
}
if (bool) {
state.test.showAnswers = 1;
@@ -541,30 +545,39 @@ export default {
state.test.targetId = 0;
state.test.type = 0;
state.test.chapterId=0;
if(props.isLevel == 1){
state.test.targetId = props.routerId;
state.test.chapterId = props.isactive;
state.test.type = 2;
} else if (props.isLevel == 2) {
state.test.targetId = props.projectId;
state.test.type = 1;
}
console.log("props.offCourseId",props.offCourseId);
if (props.faceLevel && props.offCourseId > 0) {
state.test.targetId = props.offCourseId;
state.test.type = 3;
}else{
if(props.isLevel == 1){
state.test.targetId = props.routerId;
state.test.chapterId = props.isactive;
state.test.type = 2;
if (props.EditTestId > 0) {
// 编辑任务
updateExamination(state.test)
.then(async (res) => {
await updateTask(res);
// closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
} else {
} else if (props.isLevel == 2) {
state.test.targetId = props.projectId;
state.test.type = 1;
}
}
// if (props.EditTestId > 0) {
// // 编辑任务
// updateExamination(state.test)
// .then(async (res) => {
// await updateTask(res);
// // closeDrawer();
// })
// .catch(() => {
// message.destroy();
// message.error(`编辑失败`);
// });
// } else {
// 创建任务
createExamination(state.test)
.then(async (res) => {
@@ -575,7 +588,7 @@ export default {
message.destroy();
message.error(`创建失败`);
});
}
// }
};
const updateTask = (res) => {
state.EditTestId = res.data.data.examinationId;

View File

@@ -286,6 +286,10 @@ export default {
console.log("props.getStudent", props.getStudent);
clearInterval(timer);
}
}else{
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}
})
.catch((err) => {

View File

@@ -388,7 +388,7 @@ export default {
"targetId":props.datasource.projectId,
"taskId": props.datasource.courseId,
"thirdId": props.datasource.targetId,
"type": 1
"type": 2
});
{/* "chapterId": props.datasource.stageId=="0"?"":props.datasource.stageId, */}
api.QueryOnlineManagementDetail({
@@ -399,7 +399,7 @@ export default {
"targetId":props.datasource.projectId,
"taskId": props.datasource.courseId,
"thirdId": props.datasource.targetId,
"type": 1
"type": 2
}).then(res=>{
console.log('在线课数据获取', res)
if(res.data.code==200){

View File

@@ -465,7 +465,8 @@ const tablecolumns = ref([
width: "10%",
align: "center",
customRender: ({ record: { source } }) =>
({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
// ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
({ 1: "手动加入", 2: "手动加入", 3: "手动加入", 4: "报名" }[source]),
},
...props.columns,
{