|
@@ -30,13 +30,13 @@
|
|
<table class="table table-tiny">
|
|
<table class="table table-tiny">
|
|
<tr>
|
|
<tr>
|
|
<td>课程编码</td>
|
|
<td>课程编码</td>
|
|
- <td>{{ baseInfo.courseCode }}</td>
|
|
|
|
|
|
+ <td>{{ commonInfo.courseCode }}</td>
|
|
<td>课程名称</td>
|
|
<td>课程名称</td>
|
|
- <td>{{ baseInfo.courseName }}</td>
|
|
|
|
|
|
+ <td>{{ commonInfo.courseName }}</td>
|
|
<td>课程类别</td>
|
|
<td>课程类别</td>
|
|
<td>
|
|
<td>
|
|
<el-input
|
|
<el-input
|
|
- v-model="baseInfo.courseType"
|
|
|
|
|
|
+ v-model="courseBasicInfo.courseType"
|
|
placeholder="请填写课程类别"
|
|
placeholder="请填写课程类别"
|
|
size="small"
|
|
size="small"
|
|
></el-input>
|
|
></el-input>
|
|
@@ -44,7 +44,7 @@
|
|
<td>学分</td>
|
|
<td>学分</td>
|
|
<td>
|
|
<td>
|
|
<el-input-number
|
|
<el-input-number
|
|
- v-model="baseInfo.stdScore"
|
|
|
|
|
|
+ v-model="courseBasicInfo.credit"
|
|
placeholder="请录入学分"
|
|
placeholder="请录入学分"
|
|
size="small"
|
|
size="small"
|
|
:min="0"
|
|
:min="0"
|
|
@@ -58,19 +58,19 @@
|
|
<td>考核方式</td>
|
|
<td>考核方式</td>
|
|
<td>
|
|
<td>
|
|
<el-input
|
|
<el-input
|
|
- v-model="baseInfo.examType"
|
|
|
|
|
|
+ v-model="courseBasicInfo.evaluationMode"
|
|
placeholder="请填写考核方式"
|
|
placeholder="请填写考核方式"
|
|
size="small"
|
|
size="small"
|
|
></el-input>
|
|
></el-input>
|
|
</td>
|
|
</td>
|
|
<td>开课时间</td>
|
|
<td>开课时间</td>
|
|
- <td>{{ baseInfo.courseStartTime }}</td>
|
|
|
|
|
|
+ <td>{{ courseBasicInfo.openTime }}</td>
|
|
<td>授课对象</td>
|
|
<td>授课对象</td>
|
|
- <td>{{ baseInfo.teachClazz }}</td>
|
|
|
|
|
|
+ <td>{{ courseBasicInfo.teachingObject }}</td>
|
|
<td>学时</td>
|
|
<td>学时</td>
|
|
<td>
|
|
<td>
|
|
<el-input-number
|
|
<el-input-number
|
|
- v-model="baseInfo.teachHours"
|
|
|
|
|
|
+ v-model="courseBasicInfo.period"
|
|
placeholder="请录入学时"
|
|
placeholder="请录入学时"
|
|
:min="0"
|
|
:min="0"
|
|
:max="999"
|
|
:max="999"
|
|
@@ -84,7 +84,7 @@
|
|
<td>选课人数</td>
|
|
<td>选课人数</td>
|
|
<td>
|
|
<td>
|
|
<el-input-number
|
|
<el-input-number
|
|
- v-model="baseInfo.studentCount"
|
|
|
|
|
|
+ v-model="courseBasicInfo.selectionCount"
|
|
placeholder="请录入选课人数"
|
|
placeholder="请录入选课人数"
|
|
:min="0"
|
|
:min="0"
|
|
:max="999"
|
|
:max="999"
|
|
@@ -94,11 +94,11 @@
|
|
></el-input-number>
|
|
></el-input-number>
|
|
</td>
|
|
</td>
|
|
<td>参评人数</td>
|
|
<td>参评人数</td>
|
|
- <td>{{ baseInfo.commentCount }}</td>
|
|
|
|
|
|
+ <td>{{ courseBasicInfo.participantCount }}</td>
|
|
<td>课程目标达成度期望值</td>
|
|
<td>课程目标达成度期望值</td>
|
|
<td colspan="3">
|
|
<td colspan="3">
|
|
<el-select
|
|
<el-select
|
|
- v-model="baseInfo.courseTarget"
|
|
|
|
|
|
+ v-model="courseBasicInfo.courseDegree"
|
|
size="small"
|
|
size="small"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
@@ -113,11 +113,11 @@
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>任课老师</td>
|
|
<td>任课老师</td>
|
|
- <td>{{ baseInfo.teachTeacher }}</td>
|
|
|
|
|
|
+ <td>{{ courseBasicInfo.teacher }}</td>
|
|
<td>评价负责人</td>
|
|
<td>评价负责人</td>
|
|
<td>
|
|
<td>
|
|
<el-input
|
|
<el-input
|
|
- v-model="baseInfo.commentManager"
|
|
|
|
|
|
+ v-model="courseBasicInfo.director"
|
|
placeholder="请填写评价负责人姓名"
|
|
placeholder="请填写评价负责人姓名"
|
|
size="small"
|
|
size="small"
|
|
></el-input>
|
|
></el-input>
|
|
@@ -125,7 +125,7 @@
|
|
<td>评价参与人</td>
|
|
<td>评价参与人</td>
|
|
<td colspan="3">
|
|
<td colspan="3">
|
|
<el-input
|
|
<el-input
|
|
- v-model="baseInfo.commentUsers"
|
|
|
|
|
|
+ v-model="courseBasicInfo.participant"
|
|
placeholder="请填写评价人姓名"
|
|
placeholder="请填写评价人姓名"
|
|
size="small"
|
|
size="small"
|
|
></el-input>
|
|
></el-input>
|
|
@@ -153,7 +153,7 @@
|
|
</h2>
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
<div class="part-box part-box-pad">
|
|
<div class="part-box part-box-pad">
|
|
- <el-table :data="distributionTable">
|
|
|
|
|
|
+ <el-table :data="questionInfoTable">
|
|
<el-table-column
|
|
<el-table-column
|
|
label="试题号"
|
|
label="试题号"
|
|
prop="name"
|
|
prop="name"
|
|
@@ -178,7 +178,7 @@
|
|
v-for="subNumber in struct.subNumbers"
|
|
v-for="subNumber in struct.subNumbers"
|
|
:key="subNumber"
|
|
:key="subNumber"
|
|
:label="subNumber"
|
|
:label="subNumber"
|
|
- :prop="`${struct.mainNumber}-${subNumber}`"
|
|
|
|
|
|
+ :prop="`${struct.mainNumber}_${subNumber}`"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -186,8 +186,8 @@
|
|
</el-table>
|
|
</el-table>
|
|
<div class="chart-box" style="height: 300px; margin-top: 20px">
|
|
<div class="chart-box" style="height: 300px; margin-top: 20px">
|
|
<v-chart
|
|
<v-chart
|
|
- v-if="scoreDistributionChartOption"
|
|
|
|
- :option="scoreDistributionChartOption"
|
|
|
|
|
|
+ v-if="questionInfoChartOption"
|
|
|
|
+ :option="questionInfoChartOption"
|
|
></v-chart>
|
|
></v-chart>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -230,27 +230,38 @@
|
|
</tr>
|
|
</tr>
|
|
|
|
|
|
<template v-for="item in courseTargetList">
|
|
<template v-for="item in courseTargetList">
|
|
- <tr v-for="(step, sind) in item.steps" :key="`${item.name}-${sind}`">
|
|
|
|
- <td v-if="!sind" :rowspan="item.steps.length" style="width: 240px">
|
|
|
|
- {{ item.name }}
|
|
|
|
|
|
+ <tr
|
|
|
|
+ v-for="(evaluation, eindex) in item.evaluationList"
|
|
|
|
+ :key="`${item.targetId}-${eindex}`"
|
|
|
|
+ >
|
|
|
|
+ <td
|
|
|
|
+ v-if="!eindex"
|
|
|
|
+ :rowspan="item.evaluationList.length"
|
|
|
|
+ style="width: 240px"
|
|
|
|
+ >
|
|
|
|
+ {{ item.targetName }}
|
|
</td>
|
|
</td>
|
|
- <td v-if="!sind" :rowspan="item.steps.length">
|
|
|
|
- <p v-for="item in item.indicator.split('\n')" :key="item">
|
|
|
|
- {{ item }}
|
|
|
|
|
|
+ <td v-if="!eindex" :rowspan="item.evaluationList.length">
|
|
|
|
+ <p v-for="edesc in item.evaluationDesc.split('\n')" :key="edesc">
|
|
|
|
+ {{ edesc }}
|
|
</p>
|
|
</p>
|
|
</td>
|
|
</td>
|
|
- <td style="width: 140px">{{ step.name }}</td>
|
|
|
|
- <td style="width: 80px">{{ step.rate }}</td>
|
|
|
|
- <td style="width: 100px">{{ step.score }}</td>
|
|
|
|
- <td style="width: 100px">{{ step.aveScore }}</td>
|
|
|
|
- <td v-if="!sind" :rowspan="item.steps.length" style="width: 140px">
|
|
|
|
- {{ item.getVal }}
|
|
|
|
|
|
+ <td style="width: 140px">{{ evaluation.name }}</td>
|
|
|
|
+ <td style="width: 80px">{{ evaluation.weight }}</td>
|
|
|
|
+ <td style="width: 100px">{{ evaluation.score }}</td>
|
|
|
|
+ <td style="width: 100px">{{ evaluation.avg }}</td>
|
|
|
|
+ <td
|
|
|
|
+ v-if="!eindex"
|
|
|
|
+ :rowspan="item.evaluationList.length"
|
|
|
|
+ style="width: 140px"
|
|
|
|
+ >
|
|
|
|
+ {{ item.evaluationValue }}
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</template>
|
|
</template>
|
|
<tr>
|
|
<tr>
|
|
<td colspan="6">课程总目标</td>
|
|
<td colspan="6">课程总目标</td>
|
|
- <td>{{ totalGetVal }}</td>
|
|
|
|
|
|
+ <td>{{ courseTargetValue }}</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
|
|
|
|
@@ -273,7 +284,7 @@
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="学号"
|
|
label="学号"
|
|
- prop="code"
|
|
|
|
|
|
+ prop="studentCode"
|
|
width="100"
|
|
width="100"
|
|
align="center"
|
|
align="center"
|
|
fixed="left"
|
|
fixed="left"
|
|
@@ -286,13 +297,13 @@
|
|
>
|
|
>
|
|
<el-table-column min-width="120" align="center">
|
|
<el-table-column min-width="120" align="center">
|
|
<template slot="header">
|
|
<template slot="header">
|
|
- {{ target.endExam }}({{ target.endRate }})
|
|
|
|
|
|
+ 期末考试({{ target.finalWeight }})
|
|
</template>
|
|
</template>
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-for="dimension in target.endDimensions"
|
|
|
|
- :key="`${target.name}${dimension}`"
|
|
|
|
|
|
+ v-for="dimension in target.finalDimensions"
|
|
|
|
+ :key="`${target.targetId}${dimension}`"
|
|
:label="dimension"
|
|
:label="dimension"
|
|
- :prop="`${target.name}-${target.endExam}-${dimension}`"
|
|
|
|
|
|
+ :prop="`${target.targetId}-final-${dimension}`"
|
|
min-width="60"
|
|
min-width="60"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
@@ -300,13 +311,13 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column min-width="120" align="center">
|
|
<el-table-column min-width="120" align="center">
|
|
<template slot="header">
|
|
<template slot="header">
|
|
- {{ target.normalExam }}({{ target.normalRate }})
|
|
|
|
|
|
+ 平时考试({{ target.usualWeight }})
|
|
</template>
|
|
</template>
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-for="work in target.normalWorks"
|
|
|
|
- :key="`${target.name}${work}`"
|
|
|
|
|
|
+ v-for="work in target.usualWorks"
|
|
|
|
+ :key="`${target.targetId}${work}`"
|
|
:label="work"
|
|
:label="work"
|
|
- :prop="`${target.name}-${target.normalExam}-${work}`"
|
|
|
|
|
|
+ :prop="`${target.targetId}-usual-${work}`"
|
|
min-width="60"
|
|
min-width="60"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
@@ -315,11 +326,18 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="学生成绩"
|
|
label="学生成绩"
|
|
- prop="totalScore"
|
|
|
|
|
|
+ prop="score"
|
|
align="center"
|
|
align="center"
|
|
width="100"
|
|
width="100"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+
|
|
|
|
+ <div class="chart-box" style="height: 400px; margin-top: 20px">
|
|
|
|
+ <v-chart
|
|
|
|
+ v-if="studentScoreChartOption"
|
|
|
|
+ :option="studentScoreChartOption"
|
|
|
|
+ ></v-chart>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div slot="footer"></div>
|
|
<div slot="footer"></div>
|
|
@@ -328,8 +346,9 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { reportData } from "./data";
|
|
import { reportData } from "./data";
|
|
-import { exportTargetReport } from "../api";
|
|
|
|
|
|
+import { targetReportDetail, exportTargetReport } from "../api";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
import { downloadByApi } from "@/plugins/download";
|
|
|
|
+import { calcSum } from "@/plugins/utils";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "target-report-detail",
|
|
name: "target-report-detail",
|
|
@@ -343,24 +362,27 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- modalIsShow: false,
|
|
|
|
- baseInfo: {},
|
|
|
|
- courseTargetList: [],
|
|
|
|
- totalGetVal: 0.67,
|
|
|
|
- distributionTable: [],
|
|
|
|
- scoreDistribution: [],
|
|
|
|
- studentScoreTable: [],
|
|
|
|
|
|
+ modalIsShow: true,
|
|
expectancyList: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
|
|
expectancyList: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
|
|
- scoreDistributionChartOption: null,
|
|
|
|
- courseTargetListChartOption: null,
|
|
|
|
|
|
+ commonInfo: {},
|
|
|
|
+ courseBasicInfo: {},
|
|
paperStructs: [],
|
|
paperStructs: [],
|
|
|
|
+ questionInfoTable: [],
|
|
|
|
+ courseTargetList: [],
|
|
|
|
+ courseTargetValue: 0.67,
|
|
|
|
+ questionInfoChartOption: null,
|
|
|
|
+ courseTargetListChartOption: null,
|
|
|
|
+
|
|
courseTargets: [],
|
|
courseTargets: [],
|
|
targetColumnCounts: [],
|
|
targetColumnCounts: [],
|
|
|
|
+ studentScoreTable: [],
|
|
|
|
+ studentScoreChartOption: null,
|
|
downloading: false,
|
|
downloading: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.initData();
|
|
|
|
|
|
+ // this.initData();
|
|
|
|
+ this.buildData(reportData);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
cancel() {
|
|
cancel() {
|
|
@@ -369,27 +391,46 @@ export default {
|
|
open() {
|
|
open() {
|
|
this.modalIsShow = true;
|
|
this.modalIsShow = true;
|
|
},
|
|
},
|
|
- initData() {
|
|
|
|
- this.baseInfo = reportData.baseInfo;
|
|
|
|
- this.courseTargetList = reportData.courseTargetList;
|
|
|
|
- this.scoreDistribution = reportData.scoreDistribution;
|
|
|
|
- this.parsePaperStructs(reportData.distributionList);
|
|
|
|
- this.parseDistributionTable(reportData.distributionList);
|
|
|
|
|
|
+ buildData(data) {
|
|
|
|
+ this.commonInfo = data.commonInfo;
|
|
|
|
+ this.courseBasicInfo = data.courseBasicInfo;
|
|
|
|
|
|
- this.parseCourseTargets(reportData.studentScores);
|
|
|
|
- this.parseStudentScoreTable(reportData.studentScores);
|
|
|
|
|
|
+ this.courseTargetValue = data.courseEvaluationResult.targetValue;
|
|
|
|
+ this.courseTargetList = data.courseEvaluationResult.targetList;
|
|
|
|
|
|
- this.scoreDistributionChartOption =
|
|
|
|
- this.getScoreDistributionChartOption();
|
|
|
|
|
|
+ const {
|
|
|
|
+ courseEvaluationSpread: { questionInfo, scoreList },
|
|
|
|
+ } = data;
|
|
|
|
+ this.parsePaperStructs(questionInfo);
|
|
|
|
+ this.parseQuestionInfoTable(questionInfo);
|
|
|
|
+ this.questionInfoChartOption = this.getQuestionInfoChartOption(scoreList);
|
|
this.courseTargetListChartOption = this.getCourseTargetListChartOption();
|
|
this.courseTargetListChartOption = this.getCourseTargetListChartOption();
|
|
|
|
+
|
|
|
|
+ const {
|
|
|
|
+ courseEvaluationResultDetail: {
|
|
|
|
+ examStudentList,
|
|
|
|
+ courseTargetList: examStudentTargets,
|
|
|
|
+ },
|
|
|
|
+ } = data;
|
|
|
|
+
|
|
|
|
+ this.parseCourseTargets(examStudentList);
|
|
|
|
+ this.parseStudentScoreTable(examStudentList);
|
|
|
|
+ this.studentScoreChartOption =
|
|
|
|
+ this.parseStudentScoreChartOption(examStudentTargets);
|
|
|
|
+ },
|
|
|
|
+ async initData() {
|
|
|
|
+ const data = await targetReportDetail({
|
|
|
|
+ examId: this.course.examId,
|
|
|
|
+ courseCode: this.course.courseCode,
|
|
|
|
+ paperNumber: this.course.paperNumber,
|
|
|
|
+ });
|
|
|
|
+ this.buildData(data);
|
|
},
|
|
},
|
|
- parsePaperStructs(distributionList) {
|
|
|
|
- if (!distributionList || !distributionList.length) return;
|
|
|
|
|
|
+ parsePaperStructs(questionInfo) {
|
|
|
|
+ if (!questionInfo || !questionInfo.length) return;
|
|
|
|
|
|
- const scores = distributionList[0].scores;
|
|
|
|
const structMap = {};
|
|
const structMap = {};
|
|
-
|
|
|
|
- scores.forEach((item) => {
|
|
|
|
|
|
+ questionInfo.forEach((item) => {
|
|
if (!structMap[item.mainNumber]) {
|
|
if (!structMap[item.mainNumber]) {
|
|
structMap[item.mainNumber] = [];
|
|
structMap[item.mainNumber] = [];
|
|
}
|
|
}
|
|
@@ -402,123 +443,47 @@ export default {
|
|
};
|
|
};
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- parseDistributionTable(distributionList) {
|
|
|
|
- this.distributionTable = distributionList.map((item) => {
|
|
|
|
- const data = {
|
|
|
|
- name: item.name,
|
|
|
|
- totalScore: item.totalScore,
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- item.scores.forEach((elem) => {
|
|
|
|
- data[`${elem.mainNumber}-${elem.subNumber}`] = elem.score;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- return data;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- parseCourseTargets(studentScores) {
|
|
|
|
- if (!studentScores || !studentScores.length) return;
|
|
|
|
|
|
+ parseQuestionInfoTable(questionInfo) {
|
|
|
|
+ const targetMap = {};
|
|
|
|
+ const tData = {
|
|
|
|
+ name: "目标分值",
|
|
|
|
+ totalScore: calcSum(questionInfo.map((item) => item.score || 0)),
|
|
|
|
+ };
|
|
|
|
+ questionInfo.forEach((question) => {
|
|
|
|
+ const qno = `${question.mainNumber}_${question.subNumber}`;
|
|
|
|
+ tData[qno] = question.score;
|
|
|
|
|
|
- const targets = studentScores[0].courseTargets;
|
|
|
|
|
|
+ question.targetList.forEach((target) => {
|
|
|
|
+ if (!targetMap[target.targetId]) {
|
|
|
|
+ targetMap[target.targetId] = {
|
|
|
|
+ name: target.targetName,
|
|
|
|
+ totalScore: 0,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
|
|
- let tColumnCounts = [];
|
|
|
|
- this.courseTargets = targets.map((target) => {
|
|
|
|
- const ntarget = { ...target };
|
|
|
|
- ntarget.endDimensions = target.endDimensions.map((item) => item.name);
|
|
|
|
- ntarget.normalWorks = target.normalWorks.map((item) => item.name);
|
|
|
|
- tColumnCounts.push(
|
|
|
|
- ntarget.endDimensions.length + ntarget.normalWorks.length
|
|
|
|
- );
|
|
|
|
- return ntarget;
|
|
|
|
|
|
+ if (target.dimensionList.length) {
|
|
|
|
+ targetMap[target.targetId][qno] = question.score;
|
|
|
|
+ targetMap[target.targetId].totalScore += question.score;
|
|
|
|
+ } else {
|
|
|
|
+ targetMap[target.targetId][qno] = "";
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
- let tCount = 0;
|
|
|
|
- this.targetColumnCounts = tColumnCounts.map((item) => {
|
|
|
|
- tCount += item;
|
|
|
|
- return tCount;
|
|
|
|
- });
|
|
|
|
|
|
+ this.questionInfoTable = [tData, ...Object.values(targetMap)];
|
|
},
|
|
},
|
|
- parseStudentScoreTable(studentScores) {
|
|
|
|
- const studentScoreTable = studentScores.map((student) => {
|
|
|
|
- const nitem = {
|
|
|
|
- name: student.name,
|
|
|
|
- code: student.code,
|
|
|
|
- totalScore: student.totalScore,
|
|
|
|
|
|
+ getQuestionInfoChartOption(scoreList) {
|
|
|
|
+ const scoreRange = scoreList.scoreRange.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ name: `${item.minScore}~${item.maxScore}`,
|
|
|
|
+ value: item.studentCount,
|
|
};
|
|
};
|
|
-
|
|
|
|
- student.courseTargets.forEach((target) => {
|
|
|
|
- target.endDimensions.forEach((dimension) => {
|
|
|
|
- nitem[`${target.name}-${target.endExam}-${dimension.name}`] =
|
|
|
|
- dimension.score;
|
|
|
|
- });
|
|
|
|
- target.normalWorks.forEach((work) => {
|
|
|
|
- nitem[`${target.name}-${target.normalExam}-${work.name}`] =
|
|
|
|
- work.score;
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- return nitem;
|
|
|
|
});
|
|
});
|
|
-
|
|
|
|
- let targetData = {
|
|
|
|
- name: "课程目标达成度",
|
|
|
|
- totalScore: "",
|
|
|
|
- };
|
|
|
|
- this.courseTargets.forEach((target) => {
|
|
|
|
- targetData[
|
|
|
|
- `${target.name}-${target.endExam}-${target.endDimensions[0]}`
|
|
|
|
- ] = target.getVal;
|
|
|
|
|
|
+ scoreRange.unshift({
|
|
|
|
+ name: "不及格",
|
|
|
|
+ value: scoreList.failRate,
|
|
});
|
|
});
|
|
- studentScoreTable.push(targetData);
|
|
|
|
|
|
|
|
- const fTarget = this.courseTargets[0];
|
|
|
|
- studentScoreTable.push({
|
|
|
|
- name: "课程达成度",
|
|
|
|
- [`${fTarget.name}-${fTarget.endExam}-${fTarget.endDimensions[0]}`]:
|
|
|
|
- this.totalGetVal,
|
|
|
|
- });
|
|
|
|
- this.studentScoreTable = studentScoreTable;
|
|
|
|
- },
|
|
|
|
- studentScoreSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
- const lineCount = this.studentScoreTable.length - 1;
|
|
|
|
- const maxTargetColumnCount = this.targetColumnCounts.slice(-1)[0];
|
|
|
|
- if (rowIndex === lineCount) {
|
|
|
|
- if (columnIndex === 0) {
|
|
|
|
- return [1, 2];
|
|
|
|
- } else if (columnIndex === 2) {
|
|
|
|
- return [1, maxTargetColumnCount + 1];
|
|
|
|
- } else {
|
|
|
|
- return [0, 0];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (rowIndex === lineCount - 1) {
|
|
|
|
- const colsMap = {};
|
|
|
|
- const targetColumns = [0, ...this.targetColumnCounts.slice(0, -1)];
|
|
|
|
- targetColumns.map((item, index) => {
|
|
|
|
- colsMap[item] = this.targetColumnCounts[index] - item;
|
|
|
|
- });
|
|
|
|
- if (columnIndex === 0) {
|
|
|
|
- return [1, 2];
|
|
|
|
- } else {
|
|
|
|
- if (targetColumns.includes(columnIndex - 2)) {
|
|
|
|
- return [1, colsMap[columnIndex - 2]];
|
|
|
|
- } else if (columnIndex < maxTargetColumnCount + 2) {
|
|
|
|
- return [0, 0];
|
|
|
|
- } else {
|
|
|
|
- return [1, 1];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (rowIndex === lineCount - 2) {
|
|
|
|
- if (columnIndex === 0) {
|
|
|
|
- return [1, 2];
|
|
|
|
- } else if (columnIndex === 1) {
|
|
|
|
- return [0, 0];
|
|
|
|
- } else {
|
|
|
|
- return [1, 1];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- getScoreDistributionChartOption() {
|
|
|
|
let options = {
|
|
let options = {
|
|
color: ["#556dff", "#3A5AE5"],
|
|
color: ["#556dff", "#3A5AE5"],
|
|
title: {
|
|
title: {
|
|
@@ -538,7 +503,7 @@ export default {
|
|
nameTextStyle: {
|
|
nameTextStyle: {
|
|
color: "#363D59",
|
|
color: "#363D59",
|
|
},
|
|
},
|
|
- data: this.scoreDistribution.map((item) => item.name),
|
|
|
|
|
|
+ data: scoreRange.map((item) => item.name),
|
|
axisLabel: {
|
|
axisLabel: {
|
|
color: "#6F7482",
|
|
color: "#6F7482",
|
|
interval: 0,
|
|
interval: 0,
|
|
@@ -586,7 +551,7 @@ export default {
|
|
name: "占比",
|
|
name: "占比",
|
|
type: "bar",
|
|
type: "bar",
|
|
barWidth: 60,
|
|
barWidth: 60,
|
|
- data: this.scoreDistribution.map((item) => item.val),
|
|
|
|
|
|
+ data: scoreRange.map((item) => item.value),
|
|
label: {
|
|
label: {
|
|
show: true,
|
|
show: true,
|
|
formatter: "{c}%",
|
|
formatter: "{c}%",
|
|
@@ -625,7 +590,7 @@ export default {
|
|
nameTextStyle: {
|
|
nameTextStyle: {
|
|
color: "#363D59",
|
|
color: "#363D59",
|
|
},
|
|
},
|
|
- data: this.courseTargetList.map((item) => item.name),
|
|
|
|
|
|
+ data: this.courseTargetList.map((item) => item.targetName),
|
|
axisLabel: {
|
|
axisLabel: {
|
|
color: "#6F7482",
|
|
color: "#6F7482",
|
|
interval: 0,
|
|
interval: 0,
|
|
@@ -676,7 +641,7 @@ export default {
|
|
name: "达成值",
|
|
name: "达成值",
|
|
type: "bar",
|
|
type: "bar",
|
|
barWidth: 60,
|
|
barWidth: 60,
|
|
- data: this.courseTargetList.map((item) => item.getVal),
|
|
|
|
|
|
+ data: this.courseTargetList.map((item) => item.evaluationValue),
|
|
label: {
|
|
label: {
|
|
show: true,
|
|
show: true,
|
|
position: "top",
|
|
position: "top",
|
|
@@ -686,7 +651,208 @@ export default {
|
|
name: "期望值",
|
|
name: "期望值",
|
|
type: "line",
|
|
type: "line",
|
|
symbol: "none",
|
|
symbol: "none",
|
|
- data: this.courseTargetList.map((item) => this.totalGetVal),
|
|
|
|
|
|
+ data: this.courseTargetList.map((item) => this.courseTargetValue),
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ return options;
|
|
|
|
+ },
|
|
|
|
+ parseCourseTargets(examStudentList) {
|
|
|
|
+ if (!examStudentList || !examStudentList.length) return;
|
|
|
|
+
|
|
|
|
+ const targetList = examStudentList[0].targetList;
|
|
|
|
+
|
|
|
|
+ let tColumnCounts = [];
|
|
|
|
+ this.courseTargets = targetList.map((target) => {
|
|
|
|
+ const ntarget = {
|
|
|
|
+ targetId: target.targetId,
|
|
|
|
+ targetName: target.targetName,
|
|
|
|
+ finalWeight: target.finalScore.weight,
|
|
|
|
+ usualWeight: target.usualScore.weight,
|
|
|
|
+ evaluationValue: target.evaluationValue,
|
|
|
|
+ };
|
|
|
|
+ ntarget.finalDimensions = target.finalScore.dimensionList.map(
|
|
|
|
+ (item) => item.dimensionCode
|
|
|
|
+ );
|
|
|
|
+ ntarget.usualWorks = target.usualScore.scoreList.map(
|
|
|
|
+ (item) => item.name
|
|
|
|
+ );
|
|
|
|
+ tColumnCounts.push(
|
|
|
|
+ ntarget.finalDimensions.length + ntarget.usualWorks.length
|
|
|
|
+ );
|
|
|
|
+ return ntarget;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ let tCount = 0;
|
|
|
|
+ this.targetColumnCounts = tColumnCounts.map((item) => {
|
|
|
|
+ tCount += item;
|
|
|
|
+ return tCount;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ parseStudentScoreTable(examStudentList) {
|
|
|
|
+ const studentScoreTable = examStudentList.map((student) => {
|
|
|
|
+ const nitem = {
|
|
|
|
+ name: student.name,
|
|
|
|
+ studentCode: student.studentCode,
|
|
|
|
+ score: student.score,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ student.targetList.forEach((target) => {
|
|
|
|
+ target.finalScore.dimensionList.forEach((dimension) => {
|
|
|
|
+ nitem[`${target.targetId}-final-${dimension.dimensionCode}`] =
|
|
|
|
+ dimension.dimensionScore;
|
|
|
|
+ });
|
|
|
|
+ target.usualScore.scoreList.forEach((work) => {
|
|
|
|
+ nitem[`${target.targetId}-usual-${work.name}`] = work.score;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ return nitem;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const targetData = {
|
|
|
|
+ name: "课程目标达成度",
|
|
|
|
+ score: "",
|
|
|
|
+ };
|
|
|
|
+ this.courseTargets.forEach((target) => {
|
|
|
|
+ targetData[`${target.targetId}-final-${target.finalDimensions[0]}`] =
|
|
|
|
+ target.evaluationValue;
|
|
|
|
+ });
|
|
|
|
+ studentScoreTable.push(targetData);
|
|
|
|
+
|
|
|
|
+ const fTarget = this.courseTargets[0];
|
|
|
|
+ studentScoreTable.push({
|
|
|
|
+ name: "课程达成度",
|
|
|
|
+ [`${fTarget.targetId}-final-${fTarget.finalDimensions[0]}`]:
|
|
|
|
+ this.courseTargetValue,
|
|
|
|
+ });
|
|
|
|
+ this.studentScoreTable = studentScoreTable;
|
|
|
|
+ },
|
|
|
|
+ studentScoreSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
+ const lineCount = this.studentScoreTable.length - 1;
|
|
|
|
+ const maxTargetColumnCount = this.targetColumnCounts.slice(-1)[0];
|
|
|
|
+ if (rowIndex === lineCount) {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ return [1, 2];
|
|
|
|
+ } else if (columnIndex === 2) {
|
|
|
|
+ return [1, maxTargetColumnCount + 1];
|
|
|
|
+ } else {
|
|
|
|
+ return [0, 0];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (rowIndex === lineCount - 1) {
|
|
|
|
+ const colsMap = {};
|
|
|
|
+ const targetColumns = [0, ...this.targetColumnCounts.slice(0, -1)];
|
|
|
|
+ targetColumns.map((item, index) => {
|
|
|
|
+ colsMap[item] = this.targetColumnCounts[index] - item;
|
|
|
|
+ });
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ return [1, 2];
|
|
|
|
+ } else {
|
|
|
|
+ if (targetColumns.includes(columnIndex - 2)) {
|
|
|
|
+ return [1, colsMap[columnIndex - 2]];
|
|
|
|
+ } else if (columnIndex < maxTargetColumnCount + 2) {
|
|
|
|
+ return [0, 0];
|
|
|
|
+ } else {
|
|
|
|
+ return [1, 1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (rowIndex === lineCount - 2) {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ return [1, 2];
|
|
|
|
+ } else if (columnIndex === 1) {
|
|
|
|
+ return [0, 0];
|
|
|
|
+ } else {
|
|
|
|
+ return [1, 1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ parseStudentScoreChartOption(examStudentTargets) {
|
|
|
|
+ let options = {
|
|
|
|
+ color: ["#556dff", "#f59a23"],
|
|
|
|
+ title: {
|
|
|
|
+ text: "课程目标达成评价值",
|
|
|
|
+ left: "center",
|
|
|
|
+ },
|
|
|
|
+ grid: {
|
|
|
|
+ left: 40,
|
|
|
|
+ top: 40,
|
|
|
|
+ right: 80,
|
|
|
|
+ bottom: 30,
|
|
|
|
+ containLabel: true,
|
|
|
|
+ },
|
|
|
|
+ legend: {
|
|
|
|
+ top: 0,
|
|
|
|
+ data: ["平时成绩", "期末成绩"],
|
|
|
|
+ itemWidth: 12,
|
|
|
|
+ itemHeight: 4,
|
|
|
|
+ itemGap: 22,
|
|
|
|
+ right: 40,
|
|
|
|
+ },
|
|
|
|
+ xAxis: {
|
|
|
|
+ type: "category",
|
|
|
|
+ name: "课程目标",
|
|
|
|
+ nameTextStyle: {
|
|
|
|
+ color: "#363D59",
|
|
|
|
+ },
|
|
|
|
+ data: examStudentTargets.map((item) => item.targetName),
|
|
|
|
+ axisLabel: {
|
|
|
|
+ color: "#6F7482",
|
|
|
|
+ interval: 0,
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ margin: 12,
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ show: true,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: "#EFF0F5",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ splitLine: {
|
|
|
|
+ show: false,
|
|
|
|
+ },
|
|
|
|
+ axisTick: {
|
|
|
|
+ show: false,
|
|
|
|
+ },
|
|
|
|
+ axisPointer: {
|
|
|
|
+ type: "shadow",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ yAxis: {
|
|
|
|
+ type: "value",
|
|
|
|
+ name: "期望值",
|
|
|
|
+ min: 0,
|
|
|
|
+ max: 1,
|
|
|
|
+ interval: 0.1,
|
|
|
|
+ nameTextStyle: {
|
|
|
|
+ color: "#363D59",
|
|
|
|
+ },
|
|
|
|
+ axisLabel: {
|
|
|
|
+ color: "#6F7482",
|
|
|
|
+ },
|
|
|
|
+ axisLine: {
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: "#EFF0F5",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ splitLine: {
|
|
|
|
+ lineStyle: {
|
|
|
|
+ color: "#EFF0F5",
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ series: [
|
|
|
|
+ {
|
|
|
|
+ name: "平时成绩",
|
|
|
|
+ type: "bar",
|
|
|
|
+ barWidth: 40,
|
|
|
|
+ data: examStudentTargets.map((item) => item.usualScore),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "期末成绩",
|
|
|
|
+ type: "bar",
|
|
|
|
+ barWidth: 40,
|
|
|
|
+ data: examStudentTargets.map((item) => item.finalScore),
|
|
},
|
|
},
|
|
],
|
|
],
|
|
};
|
|
};
|