|
@@ -37,7 +37,7 @@
|
|
<div class="statistics-body stat-type-body">
|
|
<div class="statistics-body stat-type-body">
|
|
<div class="stat-type-table">
|
|
<div class="stat-type-table">
|
|
<el-table :data="paperQuestionData" border>
|
|
<el-table :data="paperQuestionData" border>
|
|
- <el-table-column label="题型" prop="paperDetailName" width="120">
|
|
|
|
|
|
+ <el-table-column label="题型" prop="sourceDetailName" width="120">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="试题数量">
|
|
<el-table-column label="试题数量">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -79,10 +79,10 @@
|
|
<span>
|
|
<span>
|
|
{{ scope.row.questionCount }} (
|
|
{{ scope.row.questionCount }} (
|
|
{{
|
|
{{
|
|
- scope.row.paperDetailInfo
|
|
|
|
|
|
+ scope.row.questionTypeInfo
|
|
.map(
|
|
.map(
|
|
(item) =>
|
|
(item) =>
|
|
- `${item.paperDetailName}:${item.questionCount}`
|
|
|
|
|
|
+ `${item.sourceDetailName}:${item.questionCount}`
|
|
)
|
|
)
|
|
.join(",")
|
|
.join(",")
|
|
}})
|
|
}})
|
|
@@ -105,34 +105,23 @@
|
|
<h2>按知识点统计</h2>
|
|
<h2>按知识点统计</h2>
|
|
</div>
|
|
</div>
|
|
<div class="statistics-body">
|
|
<div class="statistics-body">
|
|
- <el-table
|
|
|
|
- :data="paperData3.data"
|
|
|
|
- style="width: 100%"
|
|
|
|
- border
|
|
|
|
- :span-method="objectSpanMethod3"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="blueData" border :span-method="objectSpanMethod">
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-for="(colval, colIndex) in headFirst3"
|
|
|
|
- :key="`first${colIndex}`"
|
|
|
|
- >
|
|
|
|
- <template slot="header">
|
|
|
|
- <span style="margin-left: 10px">{{ colval }}</span>
|
|
|
|
- </template>
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span style="margin-left: 10px">{{ scope.row[colIndex] }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ label="一级知识点"
|
|
|
|
+ prop="firstProperty"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="二级知识点"
|
|
|
|
+ prop="secondProperty"
|
|
|
|
+ ></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-for="(colval, colIndex) in headSecond3"
|
|
|
|
- :key="`second${colIndex}`"
|
|
|
|
|
|
+ v-for="(colval, colIndex) in questionTypeList"
|
|
|
|
+ :key="`${colval}${colIndex}`"
|
|
|
|
+ :prop="colval"
|
|
|
|
+ :label="colval"
|
|
>
|
|
>
|
|
- <template slot="header">
|
|
|
|
- <span style="margin-left: 10px">{{ colval }}</span>
|
|
|
|
- </template>
|
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span style="margin-left: 10px">{{
|
|
|
|
- scope.row[colIndex + 2]
|
|
|
|
- }}</span>
|
|
|
|
|
|
+ <span>{{ scope.row[colval] || "--" }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -173,9 +162,9 @@ export default {
|
|
paperQuestionChartOption: null,
|
|
paperQuestionChartOption: null,
|
|
paperDifficultData: [],
|
|
paperDifficultData: [],
|
|
paperDifficultChartOption: null,
|
|
paperDifficultChartOption: null,
|
|
- paperData3: { head: [], data: [] },
|
|
|
|
- headFirst3: [],
|
|
|
|
- headSecond3: [],
|
|
|
|
|
|
+ blueData: [],
|
|
|
|
+ questionTypeList: [],
|
|
|
|
+ rowspans: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -189,7 +178,7 @@ export default {
|
|
const res = await paperBaseInfoApi(this.paperId);
|
|
const res = await paperBaseInfoApi(this.paperId);
|
|
this.paperData = res.data;
|
|
this.paperData = res.data;
|
|
this.getPaperData();
|
|
this.getPaperData();
|
|
- this.getPaperData3();
|
|
|
|
|
|
+ this.getBlueData();
|
|
},
|
|
},
|
|
async getPaperData() {
|
|
async getPaperData() {
|
|
const qres = await paperQuestionTypeInfoApi({
|
|
const qres = await paperQuestionTypeInfoApi({
|
|
@@ -200,7 +189,7 @@ export default {
|
|
const qData = this.paperQuestionData.map((item) => {
|
|
const qData = this.paperQuestionData.map((item) => {
|
|
return {
|
|
return {
|
|
value: item.questionCount,
|
|
value: item.questionCount,
|
|
- name: item.paperDetailName,
|
|
|
|
|
|
+ name: item.sourceDetailName,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
this.paperQuestionChartOption = this.getChartOption(qData);
|
|
this.paperQuestionChartOption = this.getChartOption(qData);
|
|
@@ -264,21 +253,88 @@ export default {
|
|
|
|
|
|
return option;
|
|
return option;
|
|
},
|
|
},
|
|
- async getPaperData3() {
|
|
|
|
|
|
+ async getBlueData() {
|
|
// if (!this.coursePropertyId) return;
|
|
// if (!this.coursePropertyId) return;
|
|
const res = await paperBlueInfoApi({
|
|
const res = await paperBlueInfoApi({
|
|
paperId: this.paperId,
|
|
paperId: this.paperId,
|
|
- courseId: this.courseId,
|
|
|
|
- // coursePropertyId: this.coursePropertyId,
|
|
|
|
rootOrgId: this.$store.state.user.rootOrgId,
|
|
rootOrgId: this.$store.state.user.rootOrgId,
|
|
});
|
|
});
|
|
- this.paperData3 = res.data;
|
|
|
|
- this.headFirst3 = this.paperData3.head.slice(0, 2);
|
|
|
|
- this.headSecond3 = this.paperData3.head.slice(2);
|
|
|
|
|
|
+ const datas = res.data[0].distributeInfo || [];
|
|
|
|
+
|
|
|
|
+ const tableData = [];
|
|
|
|
+ let questionTypeList = [];
|
|
|
|
+ const rowspans = [];
|
|
|
|
+ let curRowIndex = 0;
|
|
|
|
+ datas.forEach((item) => {
|
|
|
|
+ const rowCount =
|
|
|
|
+ item.children && item.children.length ? item.children.length : 1;
|
|
|
|
+ rowspans.push([curRowIndex, curRowIndex + rowCount - 1]);
|
|
|
|
+ curRowIndex += rowCount;
|
|
|
|
+
|
|
|
|
+ if (item.children && item.children.length) {
|
|
|
|
+ item.children.forEach((elem) => {
|
|
|
|
+ const row = {
|
|
|
|
+ id: `${item.propertyId}_${elem.propertyId}`,
|
|
|
|
+ firstProperty: item.propertyName,
|
|
|
|
+ secondProperty: elem.propertyName,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ elem.distributeByQuestionTypeList &&
|
|
|
|
+ elem.distributeByQuestionTypeList.length
|
|
|
|
+ ) {
|
|
|
|
+ elem.distributeByQuestionTypeList.forEach((source) => {
|
|
|
|
+ row[source.sourceDetailName] = source.questionDifficultInfo
|
|
|
|
+ .map(
|
|
|
|
+ (item) => `${item.difficultLevel}:${item.questionCount}`
|
|
|
|
+ )
|
|
|
|
+ .join(",");
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (!questionTypeList.length) {
|
|
|
|
+ questionTypeList = elem.distributeByQuestionTypeList.map(
|
|
|
|
+ (source) => source.sourceDetailName
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ tableData.push(row);
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const row = {
|
|
|
|
+ id: `${item.propertyId}`,
|
|
|
|
+ firstProperty: item.propertyName,
|
|
|
|
+ secondProperty: "",
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ item.distributeByQuestionTypeList &&
|
|
|
|
+ item.distributeByQuestionTypeList.length
|
|
|
|
+ ) {
|
|
|
|
+ item.distributeByQuestionTypeList.forEach((source) => {
|
|
|
|
+ row[source.sourceDetailName] = source.questionDifficultInfo
|
|
|
|
+ .map((item) => `${item.difficultLevel}:${item.questionCount}`)
|
|
|
|
+ .join(",");
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (!questionTypeList.length) {
|
|
|
|
+ questionTypeList = item.distributeByQuestionTypeList.map(
|
|
|
|
+ (source) => source.sourceDetailName
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ tableData.push(row);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ this.questionTypeList = questionTypeList;
|
|
|
|
+ this.blueData = tableData;
|
|
|
|
+ this.rowspans = rowspans;
|
|
},
|
|
},
|
|
- objectSpanMethod3({ rowIndex, columnIndex }) {
|
|
|
|
|
|
+ objectSpanMethod({ rowIndex, columnIndex }) {
|
|
if (columnIndex === 0) {
|
|
if (columnIndex === 0) {
|
|
- for (let span of this.paperData3.rowspan) {
|
|
|
|
|
|
+ for (let span of this.rowspans) {
|
|
if (span[0] == rowIndex) {
|
|
if (span[0] == rowIndex) {
|
|
return {
|
|
return {
|
|
rowspan: span[1] - span[0] + 1,
|
|
rowspan: span[1] - span[0] + 1,
|