|
|
@@ -108,6 +108,13 @@
|
|
|
成绩比例调控<small> 请按百分比填写</small>
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
+ <b-notification
|
|
|
+ class="notification-self"
|
|
|
+ type="is-danger"
|
|
|
+ :active.sync="isServerError"
|
|
|
+ >
|
|
|
+ {{ errorMassage }}
|
|
|
+ </b-notification>
|
|
|
<div class="homework-item">
|
|
|
<label>文档作业</label>
|
|
|
<div class="homework-percent">
|
|
|
@@ -166,7 +173,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <a class="button is-link" @click="isCardModalActive = false"
|
|
|
+ <a
|
|
|
+ :class="['button', 'is-link', { 'is-loading': submitting }]"
|
|
|
+ @click="confirmPercent"
|
|
|
>确认调整</a
|
|
|
>
|
|
|
</div>
|
|
|
@@ -175,7 +184,6 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapState } from "vuex";
|
|
|
-// import { getStudentCourseReviewList } from "@/api/review";
|
|
|
import PageHeader from "@/components/PageHeader";
|
|
|
import PageBody from "@/components/PageBody/index";
|
|
|
import Chart from "chart.js";
|
|
|
@@ -206,15 +214,14 @@ export default {
|
|
|
name: "",
|
|
|
courses: [],
|
|
|
review: [],
|
|
|
- questionType: [
|
|
|
- { id: 1, title: "文档作业题目" },
|
|
|
- { id: 2, title: "代码作业题目" }
|
|
|
- ],
|
|
|
data: [],
|
|
|
isCardModalActive: false,
|
|
|
myChart2: {},
|
|
|
percent: "",
|
|
|
- finalResultPercentage: [20, 20, 20, 10, 10, 10, 10]
|
|
|
+ finalResultPercentage: [20, 20, 20, 10, 10, 10, 10],
|
|
|
+ submitting: false,
|
|
|
+ isServerError: false,
|
|
|
+ errorMessage: "服务器错误,请稍后重试"
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -256,6 +263,13 @@ export default {
|
|
|
currentIndex++;
|
|
|
}
|
|
|
return parseInt(finalRes);
|
|
|
+ },
|
|
|
+ confirmPercent() {
|
|
|
+ this.submitting = true;
|
|
|
+ this.$toast.open({
|
|
|
+ message: "成绩比例调整成功",
|
|
|
+ type: "is-success"
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -265,17 +279,19 @@ export default {
|
|
|
this.data = res.data;
|
|
|
});
|
|
|
//绘制图表
|
|
|
- var resultChart = document.getElementById("result-chart");
|
|
|
- var myChart2 = new Chart(resultChart, {
|
|
|
+ let resultChart = document.getElementById("result-chart");
|
|
|
+ let myChart2 = new Chart(resultChart, {
|
|
|
type: "bar",
|
|
|
data: {
|
|
|
labels: [
|
|
|
- "0-30分段",
|
|
|
- "30-60分段",
|
|
|
- "60-70分段",
|
|
|
- "70-80分段",
|
|
|
- "80-90分段",
|
|
|
- "90-100分段"
|
|
|
+ "0分",
|
|
|
+ "1-29分",
|
|
|
+ "30-59分段",
|
|
|
+ "60-69分段",
|
|
|
+ "70-79分段",
|
|
|
+ "80-89分段",
|
|
|
+ "90-99分段",
|
|
|
+ "100分"
|
|
|
],
|
|
|
datasets: [
|
|
|
{
|
|
|
@@ -285,7 +301,7 @@ export default {
|
|
|
borderWidth: 1,
|
|
|
pointStrokeColor: "#fff",
|
|
|
pointStyle: "crossRot",
|
|
|
- data: [6, 10, 34, 50, 80, 30],
|
|
|
+ data: [2, 6, 10, 34, 50, 80, 30, 2],
|
|
|
cubicInterpolationMode: "monotone",
|
|
|
spanGaps: "false",
|
|
|
fill: "false"
|
|
|
@@ -303,12 +319,6 @@ export default {
|
|
|
/*color: #7957d5;*/
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
-/*.data-table {*/
|
|
|
-/*width: 100%;*/
|
|
|
-/*padding: 30px;*/
|
|
|
-/*!*min-height: 80vh;*!*/
|
|
|
-/*background-color: #ffffff;*/
|
|
|
-/*}*/
|
|
|
.chart {
|
|
|
margin-top: 1.5rem;
|
|
|
}
|