dedsudiyu пре 14 часа
родитељ
комит
52ed8d864d

+ 11 - 3
src/views/safetyEducationExaminationNew/dataStatistics/LabPersonMatch.vue

@@ -318,8 +318,11 @@ export default {
         },
         yAxis: {
           type: 'value',
-          max: num,
-          interval: 100,
+          max: (value) => {
+            // value.max 是三个 series 中的最大值,向上取整到 50 的倍数
+            return Math.ceil(value.max / 50) * 50
+          },
+          interval: 50,
           splitLine: { lineStyle: { color: '#f0f0f0' } },
           axisLabel: { fontSize: 11, color: '#aaa' },
           axisLine: { show: false },
@@ -382,7 +385,12 @@ export default {
       }
       examElStatisticsLabList(obj).then(response => {
         response.data.schoolSummary.type = 2
-        let list = response.data.records.concat([response.data.schoolSummary])
+        let list = [];
+        if(this.adminType == 1&&!this.queryParams.deptId){
+          list = response.data.records.concat([response.data.schoolSummary]);
+        }else{
+          list = response.data.records;
+        }
         this.$set(this, 'tableData', list)
         this.$set(this,'total',response.data.total);
       })

+ 31 - 25
src/views/safetyEducationExaminationNew/dataStatistics/components/dataReport/ExamSituation.vue

@@ -216,7 +216,7 @@ export default {
     //操作按钮
     tableButton(type,row){
       if(type == 1){
-        this.$set(this, 'drawerTitle', '分级考试人员明细')
+        this.$set(this, 'drawerTitle', row.examTypeName+'人员明细')
         let obj = {
           adminType:this.adminType,
           valueYear:this.valueYear,
@@ -272,7 +272,7 @@ export default {
         }else{
           obj.deptId = localStorage.getItem('deptId');
         }
-        self.download('/exam/elStatistics/exam/export', {...obj}, '考试情况统计.xlsx')
+        self.download('/exam/elStatistics/exam/grouped/list-export', {...obj}, '考试情况统计.xlsx')
       }).catch(() => {})
     },
     //图表
@@ -355,6 +355,11 @@ export default {
         ],
         yAxis: {
           type: 'value',
+          max: (value) => {
+            // value.max 是三个 series 中的最大值,向上取整到 50 的倍数
+            return Math.ceil(value.max / 50) * 50
+          },
+          interval: 50,
           splitLine: { lineStyle: { color: '#f0f0f0' } },
           axisLabel: { fontSize: 11, color: '#aaa' },
           axisLine: { show: false },
@@ -590,33 +595,34 @@ export default {
             type:2,
           })
         }
-
-        for(let o=0;o<response.data.schoolStats.examTypeGroup.length;o++){
+        if(this.adminType == 1&&!this.queryParams.deptId){
+          for(let o=0;o<response.data.schoolStats.examTypeGroup.length;o++){
+            list.push({
+              deptName:response.data.schoolStats.deptName,
+              deptId:'',
+              examTypeId:response.data.schoolStats.examTypeGroup[o].examTypeId,
+              examTypeName:response.data.schoolStats.examTypeGroup[o].examTypeName,
+              expectedCount:response.data.schoolStats.examTypeGroup[o].expectedCount,
+              examCount:response.data.schoolStats.examTypeGroup[o].examCount,
+              passedCount:response.data.schoolStats.examTypeGroup[o].passedCount,
+              notPassedCount:response.data.schoolStats.examTypeGroup[o].notPassedCount,
+              absentCount:response.data.schoolStats.examTypeGroup[o].absentCount,
+              passRate:response.data.schoolStats.examTypeGroup[o].passRate,
+              type:3,
+            })
+          }
           list.push({
             deptName:response.data.schoolStats.deptName,
-            deptId:'',
-            examTypeId:response.data.schoolStats.examTypeGroup[o].examTypeId,
-            examTypeName:response.data.schoolStats.examTypeGroup[o].examTypeName,
-            expectedCount:response.data.schoolStats.examTypeGroup[o].expectedCount,
-            examCount:response.data.schoolStats.examTypeGroup[o].examCount,
-            passedCount:response.data.schoolStats.examTypeGroup[o].passedCount,
-            notPassedCount:response.data.schoolStats.examTypeGroup[o].notPassedCount,
-            absentCount:response.data.schoolStats.examTypeGroup[o].absentCount,
-            passRate:response.data.schoolStats.examTypeGroup[o].passRate,
-            type:3,
+            examTypeName:'汇总',
+            expectedCount:response.data.schoolStats.summary.expectedCount,
+            examCount:response.data.schoolStats.summary.examCount,
+            passedCount:response.data.schoolStats.summary.passedCount,
+            notPassedCount:response.data.schoolStats.summary.notPassedCount,
+            absentCount:response.data.schoolStats.summary.absentCount,
+            passRate:response.data.schoolStats.summary.passRate,
+            type:2,
           })
         }
-        list.push({
-          deptName:response.data.schoolStats.deptName,
-          examTypeName:'汇总',
-          expectedCount:response.data.schoolStats.summary.expectedCount,
-          examCount:response.data.schoolStats.summary.examCount,
-          passedCount:response.data.schoolStats.summary.passedCount,
-          notPassedCount:response.data.schoolStats.summary.notPassedCount,
-          absentCount:response.data.schoolStats.summary.absentCount,
-          passRate:response.data.schoolStats.summary.passRate,
-          type:2,
-        })
         this.$set(this,'dataList',list);
         this.$set(this,'total',response.data.total);
       });

+ 70 - 3
src/views/safetyEducationExaminationNew/dataStatistics/components/dataReport/userListPage.vue

@@ -46,6 +46,7 @@
         </el-form-item>
         <el-form-item label="" prop="examTypeId">
           <el-select
+            @change="checkExamType"
             v-model="queryParams.examTypeId"
             placeholder="考试类型"
             style="width: 150px">
@@ -57,7 +58,7 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="" prop="levelIdClassifyTypeId">
+        <el-form-item label="" prop="levelIdClassifyTypeId" v-if="examTypeCode == 'CLASSIFIED'">
           <el-cascader
             v-model="queryParams.levelIdClassifyTypeId"
             placeholder="分级分类"
@@ -94,11 +95,15 @@
         </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/>
@@ -149,13 +154,25 @@
   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',              //导出接口地址
+          ids:'',                                        //勾选导出,勾选的IDS
+          fileName:'数据报表-人员明细',                         //导出文件的命名
+          customKey:null,                                //自定义参数KEY(非必填)
+          customValue:null,                               //自定义参数VALUE(非必填)
+          screenData:{}                                  //导出筛选数据(非必要-如有该参数组件会显示导出筛选数据按钮)
+        },
         adminType:0,
         optionList:[],
         optionListA:[],
@@ -175,6 +192,7 @@
           examResult:'',
           makeupResult:'',
         },
+        examTypeCode:'',
         //列表数据
         dataList:[],
         //数据数量
@@ -201,6 +219,13 @@
         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);
@@ -221,6 +246,7 @@
           examResult:'',
           makeupResult:'',
         });
+        this.checkExamType(this.drawerPropsData.examTypeId)
         this.getList();
       },
       getList(){
@@ -246,11 +272,51 @@
         }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.screenData = {
+          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]){
+          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 => {
@@ -261,6 +327,7 @@
             }
           }
           this.$set(this,'optionListB',list);
+          this.checkExamType(this.drawerPropsData.examTypeId)
         });
       },
       //学院列表

Разлика између датотеке није приказан због своје велике величине
+ 160 - 0
src/views/safetyEducationExaminationNew/dataStatistics/components/exportComponent/exportComponent.vue


+ 6 - 1
src/views/safetyEducationExaminationNew/dataStatistics/components/regularExam/ExamSituation.vue

@@ -282,6 +282,11 @@ export default {
         },
         yAxis: {
           type: 'value',
+          max: (value) => {
+            // value.max 是三个 series 中的最大值,向上取整到 50 的倍数
+            return Math.ceil(value.max / 50) * 50
+          },
+          interval: 50,
           splitLine: { lineStyle: { color: '#f0f0f0' } },
           axisLabel: { fontSize: 11, color: '#aaa' },
           axisLine: { show: false },
@@ -442,7 +447,7 @@ export default {
     //考试统计图表
     examElStatisticsExamChart(){
       let obj = {
-        // academicYear:this.valueYear,
+        academicYear:this.valueYear,
         personType:this.checkIndex,
         examId:this.queryParams.examId,
       }

+ 45 - 3
src/views/safetyEducationExaminationNew/dataStatistics/components/regularExam/userListPage.vue

@@ -16,7 +16,7 @@
         </el-form-item>
         <el-form-item label="" prop="examId">
           <el-select filterable
-                     v-model="queryParams.examId" clearable placeholder="请输入或选择考试名称" style="width: 360px">
+                     v-model="queryParams.examId" clearable placeholder="请输入或选择考试名称" style="width: 300px">
             <el-option
               v-for="dict in optionListB"
               :key="dict.examId"
@@ -83,11 +83,15 @@
         </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/>
@@ -134,13 +138,25 @@
     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:[],
@@ -186,6 +202,13 @@
         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);
@@ -224,11 +247,30 @@
         }else{
           obj.deptId = localStorage.getItem('deptId');
         }
+        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 => {

+ 50 - 5
src/views/safetyEducationExaminationNew/dataStatistics/userListPage.vue

@@ -54,11 +54,15 @@
         </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/>
@@ -96,13 +100,25 @@
   import {
     examElStatisticsGetAcademicYear,systemDeptCurrentDept,examElStatisticsLabListDetail,
   } 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/lab/detail-page-export',              //导出接口地址
+          userIds:'',                                        //勾选导出,勾选的IDS
+          fileName:'实验室匹配-人员明细',                         //导出文件的命名
+          customKey:null,                                //自定义参数KEY(非必填)
+          customValue:null,                               //自定义参数VALUE(非必填)
+          screenData:{}                                  //导出筛选数据(非必要-如有该参数组件会显示导出筛选数据按钮)
+        },
         adminType:0,
         optionListA:[],
         optionListB:[],
@@ -141,6 +157,13 @@
         this.laboratoryLevelConfigGetLevelTitleList();
         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);
@@ -178,11 +201,33 @@
         }else{
           obj.deptId = localStorage.getItem('deptId');
         }
+        this.setExportConfig();
         examElStatisticsLabListDetail(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.valueYear,
+          personType:this.queryParams.personType,
+          account:this.queryParams.account,
+        };
+        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');
+        }
+        console.log('')
+      },
       //学院列表
       systemDeptCurrentDept(){
         systemDeptCurrentDept({}).then(response => {
@@ -264,7 +309,7 @@
       .colorA{
         display: inline-block;
         text-align: center;
-        width:60px;
+        padding:0 10px;
         border-radius:4px;
         color:#28a47c;
         background-color:#e9f8f1;
@@ -272,7 +317,7 @@
       .colorB{
         display: inline-block;
         text-align: center;
-        width:60px;
+        padding:0 10px;
         border-radius:4px;
         color:#e88928;
         background-color:#fff5e8;
@@ -280,7 +325,7 @@
       .colorC{
         display: inline-block;
         text-align: center;
-        width:60px;
+        padding:0 10px;
         border-radius:4px;
         color:#df555f;
         background-color:#fff0f1;