diff --git a/src/api/axios.js b/src/api/axios.js
index 720a7c3..70fd450 100644
--- a/src/api/axios.js
+++ b/src/api/axios.js
@@ -24,6 +24,13 @@ service.interceptors.request.use(
const source = axios.CancelToken.source();
store.commit("setTokenSources", [source.token, source.cancel]);
config.cancelToken = source.token;
+ const role = store.getters.info.showRole || store.getters.info.permissions[0].role;
+ if (role == "ROLE_BANZHUREN") {
+ const classes = store.getters.classes
+ config.manager = 1
+ config.classes = classes
+ }
+ console.log(config)
return config;
},
(error) => {
diff --git a/src/components/charts/lineChart.vue b/src/components/charts/lineChart.vue
index 7cf3ae4..768badb 100644
--- a/src/components/charts/lineChart.vue
+++ b/src/components/charts/lineChart.vue
@@ -57,6 +57,7 @@ export default {
},
axisLabel: {
color: "#333",
+ interval: 0
},
},
yAxis: {
diff --git a/src/components/exportDia.vue b/src/components/exportDia.vue
index 7961ee8..87032b9 100644
--- a/src/components/exportDia.vue
+++ b/src/components/exportDia.vue
@@ -25,10 +25,13 @@
{{
- scoped.row.classRank || scoped.row.rank }}
+ scoped.row.classRank || scoped.row.rank || scoped.row.examList[0].classRank }}
- {{
- scoped.row.correctRate|| scoped.row.scoringRate }}%
+
+ {{
+ scoped.row.correctRate || scoped.row.scoringRate }}%
+ {{ scoped.row.examList[0].score }}
+
-
+
diff --git a/src/views/basic/test/components/scoreSet.vue b/src/views/basic/test/components/scoreSet.vue
index f21ef7c..6ea21e1 100644
--- a/src/views/basic/test/components/scoreSet.vue
+++ b/src/views/basic/test/components/scoreSet.vue
@@ -161,7 +161,7 @@ export default {
upSuccess(res) {
this.$message.success("导入成功");
this.diaUp = false;
- this._QueryData()
+ this.closeScoreSet()
},
async downExcel() {
//模板下载
diff --git a/src/views/basic/test/components/test.vue b/src/views/basic/test/components/test.vue
index 061177c..c320dc2 100644
--- a/src/views/basic/test/components/test.vue
+++ b/src/views/basic/test/components/test.vue
@@ -651,7 +651,7 @@ div::-webkit-scrollbar-thumb {
background-color: #ffebec;
font-size: 14px;
color: #fd9795;
- margin: 10px 20px 0 20px;
+ margin: 0 20px 10px 20px;
display: flex;
&-p {
diff --git a/src/views/basic/test/index.vue b/src/views/basic/test/index.vue
index 588b00a..6de3128 100644
--- a/src/views/basic/test/index.vue
+++ b/src/views/basic/test/index.vue
@@ -87,7 +87,7 @@ export default {
};
},
async created() {
- this.code = localStorage.getItem("csCode") || "";
+ this.code = this.$store.getters.csCode;
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
diff --git a/src/views/basic/test/list.vue b/src/views/basic/test/list.vue
index a266f1e..c0c083c 100644
--- a/src/views/basic/test/list.vue
+++ b/src/views/basic/test/list.vue
@@ -62,13 +62,11 @@
- {{
- `${index == 0 ? '' : '/'}` + item.className
- }}
+ {{ `${index == 0 ? '' : '/'}` + item }}
-
+
1) {
this.isMultipleClass = true
}
@@ -225,11 +223,12 @@ export default {
},
// 多班对比
linkContrast(obj) {
+ console.log(obj)
this.$router.push({
path: "/testAnalysis",
query: {
- ids: obj.ids,
- classId: obj.classList.map(item => item.classId).join(),
+ ids: obj.ids.join(','),
+ classId: obj.classIds.join(','),
subjectName: obj.subjectName,
title: obj.title,
type: 4
@@ -284,7 +283,7 @@ export default {
for (let key in this.query) {
if (this.query[key] != "") {
if (key == 'classId') {
- if (query.classId?.length == 1) {
+ if (this.query.classId?.length == 1) {
query.classId = this.query[key][0]
} else {
query.classIds = [...this.query[key]]
@@ -303,8 +302,35 @@ export default {
});
this.loading = false;
if (status === 0) {
- this.tableData = (data?.list && [...data?.list]) || [];
- this.total = data?.count || 0;
+ if (this.query.classId.length > 1) {
+ //多班级
+ let tableObj = {};
+ data?.list?.map((item) => {
+ if (tableObj[item.examPaperId]) {
+ tableObj[item.examPaperId].ids.push(item.id)
+ tableObj[item.examPaperId].classIds.push(item.classId)
+ tableObj[item.examPaperId].classNames.push(item.className)
+ } else {
+ tableObj[item.examPaperId] = {
+ ids: [item.id],
+ examPaperId: item.examPaperId,
+ classIds: [item.classId],
+ classNames: [item.className],
+ title: item.title,
+ examPaperScore: item.examPaperScore,
+ subjectName: item.subjectName
+ }
+ }
+ });
+ Object.keys(tableObj).map(keys => {
+ if (tableObj[keys].classIds.length > 1) {
+ this.tableData.push(tableObj[keys])
+ }
+ })
+ } else {
+ this.tableData = (data?.list && [...data?.list]) || [];
+ this.total = data?.count || 0;
+ }
} else {
this.$message.error(info);
}
diff --git a/src/views/examinationPaper/archiving.vue b/src/views/examinationPaper/archiving.vue
index 5fc0cb4..301b03a 100644
--- a/src/views/examinationPaper/archiving.vue
+++ b/src/views/examinationPaper/archiving.vue
@@ -142,7 +142,7 @@ export default {
};
},
async created() {
- this.code = localStorage.getItem("csCode") || "";
+ this.code = this.$store.getters.csCode;
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue
index be22a27..1d49cc8 100644
--- a/src/views/examinationPaper/index.vue
+++ b/src/views/examinationPaper/index.vue
@@ -190,7 +190,7 @@ export default {
};
},
async created() {
- this.code = localStorage.getItem("csCode") || "";
+ this.code = this.$store.getters.csCode;
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
diff --git a/src/views/index/mainIndex.vue b/src/views/index/mainIndex.vue
index e0337cd..07ecde7 100644
--- a/src/views/index/mainIndex.vue
+++ b/src/views/index/mainIndex.vue
@@ -257,7 +257,7 @@ export default {
},
},
created() {
- this.code = localStorage.getItem("csCode") || "";
+ this.code = this.$store.getters.csCode;
this._Init(this.$store.getters.info.showRoleName);
this._QueryData();
},
diff --git a/src/views/layout/aside/aside.vue b/src/views/layout/aside/aside.vue
index 656a894..43d3ccf 100644
--- a/src/views/layout/aside/aside.vue
+++ b/src/views/layout/aside/aside.vue
@@ -86,7 +86,7 @@ export default {
};
},
created() {
- this.code = getURLParams("code") || localStorage.getItem("csCode") || "";
+ this.code = getURLParams("code") || this.$store.getters.csCode;
this.path = this.$route.path;
},
methods: {
diff --git a/src/views/layout/header/header.vue b/src/views/layout/header/header.vue
index b0c4de8..17c29e6 100644
--- a/src/views/layout/header/header.vue
+++ b/src/views/layout/header/header.vue
@@ -194,7 +194,7 @@ export default {
};
},
created() {
- this.code = localStorage.getItem("csCode") || "";
+ this.code = this.$store.getters.csCode;
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index fa20cc2..8bfaaa0 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -115,7 +115,7 @@ export default {
},
created() {
this.url = this.$route.query?.url || "";
- this.code = getURLParams("code") || localStorage.getItem("csCode") || "";
+ this.code = getURLParams("code") || this.$store.getters.csCode;
this.dockkey = getURLParams("dockkey") || "";
if (this.code || this.dockkey) {
this.loading = true;