| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472 |
- <!-- 分级考试人员明细 -->
- <template>
- <div class="page-container dataReportUserListPage-addPage">
- <div class="page-form-title-box">
- <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-option
- v-for="dict in optionList"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="category">
- <div class="table-top-button-box">
- <div>
- <p @click="queryParams.category = 'EXAMED'" :class="queryParams.category == 'EXAMED'?'check-table-button':''">已考人员</p>
- <p @click="queryParams.category = 'NOT_EXAMED'" :class="queryParams.category == 'NOT_EXAMED'?'check-table-button':''">未考人员</p>
- </div>
- </div>
- </el-form-item>
- <el-form-item label="" prop="personType">
- <div class="table-top-button-box-1">
- <div>
- <p @click="queryParams.personType = 3" :class="queryParams.personType == 3?'check-table-button':''">本科</p>
- <p @click="queryParams.personType = 2" :class="queryParams.personType == 2?'check-table-button':''">硕士研究生</p>
- <p @click="queryParams.personType = 4" :class="queryParams.personType == 4?'check-table-button':''">博士研究生</p>
- <p @click="queryParams.personType = 1" :class="queryParams.personType == 1?'check-table-button':''">教职工</p>
- </div>
- </div>
- </el-form-item>
- <el-form-item label="" prop="deptId">
- <el-select v-if="adminType == 1"
- v-model="queryParams.deptId"
- placeholder="学院"
- style="width: 160px">
- <el-option
- v-for="dict in optionListA"
- :key="dict.deptId"
- :label="dict.deptName"
- :value="dict.deptId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="examTypeId">
- <el-select
- @change="checkExamType"
- v-model="queryParams.examTypeId"
- placeholder="考试类型"
- style="width: 150px">
- <el-option
- v-for="dict in optionListB"
- :key="dict.id"
- :label="dict.examTypeName"
- :value="dict.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="levelIdClassifyTypeId" v-if="examTypeCode == 'CLASSIFIED'">
- <el-cascader
- v-model="queryParams.levelIdClassifyTypeId"
- placeholder="分级分类"
- :options="optionListC"
- :props="{ checkStrictly: true,expandTrigger: 'hover' }"
- style="width: 150px"
- ></el-cascader>
- </el-form-item>
- <el-form-item label="" prop="examResult">
- <el-select
- v-model="queryParams.examResult"
- placeholder="考试结果"
- style="width: 130px">
- <el-option key="1" label="已通过" value="1"/>
- <el-option key="0" label="未通过" value="0"/>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="makeupResult">
- <el-select
- v-model="queryParams.makeupResult"
- placeholder="补考结果"
- style="width: 130px">
- <el-option key="1" label="已通过" value="1"/>
- <el-option key="0" label="未通过" value="0"/>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="account">
- <el-input
- maxLength="30"
- v-model="queryParams.account"
- placeholder="搜索姓名/学工号"
- style="width: 150px"
- />
- </el-form-item>
- <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
- <p class="page-reset-common-style-button" @click="resetQuery">重置</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"
- @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>
- <template slot-scope="scope">
- <span v-if="scope.row.examTypeCode=='CLASSIFIED'">{{scope.row.levelName}}-{{scope.row.classifyTypeName}}</span>
- <span v-else>{{scope.row.examTypeName}}</span>
- </template>
- </el-table-column>
- <el-table-column label="学习情况" prop="learningStatus" 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 ?'':(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>
- <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 ?'':(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>
- </el-table>
- <pagination :page-sizes="[20, 30, 40, 50]"
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.page"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- </div>
- </template>
- <script>
- import {
- laboratoryClassTypeGetList,laboratoryLevelConfigGetLevelTitleList,
- } from "@/api/commonality/permission";
- import {
- examElExamTypeList,systemDeptCurrentDept,examElStatisticsGetAcademicYear,examElStatisticsExamGroupedChartDetail,
- } 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/grouped/chart-detail-export',
- userIds:'',
- fileName:'数据报表-人员明细',
- customKey:null,
- customValue:null,
- allData:{},
- screenData:{},
- type:1,
- },
- adminType:0,
- optionList:[],
- optionListA:[],
- optionListB:[],
- optionListC:[],
- //查询条件
- queryParams:{
- page:1,
- pageSize:20,
- academicYear:'',
- category:'EXAMED',
- personType:'3',
- deptId:'',
- examTypeId:'',
- levelIdClassifyTypeId:[],
- account:'',
- examResult:'',
- makeupResult:'',
- },
- examTypeCode:'',
- //列表数据
- dataList:[],
- //数据数量
- total:0,
- }
- },
- created() {
- },
- mounted() {
- this.initialize()
- },
- methods: {
- // 初始化
- initialize() {
- this.$set(this,'adminType',this.drawerPropsData.adminType);
- this.$set(this.queryParams,'academicYear',this.drawerPropsData.valueYear);
- this.$set(this.queryParams,'personType',this.drawerPropsData.personType);
- this.$set(this.queryParams,'deptId',this.drawerPropsData.deptId);
- this.$set(this.queryParams,'examTypeId',this.drawerPropsData.examTypeId);
- this.examElExamTypeList();
- this.systemDeptCurrentDept();
- this.laboratoryLevelConfigGetLevelTitleList();
- this.examElStatisticsGetAcademicYear();
- this.getList();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.$set(this.exportConfig,'userIds',selection.map(item => item.userId));
- },
- getRowKeys(row) {
- return row.userId
- },
- //查询按钮
- handleQuery(){
- this.$set(this.queryParams,'page',1);
- this.getList();
- },
- //重置按钮
- resetQuery(){
- this.$set(this,'queryParams',{
- page:1,
- pageSize:20,
- academicYear:this.drawerPropsData.valueYear,
- category:'EXAMED',
- personType:this.drawerPropsData.personType,
- deptId:this.drawerPropsData.deptId,
- examTypeId:this.drawerPropsData.examTypeId,
- levelIdClassifyTypeId:[],
- account:'',
- examResult:'',
- makeupResult:'',
- });
- this.checkExamType(this.drawerPropsData.examTypeId)
- this.getList();
- },
- getList(){
- let obj = {
- page:this.queryParams.page,
- pageSize:this.queryParams.pageSize,
- academicYear:this.queryParams.academicYear,
- category:this.queryParams.category,
- personType:this.queryParams.personType,
- examTypeId:this.queryParams.examTypeId,
- account:this.queryParams.account,
- examResult:this.queryParams.examResult,
- makeupResult:this.queryParams.makeupResult,
- }
- if(this.queryParams.levelIdClassifyTypeId[0]){
- obj.levelId = this.queryParams.levelIdClassifyTypeId[0];
- }
- if(this.queryParams.levelIdClassifyTypeId[1]){
- obj.classifyTypeId = this.queryParams.levelIdClassifyTypeId[1];
- }
- if(this.adminType == 1){
- obj.deptId = this.queryParams.deptId;
- }else{
- obj.deptId = localStorage.getItem('deptId');
- }
- this.setExportConfig();
- examElStatisticsExamGroupedChartDetail(obj).then(response => {
- this.$set(this,'dataList',response.data.records);
- this.$set(this,'total',response.data.total);
- })
- },
- setExportConfig(){
- //全部条件
- this.exportConfig.allData = {
- academicYear:this.queryParams.academicYear,
- examTypeId:this.queryParams.examTypeId,
- deptId:this.adminType == 1?this.queryParams.deptId:localStorage.getItem('deptId'),
- };
- //筛选条件
- this.exportConfig.screenData = {
- academicYear:this.queryParams.academicYear,
- category:this.queryParams.category,
- personType:this.queryParams.personType,
- examTypeId:this.queryParams.examTypeId,
- account:this.queryParams.account,
- examResult:this.queryParams.examResult,
- makeupResult:this.queryParams.makeupResult,
- };
- if(this.queryParams.levelIdClassifyTypeId[0]){
- this.exportConfig.screenData.levelId = this.queryParams.levelIdClassifyTypeId[0];
- }
- if(this.queryParams.levelIdClassifyTypeId[1]){
- this.exportConfig.screenData.classifyTypeId = this.queryParams.levelIdClassifyTypeId[1];
- }
- if(this.adminType == 1){
- this.exportConfig.screenData.deptId = this.queryParams.deptId;
- }else{
- this.exportConfig.screenData.deptId = localStorage.getItem('deptId');
- }
- },
- //选中考试类型
- checkExamType(val){
- let self = this;
- let num = 0;
- for(let i=0;i<self.optionListB.length;i++){
- if(self.optionListB[i].id == val){
- num++
- self.$set(self,'examTypeCode',self.optionListB[i].examTypeCode);
- }
- }
- if(num == 0){
- self.$set(self,'examTypeCode','');
- }
- this.$set(this.queryParams,'levelIdClassifyTypeId',[]);
- },
- //查询全部考试类型
- examElExamTypeList(){
- examElExamTypeList({}).then(response => {
- let list = [];
- for(let i=0;i<response.data.length;i++){
- if(response.data[i].examTypeCode == 'CLASSIFIED' || response.data[i].examTypeCode == 'yzyh' || response.data[i].examTypeCode == 'STUDENT'){
- list.push(response.data[i]);
- }
- }
- this.$set(this,'optionListB',list);
- this.checkExamType(this.drawerPropsData.examTypeId)
- });
- },
- //学院列表
- systemDeptCurrentDept(){
- systemDeptCurrentDept({}).then(response => {
- const list = response.data || [];
- this.formatTreeData(list);
- if(list[0]){
- this.$set(this,'optionListA',list[0].child);
- this.optionListA.unshift({ deptName:'全部学院', deptId:'' })
- }else{
- this.$set(this,'optionListA',[]);
- }
- });
- },
- //学院列表
- laboratoryLevelConfigGetLevelTitleList(){
- laboratoryLevelConfigGetLevelTitleList({}).then(responseA => {
- laboratoryClassTypeGetList({}).then(responseB => {
- let list = []
- for(let i=0;i<responseA.data.length;i++){
- let obj = {
- value:responseA.data[i].levelId,
- label:responseA.data[i].titleName,
- children:[],
- }
- for(let o=0;o<responseB.data.length;o++){
- obj.children.push({
- value:responseB.data[o].typeId,
- label:responseB.data[o].typeName,
- })
- }
- list.push(obj)
- }
- this.$set(this,'optionListC',list);
- });
- });
- },
- //学年列表
- examElStatisticsGetAcademicYear(){
- examElStatisticsGetAcademicYear({}).then(response => {
- this.$set(this,'optionList',response.data);
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .dataReportUserListPage-addPage {
- height:100%;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .page-form-title-box {
- /* 分组筛选按钮 */
- .table-top-button-box {
- display: inline-block;
- vertical-align: top;
- div {
- display: flex;
- p {
- border: 1px solid #DCDFE6;
- width: 80px;
- text-align: center;
- height: 40px;
- line-height: 40px;
- cursor: pointer;
- font-size: 14px;
- &:nth-child(1) { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
- &:nth-child(2) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
- }
- .check-table-button{
- border: 1px solid #0183fa!important;
- background-color: #0183fa!important;;
- color:#fff!important;;
- }
- }
- }
- .table-top-button-box-1 {
- display: inline-block;
- vertical-align: top;
- div {
- display: flex;
- p {
- border: 1px solid #DCDFE6;
- width: 80px;
- text-align: center;
- height: 40px;
- line-height: 40px;
- cursor: pointer;
- font-size: 14px;
- &:nth-child(1) { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
- &:nth-child(2) { border-left: none; border-right: none; }
- &:nth-child(3) { border-right: none; }
- &:nth-child(4) { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
- }
- .check-table-button{
- border: 1px solid #0183fa!important;
- background-color: #0183fa!important;;
- color:#fff!important;;
- }
- }
- }
- }
- .page-content-box{
- .colorA{
- display: inline-block;
- text-align: center;
- width:60px;
- border-radius:4px;
- color:#28a47c;
- background-color:#e9f8f1;
- }
- .colorB{
- display: inline-block;
- text-align: center;
- width:60px;
- border-radius:4px;
- color:#df555f;
- background-color:#fff0f1;
- }
- .colorC{
- display: inline-block;
- text-align: center;
- width:60px;
- border-radius:4px;
- color:#999;
- background-color:#dedede;
- }
- }
- }
- </style>
|