|
|
@@ -74,6 +74,80 @@
|
|
|
展示每道试题的得分率图。得分率指实际得分/考核分的比值,换算成的百分数。可以用于分析每道试题的难易程度和质量,试题得分率高意味着试题难度低或者学生整体水平高;得分率低意味着试题难度较高或者考生整体水平较低。点击每道试题的柱或雷达图的题号可在下方查看该题每个班的得分率情况。
|
|
|
</template>
|
|
|
</ReportModule>
|
|
|
+ <ReportModule
|
|
|
+ :showTitle="true"
|
|
|
+ :titleList="[state.groupTitle, state.groupName]"
|
|
|
+ :showDescribe="true"
|
|
|
+ tableOrChart="chart"
|
|
|
+ :showPrintBtn="false"
|
|
|
+ :showExportBtn="false"
|
|
|
+ >
|
|
|
+ <template #title_right>
|
|
|
+ <EchartType
|
|
|
+ :chartTypeList="state.majorQuestionData.chartTypeList"
|
|
|
+ :current="state.majorQuestionData.chartType"
|
|
|
+ @ChangeEchartType="(val) => ChangeEchartType(val, 'majorQuestionData')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #module_table_chart>
|
|
|
+ <template v-if="state.majorQuestionData.data.length > 0">
|
|
|
+ <BarLineCharts
|
|
|
+ ref="majorQuestionCharts"
|
|
|
+ v-if="state.majorQuestionData.chartType == 'line_bar_chart'"
|
|
|
+ :legendList="state.majorQuestionData.legendList"
|
|
|
+ :showBarLegendIndex="state.majorQuestionData.showBarLegendIndex"
|
|
|
+ title="得分率"
|
|
|
+ :data="state.majorQuestionData.data"
|
|
|
+ @HandleChartClick="HandleQuestionChartClick"
|
|
|
+ @ChangeChartOrder="
|
|
|
+ (sortType, legendData, barIndex) =>
|
|
|
+ ChangeChartOrder(sortType, legendData, barIndex, 2)
|
|
|
+ "
|
|
|
+ >
|
|
|
+ </BarLineCharts>
|
|
|
+ <BarsCharts
|
|
|
+ ref="majorQuestionCharts"
|
|
|
+ :key="state.chartKey"
|
|
|
+ v-if="state.majorQuestionData.chartType == 'vertical_bar'"
|
|
|
+ :data="state.majorQuestionData.data"
|
|
|
+ :showSortSelectbox="true"
|
|
|
+ :legendList="state.majorQuestionData.legendList"
|
|
|
+ unit="%"
|
|
|
+ title="得分率"
|
|
|
+ :isClick="true"
|
|
|
+ @HandleChartClick="HandleQuestionChartClick"
|
|
|
+ @ChangeChartOrder="
|
|
|
+ (sortType, legendData, barIndex) =>
|
|
|
+ ChangeChartOrder(sortType, legendData, barIndex, 2)
|
|
|
+ "
|
|
|
+ ></BarsCharts>
|
|
|
+ <RadarCharts
|
|
|
+ v-if="state.majorQuestionData.chartType == 'radar_chart'"
|
|
|
+ :key="state.chartKey"
|
|
|
+ :data="state.majorQuestionData.data"
|
|
|
+ :legendList="state.majorQuestionData.legendList"
|
|
|
+ :showCheckBox="true"
|
|
|
+ :openShowAllLegend="true"
|
|
|
+ :isClick="true"
|
|
|
+ @HandleChartClick="HandleQuestionChartClick"
|
|
|
+ >
|
|
|
+ </RadarCharts>
|
|
|
+ </template>
|
|
|
+ <div
|
|
|
+ v-else
|
|
|
+ class="no_content_data"
|
|
|
+ v-loading="state.dataLoading"
|
|
|
+ :element-loading-text="state.loadingText"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ element-loading-background="#ffffff"
|
|
|
+ >
|
|
|
+ <span>暂无数据</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #module_describe>
|
|
|
+ 展示每道试题的得分率图。得分率指实际得分/考核分的比值,换算成的百分数。可以用于分析每道试题的难易程度和质量,试题得分率高意味着试题难度低或者学生整体水平高;得分率低意味着试题难度较高或者考生整体水平较低。点击每道试题的柱或雷达图的题号可在下方查看该题每个班的得分率情况。
|
|
|
+ </template>
|
|
|
+ </ReportModule>
|
|
|
<ReportModule
|
|
|
:showTitle="true"
|
|
|
:titleList="[state.groupTitle, state.questionTitle]"
|
|
|
@@ -230,8 +304,8 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template #module_qita>
|
|
|
- <div class="content_left card"></div>
|
|
|
- <div class="content_right card table_42">
|
|
|
+ <div class="content_left paper_card"></div>
|
|
|
+ <div class="content_right paper_card table_42">
|
|
|
<el-table
|
|
|
border
|
|
|
:data="state.majorAnswerData.tableData"
|
|
|
@@ -382,7 +456,7 @@ import ReportModule from "@/components/ReportModule.vue";
|
|
|
import EchartType from "@/components/EchartType.vue";
|
|
|
import { useAnalysisStore } from "@/store/analysis";
|
|
|
import {
|
|
|
- questionAnalysis,
|
|
|
+ questionGroupAnalysis,
|
|
|
queryAnswerListByAnswerAndScore,
|
|
|
} from "@/api/analysis";
|
|
|
import BarLineCharts from "@/components/echarts/barLineCharts.vue"; //柱状图折线图组合图组件
|
|
|
@@ -465,6 +539,20 @@ const state = reactive({
|
|
|
}, //小题分析数据
|
|
|
majorQuestionData: {
|
|
|
chartType: "line_bar_chart", //默认显示折线图柱状图line_bar_chart
|
|
|
+ chartTypeList: [
|
|
|
+ {
|
|
|
+ label: "组合图",
|
|
|
+ value: "line_bar_chart",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "柱状图",
|
|
|
+ value: "vertical_bar",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "雷达图",
|
|
|
+ value: "radar_chart",
|
|
|
+ },
|
|
|
+ ],
|
|
|
legendList: [],
|
|
|
defaultLegendList: [],
|
|
|
showBarLegendIndex: 1,
|
|
|
@@ -648,147 +736,165 @@ const state = reactive({
|
|
|
cardQuestionId: "", // 批量查看答题卡试题id
|
|
|
cardRegistrationCodeList: [], // 批量查看答题卡学生账号数组
|
|
|
});
|
|
|
+const majorQuestionCharts = ref(null);
|
|
|
const majorTable = ref(null);
|
|
|
//排序
|
|
|
const ChangeChartOrder = (sortType, legendData, barIndex, number) => {
|
|
|
- const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
|
|
|
- (item) => item.prop == "estimatedScore",
|
|
|
- ); //是否存在预估满分
|
|
|
- const fullVolume = state.problemAnalysisData.questionList.filter(
|
|
|
- (item) => item.showCode == 999,
|
|
|
- ); //全卷
|
|
|
- const questionList = state.problemAnalysisData.questionList.filter(
|
|
|
- (item) => item.showCode != 999,
|
|
|
- );
|
|
|
- const newBarIndex = isHasEstimatedScore ? barIndex - 1 : barIndex;
|
|
|
- if (sortType == "2") {
|
|
|
- //从低到高
|
|
|
- questionList.sort(function (a, b) {
|
|
|
- return (
|
|
|
- (a?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0) -
|
|
|
- (b?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0)
|
|
|
- );
|
|
|
+ if (number == 1) {
|
|
|
+ const fullVolume = state.problemAnalysisData.groupList.filter(
|
|
|
+ (item) => item.groupCode == 999,
|
|
|
+ ); //全卷
|
|
|
+ const groupList = state.problemAnalysisData.groupList.filter(
|
|
|
+ (item) => item.groupCode != 999,
|
|
|
+ );
|
|
|
+ //题目分组排序
|
|
|
+ if (sortType == "2") {
|
|
|
+ //从低到高
|
|
|
+ groupList.sort(function (a, b) {
|
|
|
+ return (
|
|
|
+ (a?.classList?.[barIndex]?.questionStats?.scoreRate || 0) -
|
|
|
+ (b?.classList?.[barIndex]?.questionStats?.scoreRate || 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ } else if (sortType == "3") {
|
|
|
+ //从高到低
|
|
|
+ groupList.sort(function (a, b) {
|
|
|
+ return (
|
|
|
+ (b?.classList?.[barIndex]?.questionStats?.scoreRate || 0) -
|
|
|
+ (a?.classList?.[barIndex]?.questionStats?.scoreRate || 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ //默认排序 按题号排序
|
|
|
+ groupList.sort(function (a, b) {
|
|
|
+ return (a?.groupCode || 0) - (b.groupCode || 0);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ state.problemAnalysisData.groupList = [...groupList, ...fullVolume];
|
|
|
+ state.problemAnalysisData.data = [];
|
|
|
+ state.problemAnalysisData.groupList.forEach((group) => {
|
|
|
+ const scoreRateArr =
|
|
|
+ group.classList?.map((item) => item?.questionStats?.scoreRate ?? 0) ||
|
|
|
+ [];
|
|
|
+ state.problemAnalysisData.data.push([group.groupName, ...scoreRateArr]);
|
|
|
});
|
|
|
- } else if (sortType == "3") {
|
|
|
- //从高到低
|
|
|
- questionList.sort(function (a, b) {
|
|
|
- return (
|
|
|
- (b?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0) -
|
|
|
- (a?.classList?.[newBarIndex]?.questionStats?.scoreRate || 0)
|
|
|
- );
|
|
|
+ let chartTitle = ["group"];
|
|
|
+ state.problemAnalysisData.changeHeaderList.forEach((item) => {
|
|
|
+ chartTitle.push(item.label);
|
|
|
});
|
|
|
+ state.problemAnalysisData.data.unshift(chartTitle); // 柱状图 图例标题
|
|
|
+ state.problemAnalysisData.data.pop(); // 删除最后一行 全卷
|
|
|
+ state.problemAnalysisData.legendList = legendData;
|
|
|
+ //大题分析 /阅读表达
|
|
|
+ GetClassQuestionData(0, state.problemAnalysisData.groupList[0].groupName);
|
|
|
} else {
|
|
|
- //默认排序 按题号排序
|
|
|
- questionList.sort(function (a, b) {
|
|
|
- return (a?.showCode || 0) - (b.showCode || 0);
|
|
|
- });
|
|
|
- }
|
|
|
- state.problemAnalysisData.questionList = [...questionList, ...fullVolume];
|
|
|
- let chartData = [],
|
|
|
- chartTitle = [];
|
|
|
- state.problemAnalysisData.questionList.forEach((ques) => {
|
|
|
- const scoreRateArr = ques.classList.map(
|
|
|
- (item) => item?.questionStats?.scoreRate || 0,
|
|
|
+ const fullVolume = state.problemAnalysisData.questionList.filter(
|
|
|
+ (item) => item.showCode == 999,
|
|
|
+ ); //全卷
|
|
|
+ const questionList = state.problemAnalysisData.questionList.filter(
|
|
|
+ (item) => item.showCode != 999,
|
|
|
);
|
|
|
- if (isHasEstimatedScore) {
|
|
|
- chartData.push([
|
|
|
- ques.questionName,
|
|
|
- ques.estimatedScoreRate,
|
|
|
- ...scoreRateArr,
|
|
|
- ]);
|
|
|
+ if (sortType == "2") {
|
|
|
+ //从低到高
|
|
|
+ questionList.sort(function (a, b) {
|
|
|
+ return (
|
|
|
+ (a?.classList?.[barIndex]?.questionStats?.scoreRate || 0) -
|
|
|
+ (b?.classList?.[barIndex]?.questionStats?.scoreRate || 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ } else if (sortType == "3") {
|
|
|
+ //从高到低
|
|
|
+ questionList.sort(function (a, b) {
|
|
|
+ return (
|
|
|
+ (b?.classList?.[barIndex]?.questionStats?.scoreRate || 0) -
|
|
|
+ (a?.classList?.[barIndex]?.questionStats?.scoreRate || 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
} else {
|
|
|
- chartData.push([ques.questionName, ...scoreRateArr]);
|
|
|
+ //默认排序 按题号排序
|
|
|
+ questionList.sort(function (a, b) {
|
|
|
+ return (a?.showCode || 0) - (b.showCode || 0);
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- const newChangeHeaderList = isHasEstimatedScore
|
|
|
- ? [
|
|
|
- { ...isHasEstimatedScore, isG: false, type: 1 },
|
|
|
- ...state.problemAnalysisData.changeHeaderList,
|
|
|
- ]
|
|
|
- : [...state.problemAnalysisData.changeHeaderList];
|
|
|
- newChangeHeaderList.forEach((item) => {
|
|
|
- chartTitle.push(item.label);
|
|
|
- });
|
|
|
- chartTitle.unshift("group");
|
|
|
- chartData.unshift(chartTitle); // 柱状图 图例标题
|
|
|
- chartData.pop(); // 删除最后一行 全卷
|
|
|
- state.problemAnalysisData.data = chartData;
|
|
|
- state.problemAnalysisData.legendList = legendData;
|
|
|
- //小题分析 /第N题
|
|
|
- GetQuestionStatsData(0);
|
|
|
+ state.problemAnalysisData.questionList = [...questionList, ...fullVolume];
|
|
|
+
|
|
|
+ //Y轴数据
|
|
|
+ state.majorQuestionData.data = [];
|
|
|
+ state.problemAnalysisData.questionList.forEach((question) => {
|
|
|
+ const scoreRateArr = question.classList.map(
|
|
|
+ (item) => item?.questionStats?.scoreRate || 0,
|
|
|
+ );
|
|
|
+ state.majorQuestionData.data.push([
|
|
|
+ question.questionName,
|
|
|
+ ...scoreRateArr,
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ let chartTitle = [];
|
|
|
+ state.problemAnalysisData.changeHeaderList.forEach((item) => {
|
|
|
+ chartTitle.push(item.label);
|
|
|
+ });
|
|
|
+ chartTitle.unshift("group");
|
|
|
+ state.majorQuestionData.legendList = legendData;
|
|
|
+ state.majorQuestionData.data.unshift(chartTitle); // 柱状图 图例标题
|
|
|
+ //大题分析 /阅读表达 / 第32题
|
|
|
+ GetQuestionStatsData(0);
|
|
|
+ }
|
|
|
};
|
|
|
//试题图表切换公共方法
|
|
|
const ChangeEchartType = (value, prop) => {
|
|
|
if (prop == "problemAnalysisData") {
|
|
|
ChangeChartOrder("1", state.problemAnalysisData.defaultLegendList, "", 1);
|
|
|
+ } else if (prop == "majorQuestionData") {
|
|
|
+ ChangeChartOrder("1", state.majorQuestionData.defaultLegendList, "", 2);
|
|
|
}
|
|
|
state[prop].chartType = value;
|
|
|
};
|
|
|
-//获取小题分析数据
|
|
|
-const GetQuestionAnalysisData = () => {
|
|
|
- state.problemAnalysisData.data = []; //柱状图折线图 X轴
|
|
|
+//题目分组分析
|
|
|
+const GetQuestionGroupAnalysisData = () => {
|
|
|
+ state.problemAnalysisData.data = []; //柱状图折线图
|
|
|
state.dataLoading = true;
|
|
|
- questionAnalysis({
|
|
|
+ questionGroupAnalysis({
|
|
|
...analysisStore.filterObject,
|
|
|
- analysisType: 0, //0-小题分析 1大题分析 2-知识点 3-能力点 question_group_code(4,5,6,7,8) 11-题型分析
|
|
|
+ analysisType: 4,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- if (
|
|
|
- res.code == 200 &&
|
|
|
- res.data &&
|
|
|
- res.data.questionList &&
|
|
|
- res.data.questionList.length
|
|
|
- ) {
|
|
|
+ // console.log("打印题目分组分析接口返回数据",res)
|
|
|
+ state.problemAnalysisData.data = []; //柱状图折线图
|
|
|
+ if (res.code == 200 && res.data && res.data.groupList.length) {
|
|
|
const { data } = res;
|
|
|
- const questionList = data.questionList || [];
|
|
|
+ const groupList = data.groupList || [];
|
|
|
const changeHeaderList = data.changeHeaderList || []; //柱状图折线图 班级名称
|
|
|
- state.problemAnalysisData.groupList = [];
|
|
|
- state.problemAnalysisData.groupTableList = [];
|
|
|
- state.problemAnalysisData.questionList = questionList;
|
|
|
- state.problemAnalysisData.questionTableList = cloneDeep(questionList);
|
|
|
+ state.problemAnalysisData.groupList = groupList;
|
|
|
+ state.problemAnalysisData.groupTableList = cloneDeep(groupList);
|
|
|
state.problemAnalysisData.headerList = data.headerList || [];
|
|
|
state.problemAnalysisData.changeHeaderList = changeHeaderList;
|
|
|
state.problemAnalysisData.childHeaderList = data.childHeaderList || [];
|
|
|
|
|
|
state.chartKey++;
|
|
|
//Y轴数据
|
|
|
- let chartData = [];
|
|
|
- let legendList = [];
|
|
|
- const isHasEstimatedScore = state.problemAnalysisData.headerList.find(
|
|
|
- (item) => item.prop == "estimatedScore",
|
|
|
- ); //是否存在预估满分
|
|
|
- chartData = questionList.map((item) => {
|
|
|
- return isHasEstimatedScore
|
|
|
- ? [item.questionName, item.estimatedScoreRate]
|
|
|
- : [item.questionName];
|
|
|
+ state.problemAnalysisData.data = groupList.map((item) => {
|
|
|
+ return [item.groupName];
|
|
|
});
|
|
|
- questionList.forEach((ques, key) => {
|
|
|
- const scoreRateArr = ques.classList.map(
|
|
|
- (item) => item?.questionStats?.scoreRate || 0,
|
|
|
- );
|
|
|
- chartData[key].push(...scoreRateArr);
|
|
|
+
|
|
|
+ groupList.forEach((group, key) => {
|
|
|
+ const scoreRateArr =
|
|
|
+ group.classList?.map(
|
|
|
+ (item) => item?.questionStats?.scoreRate ?? 0,
|
|
|
+ ) || [];
|
|
|
+ state.problemAnalysisData.data[key].push(...scoreRateArr);
|
|
|
});
|
|
|
let chartTitle = [],
|
|
|
titleType = [],
|
|
|
classSelectLegend = [];
|
|
|
- const newChangeHeaderList = isHasEstimatedScore
|
|
|
- ? [
|
|
|
- { ...isHasEstimatedScore, isG: false, type: 1 },
|
|
|
- ...changeHeaderList,
|
|
|
- ]
|
|
|
- : [...changeHeaderList];
|
|
|
- newChangeHeaderList.forEach((item) => {
|
|
|
+ changeHeaderList.forEach((item) => {
|
|
|
chartTitle.push(item.label);
|
|
|
titleType.push(item.type ? item.type : ""); //1柱状图 2折线
|
|
|
- if (
|
|
|
- item.prop != "0" &&
|
|
|
- item.prop != "estimatedScore" &&
|
|
|
- item.prop.indexOf("school_group") == -1
|
|
|
- ) {
|
|
|
+ if (item.prop != "0" && item.prop.indexOf("school_group") == -1) {
|
|
|
classSelectLegend.push(item.label);
|
|
|
}
|
|
|
});
|
|
|
chartTitle.unshift("group");
|
|
|
+
|
|
|
if (analysisStore.filterObject.classLevel != 2) {
|
|
|
//0 年级 1 组合班级 2具体班级
|
|
|
let startIndex = 1,
|
|
|
@@ -805,30 +911,31 @@ const GetQuestionAnalysisData = () => {
|
|
|
startIndex = barFirtIndex;
|
|
|
endIndex = barFirtIndex + 2;
|
|
|
}
|
|
|
- legendList =
|
|
|
+ state.problemAnalysisData.legendList =
|
|
|
chartTitle.length > 1 ? chartTitle.slice(startIndex, endIndex) : [];
|
|
|
state.problemAnalysisData.showBarLegendIndex = endIndex - 2;
|
|
|
} else {
|
|
|
//单班 联校和组合学校不默认显示
|
|
|
- legendList = classSelectLegend;
|
|
|
+ state.problemAnalysisData.legendList = classSelectLegend;
|
|
|
state.problemAnalysisData.showBarLegendIndex =
|
|
|
changeHeaderList.length - 1;
|
|
|
}
|
|
|
- chartData.unshift(chartTitle); // 柱状图 图例标题
|
|
|
- chartData.pop(); // 删除最后一行 全卷
|
|
|
- state.problemAnalysisData.data = chartData;
|
|
|
- state.problemAnalysisData.legendList = legendList;
|
|
|
- state.problemAnalysisData.defaultLegendList = cloneDeep(legendList);
|
|
|
- //小题分析 /第N题
|
|
|
- GetQuestionStatsData(0);
|
|
|
- // 获取项目分析表
|
|
|
+ state.problemAnalysisData.defaultLegendList = cloneDeep(
|
|
|
+ state.problemAnalysisData.legendList,
|
|
|
+ );
|
|
|
+ state.problemAnalysisData.data.unshift(chartTitle); // 柱状图 图例标题
|
|
|
+ state.problemAnalysisData.data.pop(); // 删除最后一行 全卷
|
|
|
+
|
|
|
+ //大题分析 /阅读表达
|
|
|
+ GetClassQuestionData(0, groupList[0].groupName);
|
|
|
+ // 大题分析表
|
|
|
GetMajorTableData();
|
|
|
} else {
|
|
|
+ state.questionTypesData.data = [];
|
|
|
+ state.questionTypesData.tableData = [];
|
|
|
+ state.problemAnalysisData.showBarLegendIndex = 1;
|
|
|
state.problemAnalysisData.groupList = [];
|
|
|
- state.problemAnalysisData.groupTableList = [];
|
|
|
state.problemAnalysisData.questionList = [];
|
|
|
- state.problemAnalysisData.questionTableList = [];
|
|
|
- state.problemAnalysisData.showBarLegendIndex = 1;
|
|
|
state.problemAnalysisData.headerList = [];
|
|
|
state.problemAnalysisData.changeHeaderList = [];
|
|
|
state.problemAnalysisData.childHeaderList = [];
|
|
|
@@ -878,6 +985,13 @@ const GetQuestionAnalysisData = () => {
|
|
|
};
|
|
|
// 点击柱状图折线图
|
|
|
const HandleChartClick = (index, name) => {
|
|
|
+ if (majorQuestionCharts.value) {
|
|
|
+ majorQuestionCharts.value.ChangeSelectValue();
|
|
|
+ }
|
|
|
+ GetClassQuestionData(index, name); //题目分组分析
|
|
|
+};
|
|
|
+//大题分析 /阅读表达 点击柱状图
|
|
|
+const HandleQuestionChartClick = (index, name) => {
|
|
|
GetQuestionStatsData(index); //小题分析
|
|
|
};
|
|
|
// 获取小题分析 /第N题
|
|
|
@@ -972,10 +1086,67 @@ const GetQuestionStatsData = (index) => {
|
|
|
dataStackY,
|
|
|
];
|
|
|
}
|
|
|
- console.log("打印questionScoreStatsData1111", state.questionScoreStatsData);
|
|
|
// 获取小题分析 /第N题 / 第N班
|
|
|
GetQuestionAnswerData(state.problemAnalysisData.showBarLegendIndex);
|
|
|
};
|
|
|
+//大题分析 /阅读表达
|
|
|
+const GetClassQuestionData = (index, name) => {
|
|
|
+ state.majorQuestionData.data = [];
|
|
|
+ state.groupName = name;
|
|
|
+ const groupList = state.problemAnalysisData.groupList[index];
|
|
|
+ const questionList = groupList.questionList;
|
|
|
+ state.problemAnalysisData.questionList = questionList;
|
|
|
+ //Y轴数据
|
|
|
+ state.majorQuestionData.data = questionList.map((item) => {
|
|
|
+ return [item.questionName];
|
|
|
+ });
|
|
|
+ questionList.forEach((question, key) => {
|
|
|
+ const scoreRateArr = question.classList.map(
|
|
|
+ (item) => item?.questionStats?.scoreRate || 0,
|
|
|
+ );
|
|
|
+ state.majorQuestionData.data[key].push(...scoreRateArr);
|
|
|
+ });
|
|
|
+ let chartTitle = [],
|
|
|
+ titleType = [],
|
|
|
+ classSelectLegend = [];
|
|
|
+ state.problemAnalysisData.changeHeaderList.forEach((item) => {
|
|
|
+ chartTitle.push(item.label);
|
|
|
+ titleType.push(item.type ? item.type : ""); //1柱状图 2折线
|
|
|
+ if (item.prop != "0" && item.prop.indexOf("school_group") == -1) {
|
|
|
+ classSelectLegend.push(item.label);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ chartTitle.unshift("group");
|
|
|
+ if (analysisStore.filterObject.classLevel != 2) {
|
|
|
+ //0 年级 1 组合班级 2具体班级
|
|
|
+ let startIndex = 1,
|
|
|
+ endIndex = 3;
|
|
|
+ if (analysisStore.filterObject.schoolLevel == 2) {
|
|
|
+ //0-联考 1-学校分组 2-具体学校
|
|
|
+ startIndex =
|
|
|
+ titleType.lastIndexOf(1) > -1 ? titleType.lastIndexOf(1) + 1 : 1;
|
|
|
+ endIndex = titleType.indexOf(2) > -1 ? titleType.indexOf(2) + 2 : 3; //单校时显示联校、组合校、年级是柱子;班级组合、班级是折线。
|
|
|
+ } else {
|
|
|
+ //联校 组合学校 默认当前的为第一个选中的柱子
|
|
|
+ const barFirtIndex =
|
|
|
+ titleType.lastIndexOf(1) > -1 ? titleType.lastIndexOf(1) + 1 : 1;
|
|
|
+ startIndex = barFirtIndex;
|
|
|
+ endIndex = barFirtIndex + 2;
|
|
|
+ }
|
|
|
+ state.majorQuestionData.legendList =
|
|
|
+ chartTitle.length > 1 ? chartTitle.slice(startIndex, endIndex) : [];
|
|
|
+ state.majorQuestionData.showBarLegendIndex = endIndex - 2;
|
|
|
+ } else {
|
|
|
+ //联校和组合学校不默认显示
|
|
|
+ state.majorQuestionData.legendList = classSelectLegend;
|
|
|
+ }
|
|
|
+ state.majorQuestionData.defaultLegendList = cloneDeep(
|
|
|
+ state.majorQuestionData.legendList,
|
|
|
+ );
|
|
|
+ state.majorQuestionData.data.unshift(chartTitle); // 柱状图 图例标题
|
|
|
+ //大题分析 /阅读表达 / 第32题
|
|
|
+ GetQuestionStatsData(0);
|
|
|
+};
|
|
|
//切换 获取小题分析 /第N题 获取第N班答题列表
|
|
|
const HandleQuestionScoreChartClick = (index) => {
|
|
|
GetQuestionAnswerData(index + state.problemAnalysisData.showBarLegendIndex);
|
|
|
@@ -1107,7 +1278,7 @@ const GetMajorTableData = () => {
|
|
|
(item) => item.prop,
|
|
|
); //动态表头字段名
|
|
|
let allTableData = [];
|
|
|
- const allList = state.problemAnalysisData.questionTableList;
|
|
|
+ const allList = state.problemAnalysisData.groupTableList;
|
|
|
allList.forEach((item) => {
|
|
|
let itemObj = {
|
|
|
questionId: item?.questionId || "",
|
|
|
@@ -1157,7 +1328,7 @@ const GetPageMajorTableData = () => {
|
|
|
const ResetTableScroll = () => {
|
|
|
nextTick(() => {
|
|
|
if (majorTable.value) {
|
|
|
- const tableBody = majorTable.value.querySelector(
|
|
|
+ const tableBody = majorTable.value.$el.querySelector(
|
|
|
".el-table__body-wrapper",
|
|
|
);
|
|
|
if (tableBody) {
|
|
|
@@ -1175,7 +1346,7 @@ const handleSizeChange = (val: number) => {
|
|
|
state.majorTableData.pageSize = val;
|
|
|
state.majorTableData.currentPage = 1;
|
|
|
GetMajorTableData(); //加载分析表格数据
|
|
|
-}
|
|
|
+};
|
|
|
//设置表头样式
|
|
|
const HeaderRowStyle = ({ row, rowIndex }) => {
|
|
|
if (rowIndex === 1) {
|
|
|
@@ -1185,42 +1356,46 @@ const HeaderRowStyle = ({ row, rowIndex }) => {
|
|
|
}
|
|
|
};
|
|
|
const pageInit = () => {
|
|
|
+ const chartTypeLists = [
|
|
|
+ {
|
|
|
+ label: "组合图",
|
|
|
+ value: "line_bar_chart",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "柱状图",
|
|
|
+ value: "vertical_bar",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "雷达图",
|
|
|
+ value: "radar_chart",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ const chartTypeList = [
|
|
|
+ {
|
|
|
+ label: "柱状图",
|
|
|
+ value: "vertical_bar",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "雷达图",
|
|
|
+ value: "radar_chart",
|
|
|
+ },
|
|
|
+ ];
|
|
|
state.problemAnalysisData.chartTypeList =
|
|
|
- analysisStore.filterObject.classLevel != 2
|
|
|
- ? [
|
|
|
- {
|
|
|
- label: "组合图",
|
|
|
- value: "line_bar_chart",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "柱状图",
|
|
|
- value: "vertical_bar",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "雷达图",
|
|
|
- value: "radar_chart",
|
|
|
- },
|
|
|
- ]
|
|
|
- : [
|
|
|
- {
|
|
|
- label: "柱状图",
|
|
|
- value: "vertical_bar",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "雷达图",
|
|
|
- value: "radar_chart",
|
|
|
- },
|
|
|
- ];
|
|
|
+ analysisStore.filterObject.classLevel != 2 ? chartTypeLists : chartTypeList;
|
|
|
state.problemAnalysisData.chartType =
|
|
|
analysisStore.filterObject.classLevel != 2
|
|
|
? "line_bar_chart"
|
|
|
: "vertical_bar";
|
|
|
+ state.majorQuestionData.chartTypeList =
|
|
|
+ analysisStore.filterObject.classLevel != 2 ? chartTypeLists : chartTypeList;
|
|
|
+ state.majorQuestionData.chartType =
|
|
|
+ analysisStore.filterObject.classLevel != 2
|
|
|
+ ? "line_bar_chart"
|
|
|
+ : "vertical_bar";
|
|
|
state.questionScoreStatsData.chartType = "vertical_bar";
|
|
|
state.majorTableData.currentPage = 1;
|
|
|
state.majorAnswerData.rowIndex = 0;
|
|
|
- state.studentPreviousExamData.selectVal = "standardScore";
|
|
|
- state.studentPreviousExamData.selectName = "标准分";
|
|
|
- GetQuestionAnalysisData(); //获取小题分析数据
|
|
|
+ GetQuestionGroupAnalysisData(); //题目分组分析
|
|
|
};
|
|
|
// 监听筛选条件
|
|
|
watch(
|
|
|
@@ -1242,7 +1417,7 @@ onMounted(() => {
|
|
|
width: calc(100% - 220px);
|
|
|
}
|
|
|
|
|
|
- &.card {
|
|
|
+ &.paper_card {
|
|
|
width: calc(100% - 480px);
|
|
|
}
|
|
|
}
|
|
|
@@ -1251,14 +1426,14 @@ onMounted(() => {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- margin: auto;
|
|
|
+ margin: auto 0 auto auto;
|
|
|
padding-bottom: 0;
|
|
|
|
|
|
&.answer {
|
|
|
width: 200px;
|
|
|
}
|
|
|
|
|
|
- &.card {
|
|
|
+ &.paper_card {
|
|
|
width: 460px;
|
|
|
}
|
|
|
|
|
|
@@ -1271,4 +1446,4 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|