|
|
@ -9,259 +9,276 @@ |
|
|
|
|
|
|
|
|
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card v-if="method != 2" |
|
|
|
<div v-loading="loading"> |
|
|
|
shadow="hover" |
|
|
|
<el-card v-if="method != 2" |
|
|
|
class="m-b-20"> |
|
|
|
shadow="hover" |
|
|
|
<div class="stat"> |
|
|
|
class="m-b-20"> |
|
|
|
<div class="nums"> |
|
|
|
<div class="stat"> |
|
|
|
<div class="item"> |
|
|
|
<div class="nums"> |
|
|
|
<p class="name">已参加/应参加人数</p> |
|
|
|
<div class="item"> |
|
|
|
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}</p> |
|
|
|
<p class="name">已参加/应参加人数</p> |
|
|
|
</div> |
|
|
|
<p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}</p> |
|
|
|
<div class="item"> |
|
|
|
</div> |
|
|
|
<p class="name">实验平均分</p> |
|
|
|
<div class="item"> |
|
|
|
<p class="val">{{ avgScore }}</p> |
|
|
|
<p class="name">实验平均分</p> |
|
|
|
|
|
|
|
<p class="val">{{ avgScore }}</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="chart" |
|
|
|
|
|
|
|
id="chart"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="chart" |
|
|
|
</el-card> |
|
|
|
id="chart"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
|
|
|
class="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: i === active}" |
|
|
|
|
|
|
|
@click="tabChange(i)">{{ item }}</a> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<el-card shadow="hover" |
|
|
|
<div> |
|
|
|
class="m-b-20"> |
|
|
|
<el-input size="small" |
|
|
|
<div v-if="showFile" |
|
|
|
placeholder="请输入学校/学生姓名" |
|
|
|
class="tabs m-b-20"> |
|
|
|
prefix-icon="el-icon-search" |
|
|
|
<a class="item" |
|
|
|
v-model="keyword" |
|
|
|
v-for="(item, i) in tabs" |
|
|
|
clearable |
|
|
|
:key="i" |
|
|
|
style="width: 300px"></el-input> |
|
|
|
:class="{active: i === active}" |
|
|
|
</div> |
|
|
|
@click="tabChange(i)">{{ item }}</a> |
|
|
|
<div v-if="!active"> |
|
|
|
|
|
|
|
<el-button v-if="method == 2" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="batchImport">上传成绩</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
@click="delAllData">批量删除</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
@click="exportData">导出</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
:loading="loading" |
|
|
|
|
|
|
|
@click="exportData1">{{ loading ? '正在导出' : '批量导出' }}</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<template v-if="!active"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<el-table :data="list" |
|
|
|
<div> |
|
|
|
class="table" |
|
|
|
<el-input size="small" |
|
|
|
ref="table" |
|
|
|
placeholder="请输入学校/学生姓名" |
|
|
|
stripe |
|
|
|
prefix-icon="el-icon-search" |
|
|
|
header-align="center" |
|
|
|
v-model="keyword" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
clearable |
|
|
|
row-key="reportId"> |
|
|
|
style="width: 300px"></el-input> |
|
|
|
<el-table-column type="selection" |
|
|
|
</div> |
|
|
|
width="55" |
|
|
|
<div v-if="!active"> |
|
|
|
align="center" |
|
|
|
<el-button v-if="method == 2" |
|
|
|
:reserve-selection="true"></el-table-column> |
|
|
|
type="primary" |
|
|
|
<el-table-column type="index" |
|
|
|
@click="batchImport">上传成绩</el-button> |
|
|
|
width="60" |
|
|
|
<el-button type="primary" |
|
|
|
label="序号" |
|
|
|
:disabled="!!multipleSelection.find(e => method != 2 && !e.reportId)" |
|
|
|
align="center"> |
|
|
|
@click="delAllData">批量删除</el-button> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" |
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
:loading="exporting" |
|
|
|
</template> |
|
|
|
@click="exportData">{{ exporting ? '正在导出' : '批量导出' }}</el-button> |
|
|
|
</el-table-column> |
|
|
|
</div> |
|
|
|
<el-table-column prop="schoolName" |
|
|
|
<div v-else> |
|
|
|
label="学校" |
|
|
|
<el-button type="primary" |
|
|
|
min-width="150" |
|
|
|
:loading="exporting1" |
|
|
|
align="center"></el-table-column> |
|
|
|
@click="exportData1">{{ exporting1 ? '正在导出' : '批量导出' }}</el-button> |
|
|
|
<el-table-column v-if="competitionType" |
|
|
|
</div> |
|
|
|
prop="teamName" |
|
|
|
|
|
|
|
label="团队名称" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
|
|
|
label="学生姓名" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="workNumber" |
|
|
|
|
|
|
|
label="学号" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="score" |
|
|
|
|
|
|
|
label="分数" |
|
|
|
|
|
|
|
width="90" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.submitTime ? scope.row.score : '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="timeSum" |
|
|
|
|
|
|
|
label="耗时" |
|
|
|
|
|
|
|
width="90" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="submitTime" |
|
|
|
|
|
|
|
label="提交时间" |
|
|
|
|
|
|
|
min-width="150" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.submitTime || '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="160"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button v-if="method != 2" |
|
|
|
|
|
|
|
:disabled="!scope.row.reportId" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button> |
|
|
|
|
|
|
|
<el-button v-if="scope.row.reportId" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div class="pagination"> |
|
|
|
|
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
:current-page="page"> |
|
|
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<el-table :data="list1" |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
:key="2" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange1" |
|
|
|
|
|
|
|
row-key="reportId"> |
|
|
|
|
|
|
|
<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 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="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
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> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template v-if="!active"> |
|
|
|
</el-card> |
|
|
|
<el-table :data="list" |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
ref="table" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
|
|
row-key="reportId"> |
|
|
|
|
|
|
|
<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 + (page - 1) * pageSize + 1 }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="schoolName" |
|
|
|
|
|
|
|
label="学生账号归属" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="realSchool" |
|
|
|
|
|
|
|
label="学生所属院校" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column v-if="competitionType" |
|
|
|
|
|
|
|
prop="teamName" |
|
|
|
|
|
|
|
label="团队名称" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
|
|
|
label="学生姓名" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="workNumber" |
|
|
|
|
|
|
|
label="学号" |
|
|
|
|
|
|
|
min-width="100" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="score" |
|
|
|
|
|
|
|
label="分数" |
|
|
|
|
|
|
|
width="90" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.submitTime ? scope.row.score : '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="timeSum" |
|
|
|
|
|
|
|
label="耗时" |
|
|
|
|
|
|
|
width="90" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="submitTime" |
|
|
|
|
|
|
|
label="提交时间" |
|
|
|
|
|
|
|
min-width="150" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
{{ scope.row.submitTime || '--' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="160"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-button v-if="method != 2" |
|
|
|
|
|
|
|
:disabled="!scope.row.reportId" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button> |
|
|
|
|
|
|
|
<el-button v-if="scope.row.reportId" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div class="pagination"> |
|
|
|
|
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
:current-page="page"> |
|
|
|
|
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<el-table :data="list1" |
|
|
|
|
|
|
|
class="table" |
|
|
|
|
|
|
|
:key="2" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange1" |
|
|
|
|
|
|
|
row-key="reportId"> |
|
|
|
|
|
|
|
<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="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
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> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="批量导入" |
|
|
|
<el-dialog title="批量导入" |
|
|
|
:visible.sync="importVisible" |
|
|
|
:visible.sync="importVisible" |
|
|
|
width="24%" |
|
|
|
width="24%" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div style="text-align: center"> |
|
|
|
<div style="text-align: center"> |
|
|
|
<div style="margin-bottom: 10px;"> |
|
|
|
<template v-if="!uploadFaild"> |
|
|
|
<el-button type="primary" |
|
|
|
<div style="margin-bottom: 10px;"> |
|
|
|
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> |
|
|
|
<el-button type="primary" |
|
|
|
</div> |
|
|
|
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> |
|
|
|
<el-upload ref="importStaff" |
|
|
|
</div> |
|
|
|
name="file" |
|
|
|
<el-upload ref="upload" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
name="file" |
|
|
|
:on-remove="handleRemove" |
|
|
|
class="import-file" |
|
|
|
:on-error="uploadError" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
:on-success="uploadSuccess" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:limit="1" |
|
|
|
:on-error="uploadError" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:on-success="uploadSuccess" |
|
|
|
:action="this.api.batchImportGrades" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
:file-list="uploadList" |
|
|
|
:limit="1" |
|
|
|
:headers="headers" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:data="{ |
|
|
|
:action="this.api.batchImportGrades" |
|
|
|
|
|
|
|
:file-list="uploadList" |
|
|
|
|
|
|
|
:headers="headers" |
|
|
|
|
|
|
|
:disabled="uploading" |
|
|
|
|
|
|
|
:data="{ |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
systemId: 0 |
|
|
|
systemId: 0 |
|
|
|
}"> |
|
|
|
}"> |
|
|
|
<el-button type="primary" |
|
|
|
<el-button type="primary" |
|
|
|
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
:loading="uploading" |
|
|
|
</el-upload> |
|
|
|
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
<el-link v-if="uploadFaild" |
|
|
|
</el-upload> |
|
|
|
type="primary" |
|
|
|
</template> |
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</el-link> |
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<p style="margin-bottom: 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p> |
|
|
|
|
|
|
|
<p type="primary" |
|
|
|
|
|
|
|
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" |
|
|
|
|
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</p> |
|
|
|
|
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span slot="footer" |
|
|
|
<span v-if="uploading" |
|
|
|
|
|
|
|
slot="footer" |
|
|
|
class="dialog-footer"> |
|
|
|
class="dialog-footer"> |
|
|
|
<el-button size="small" |
|
|
|
<el-button @click="cancelUpload">停止导入</el-button> |
|
|
|
@click="importVisible = false">取 消</el-button> |
|
|
|
|
|
|
|
<el-button size="small" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="uploadSure">确 定</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -299,14 +316,17 @@ export default { |
|
|
|
importVisible: false, |
|
|
|
importVisible: false, |
|
|
|
uploadList: [], |
|
|
|
uploadList: [], |
|
|
|
uploadFaild: false, |
|
|
|
uploadFaild: false, |
|
|
|
exportCode: '', |
|
|
|
uploading: false, |
|
|
|
|
|
|
|
faildData: null, |
|
|
|
headers: { |
|
|
|
headers: { |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
}, |
|
|
|
}, |
|
|
|
statData: {}, |
|
|
|
statData: {}, |
|
|
|
tabs: ['成绩列表', '文件列表'], |
|
|
|
tabs: ['成绩列表', '文件列表'], |
|
|
|
active: 0, |
|
|
|
active: 0, |
|
|
|
loading: false |
|
|
|
loading: false, |
|
|
|
|
|
|
|
exporting: false, |
|
|
|
|
|
|
|
exporting1: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -321,51 +341,52 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getData () { |
|
|
|
async getData () { |
|
|
|
|
|
|
|
this.loading = true |
|
|
|
// 文件列表 |
|
|
|
// 文件列表 |
|
|
|
if (this.active) { |
|
|
|
if (this.active) { |
|
|
|
this.$post(this.api.cCompetitionStageFileList, { |
|
|
|
const { data } = await this.$post(this.api.cCompetitionStageFileList, { |
|
|
|
pageNum: this.page1, |
|
|
|
pageNum: this.page1, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
keyWord: this.keyword, |
|
|
|
keyWord: this.keyword, |
|
|
|
}).then(({ data }) => { |
|
|
|
}) |
|
|
|
data.records.forEach(e => { |
|
|
|
data.records.forEach(e => { |
|
|
|
e.loading = false |
|
|
|
e.loading = false |
|
|
|
e.fileType = '其他' |
|
|
|
e.fileType = '其他' |
|
|
|
if (util.isVideo(e.fileFormat)) { |
|
|
|
if (util.isVideo(e.fileFormat)) { |
|
|
|
e.fileType = '视频' |
|
|
|
e.fileType = '视频' |
|
|
|
} else if (util.isAudio(e.fileFormat)) { |
|
|
|
} else if (util.isAudio(e.fileFormat)) { |
|
|
|
e.fileType = '音频' |
|
|
|
e.fileType = '音频' |
|
|
|
} else if (util.isImg(e.fileFormat)) { |
|
|
|
} else if (util.isImg(e.fileFormat)) { |
|
|
|
e.fileType = '图片' |
|
|
|
e.fileType = '图片' |
|
|
|
} else if (util.isDoc(e.fileFormat)) { |
|
|
|
} else if (util.isDoc(e.fileFormat)) { |
|
|
|
e.fileType = '文档' |
|
|
|
e.fileType = '文档' |
|
|
|
} else if (util.isCompress(e.fileFormat)) { |
|
|
|
} else if (util.isCompress(e.fileFormat)) { |
|
|
|
e.fileType = '压缩包' |
|
|
|
e.fileType = '压缩包' |
|
|
|
} else if (e.fileType === 'pdf') { |
|
|
|
} else if (e.fileType === 'pdf') { |
|
|
|
e.fileType = 'pdf' |
|
|
|
e.fileType = 'pdf' |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.list1 = data.records |
|
|
|
this.list1 = data.records |
|
|
|
this.total1 = data.total |
|
|
|
this.total1 = data.total |
|
|
|
}).catch(res => { }) |
|
|
|
this.loading = false |
|
|
|
} else { // 成绩列表 |
|
|
|
} else { // 成绩列表 |
|
|
|
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 |
|
|
|
}).then(({ data, page }) => { |
|
|
|
}) |
|
|
|
this.total = page.total |
|
|
|
this.total = page.total |
|
|
|
this.list = page.records |
|
|
|
this.list = page.records |
|
|
|
this.statData = data |
|
|
|
this.statData = data |
|
|
|
this.avgScore = (+data.avgScore).toFixed(2) |
|
|
|
this.avgScore = (+data.avgScore).toFixed(2) |
|
|
|
this.getChart() |
|
|
|
this.getChart() |
|
|
|
}).catch(res => { }) |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData () { |
|
|
|
initData () { |
|
|
@ -377,50 +398,42 @@ export default { |
|
|
|
this.$router.push(`/match/report?reportId=${row.reportId}`) |
|
|
|
this.$router.push(`/match/report?reportId=${row.reportId}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
exportData () { |
|
|
|
async exportData () { |
|
|
|
// 有选择数据,则导出已选择的,否则导出全部 |
|
|
|
if (this.list.length) { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
this.exporting = true |
|
|
|
axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, { |
|
|
|
// 有选择数据,则导出已选择的,否则导出全部 |
|
|
|
headers: this.headers, |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
responseType: 'blob' |
|
|
|
const res = await axios.post(this.api.exportExperimentalResultsInBatch, this.multipleSelection, { |
|
|
|
}).then((res) => { |
|
|
|
headers: this.headers, |
|
|
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
|
|
}) |
|
|
|
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) |
|
|
|
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) |
|
|
|
}).catch(res => { }) |
|
|
|
this.exporting = false |
|
|
|
} else if (this.list.length) { |
|
|
|
} else { |
|
|
|
axios.post(this.api.allExperimentalResultsAreDerived, { |
|
|
|
const res = await axios.post(this.api.allExperimentalResultsAreDerived, { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10000, |
|
|
|
pageSize: 10000, |
|
|
|
competitionId: this.id, |
|
|
|
competitionId: this.id, |
|
|
|
isNakadai: 1, |
|
|
|
isNakadai: 1, |
|
|
|
stageId: this.stageId, |
|
|
|
stageId: this.stageId, |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
headers: this.headers, |
|
|
|
headers: this.headers, |
|
|
|
responseType: 'blob' |
|
|
|
responseType: 'blob' |
|
|
|
}).then((res) => { |
|
|
|
}) |
|
|
|
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) |
|
|
|
util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) |
|
|
|
}).catch(res => { }) |
|
|
|
this.exporting = false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// let { list } = this |
|
|
|
|
|
|
|
// if (this.multipleSelection.length) { |
|
|
|
|
|
|
|
// list = this.multipleSelection |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// axios.post(this.api.exportExperimentalResultsInBatch, list, { |
|
|
|
|
|
|
|
// headers: this.headers, |
|
|
|
|
|
|
|
// responseType: 'blob' |
|
|
|
|
|
|
|
// }).then((res) => { |
|
|
|
|
|
|
|
// util.downloadFileDirect(`赛事成绩.xls`, new Blob([res.data])) |
|
|
|
|
|
|
|
// }).catch(res => { }) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
exportData1 () { |
|
|
|
exportData1 () { |
|
|
|
this.loading = true |
|
|
|
this.exporting1 = true |
|
|
|
let list = this.list1 |
|
|
|
let list = this.list1 |
|
|
|
if (this.multipleSelection1.length) { |
|
|
|
if (this.multipleSelection1.length) { |
|
|
|
list = this.multipleSelection1 |
|
|
|
list = this.multipleSelection1 |
|
|
|
} |
|
|
|
} |
|
|
|
Zip('批量导出', list, () => { |
|
|
|
Zip('批量导出', list, () => { |
|
|
|
this.loading = false |
|
|
|
this.exporting1 = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDelete (row) { // 删除 |
|
|
|
handleDelete (row) { // 删除 |
|
|
@ -443,21 +456,22 @@ export default { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(async () => { |
|
|
|
let ids = this.multipleSelection.map(item => { |
|
|
|
let ids = this.multipleSelection.map(item => { |
|
|
|
return this.method == 2 ? item.scoreId : item.reportId |
|
|
|
return this.method == 2 ? item.scoreId : item.reportId |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$post(this.api.batchDeleteContestGrade, { |
|
|
|
ids = ids.filter(e => e) |
|
|
|
ids, |
|
|
|
if (ids.length) { |
|
|
|
competitionId: this.id, |
|
|
|
await this.$post(this.api.batchDeleteContestGrade, { |
|
|
|
stageId: this.stageId |
|
|
|
ids, |
|
|
|
}).then(res => { |
|
|
|
competitionId: this.id, |
|
|
|
|
|
|
|
stageId: this.stageId |
|
|
|
|
|
|
|
}) |
|
|
|
this.multipleSelection = []; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(res => { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -517,7 +531,12 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 模板下载 |
|
|
|
// 模板下载 |
|
|
|
download () { |
|
|
|
download () { |
|
|
|
location.href = this.api.gradeImport |
|
|
|
axios.get(`${this.api.gradeDownloadExcel}?competitionId=${this.id}&stageId=${this.stageId}`, { |
|
|
|
|
|
|
|
headers: this.headers, |
|
|
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
|
|
util.downloadFileDirect('赛事成绩导入模板.xlsx', new Blob([res.data])) |
|
|
|
|
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 上传文件 |
|
|
|
// 上传文件 |
|
|
|
handleExceed (files, fileList) { |
|
|
|
handleExceed (files, fileList) { |
|
|
@ -527,23 +546,27 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下载失败文件 |
|
|
|
// 下载失败文件 |
|
|
|
showFaild () { |
|
|
|
showFaild () { |
|
|
|
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.exportCode}`, { |
|
|
|
axios.get(`${this.api.performanceExportFailure}?exportCode=${this.faildData.exportCode}&competitionType=${this.faildData.competitionType}`, { |
|
|
|
headers: this.headers, |
|
|
|
headers: this.headers, |
|
|
|
responseType: 'blob' |
|
|
|
responseType: 'blob' |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data])) |
|
|
|
util.downloadFileDirect(`批量导入成绩管理失败数据导出.xls`, new Blob([res.data])) |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadSuccess (res, file, fileList) { |
|
|
|
uploadSuccess (res) { |
|
|
|
|
|
|
|
this.uploading = false |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadFaild = false |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.data.exportCode) { |
|
|
|
const { data } = res |
|
|
|
this.exportCode = res.data.exportCode |
|
|
|
if (data.exportCode) { |
|
|
|
|
|
|
|
this.faildData = data |
|
|
|
this.uploadFaild = true |
|
|
|
this.uploadFaild = true |
|
|
|
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) |
|
|
|
} else { |
|
|
|
|
|
|
|
util.successMsg(data.tip, 3000) |
|
|
|
|
|
|
|
this.importVisible = false |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") |
|
|
|
util.errorMsg(res.message || '上传失败,请检查数据') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError (err, file, fileList) { |
|
|
|
uploadError (err, file, fileList) { |
|
|
@ -553,6 +576,9 @@ export default { |
|
|
|
center: true |
|
|
|
center: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
beforeUpload (file) { |
|
|
|
|
|
|
|
this.uploading = true |
|
|
|
|
|
|
|
}, |
|
|
|
beforeRemove (file, fileList) { |
|
|
|
beforeRemove (file, fileList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`) |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -560,9 +586,12 @@ export default { |
|
|
|
this.uploadList = fileList |
|
|
|
this.uploadList = fileList |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadFaild = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadSure () { |
|
|
|
cancelUpload () { |
|
|
|
|
|
|
|
this.uploading = false |
|
|
|
|
|
|
|
this.$refs.upload.abort() |
|
|
|
|
|
|
|
this.keyword = '' |
|
|
|
|
|
|
|
this.initData() |
|
|
|
this.importVisible = false |
|
|
|
this.importVisible = false |
|
|
|
this.getData() |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// tab回调 |
|
|
|
// tab回调 |
|
|
@ -658,4 +687,11 @@ export default { |
|
|
|
height: 300px; |
|
|
|
height: 300px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/deep/.import-file { |
|
|
|
|
|
|
|
.el-progress__text, |
|
|
|
|
|
|
|
.el-progress, |
|
|
|
|
|
|
|
.el-upload-list__item-status-label { |
|
|
|
|
|
|
|
display: none !important; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |