|
|
|
@ -6,161 +6,179 @@ |
|
|
|
|
<el-page-header @back="$router.push('list?tab=tab1')" |
|
|
|
|
:content="goodsName"></el-page-header> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<el-tabs v-model="curTab" |
|
|
|
|
@tab-click="tabChange"> |
|
|
|
|
<el-tab-pane v-for="(item) in tabs" |
|
|
|
|
:label="item.name" |
|
|
|
|
<!-- <el-radio-group v-model="classId" |
|
|
|
|
size="small"> |
|
|
|
|
<el-radio v-for="(item, i) in classList" |
|
|
|
|
:key="i" |
|
|
|
|
:label="item.id" |
|
|
|
|
@change="initData">{{ item.className }}</el-radio> |
|
|
|
|
</el-radio-group> --> |
|
|
|
|
<el-tabs v-model="classId" |
|
|
|
|
@tab-click="classChange"> |
|
|
|
|
<el-tab-pane v-for="(item, i) in classList" |
|
|
|
|
:key="i" |
|
|
|
|
:name="item.id" |
|
|
|
|
:key="item.id"></el-tab-pane> |
|
|
|
|
:label="item.className"></el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<div class="stat"> |
|
|
|
|
<div class="nums"> |
|
|
|
|
<div class="item"> |
|
|
|
|
<p class="name">实验总人数</p> |
|
|
|
|
<p class="val">{{ peopleNum }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item2"> |
|
|
|
|
<p class="name">实验平均分</p> |
|
|
|
|
<p class="val">{{ avgScore }}</p> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<el-tabs v-model="curTab" |
|
|
|
|
@tab-click="tabChange"> |
|
|
|
|
<el-tab-pane v-for="(item) in tabs" |
|
|
|
|
:label="item.name" |
|
|
|
|
:name="item.id" |
|
|
|
|
:key="item.id"></el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<div class="stat"> |
|
|
|
|
<div class="nums"> |
|
|
|
|
<div class="item"> |
|
|
|
|
<p class="name">实验总人数</p> |
|
|
|
|
<p class="val">{{ peopleNum }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item2"> |
|
|
|
|
<p class="name">实验平均分</p> |
|
|
|
|
<p class="val">{{ avgScore }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item3"> |
|
|
|
|
<p class="name">实验最高分</p> |
|
|
|
|
<p class="val">{{ maxScore || 0 }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item4"> |
|
|
|
|
<p class="name">实验最低分</p> |
|
|
|
|
<p class="val">{{ minScore || 0 }}</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item3"> |
|
|
|
|
<p class="name">实验最高分</p> |
|
|
|
|
<p class="val">{{ maxScore || 0 }}</p> |
|
|
|
|
<div class="chart" |
|
|
|
|
id="chart"></div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<h6 style="font-size: 16px">错误率分析</h6> |
|
|
|
|
<div class="wrong"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="jud-name">错误率最高:{{ max.projectName }}</span> |
|
|
|
|
<span>参加考试{{ max.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item4"> |
|
|
|
|
<p class="name">实验最低分</p> |
|
|
|
|
<p class="val">{{ minScore || 0 }}</p> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="jud-name">错误率最低:{{ min.projectName }}</span> |
|
|
|
|
<span>参加考试{{ min.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="chart" |
|
|
|
|
id="chart"></div> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" |
|
|
|
|
class="m-b-20"> |
|
|
|
|
<h6 style="font-size: 16px">错误率分析</h6> |
|
|
|
|
<div class="wrong"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="jud-name">错误率最高:{{ max.projectName }}</span> |
|
|
|
|
<span>参加考试{{ max.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="jud-name">错误率最低:{{ min.projectName }}</span> |
|
|
|
|
<span>参加考试{{ min.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="chart" |
|
|
|
|
id="chart1"></div> |
|
|
|
|
</el-card> |
|
|
|
|
id="chart1"></div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover"> |
|
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入姓名/学号" |
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
v-model="keyword" |
|
|
|
|
clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="exportData">导出成绩列表</el-button> |
|
|
|
|
<!-- <el-button type="primary" |
|
|
|
|
<el-card shadow="hover"> |
|
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
|
<div> |
|
|
|
|
<el-input placeholder="请输入姓名/学号" |
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
v-model="keyword" |
|
|
|
|
clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="exportData">导出成绩列表</el-button> |
|
|
|
|
<!-- <el-button type="primary" |
|
|
|
|
@click="exportReport">导出成绩详情</el-button> --> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="listData" |
|
|
|
|
class="table" |
|
|
|
|
ref="table" |
|
|
|
|
:key="curTab" |
|
|
|
|
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="userName" |
|
|
|
|
label="姓名" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="workNumber" |
|
|
|
|
label="学号" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<template v-if="curTab == 0"> |
|
|
|
|
<el-table-column label="练习项目数" |
|
|
|
|
<el-table :data="listData" |
|
|
|
|
class="table" |
|
|
|
|
ref="table" |
|
|
|
|
:key="curTab" |
|
|
|
|
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.row.totalNumberOfPractices }} |
|
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="numberOfExercises" |
|
|
|
|
label="练习次数" |
|
|
|
|
width="90" |
|
|
|
|
<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 label="累计练习时长" |
|
|
|
|
<template v-if="curTab == 0"> |
|
|
|
|
<el-table-column label="练习项目数" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.totalNumberOfPractices }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="numberOfExercises" |
|
|
|
|
label="练习次数" |
|
|
|
|
width="90" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="累计练习时长" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.cumulativePracticeTime }}min |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-table-column prop="totalNumberOfParticipants" |
|
|
|
|
label="参加考核次数" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="averageTimeSpent" |
|
|
|
|
label="平均用时" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.averageTimeSpent }}min |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<el-table-column prop="avgScore" |
|
|
|
|
label="平均分" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.cumulativePracticeTime }}min |
|
|
|
|
{{ curTab == 0 ? scope.row.avgScore : scope.row.averageScore }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-table-column prop="totalNumberOfParticipants" |
|
|
|
|
label="参加考核次数" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="averageTimeSpent" |
|
|
|
|
label="平均用时" |
|
|
|
|
align="center"> |
|
|
|
|
<el-table-column prop="maxScore" |
|
|
|
|
label="最高分" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="minScore" |
|
|
|
|
label="最低分" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
align="center" |
|
|
|
|
width="140"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.averageTimeSpent }}min |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="show(scope.row)">查看成绩详情</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<el-table-column prop="avgScore" |
|
|
|
|
label="平均分" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ curTab == 0 ? scope.row.avgScore : scope.row.averageScore }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="maxScore" |
|
|
|
|
label="最高分" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="minScore" |
|
|
|
|
label="最低分" |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
align="center" |
|
|
|
|
width="140"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="show(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> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background |
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
:total="total" |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
:current-page="page"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-dialog title="成绩详情" |
|
|
|
@ -284,6 +302,7 @@ export default { |
|
|
|
|
id: +this.$route.query.id, |
|
|
|
|
cid: +this.$route.query.cid, |
|
|
|
|
classId: +this.$route.query.classId, |
|
|
|
|
classList: [], |
|
|
|
|
keyword: "", |
|
|
|
|
searchTimer: null, |
|
|
|
|
listDataAll: [], |
|
|
|
@ -320,8 +339,8 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
// this.getClass() |
|
|
|
|
this.getData() |
|
|
|
|
this.getClass() |
|
|
|
|
this.initData() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 成绩 |
|
|
|
@ -367,6 +386,23 @@ export default { |
|
|
|
|
this.page = 1 |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
// 获取班级下拉框数据 |
|
|
|
|
getClass () { |
|
|
|
|
this.$post(this.api.allClassesInOurSchool).then(res => { |
|
|
|
|
this.classList = res.data |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
// 班级切换回调 |
|
|
|
|
classChange () { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: 'course', |
|
|
|
|
query: { |
|
|
|
|
...this.$route.query, |
|
|
|
|
classId: this.classId |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.initData() |
|
|
|
|
}, |
|
|
|
|
// 分页 |
|
|
|
|
handlePage () { |
|
|
|
|
const list = this.listDataAll |
|
|
|
|