|
|
@@ -22,6 +22,33 @@
|
|
|
v-model="$v.params.name.$model"
|
|
|
></b-input>
|
|
|
</b-field>
|
|
|
+ <b-field
|
|
|
+ label="作业配置"
|
|
|
+ :type="$v.params.dltype.$error ? 'is-danger' : ''"
|
|
|
+ :message="$v.params.dltype.$error ? '请选择机器学习作业配置' : ''"
|
|
|
+ >
|
|
|
+ </b-field>
|
|
|
+ <div style="display: flex; margin-bottom: 0.5em">
|
|
|
+ <b-radio
|
|
|
+ name="dltype"
|
|
|
+ value="0"
|
|
|
+ v-model="$v.params.dltype"
|
|
|
+ style="flex: 1"
|
|
|
+ >
|
|
|
+ Tensorflow
|
|
|
+ </b-radio>
|
|
|
+ <b-radio
|
|
|
+ name="dltype"
|
|
|
+ value="1"
|
|
|
+ v-model="$v.params.dltype"
|
|
|
+ style="flex: 1"
|
|
|
+ >Pytorch
|
|
|
+ </b-radio>
|
|
|
+ <b-checkbox value="false" v-model="$v.params.useGPU"
|
|
|
+ >是否使用GPU</b-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+
|
|
|
<b-field
|
|
|
label="作业描述"
|
|
|
:type="$v.params.description.$error ? 'is-danger' : ''"
|
|
|
@@ -180,7 +207,13 @@ import { required } from "vuelidate/lib/validators";
|
|
|
import pathMixins from "@/mixins/path";
|
|
|
import { difficultyType } from "@/data/questionDifficulty";
|
|
|
import { difficultyClass } from "@/data/questionDifficulty";
|
|
|
+import BInput from "buefy/src/components/input/Input";
|
|
|
+import BField from "buefy/src/components/field/Field";
|
|
|
+import BRadio from "buefy/src/components/radio/Radio";
|
|
|
+import BCheckbox from "buefy/src/components/checkbox/Checkbox";
|
|
|
+
|
|
|
export default {
|
|
|
+ components: { BCheckbox, BRadio, BField, BInput },
|
|
|
props: {
|
|
|
courseId: {
|
|
|
type: Number
|
|
|
@@ -205,6 +238,8 @@ export default {
|
|
|
return {
|
|
|
params: {
|
|
|
name: null,
|
|
|
+ dltype: 0,
|
|
|
+ useGPU: false,
|
|
|
description: null,
|
|
|
startAt: null,
|
|
|
endAt: null,
|
|
|
@@ -372,6 +407,12 @@ export default {
|
|
|
name: {
|
|
|
required
|
|
|
},
|
|
|
+ dltype: {
|
|
|
+ required
|
|
|
+ },
|
|
|
+ useGPU: {
|
|
|
+ required
|
|
|
+ },
|
|
|
description: {
|
|
|
required
|
|
|
},
|
|
|
@@ -405,13 +446,16 @@ export default {
|
|
|
.card {
|
|
|
text-align: left;
|
|
|
padding: 30px;
|
|
|
+
|
|
|
.title {
|
|
|
font-size: 1.25rem;
|
|
|
+
|
|
|
small {
|
|
|
color: gray;
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.content {
|
|
|
a {
|
|
|
margin-top: 30px;
|
|
|
@@ -419,6 +463,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.description {
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|