|
|
@ -17,17 +17,8 @@ |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="item"> |
|
|
|
<div class="item"> |
|
|
|
<p class="name">平均分</p> |
|
|
|
<p class="name">实验平均分</p> |
|
|
|
<p class="val">{{ (+statData.avgScore).toFixed(2) }}</p> |
|
|
|
<p class="val">{{ avgScore }}</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="item"> |
|
|
|
|
|
|
|
<p class="name">最高分</p> |
|
|
|
|
|
|
|
<p class="val">{{ statData.maxScore }} |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="item"> |
|
|
|
|
|
|
|
<p class="name">最低分</p> |
|
|
|
|
|
|
|
<p class="val">{{ statData.minScore }}</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="chart" id="chart"></div> |
|
|
|
<div class="chart" id="chart"></div> |
|
|
@ -35,9 +26,9 @@ |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<div class="tabs m-b-20"> |
|
|
|
<div v-if="showFile" class="tabs m-b-20"> |
|
|
|
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id === active }" |
|
|
|
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: i === active }" @click="tabChange(i)">{{ |
|
|
|
@click="tabChange(item.id)">{{ item.name }}</a> |
|
|
|
item }}</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
@ -45,9 +36,19 @@ |
|
|
|
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable |
|
|
|
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable |
|
|
|
style="width: 300px"></el-input> |
|
|
|
style="width: 300px"></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="!active"> |
|
|
|
|
|
|
|
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" :disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)" |
|
|
|
|
|
|
|
@click="delAllData">批量删除</el-button> |
|
|
|
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出' |
|
|
|
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出' |
|
|
|
}}</el-button> |
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
|
|
|
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出' |
|
|
|
|
|
|
|
}}</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<template v-if="!active"> |
|
|
|
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" |
|
|
|
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" |
|
|
|
@selection-change="handleSelectionChange" row-key="id"> |
|
|
|
@selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
@ -95,6 +96,42 @@ |
|
|
|
@current-change="handleCurrentChange" :current-page="page"> |
|
|
|
@current-change="handleCurrentChange" :current-page="page"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<el-table :data="list1" class="table" :key="2" stripe header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange1" row-key="id"> |
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.$index + (page1 - 1) * pageSize + 1 }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="schoolName" label="学生账号归属" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="realSchool" label="学生所在院校" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column v-if="competitionType" prop="teamName" label="团队名称" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userName" label="学生姓名" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="fileName" label="文件名" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="fileSize" label="文件大小" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="fileType" label="文件类型" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="fileFormat" label="文件格式" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="createTime" label="提交时间" width="150" align="center"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" width="200"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button v-if="!isCompress(scope.row.fileFormat)" type="text" |
|
|
|
|
|
|
|
@click="preview(scope.row)">预览文件</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" size="mini" :loading="scope.row.loading" |
|
|
|
|
|
|
|
@click="exportFile(scope.row)">导出文件</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div class="pagination"> |
|
|
|
|
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="total1" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange1" :current-page="page1"> |
|
|
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false" |
|
|
|
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false" |
|
|
@ -142,6 +179,7 @@ export default { |
|
|
|
stageId: +this.$route.query.stageId, |
|
|
|
stageId: +this.$route.query.stageId, |
|
|
|
method: +this.$route.query.method, |
|
|
|
method: +this.$route.query.method, |
|
|
|
competitionType: +this.$route.query.competitionType, |
|
|
|
competitionType: +this.$route.query.competitionType, |
|
|
|
|
|
|
|
showFile: this.$route.query.showFile === 'true', |
|
|
|
isCompress: util.isCompress, |
|
|
|
isCompress: util.isCompress, |
|
|
|
keyword: this.$route.query.keyword || '', |
|
|
|
keyword: this.$route.query.keyword || '', |
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
@ -165,22 +203,9 @@ export default { |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
token: sessionStorage.getItem("token") |
|
|
|
token: sessionStorage.getItem("token") |
|
|
|
}, |
|
|
|
}, |
|
|
|
statData: { |
|
|
|
statData: {}, |
|
|
|
avgScore: 0, |
|
|
|
tabs: ['成绩列表', '文件列表'], |
|
|
|
maxScore: 0, |
|
|
|
active: 0, |
|
|
|
minScore: 0, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
tabs: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 1, |
|
|
|
|
|
|
|
name: '已提交' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 0, |
|
|
|
|
|
|
|
name: '未提交' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
active: 1, |
|
|
|
|
|
|
|
loading: false, |
|
|
|
loading: false, |
|
|
|
exporting: false, |
|
|
|
exporting: false, |
|
|
|
exporting1: false, |
|
|
|
exporting1: false, |
|
|
@ -191,7 +216,7 @@ export default { |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: '/theoryArchList', |
|
|
|
path: '/otherArchList', |
|
|
|
query: { |
|
|
|
query: { |
|
|
|
...this.$route.query, |
|
|
|
...this.$route.query, |
|
|
|
keyword: val |
|
|
|
keyword: val |
|
|
@ -207,20 +232,51 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
async getData () { |
|
|
|
async getData () { |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
|
|
|
|
// 文件列表 |
|
|
|
|
|
|
|
if (this.active) { |
|
|
|
|
|
|
|
const { data } = await this.$post(this.api.cCompetitionStageFileList, { |
|
|
|
|
|
|
|
pageNum: this.page1, |
|
|
|
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
|
|
|
competitionId: this.id, |
|
|
|
|
|
|
|
stageId: this.stageId, |
|
|
|
|
|
|
|
keyWord: this.keyword, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
data.records.forEach(e => { |
|
|
|
|
|
|
|
e.loading = false |
|
|
|
|
|
|
|
e.fileType = '其他' |
|
|
|
|
|
|
|
if (util.isVideo(e.fileFormat)) { |
|
|
|
|
|
|
|
e.fileType = '视频' |
|
|
|
|
|
|
|
} else if (util.isAudio(e.fileFormat)) { |
|
|
|
|
|
|
|
e.fileType = '音频' |
|
|
|
|
|
|
|
} else if (util.isImg(e.fileFormat)) { |
|
|
|
|
|
|
|
e.fileType = '图片' |
|
|
|
|
|
|
|
} else if (util.isDoc(e.fileFormat)) { |
|
|
|
|
|
|
|
e.fileType = '文档' |
|
|
|
|
|
|
|
} else if (util.isCompress(e.fileFormat)) { |
|
|
|
|
|
|
|
e.fileType = '压缩包' |
|
|
|
|
|
|
|
} else if (e.fileType === 'pdf') { |
|
|
|
|
|
|
|
e.fileType = 'pdf' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.list1 = data.records |
|
|
|
|
|
|
|
this.total1 = data.total |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
} else { // 成绩列表 |
|
|
|
const { data, page } = await this.$post(this.api.stageGradeManagementList, { |
|
|
|
const { data, page } = await this.$post(this.api.stageGradeManagementList, { |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
keyWord: this.keyword, |
|
|
|
keyWord: this.keyword, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
isNakadai: 1, |
|
|
|
isNakadai: 1 |
|
|
|
participatingState: this.active, |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
this.total = page.total |
|
|
|
this.total = page.total |
|
|
|
this.list = page.records |
|
|
|
this.list = page.records |
|
|
|
this.statData = data |
|
|
|
this.statData = data |
|
|
|
this.getChart() |
|
|
|
this.avgScore = (+data.avgScore).toFixed(2) |
|
|
|
|
|
|
|
this.method != 2 && this.getChart() |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData () { |
|
|
|
initData () { |
|
|
|
this.page = 1 |
|
|
|
this.page = 1 |
|
|
@ -228,7 +284,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查看成绩报告 |
|
|
|
// 查看成绩报告 |
|
|
|
show (row) { |
|
|
|
show (row) { |
|
|
|
this.$router.push(`/${this.method === 1 ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`) |
|
|
|
this.$router.push(`/trialReport?reportId=${row.reportId}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
async exportData () { |
|
|
|
async exportData () { |
|
|
@ -249,7 +305,6 @@ export default { |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
isNakadai: 1, |
|
|
|
isNakadai: 1, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
participatingState: this.active, |
|
|
|
|
|
|
|
}, { |
|
|
|
}, { |
|
|
|
headers: this.headers, |
|
|
|
headers: this.headers, |
|
|
|
responseType: 'blob' |
|
|
|
responseType: 'blob' |
|
|
@ -259,22 +314,31 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
async handleDelete (row) { // 删除 |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', { |
|
|
|
exportData1 () { |
|
|
|
confirmButtonText: '确定', |
|
|
|
this.exporting1 = true |
|
|
|
cancelButtonText: '取消', |
|
|
|
let list = this.list1 |
|
|
|
type: 'warning', |
|
|
|
if (this.multipleSelection1.length) { |
|
|
|
closeOnClickModal: false, |
|
|
|
list = this.multipleSelection1 |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
} |
|
|
|
|
|
|
|
Zip('批量导出', list, () => { |
|
|
|
|
|
|
|
this.exporting1 = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
await this.$post(this.api.batchDeleteContestGrade, { |
|
|
|
handleDelete (row) { // 删除 |
|
|
|
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
|
|
|
type: "warning" |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
this.$post(this.api.batchDeleteContestGrade, { |
|
|
|
ids: [this.method == 2 ? row.scoreId : row.reportId], |
|
|
|
ids: [this.method == 2 ? row.scoreId : row.reportId], |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
stageId: this.stageId |
|
|
|
stageId: this.stageId |
|
|
|
}) |
|
|
|
}).then(res => { |
|
|
|
util.successMsg("删除成功") |
|
|
|
util.successMsg("删除成功"); |
|
|
|
this.getData() |
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}).catch(res => { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(() => { }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
delAllData () { // 批量删除 |
|
|
|
delAllData () { // 批量删除 |
|
|
|
const list = this.multipleSelection |
|
|
|
const list = this.multipleSelection |
|
|
@ -305,7 +369,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCurrentChange (val) { // 切换分页 |
|
|
|
handleCurrentChange (val) { // 切换分页 |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: '/theoryArchList', |
|
|
|
path: '/otherArchList', |
|
|
|
query: { |
|
|
|
query: { |
|
|
|
...this.$route.query, |
|
|
|
...this.$route.query, |
|
|
|
page: val |
|
|
|
page: val |
|
|
@ -318,8 +382,16 @@ export default { |
|
|
|
handleSelectionChange1 (val) { // 多选 |
|
|
|
handleSelectionChange1 (val) { // 多选 |
|
|
|
this.multipleSelection1 = val; |
|
|
|
this.multipleSelection1 = val; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
handleCurrentChange1 (val) { // 切换分页 |
|
|
|
|
|
|
|
this.page1 = val; |
|
|
|
|
|
|
|
this.getData(); |
|
|
|
|
|
|
|
}, |
|
|
|
getChart () { // 初始化折线图 |
|
|
|
getChart () { // 初始化折线图 |
|
|
|
const { fractionalSegmentCounts: data } = this.statData |
|
|
|
const data = [] |
|
|
|
|
|
|
|
const { statData } = this |
|
|
|
|
|
|
|
for (let i = 1; i <= 10; i++) { |
|
|
|
|
|
|
|
data.push(statData['num' + i]) |
|
|
|
|
|
|
|
} |
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
myChart.setOption({ |
|
|
|
myChart.setOption({ |
|
|
|
title: { text: "实验分数分布图" }, |
|
|
|
title: { text: "实验分数分布图" }, |
|
|
@ -329,7 +401,7 @@ export default { |
|
|
|
type: "category", |
|
|
|
type: "category", |
|
|
|
boundaryGap: false, |
|
|
|
boundaryGap: false, |
|
|
|
interval: 10, |
|
|
|
interval: 10, |
|
|
|
data: data.map(e => e.range) |
|
|
|
data: ["0-10", "10-20", "20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90", "90-100"] |
|
|
|
}, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
yAxis: { |
|
|
|
name: "人数", |
|
|
|
name: "人数", |
|
|
@ -337,7 +409,7 @@ export default { |
|
|
|
minInterval: 10 |
|
|
|
minInterval: 10 |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: [{ |
|
|
|
series: [{ |
|
|
|
data: data.map(e => e.count), |
|
|
|
data, |
|
|
|
type: "line", |
|
|
|
type: "line", |
|
|
|
areaStyle: {}, |
|
|
|
areaStyle: {}, |
|
|
|
color: ["#8191fd"] |
|
|
|
color: ["#8191fd"] |
|
|
@ -418,10 +490,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// tab回调 |
|
|
|
// tab回调 |
|
|
|
tabChange (i) { |
|
|
|
tabChange (i) { |
|
|
|
this.multipleSelection = [] |
|
|
|
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
|
|
|
this.active = i |
|
|
|
this.active = i |
|
|
|
this.initData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 预览附件 |
|
|
|
// 预览附件 |
|
|
|
preview (item) { |
|
|
|
preview (item) { |
|
|
@ -475,9 +545,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
.nums { |
|
|
|
.nums { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
width: 640px; |
|
|
|
|
|
|
|
margin-right: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
|
|
|
|
|
|
|
|
.item:nth-child(1) { |
|
|
|
.item:nth-child(1) { |
|
|
@ -488,14 +556,6 @@ export default { |
|
|
|
background-image: url('../../../assets/img/avg.png'); |
|
|
|
background-image: url('../../../assets/img/avg.png'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item:nth-child(3) { |
|
|
|
|
|
|
|
background-image: url('../../../assets/img/ach1.png'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.item:nth-child(4) { |
|
|
|
|
|
|
|
background-image: url('../../../assets/img/ach2.png'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
.item { |
|
|
|
width: 300px; |
|
|
|
width: 300px; |
|
|
|
min-height: 145px; |
|
|
|
min-height: 145px; |
|
|
@ -520,7 +580,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart { |
|
|
|
.chart { |
|
|
|
width: calc(100% - 660px); |
|
|
|
flex: 1; |
|
|
|
height: 300px; |
|
|
|
height: 300px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |