|
|
|
@ -77,8 +77,11 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import echarts from "echarts"; |
|
|
|
|
import axios from 'axios'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -97,7 +100,8 @@ export default { |
|
|
|
|
pageSize: 10, |
|
|
|
|
total: 0, |
|
|
|
|
peopleNum: 0, // 总人数 |
|
|
|
|
avgScore: 0 // 平均分 |
|
|
|
|
avgScore: 0, // 平均分 |
|
|
|
|
token: btoa(util.local.get(Setting.tokenKey)), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -143,11 +147,27 @@ export default { |
|
|
|
|
exportData() { // 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
|
if (this.multipleSelection.length) { |
|
|
|
|
let ids = this.multipleSelection.map(item => { |
|
|
|
|
return item.projectId; |
|
|
|
|
return item.reportId; |
|
|
|
|
}); |
|
|
|
|
location.href = `${this.api.exportAssessmentInfo}?ids=${ids.toString()}`; |
|
|
|
|
axios.get(`${this.api.exportAssessmentInfo}?assessmentId=${this.assessmentId}&classId=${this.classId}&ids=${ids.toString()}`,{ |
|
|
|
|
headers: { |
|
|
|
|
token: this.token |
|
|
|
|
}, |
|
|
|
|
responseType: 'blob' |
|
|
|
|
}).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 { |
|
|
|
|
location.href = `${this.api.exportAssessmentInfo}?ids=`; |
|
|
|
|
axios.get(`${this.api.exportAssessmentInfo}?assessmentId=${this.assessmentId}&classId=${this.classId}&ids=`,{ |
|
|
|
|
headers: { |
|
|
|
|
token: this.token |
|
|
|
|
}, |
|
|
|
|
responseType: 'blob' |
|
|
|
|
}).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) { // 删除 |
|
|
|
|