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

View File

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

View File

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

View File

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

View File

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