diff --git a/src/api/apis/apis.js b/src/api/apis/apis.js
index 07e69a3..d87bfe4 100644
--- a/src/api/apis/apis.js
+++ b/src/api/apis/apis.js
@@ -74,6 +74,33 @@ export default {
data,
});
},
+ //班主任-导出阶段问答报表
+ cTExportPhaseAnswerReport(data) {
+ return service({
+ url: setUpUrls.cTExportPhaseAnswerReport,
+ method: "POST",
+ data,
+ responseType: 'arraybuffer',
+ });
+ },
+ //班主任-导出阶段互动报表
+ cTExportPhaseInteractiveReport(data) {
+ return service({
+ url: setUpUrls.cTExportPhaseInteractiveReport,
+ method: "POST",
+ data,
+ responseType: 'arraybuffer',
+ });
+ },
+ //班主任-导出阶段测练报表
+ cTExportPhaseExamReport(data) {
+ return service({
+ url: setUpUrls.cTExportPhaseExamReport,
+ method: "POST",
+ data,
+ responseType: 'arraybuffer',
+ });
+ },
//任课老师-查询管理的班级
tClassList(data) {
diff --git a/src/api/urls/apis.js b/src/api/urls/apis.js
index 1952534..3be8ba9 100644
--- a/src/api/urls/apis.js
+++ b/src/api/urls/apis.js
@@ -18,6 +18,12 @@ export default {
cTPhaseInteractiveReport: "/api_html/class/manager/phaseInteractiveReport",
//班主任-查询阶段测练报表
cTPhaseExamReport: "/api_html/class/manager/phaseExamReport",
+ //班主任-导出阶段问答报表
+ cTExportPhaseAnswerReport: "/api_html/class/manager/exportPhaseAnswerReport",
+ //班主任- 导出阶段互动报表
+ cTExportPhaseInteractiveReport: "/api_html/class/manager/exportPhaseInteractiveReport",
+ //班主任- 导出阶段测练报表
+ cTExportPhaseExamReport: "/api_html/class/manager/exportPhaseExamReport",
//任课老师-查询管理班级
tClassList: "/api_html/teaching/classList",
diff --git a/src/views/ask/analysis.vue b/src/views/ask/analysis.vue
index 830ab63..ad9fe38 100644
--- a/src/views/ask/analysis.vue
+++ b/src/views/ask/analysis.vue
@@ -50,7 +50,7 @@
已答总正确率:{{ detail.answerCorrectRate }}%
- 反馈时长:{{ detail.consumingDuration }}分钟
+ 反馈时长:{{ setDuration(detail.consumingDuration) }}
@@ -333,9 +333,22 @@ export default {
this._QueryData();
},
setDuration(times){
- let m = parseInt(times/60)
- let s = times%60
- return `${m}分${s}秒`
+ let m = parseInt(times/1000 / 60)
+ let s = parseInt((times/1000)%60)
+ let ms = times
+ let aTime;
+ if(times==0){
+ aTime = `0分钟`
+ }else{
+ if(m==0&&s==0){
+ aTime = `${ms}毫秒`
+ }else if(m==0&&s!=0){
+ aTime = `${s}秒`
+ }else if(m!=0&&s!=0){
+ aTime = `${m}分${s}秒`
+ }
+ }
+ return aTime
},
setSubPro(type) {
let tit;
diff --git a/src/views/ask/index.vue b/src/views/ask/index.vue
index 35b08a3..fc55160 100644
--- a/src/views/ask/index.vue
+++ b/src/views/ask/index.vue
@@ -93,9 +93,7 @@
@change="tabChange"
style="margin-bottom: 20px"
>
- 单课时报表
+ 单课时报表
@@ -439,7 +437,10 @@
>
-
+
数据导出至U盘
-
- 本功能将云平台的数据导出到U盘。
-
+ 本功能将云平台的数据导出到U盘。
+
+
+
+ {{tipData.paperNum}}
+ {{tipData.periodNum}}
+ {{tipData.examNum}}
+
+
+
@@ -53,6 +64,12 @@ export default {
downLoading: false,
url: "/api_html/teaching/importData",
file: {},
+ dialogVisible: false,
+ tipData: {
+ paperNum: 0,
+ periodNum: 0,
+ examNum: 0,
+ },
};
},
methods: {
@@ -61,13 +78,16 @@ export default {
this.downLoading = true;
const data = await this.$request.exportData();
this.downLoading = false;
- console.log(data)
+ console.log(data);
if (data) {
- let blob = new Blob([data], {type: 'application/octet-stream'})
+ let blob = new Blob([data], { type: "application/octet-stream" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
document.body.appendChild(link);
- link.download = this.$store.getters.info.name+formatDate(new Date,'yyyy_MM_dd_hh_mm_ss')+"文件.json";
+ link.download =
+ this.$store.getters.info.name +
+ formatDate(new Date(), "yyyy_MM_dd_hh_mm_ss") +
+ "文件.json";
link.href = url;
link.click();
document.body.removeChild(link);
@@ -91,16 +111,15 @@ export default {
// }
},
upSuccess(res) {
- debugger
- if (res && res.status == 0 ) {
- this.$message.success("上传成功");
- this.$emit("upSuccess");
+ if (res && res.status == 0) {
+ this.tipData = res.data
+ this.dialogVisible = true
} else {
this.$message.error(res.info);
}
},
upError(res) {
- debugger
+ debugger;
if (res && res.status == 0) {
this.$message.error("上传失败");
} else {
@@ -121,6 +140,7 @@ export default {
justify-content: center;
.down-item {
width: 400px;
+ height:330px;
border-radius: 20px;
margin: 20px;
background: #f8f8f8;
@@ -140,8 +160,10 @@ export default {
}
}
.upload-demo {
- display: flex;
- justify-content: center;
+ padding:0 20px 20px;
+ :deep(.el-upload--text){
+ display: block;
+ }
}
:deep(.el-upload) {
margin: 0 auto;
@@ -151,7 +173,7 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
- padding-bottom: 40px;
+ padding-bottom: 10px;
.fa {
font-size: 80px;
color: #aeaeae;
diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue
index ae3dfb6..e2e90c1 100644
--- a/src/views/examinationPaper/add.vue
+++ b/src/views/examinationPaper/add.vue
@@ -308,7 +308,7 @@
>
{
- if (!item.questionTitle) {
- valid += index + 1 + "、";
- }
- });
- if (valid) {
- this.$message.error(
- `大题名称不能为空,请检查第${valid.slice(0, -1)}题!`
- );
- return;
- }
+ // let valid = "";
+ // this.form.questionList.map((item, index) => {
+ // if (!item.questionTitle) {
+ // valid += index + 1 + "、";
+ // }
+ // });
+ // if (valid) {
+ // this.$message.error(
+ // `大题名称不能为空,请检查第${valid.slice(0, -1)}题!`
+ // );
+ // return;
+ // }
let questionList = this.form.questionList.map((item) => {
item.score = null;
// item.questionId = "";
diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue
index 6f3bfcb..1b8774d 100644
--- a/src/views/examinationPaper/index.vue
+++ b/src/views/examinationPaper/index.vue
@@ -108,7 +108,7 @@
}}
-
+
diff --git a/src/views/test/index.vue b/src/views/test/index.vue
index fab7de4..a96e959 100644
--- a/src/views/test/index.vue
+++ b/src/views/test/index.vue
@@ -322,8 +322,12 @@
-
-
+
+
- 导出报表
@@ -462,7 +470,7 @@ export default {
components: { editAnswer },
data() {
return {
- exportLoading:false,
+ exportLoading: false,
tableMaxHeight: 300,
role: "",
loading: false,
@@ -842,8 +850,8 @@ export default {
this.$message.error(info);
}
},
- async downExl(){
- if (this.exportLoading == true) return;
+ async downExl() {
+ if (this.exportLoading == true) return;
let query = {};
for (let key in this.query) {
if (this.query[key] != "") {
@@ -870,21 +878,22 @@ export default {
return;
}
}
+ const exportPhaseExamReport =
+ this.role == "ROLE_BANZHUREN"
+ ? this.$request.cTExportPhaseExamReport
+ : this.$request.exportPhaseExamReport;
this.exportLoading = true;
- const data = await this.$request.exportPhaseExamReport({ ...query });
+ const data = await exportPhaseExamReport({ ...query });
this.exportLoading = false;
if (data) {
let blob = new Blob([data], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
- downloadFile(
- "即时测-阶段测练报表.xlsx",
- blob
- );
+ downloadFile("即时测-阶段测练报表.xlsx", blob);
} else {
this.$message.error("下载失败");
}
- }
+ },
},
};