|
|
@@ -176,7 +176,7 @@ import { difficultyClass } from "@/data/questionDifficulty";
|
|
|
export default {
|
|
|
props: {
|
|
|
courseId: {
|
|
|
- type: String
|
|
|
+ type: Number
|
|
|
},
|
|
|
assignType: {
|
|
|
type: Number
|
|
|
@@ -206,9 +206,12 @@ export default {
|
|
|
problemName: "",
|
|
|
searchContent: "",
|
|
|
questions: [],
|
|
|
+
|
|
|
+ // 控制modal活动
|
|
|
isCreateModalActive: false,
|
|
|
isSearchModalActive: false,
|
|
|
isProblemListModalActive: false,
|
|
|
+
|
|
|
startAtConfig: {
|
|
|
...this.getDefaultConfig(),
|
|
|
minDate: "today",
|
|
|
@@ -222,6 +225,7 @@ export default {
|
|
|
errorMassage: null,
|
|
|
isServerError: false,
|
|
|
submitting: false,
|
|
|
+
|
|
|
// 转圈圈
|
|
|
loadingSearchQuestions: false,
|
|
|
loadingCreateAssignment: false
|
|
|
@@ -279,16 +283,10 @@ export default {
|
|
|
this.parseParams();
|
|
|
if (this.assignType === 1) {
|
|
|
// 文档作业
|
|
|
- this.myPromise = postDocAssignment(
|
|
|
- this.params,
|
|
|
- parseInt(this.courseId)
|
|
|
- );
|
|
|
+ this.myPromise = postDocAssignment(this.params, this.courseId);
|
|
|
} else {
|
|
|
// 代码作业
|
|
|
- this.myPromise = postCodeAssignment(
|
|
|
- this.params,
|
|
|
- parseInt(this.courseId)
|
|
|
- );
|
|
|
+ this.myPromise = postCodeAssignment(this.params, this.courseId);
|
|
|
}
|
|
|
this.myPromise.then(res => {
|
|
|
//创建成功
|