|
|
@@ -31,23 +31,23 @@
|
|
|
<div style="display: flex; margin-bottom: 0.5em">
|
|
|
<b-radio
|
|
|
name="dlType"
|
|
|
- value="0"
|
|
|
- v-model="$v.params.dlType"
|
|
|
+ native-value="0"
|
|
|
+ v-model="$v.params.dlType.$model"
|
|
|
style="flex: 1"
|
|
|
>
|
|
|
Tensorflow
|
|
|
</b-radio>
|
|
|
<b-radio
|
|
|
name="dlType"
|
|
|
- value="1"
|
|
|
- v-model="$v.params.dlType"
|
|
|
+ native-value="1"
|
|
|
+ v-model="$v.params.dlType.$model"
|
|
|
style="flex: 1"
|
|
|
>Pytorch
|
|
|
</b-radio>
|
|
|
<b-input
|
|
|
type="number"
|
|
|
placeholder="使用GPU数量"
|
|
|
- v-model="$v.params.numberOfGPU"
|
|
|
+ v-model="$v.params.numberOfGPU.$model"
|
|
|
></b-input>
|
|
|
</div>
|
|
|
|
|
|
@@ -201,6 +201,7 @@
|
|
|
<script>
|
|
|
import { getTeacherKeywordQuestionsByCode } from "@/api/question";
|
|
|
import { getTeacherKeywordQuestionsByDoc } from "@/api/question";
|
|
|
+import { getTeacherKeywordQuestionsByDL } from "@/api/question";
|
|
|
import { postDocAssignment } from "@/api/assignment";
|
|
|
import { postCodeAssignment } from "@/api/assignment";
|
|
|
import { postDLAssignment } from "@/api/dlwork";
|
|
|
@@ -299,8 +300,10 @@ export default {
|
|
|
let questionPromise = null;
|
|
|
if (this.assignType === 1) {
|
|
|
questionPromise = getTeacherKeywordQuestionsByDoc(content);
|
|
|
- } else {
|
|
|
+ } else if (this.assignType === 0) {
|
|
|
questionPromise = getTeacherKeywordQuestionsByCode(content);
|
|
|
+ } else {
|
|
|
+ questionPromise = getTeacherKeywordQuestionsByDL(content);
|
|
|
}
|
|
|
questionPromise.then(res => {
|
|
|
this.questions = res.data;
|
|
|
@@ -350,6 +353,7 @@ export default {
|
|
|
startAt: parseInt(this.params.startAt),
|
|
|
endAt: parseInt(this.params.endAt)
|
|
|
};
|
|
|
+ console.log("In CreateAssignment the dlType is ", this.params.dlType);
|
|
|
if (this.assignType === 1) {
|
|
|
// 文档作业
|
|
|
this.myPromise = postDocAssignment(param, this.courseId);
|