|
|
|
@ -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("确定要删除吗?", "提示", { |
|
|
|
|