diff --git a/src/views/basic/test/analysis.vue b/src/views/basic/test/analysis.vue
index bc84cc3..1f471d1 100644
--- a/src/views/basic/test/analysis.vue
+++ b/src/views/basic/test/analysis.vue
@@ -27,14 +27,24 @@
-
-
{{ item }}
+
+ {{ item }}
+
+
设置低分值
@@ -444,7 +454,12 @@
>
-
+
@@ -458,6 +473,55 @@
取 消
+
+
+
+
+
+
+
+
+
+
+ 100 ? (lowRange.range[1] = 100) : ''"
+ @keydown.native="keydownRange($event)"
+ >{{ lowRange.type != 0 ? "%" : "分" }}(含)
+ 100 ? (lowRange.range[1] = 100) : ''"
+ @keydown.native="keydownRange($event)"
+ >{{ lowRange.type != 0 ? "%" : "分" }}(含)
+
+
+
+
+
@@ -468,18 +532,20 @@ export default {
data() {
return {
role: "",
- status: 0,
+ status: 0,// 1:已归档试卷
tableMaxHeight: 600,
loading: false,
exportLoading: false,
diaUp: false,
url: "/api_html/teaching/importSubjectiveScore",
id: "",
+ classId: "",
+ subjectName: "",
title: "",
score: "",
tabList: ["试题分析", "成绩排名", "小题分报表", "作答明细表"],
type: 0,
- paperModifyLog: {
+ paperModifyLog: { //修改信息
realName: "",
modifiedTime: "",
},
@@ -507,6 +573,17 @@ export default {
page: 1,
size: 20,
total: 0,
+ // 设置低分值
+ loadingTange: false,
+ diaMinScore: false,
+ lowRange: {
+ type: 0,
+ range: [60, 0],
+ },
+ defaultLowRange: {
+ type: 0,
+ range: [],
+ },
};
},
created() {
@@ -516,6 +593,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 +648,42 @@ export default {
this.page = page;
this.examQuestionReport();
},
+ // 切换低分设置类型设置默认分值
+ changeScore() {
+ this.lowRange.range = [...this.defaultLowRange.range];
+ },
+ // 禁止输入负数
+ keydownRange(event) {
+ if (event.key == "-" || event.key == "e") {
+ event.returnValue = "";
+ }
+ },
+ // 关闭低分设置
+ closeDiaMinScore() {
+ this.lowRange.type = this.defaultLowRange.type;
+ this.lowRange.range = [...this.defaultLowRange.range];
+ },
+ // 保存低分设置
+ async _SavelowRange() {
+ if(this.lowRange.range[0].trim() == "" || this.lowRange.range[1].trim() == ""){
+ this.$message.warning("请补全低分设置!");
+ return
+ }
+ this.loadingTange = true;
+ let { data, status, info } = await this.$request.setLowRange({
+ classId: this.classId,
+ subjectName: this.subjectName,
+ ...this.lowRange,
+ });
+ this.loadingTange = false;
+ if (status === 0) {
+ this.$message.success(info);
+ this.diaMinScore = false;
+ this.examDetail();
+ } else {
+ this.$message.error(info);
+ }
+ },
async _QueryData() {
this.examDetail();
this.examStudentReport();
@@ -586,6 +701,12 @@ export default {
this.paperModifyLog = { ...data?.paperModifyLog };
}
this.examReport = { ...data?.examReport };
+ this.defaultLowRange = data.lowRange || {
+ type: 1,
+ range: [60, 0],
+ };
+ this.lowRange.type = this.defaultLowRange.type;
+ this.lowRange.range = [...this.defaultLowRange.range];
} else {
this.$message.error(info);
}
@@ -625,7 +746,7 @@ export default {
detail.map((items, index) => {
params["que" + items.id] = items.id;
params["score" + items.id] = String(items.score).includes(".")
- ? Number(items.score).toFixed(2)
+ ? Number(items.score)
: items.score;
params["answer" + items.id] =
items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer;
@@ -875,4 +996,19 @@ div::-webkit-scrollbar-thumb {
}
}
}
+
+// 设置低分值
+.content-header {
+ width: 100%;
+ position: relative;
+ .setMinScore {
+ position: absolute;
+ bottom: 0;
+ right: 0px;
+ }
+}
+.score-ipt {
+ width: 80px;
+ margin: 0 5px;
+}
\ No newline at end of file