diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js
index 3f0da5c..7ea48cb 100644
--- a/src/api/apis/apis.js
+++ b/src/api/apis/apis.js
@@ -1562,4 +1562,38 @@ export default {
data
});
},
+
+
+ // 删除即时测考试
+ deleteReport(data) {
+ return service({
+ url: setUpUrls.deleteReport,
+ method: "POST",
+ data
+ });
+ },
+ // 设置单班科目分析低分区间
+ setLowRange(data) {
+ return service({
+ url: setUpUrls.setLowRange,
+ method: "POST",
+ data
+ });
+ },
+ // 查询即时测多班对比情况详情
+ examMultiClassReport(data) {
+ return service({
+ url: setUpUrls.examMultiClassReport,
+ method: "POST",
+ data
+ });
+ },
+ // 查询即时测多班对比情况详情
+ exportExamMultiReport(data) {
+ return service({
+ url: setUpUrls.exportExamMultiReport,
+ method: "POST",
+ data
+ });
+ },
};
diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js
index ced6ae2..7495d0f 100644
--- a/src/api/urls/apis.js
+++ b/src/api/urls/apis.js
@@ -405,4 +405,14 @@ export default {
// 删除班级信息
removeClass: "/api_html/school/manager/delClass",
+
+
+ //删除即时测考试
+ deleteReport: "/api_html/teaching/deleteReport",
+ //设置单班科目分析低分区间
+ setLowRange: "/api_html/teaching/setLowRange",
+ //查询即时测多班对比情况详情
+ examMultiClassReport: "/api_html/teaching/examMultiClassReport",
+ //导出即时测多班报表
+ exportExamMultiReport: "/api_html/teaching/exportExamMultiReport",
}
diff --git a/src/router/index.js b/src/router/index.js
index 73ad9e9..3aebbfa 100755
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -69,6 +69,13 @@ const Archived = () => import("@/views/standard/setUp/archived")
const DeviceError = () => import("@/views/standard/device/error")
/**
+ * v1.5
+ */
+const TestContrast = () => import("@/views/standard/test/contrast")
+
+
+
+/**
* 重写路由的push方法
*/
const routerPush = Router.prototype.push
@@ -268,6 +275,15 @@ let addrouters = [
parent: "test",
hidden: true,
children: []
+ },
+ {
+ path: "/testContrast",
+ iconCls: "", // 图标样式class
+ name: "即时测报表对比",
+ component: TestContrast,
+ parent: "test",
+ hidden: true,
+ children: []
}
]
@@ -586,6 +602,14 @@ let csAddrouters = [
component: TestAnalysis,
parent: "test",
children: []
+ },
+ {
+ path: "/testContrast",
+ iconCls: "", // 图标样式class
+ name: "即时测报表分析",
+ component: TestContrast,
+ parent: "test",
+ children: []
}
]
diff --git a/src/views/standard/test/analysis.vue b/src/views/standard/test/analysis.vue
index bc84cc3..ec47aba 100644
--- a/src/views/standard/test/analysis.vue
+++ b/src/views/standard/test/analysis.vue
@@ -27,14 +27,23 @@
-
-
{{ item }}
+
+ {{ item }}
+
+
设置低分值
@@ -444,7 +453,12 @@
>
-
+
@@ -458,6 +472,47 @@
取 消
+
+
+
+
+
+
+
+
+
+ 100 ? (lowRange.range[1] = 100) : ''"
+ >{{ lowRange.type == 0 ? "%" : "分" }}(含)
+ 100 ? (lowRange.range[1] = 100) : ''"
+ >{{ lowRange.type == 0 ? "%" : "分" }}(含)
+
+
+
+
+
@@ -475,6 +530,8 @@ export default {
diaUp: false,
url: "/api_html/teaching/importSubjectiveScore",
id: "",
+ classId: "",
+ subjectName: "",
title: "",
score: "",
tabList: ["试题分析", "成绩排名", "小题分报表", "作答明细表"],
@@ -507,6 +564,13 @@ export default {
page: 1,
size: 20,
total: 0,
+ // 设置低分值
+ loadingTange:false,
+ diaMinScore: false,
+ lowRange: {
+ type: 1,
+ range: [60, 0],
+ },
};
},
created() {
@@ -516,6 +580,8 @@ export default {
this.id = this.$route.query.id;
this.status = this.$route.query.status ? this.$route.query.status : 0;
this.title = this.$route.query.title || "";
+ this.classId = this.$route.query.classId || "";
+ this.subjectName = this.$route.query.subjectName || "";
this._QueryData();
},
methods: {
@@ -569,6 +635,30 @@ export default {
this.page = page;
this.examQuestionReport();
},
+ // 切换低分设置类型设置默认分值
+ changeScore() {
+ this.lowRange.range = [60, 0];
+ },
+ // 关闭低分设置
+ closeDiaMinScore() {
+ this.lowRange.type = 1;
+ this.lowRange.range = [60, 0];
+ },
+ // 保存低分设置
+ async _SavelowRange() {
+ this.loadingTange = true;
+ let data = await this.$request.setLowRange({
+ classId: this.classId,
+ subjectName: this.subjectName,
+ ...this.lowRange,
+ });
+ this.loadingTange = false;
+ if (data && !data.code) {
+ this.$message.success(data.info);
+ this.diaMinScore = false;
+ this.$message.error(data.info);
+ }
+ },
async _QueryData() {
this.examDetail();
this.examStudentReport();
@@ -586,6 +676,10 @@ export default {
this.paperModifyLog = { ...data?.paperModifyLog };
}
this.examReport = { ...data?.examReport };
+ this.lowRange = data.lowRange || {
+ type: 1,
+ range: [60, 0],
+ };
} else {
this.$message.error(info);
}
@@ -875,4 +969,19 @@ div::-webkit-scrollbar-thumb {
}
}
}
+
+// 设置低分值
+.content-header {
+ width: 100%;
+ position: relative;
+ .setMinScore {
+ position: absolute;
+ bottom: 0;
+ right: 50px;
+ }
+}
+.score-ipt {
+ width: 80px;
+ margin: 0 5px;
+}
\ No newline at end of file
diff --git a/src/views/standard/test/contrast.vue b/src/views/standard/test/contrast.vue
new file mode 100644
index 0000000..fcddaa3
--- /dev/null
+++ b/src/views/standard/test/contrast.vue
@@ -0,0 +1,490 @@
+
+
+
+
+ 多班分析_{{ subjectNames }}_{{ title }}_成绩对比分析
+
+
+
+
+
+
+
+ <
+
+
+
+
+
+
+ {{
+ `${scoped.row.levels[index].people}(${scoped.row.levels[index].percent})`
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编号
+ *等级名称
+ *等级最高
+ *等级最低
+
+
+
+
{{ index + 1 }}
+
+
+
+
+
+ {{ fromData.levelType == 1 ? "%" : "分" }} -
+
+
+
+ {{ fromData.levelType == 1 ? "%" : "分" }}
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/standard/test/index.vue b/src/views/standard/test/index.vue
index 4a99ebd..d000330 100644
--- a/src/views/standard/test/index.vue
+++ b/src/views/standard/test/index.vue
@@ -26,9 +26,11 @@
@@ -104,7 +106,7 @@
筛选
-
+
+
+
- {{
`${scoped.row.answeredNum}/${scoped.row.classPersonNum}`
}}
+
-
+
+
+
+
+
@@ -480,7 +517,91 @@
>
-
+
+
+
+
+
已考试卷信息
+
+ 共筛选出{{ classTableLen }}个班级的已考试卷,不同班级请选择同一份试卷进行对比
+
+
+
+
+
+
+
+
+ -
+
{{ item[0].className }}
+
+
+
+
+ {{ ` ` }}
+
+
+
+
+
+
+ {{
+ (scope.row.duration / 60).toFixed(2)
+ }}
+
+
+
+
+
+
+ 生成对比报表
+
+
+
{
+ item.length ? (len += 1) : "";
+ });
+ return len;
+ },
+ },
async created() {
this.code = localStorage.getItem("csCode") || "";
this.role =
@@ -551,7 +684,7 @@ export default {
this.$store.getters.info.permissions[0].role;
this._QueryClassList2();
await this._QueryClassList();
- if (!this.query.classId) {
+ if (!this.query.classIds.length) {
return;
}
await this._QuerySubjectList();
@@ -569,7 +702,7 @@ export default {
that.query.subjectNames = that.role == "ROLE_BANZHUREN" ? [] : "";
that._QueryClassList2();
await that._QueryClassList();
- if (!that.query.classId) {
+ if (!that.query.classIds.length) {
return;
}
await that._QuerySubjectList();
@@ -583,11 +716,27 @@ export default {
});
},
methods: {
+ // 多班级选择同一试卷
+ checkboxDisabled(obj) {
+ let id = this.multipleSelection[0] || "";
+ if (id) {
+ let examPaperId;
+ for (let i = 0; i < this.tableData.length; i++) {
+ if (this.tableData[i].id == id) {
+ examPaperId = this.tableData[i].examPaperId;
+ break;
+ }
+ }
+ return obj.examPaperId == examPaperId ? false : true;
+ } else {
+ return false;
+ }
+ },
print() {
tablePrint("print-content", "即时测-" + this.tabList[this.tabIndex - 1]);
},
+ //科目改变触发事件
changeSub(val) {
- //科目改变触发事件
let sub;
if (val && val.length) {
let leng = val.length - 1;
@@ -603,19 +752,43 @@ export default {
path: "/testArchiving",
});
},
+ //去详情
linkTo(obj) {
- //去详情
this.$router.push({
path: "/testAnalysis",
query: {
id: obj.id,
title: obj.title,
score: obj.examPaperScore,
+ classId: obj.classId,
+ subjectName: obj.subjectName,
+ },
+ });
+ },
+ //去报表对比
+ linkToContrast() {
+ if (this.multipleSelection.length < 2) {
+ this.$message.warning("请选择同一份试卷多个班级进行对比!");
+ return;
+ }
+ let title = "";
+ for (let i = 0; i < this.tableData.length; i++) {
+ if (this.tableData[i].id == this.multipleSelection[0]) {
+ title = this.tableData[i].title;
+ break;
+ }
+ }
+ this.$router.push({
+ path: "/testContrast",
+ query: {
+ ids: this.multipleSelection,
+ subjectNames: this.query.subjectNames,
+ title: title,
},
});
},
+ //暂时不上线
toPortrait(obj) {
- //暂时不上线
return;
if (this.$store.getters.code) {
return;
@@ -650,11 +823,23 @@ export default {
},
});
},
+ //导入开关
uploadSJ(obj) {
- //导入开关
this.examId = obj.id;
this.diaUp = true;
},
+ //删除即时测考试
+ async removeReport(obj, index) {
+ const { data, status, info } = await this.$request.deleteReport({
+ id: obj.id,
+ });
+ if (status == 200) {
+ this.$message.success("删除成功!");
+ this.tableData = this.tableData.splice(index, 1);
+ } else {
+ this.$message.error(info);
+ }
+ },
setDate(index) {
const that = this;
this.date = index == this.date ? "" : index;
@@ -744,23 +929,20 @@ export default {
this.page = 1;
this._QueryData();
},
+ //导入成功
upSuccess(res) {
- //导入成功
this.$message.success("导入成功");
this.diaUp = false;
this._QueryData();
},
+ //切换班级
async changeclass() {
await this._QuerySubjectList();
this.page = 1;
this._QueryData();
},
- async changClazz() {
- this.page = 1;
- await this._QuerySubjectList();
- await this._QueryData();
- },
async _QueryClassList2() {
+ if (this.code) return;
const fetchClassList =
this.role == "ROLE_BANZHUREN"
? this.$request.cTClassList
@@ -778,6 +960,7 @@ export default {
? this.$request.cTClassList
: this.$request.tClassList;
const { data, status, info } = await fetchClassList();
+ this.query.classIds = [];
if (status === 0) {
this.classList = data.list.map((item) => {
return {
@@ -785,20 +968,25 @@ export default {
label: item.className,
};
});
- this.query.classId = this.classList[0]?.value;
+ this.query.classIds.push(this.classList[0]?.value);
} else {
this.$message.error(info);
}
},
async _QuerySubjectList() {
+ let query = {};
+ if (!this.query.classIds.length) return;
+ if (this.query.classIds.length == 1) {
+ query.classId = this.query.classIds[0];
+ } else {
+ query.classIds = this.query.classIds;
+ }
const fetchSubjectList =
this.role == "ROLE_BANZHUREN"
? this.$request.cTSubjectList
: this.$request.tSubjectList;
- const { data, status, info } = await fetchSubjectList({
- classId: this.query.classId,
- });
+ const { data, status, info } = await fetchSubjectList({ ...query });
if (status === 0) {
this.subjectList =
data.subjectNames?.map((item) => {
@@ -821,9 +1009,8 @@ export default {
}
},
async _QueryData() {
- if (!this.query.classId) {
- return;
- }
+ this.examReportName = "";
+ if (!this.query.classIds.length) return;
this.tableData = [];
if (this.tabIndex == 1) {
this.examReportList();
@@ -832,7 +1019,7 @@ export default {
}
},
//单卷测练
- async examReportList() {
+ async examReportList(msg) {
this.loading = true;
let query = {};
for (let key in this.query) {
@@ -858,15 +1045,39 @@ export default {
return;
}
}
+ if (this.query.classIds.length == 1) {
+ query.classId = query.classIds[0];
+ query.page = this.page;
+ query.size = this.size;
+ delete query.classIds;
+ }
+ if (msg) {
+ query.title = msg;
+ }
const { data, status, info } = await this.$request.examReportList({
...query,
- page: this.page,
- size: this.size,
});
this.loading = false;
if (status === 0) {
- this.tableData = (data?.list && [...data?.list]) || [];
- this.total = data?.count || 0;
+ if (query.classId) {
+ //单班级
+ this.tableData = (data?.list && [...data?.list]) || [];
+ this.total = data?.count || 0;
+ } else {
+ //多班级
+ this.classTable = [];
+ let tableData = [];
+ this.tableData = (data?.list && [...data?.list]) || [];
+ data?.list.map((item) => {
+ let idx = query.classIds.indexOf(item);
+ if (tableData[idx]) {
+ tableData[idx].push(item);
+ } else {
+ tableData[idx] = [item];
+ }
+ });
+ this.classTable = [...tableData];
+ }
} else {
this.$message.error(info);
}
@@ -896,6 +1107,10 @@ export default {
query["subjectNames"]?.shift();
}
}
+ if (this.query.classIds.length == 1) {
+ query.classId = query.classIds[0];
+ delete query.classIds;
+ }
const phaseExamReport =
this.role == "ROLE_BANZHUREN"
? this.$request.cTPhaseExamReport
@@ -961,8 +1176,8 @@ export default {
this.$message.error(info);
}
},
+ //报表导出
async downExl() {
- //报表到处
if (this.exportLoading == true) return;
let query = {};
for (let key in this.query) {
@@ -1006,8 +1221,8 @@ export default {
this.$message.error(data.info);
}
},
+ //模板下载
async downExcel() {
- //模板下载
this.loadingDown = true;
let data = await this.$request.subjectiveScoreTemplate({
examId: this.examId,
@@ -1064,4 +1279,85 @@ div::-webkit-scrollbar-thumb {
color: #409eff;
text-decoration: underline;
}
+.head-box {
+ display: flex;
+ justify-content: space-between;
+ font-size: 12px;
+ color: #999;
+ .txt {
+ font-size: 16px;
+ color: #333;
+ line-height: 20px;
+ position: relative;
+ margin-bottom: 6px;
+ &:after {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: -16px;
+ width: 4px;
+ height: 100%;
+ background: #409eff;
+ }
+ }
+ .red {
+ font-style: normal;
+ color: #f30;
+ }
+ .sel {
+ width: 200px;
+ :deep(.el-input__inner) {
+ border-radius: 20px;
+ }
+ }
+}
+.tab-ul {
+ display: flex;
+ flex-wrap: wrap;
+ .tab-li {
+ width: 50%;
+ flex: 1;
+ margin: 0 12px 12px 0;
+ &:nth-child(2n) {
+ margin-right: 0;
+ }
+ .tab-tit {
+ width: 100%;
+ line-height: 40px;
+ border: 1px solid #ebeef5;
+ }
+ }
+}
+.btn-box {
+ padding-top: 12px;
+ text-align: right;
+}
+.remove-test {
+ margin-left: 10px;
+}
+.input-with-select {
+ width: 200px;
+ height: 36px;
+ margin-right: 50px;
+ border-radius: 20px;
+ border: 1px solid #e2e2e2;
+ box-sizing: border-box;
+ background: #fff;
+ :deep(.el-input__inner) {
+ border-radius: 20px;
+ border: none;
+ height: 34px;
+ line-height: 34px;
+ padding-right: 0;
+ }
+ :deep(.el-button) {
+ padding: 12px;
+ }
+
+ :deep(.el-input-group__append),
+ :deep(.el-input-group__prepend) {
+ border: none;
+ background: transparent;
+ }
+}
\ No newline at end of file