|
@@ -174,6 +174,7 @@ import { getTeacherKeywordQuestionsByCode } from "@/api/question";
|
|
|
import { getTeacherKeywordQuestionsByDoc } from "@/api/question";
|
|
import { getTeacherKeywordQuestionsByDoc } from "@/api/question";
|
|
|
import { postDocAssignment } from "@/api/assignment";
|
|
import { postDocAssignment } from "@/api/assignment";
|
|
|
import { postCodeAssignment } from "@/api/assignment";
|
|
import { postCodeAssignment } from "@/api/assignment";
|
|
|
|
|
+import { postDLAssignment } from "@/api/dlwork";
|
|
|
import timeMixins from "@/mixins/time";
|
|
import timeMixins from "@/mixins/time";
|
|
|
import { required } from "vuelidate/lib/validators";
|
|
import { required } from "vuelidate/lib/validators";
|
|
|
import pathMixins from "@/mixins/path";
|
|
import pathMixins from "@/mixins/path";
|
|
@@ -192,9 +193,12 @@ export default {
|
|
|
if (this.assignType === 1) {
|
|
if (this.assignType === 1) {
|
|
|
this.createTitle = "文档";
|
|
this.createTitle = "文档";
|
|
|
this.postParam = "DOCUMENT";
|
|
this.postParam = "DOCUMENT";
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else if (this.assignType === 0) {
|
|
|
this.createTitle = "代码";
|
|
this.createTitle = "代码";
|
|
|
this.postParam = "CODE";
|
|
this.postParam = "CODE";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.createTitle = "机器学习";
|
|
|
|
|
+ this.postParam = "ML";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -313,9 +317,12 @@ export default {
|
|
|
if (this.assignType === 1) {
|
|
if (this.assignType === 1) {
|
|
|
// 文档作业
|
|
// 文档作业
|
|
|
this.myPromise = postDocAssignment(param, this.courseId);
|
|
this.myPromise = postDocAssignment(param, this.courseId);
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else if (this.assignType === 0) {
|
|
|
// 代码作业
|
|
// 代码作业
|
|
|
this.myPromise = postCodeAssignment(param, this.courseId);
|
|
this.myPromise = postCodeAssignment(param, this.courseId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 机器学习作业
|
|
|
|
|
+ this.myPromise = postDLAssignment(param, this.courseId);
|
|
|
}
|
|
}
|
|
|
this.myPromise
|
|
this.myPromise
|
|
|
.then(res => {
|
|
.then(res => {
|