|
|
@@ -5,7 +5,7 @@
|
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
:inline="true" style="width:100%;">
|
|
|
<el-form-item label="" prop="academicYear">
|
|
|
- <el-select v-model="queryParams.academicYear" style="width:160px">
|
|
|
+ <el-select v-model="queryParams.academicYear" @change="topChange()" style="width:160px">
|
|
|
<el-option
|
|
|
v-for="dict in optionList"
|
|
|
:key="dict.value"
|
|
|
@@ -14,6 +14,17 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="" prop="examId">
|
|
|
+ <el-select filterable
|
|
|
+ v-model="queryParams.examId" clearable placeholder="请输入或选择考试名称" style="width: 300px">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in optionListB"
|
|
|
+ :key="dict.examId"
|
|
|
+ :label="dict.examName"
|
|
|
+ :value="dict.examId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="" prop="category">
|
|
|
<div class="table-top-button-box">
|
|
|
<div>
|
|
|
@@ -72,30 +83,38 @@
|
|
|
</el-form-item>
|
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
|
- <p class="page-add-common-style-button" style="float: right;" @click="exportButton()">导出</p>
|
|
|
+ <el-form-item>
|
|
|
+ <export-component :exportConfig="exportConfig" style="margin-left:10px;"></export-component>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="page-content-box">
|
|
|
- <el-table class="table-box" border :data="dataList">
|
|
|
+ <el-table class="table-box" border :data="dataList"
|
|
|
+ @selection-change="handleSelectionChange" :row-key="getRowKeys">
|
|
|
+ <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
<el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
|
|
|
<el-table-column label="学工号" prop="account" width="140" show-overflow-tooltip/>
|
|
|
<el-table-column label="学院" prop="deptName" width="240" show-overflow-tooltip/>
|
|
|
<!--<el-table-column label="用户类别" prop="deptName" width="160" show-overflow-tooltip/>-->
|
|
|
<el-table-column label="考试类型" prop="examTypeName" width="160" show-overflow-tooltip/>
|
|
|
<el-table-column label="学习情况" prop="learningStatus" width="160" show-overflow-tooltip/>
|
|
|
- <el-table-column label="考试成绩" prop="examScore" width="160" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="考试成绩" prop="examScore" width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">{{scope.row.examScore?scope.row.examScore:'-'}}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="考试结果" prop="examResult" width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span :class="scope.row.examResult == 0 ?'colorC':(scope.row.examResult == 1 ?'colorA':(scope.row.examResult == 2 ?'colorB':''))">
|
|
|
- {{scope.row.examResult == 0 ?'未考':(scope.row.examResult == 1 ?'通过':(scope.row.examResult == 2 ?'未通过':''))}}
|
|
|
+ <span :class="scope.row.examResult == 0 ?'':(scope.row.examResult == 1 ?'colorA':(scope.row.examResult == 2 ?'colorB':''))">
|
|
|
+ {{scope.row.examResult == 0 ?'-':(scope.row.examResult == 1 ?'通过':(scope.row.examResult == 2 ?'未通过':''))}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="补考成绩" prop="makeupScore" width="160" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="补考成绩" prop="makeupScore" width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">{{scope.row.makeupScore?scope.row.makeupScore:'-'}}</template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="补考结果" prop="makeupResult" width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span :class="scope.row.makeupResult == 0 ?'colorC':(scope.row.makeupResult == 1 ?'colorA':(scope.row.makeupResult == 2 ?'colorB':''))">
|
|
|
- {{scope.row.makeupResult == 0 ?'未考':(scope.row.makeupResult == 1 ?'通过':(scope.row.makeupResult == 2 ?'未通过':''))}}
|
|
|
+ <span :class="scope.row.makeupResult == 0 ?'':(scope.row.makeupResult == 1 ?'colorA':(scope.row.makeupResult == 2 ?'colorB':''))">
|
|
|
+ {{scope.row.makeupResult == 0 ?'-':(scope.row.makeupResult == 1 ?'通过':(scope.row.makeupResult == 2 ?'未通过':''))}}
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -116,23 +135,38 @@
|
|
|
laboratoryClassTypeGetList,laboratoryLevelConfigGetLevelTitleList,
|
|
|
} from "@/api/commonality/permission";
|
|
|
import {
|
|
|
- examElExamTypeList,systemDeptCurrentDept,examElStatisticsGetAcademicYear,examElStatisticsExamGroupedChartDetail,
|
|
|
+ examElExamTypeList,systemDeptCurrentDept,examElStatisticsGetAcademicYear,
|
|
|
+ examElStatisticsExamTitleList,examElStatisticsExamListDetail,
|
|
|
} from "@/api/safetyEducationExaminationNew/index";
|
|
|
+ import exportComponent from "@/views/safetyEducationExaminationNew/dataStatistics/components/exportComponent/exportComponent.vue";
|
|
|
export default {
|
|
|
name: 'addPage',
|
|
|
+ components: {
|
|
|
+ exportComponent,
|
|
|
+ },
|
|
|
props: {
|
|
|
drawerPropsData: {}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ exportConfig:{
|
|
|
+ api:'/exam/elStatistics/exam/list-detail-export', //导出接口地址
|
|
|
+ ids:'', //勾选导出,勾选的IDS
|
|
|
+ fileName:'常规考试-人员明细', //导出文件的命名
|
|
|
+ customKey:null, //自定义参数KEY(非必填)
|
|
|
+ customValue:null, //自定义参数VALUE(非必填)
|
|
|
+ screenData:{} //导出筛选数据(非必要-如有该参数组件会显示导出筛选数据按钮)
|
|
|
+ },
|
|
|
adminType:0,
|
|
|
optionList:[],
|
|
|
optionListA:[],
|
|
|
+ optionListB:[],
|
|
|
//查询条件
|
|
|
queryParams:{
|
|
|
page:1,
|
|
|
pageSize:20,
|
|
|
academicYear:'',
|
|
|
+ examId:'',
|
|
|
category:'EXAMED',
|
|
|
personType:'2',
|
|
|
deptId:'',
|
|
|
@@ -157,12 +191,24 @@
|
|
|
initialize() {
|
|
|
this.$set(this,'adminType',this.drawerPropsData.adminType);
|
|
|
this.$set(this.queryParams,'academicYear',this.drawerPropsData.valueYear);
|
|
|
+ this.$set(this.queryParams,'examId',this.drawerPropsData.examId);
|
|
|
this.$set(this.queryParams,'personType',this.drawerPropsData.personType);
|
|
|
this.$set(this.queryParams,'deptId',this.drawerPropsData.deptId);
|
|
|
this.systemDeptCurrentDept();
|
|
|
this.examElStatisticsGetAcademicYear();
|
|
|
this.getList();
|
|
|
},
|
|
|
+ topChange(){
|
|
|
+ this.examElStatisticsExamTitleList();
|
|
|
+ this.$set(this.queryParams,'examId','');
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.$set(this.exportConfig,'userIds',selection.map(item => item.userId));
|
|
|
+ },
|
|
|
+ getRowKeys(row) {
|
|
|
+ return row.userId
|
|
|
+ },
|
|
|
//查询按钮
|
|
|
handleQuery(){
|
|
|
this.$set(this.queryParams,'page',1);
|
|
|
@@ -174,6 +220,7 @@
|
|
|
page:1,
|
|
|
pageSize:20,
|
|
|
academicYear:this.drawerPropsData.valueYear,
|
|
|
+ examId:this.drawerPropsData.examId,
|
|
|
category:'EXAMED',
|
|
|
personType:this.drawerPropsData.personType,
|
|
|
deptId:this.drawerPropsData.deptId,
|
|
|
@@ -187,7 +234,8 @@
|
|
|
let obj = {
|
|
|
page:this.queryParams.page,
|
|
|
pageSize:this.queryParams.pageSize,
|
|
|
- academicYear:this.queryParams.valueYear,
|
|
|
+ academicYear:this.queryParams.academicYear,
|
|
|
+ examId:this.queryParams.examId,
|
|
|
category:this.queryParams.category,
|
|
|
personType:this.queryParams.personType,
|
|
|
account:this.queryParams.account,
|
|
|
@@ -199,11 +247,30 @@
|
|
|
}else{
|
|
|
obj.deptId = localStorage.getItem('deptId');
|
|
|
}
|
|
|
- examElStatisticsExamGroupedChartDetail(obj).then(response => {
|
|
|
+ this.setExportConfig();
|
|
|
+ examElStatisticsExamListDetail(obj).then(response => {
|
|
|
this.$set(this,'dataList',response.data.records);
|
|
|
this.$set(this,'total',response.data.total);
|
|
|
})
|
|
|
},
|
|
|
+ setExportConfig(){
|
|
|
+ this.exportConfig.screenData = {
|
|
|
+ page:this.queryParams.page,
|
|
|
+ pageSize:this.queryParams.pageSize,
|
|
|
+ academicYear:this.queryParams.academicYear,
|
|
|
+ examId:this.queryParams.examId,
|
|
|
+ category:this.queryParams.category,
|
|
|
+ personType:this.queryParams.personType,
|
|
|
+ account:this.queryParams.account,
|
|
|
+ examResult:this.queryParams.examResult,
|
|
|
+ makeupResult:this.queryParams.makeupResult,
|
|
|
+ };
|
|
|
+ if(this.adminType == 1){
|
|
|
+ this.exportConfig.screenData.deptId = this.queryParams.deptId;
|
|
|
+ }else{
|
|
|
+ this.exportConfig.screenData.deptId = localStorage.getItem('deptId');
|
|
|
+ }
|
|
|
+ },
|
|
|
//学院列表
|
|
|
systemDeptCurrentDept(){
|
|
|
systemDeptCurrentDept({}).then(response => {
|
|
|
@@ -220,6 +287,21 @@
|
|
|
examElStatisticsGetAcademicYear(){
|
|
|
examElStatisticsGetAcademicYear({}).then(response => {
|
|
|
this.$set(this,'optionList',response.data);
|
|
|
+ if(this.queryParams.academicYear){
|
|
|
+ this.examElStatisticsExamTitleList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查询全部考试类型
|
|
|
+ examElStatisticsExamTitleList(){
|
|
|
+ let obj = {
|
|
|
+ year:this.queryParams.academicYear
|
|
|
+ }
|
|
|
+ if(this.adminType == 2){
|
|
|
+ obj.deptId = localStorage.getItem('deptId');
|
|
|
+ }
|
|
|
+ examElStatisticsExamTitleList(obj).then(response => {
|
|
|
+ this.$set(this,'optionListB',response.data);
|
|
|
});
|
|
|
},
|
|
|
}
|