修改导出与修改考核倒计时结束bug

dev_2022-05-11
e 3 years ago
parent bd93eb4dd7
commit 121e24498e
  1. 34
      src/pages/achievement/ass/index.vue
  2. 2
      src/pages/achievement/teach/index.vue
  3. 12
      src/pages/assessment/list/index.vue
  4. 3
      src/pages/match/manage/matchDetail.vue

@ -80,8 +80,10 @@
</template>
<script>
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
import axios from 'axios';
export default {
data() {
@ -89,6 +91,7 @@ export default {
id: this.$route.query.id,
classId: this.$route.query.classId,
projectId: this.$route.query.projectId,
assessmentId:'',
classInfo: [],
experimentalName: this.$route.query.experimentalName,
className: this.$route.query.class,
@ -100,6 +103,7 @@ export default {
total: 0,
avg: 0,
activeName:'',
token: util.local.get(Setting.tokenKey),
};
},
mounted() {
@ -109,6 +113,7 @@ export default {
this.classInfo[i].id = id.toString()
}
this.activeName= this.classInfo[0].id
this.id = this.$route.query.id
this.getData();
},
methods: {
@ -121,6 +126,7 @@ export default {
this.avg = res.avgScore
this.total = res.peopleNum
let list = res.page.records;
this.assessmentId = res.page.records[0].assessmentId;
let score = 0;
list.map(n => {
n.class = this.className;
@ -154,18 +160,28 @@ export default {
},
exportData() {
if (!this.listData.length) return false;
let selected = this.multipleSelection;
let exportList = [];
if (selected.length) {
exportList = selected.map(item => {
return item.recordId;
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.reportId;
});
axios.get(`${this.api.exportAssessmentInfo}?assessmentId=${+this.id}&classId=${this.activeName}&ids=${ids.toString()}`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
}).catch(res => {})
} else {
exportList = this.listData.map(item => {
return item.recordId;
});
axios.get(`${this.api.exportAssessmentInfo}?assessmentId=${+this.id}&classId=${this.activeName}&ids=`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
}).catch(res => {})
}
window.open(`${this.api.exportAchievement}?ids=${exportList.join(",")}&projectId=${this.projectId}&source=2`);
},
handleDelete(row) {
this.$confirm("确定要删除吗?", "提示", {

@ -157,7 +157,6 @@ export default {
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = `${this.api.exportAssessmentInfo}?assessmentId=${this.assessmentId}&classId=${this.classId}&token=${this.token}&ids=${ids.toString()}`;
} else {
axios.get(`${this.api.exportAssessmentInfo}?assessmentId=${this.assessmentId}&classId=${this.classId}&ids=`,{
headers: {
@ -167,7 +166,6 @@ export default {
}).then((res) => {
util.downloadFileDirect(`按数据库统计使用概况导出.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = `${this.api.exportAssessmentInfo}?assessmentId=${this.assessmentId}&classId=${this.classId}&token=${this.token}&ids=`;
}
},
handleDelete(row) { //

@ -86,7 +86,7 @@
</el-table-column>
<el-table-column label="倒计时" align="center">
<template slot-scope="scope">
<span>{{ timeFilter(scope.row.countDown) }}</span>
<span>{{ timeFilter(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column label="实验状态" align="center">
@ -204,6 +204,7 @@ export default {
if (val) {
this.form.startTime = val[0];
this.form.endTime = val[1];
// this.form.month = ''
} else {
this.form.startTime = "";
this.form.endTime = "";
@ -254,12 +255,13 @@ export default {
}, 1000);
},
timeFilter(countDown) {
if (countDown > 0) {
let h = Math.floor(countDown / (60 * 60));
let m = Math.floor(countDown % (60 * 60) / 60);
let s = Math.floor(countDown % (60 * 60) % 60);
if (countDown.countDown > 0) {
let h = Math.floor(countDown.countDown / (60 * 60));
let m = Math.floor(countDown.countDown % (60 * 60) / 60);
let s = Math.floor(countDown.countDown % (60 * 60) % 60);
return `${h > 9 ? h : `0${h}`}:${m > 9 ? m : `0${m}`}:${s > 9 ? s : `0${s}`}`;
} else {
countDown.status = 2
return "00:00:00";
}
},

@ -141,7 +141,6 @@ export default {
},
watch: {
signupTime: function(val) {
this.touchTime = this.touchTime+1
if (val) {
this.signUpStartTime = val[0];
this.signUpEndTime = val[1];
@ -151,7 +150,6 @@ export default {
}
},
playTime: function(val) {
this.touchTime = this.touchTime+1
if (val) {
this.playStartTime = val[0];
this.playEndTime = val[1];
@ -237,7 +235,6 @@ export default {
});
},
commitId() {
this.touchTime = this.touchTime+1
this.setMatchId(this.id);
// this.$store.commit("setMatchId", { matchId: this.id });
},

Loading…
Cancel
Save