|
|
@@ -32,11 +32,17 @@
|
|
|
<b-table-column label="学生姓名" width="120" centered>
|
|
|
{{ props.row.student }}
|
|
|
</b-table-column>
|
|
|
- <b-table-column label="文档作业" centered> 80 </b-table-column>
|
|
|
+ <b-table-column label="文档作业" centered sortable>
|
|
|
+ 80
|
|
|
+ </b-table-column>
|
|
|
|
|
|
- <b-table-column label="代码作业" centered> 90 </b-table-column>
|
|
|
+ <b-table-column label="代码作业" centered sortable>
|
|
|
+ 90
|
|
|
+ </b-table-column>
|
|
|
|
|
|
- <b-table-column label="互评作业" centered> 100 </b-table-column>
|
|
|
+ <b-table-column label="互评作业" centered sortable>
|
|
|
+ 100
|
|
|
+ </b-table-column>
|
|
|
<b-table-column
|
|
|
field="finalResult"
|
|
|
label="总评"
|
|
|
@@ -105,34 +111,58 @@
|
|
|
<div class="homework-item">
|
|
|
<label>文档作业</label>
|
|
|
<div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
+ <b-field position="is-centered">
|
|
|
+ <b-input placeholder="第一次作业百分比"> </b-input>
|
|
|
+ <p class="control">
|
|
|
+ <button class="button is-light">%</button>
|
|
|
+ </p>
|
|
|
+ </b-field>
|
|
|
</div>
|
|
|
<div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
+ <b-field position="is-centered">
|
|
|
+ <b-input placeholder="第二次作业百分比"> </b-input>
|
|
|
+ <p class="control">
|
|
|
+ <button class="button is-light">%</button>
|
|
|
+ </p>
|
|
|
+ </b-field>
|
|
|
</div>
|
|
|
<div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
+ <b-field
|
|
|
+ :type="$v.percent.$error ? 'is-danger' : ''"
|
|
|
+ :message="$v.percent.$error ? '请填写1-100之间的数字' : ''"
|
|
|
+ position="is-centered"
|
|
|
+ >
|
|
|
+ <b-input
|
|
|
+ v-model="$v.percent.$model"
|
|
|
+ placeholder="第三次作业百分比"
|
|
|
+ >
|
|
|
+ </b-input>
|
|
|
+ <p class="control">
|
|
|
+ <button class="button is-light">%</button>
|
|
|
+ </p>
|
|
|
+ </b-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="homework-item">
|
|
|
<label>互评作业</label>
|
|
|
<div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
- </div>
|
|
|
- <div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
+ <b-field position="is-centered">
|
|
|
+ <b-input placeholder="第一次作业百分比"> </b-input>
|
|
|
+ <p class="control">
|
|
|
+ <button class="button is-light">%</button>
|
|
|
+ </p>
|
|
|
+ </b-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="homework-item">
|
|
|
<label>代码作业</label>
|
|
|
<div class="homework-percent">
|
|
|
- <span>第一次作业</span>
|
|
|
- <b-input></b-input>
|
|
|
+ <b-field position="is-centered">
|
|
|
+ <b-input placeholder="第一次作业百分比"> </b-input>
|
|
|
+ <p class="control">
|
|
|
+ <button class="button is-light">%</button>
|
|
|
+ </p>
|
|
|
+ </b-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -150,6 +180,7 @@ import PageHeader from "@/components/PageHeader";
|
|
|
import PageBody from "@/components/PageBody/index";
|
|
|
import Chart from "chart.js";
|
|
|
import BInput from "buefy/src/components/input/Input";
|
|
|
+import { required, numeric, between } from "vuelidate/lib/validators";
|
|
|
|
|
|
const data = [
|
|
|
{
|
|
|
@@ -325,6 +356,13 @@ export default {
|
|
|
PageHeader,
|
|
|
PageBody
|
|
|
},
|
|
|
+ validations: {
|
|
|
+ percent: {
|
|
|
+ required,
|
|
|
+ numeric,
|
|
|
+ between: between(0, 100)
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
course: state => state.course.currentCourse
|
|
|
@@ -341,7 +379,8 @@ export default {
|
|
|
],
|
|
|
data,
|
|
|
isCardModalActive: false,
|
|
|
- myChart2: {}
|
|
|
+ myChart2: {},
|
|
|
+ percent: ""
|
|
|
};
|
|
|
},
|
|
|
methods: {
|