dedsudiyu преди 3 месеца
родител
ревизия
658cb77581

+ 40 - 0
src/api/index.js

@@ -128,6 +128,14 @@ export function reportReportBigDataLabStateStatistics(query) {
     params: query
   })
 }
+//实验室状态统计-列表
+export function reportReportBigDataLabDeptGroupCount(data) {
+  return request({
+    url: '/report/report/bigData/labDeptGroupCount',
+    method: 'post',
+    data: data
+  })
+}
 //危险源总数排行
 export function reportReportBigDataHazardTotalSort (query) {
   return request({
@@ -136,6 +144,14 @@ export function reportReportBigDataHazardTotalSort (query) {
     params: query
   })
 }
+//危险源总数排行-列表
+export function reportReportBigDataHazardDeptGroupCount (data) {
+  return request({
+    url: '/report/report/bigData/hazardDeptGroupCount',
+    method: 'post',
+    data: data
+  })
+}
 //危化品存量排行
 export function reportReportBigDataChemicalStockSort (query) {
   return request({
@@ -144,6 +160,14 @@ export function reportReportBigDataChemicalStockSort (query) {
     params: query
   })
 }
+//危化品存量排行-列表
+export function reportReportBigDataStockDeptGroupCount (data) {
+  return request({
+    url: '/report/report/bigData/stockDeptGroupCount',
+    method: 'post',
+    data: data
+  })
+}
 //安全风险预警处置
 export function reportReportBigDataWarningHandle (query) {
   return request({
@@ -176,6 +200,14 @@ export function reportReportBigDataDangerDistribution (query) {
     params: query
   })
 }
+//安全隐患分布-列表
+export function reportReportBigDataDangerDistrGroupCount (data) {
+  return request({
+    url: '/report/report/bigData/dangerDistrGroupCount',
+    method: 'post',
+    data: data
+  })
+}
 //安全隐患排行
 export function reportReportBigDataDangerSort (query) {
   return request({
@@ -184,6 +216,14 @@ export function reportReportBigDataDangerSort (query) {
     params: query
   })
 }
+//安全隐患排行-列表
+export function reportReportBigDataDangerSortGroupCount (data) {
+  return request({
+    url: '/report/report/bigData/dangerSortGroupCount',
+    method: 'post',
+    data: data
+  })
+}
 //资源设备统计-笼位预约概况
 export function reportReportBsCageRateList (query) {
   return request({

+ 15 - 0
src/assets/styles/index.scss

@@ -330,3 +330,18 @@ body {
     }
   }
 }
+
+.el-select-dropdown{
+  background-color: #032F33;
+  border: 1px solid #15827C;
+}
+.el-select-dropdown__item.selected{
+  color: #fff;
+}
+.el-select-dropdown__item{
+  color: #fff;
+}
+.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
+  background-color: #15827C;
+  color: #fff;
+}

+ 1 - 0
src/views/resourceDevice/pageList/equipmentLifeComponentTable.vue

@@ -126,6 +126,7 @@
         }else{
           this.$set(this.queryParams,'ascOrDesc','');
           this.$set(this.queryParams,'type','');
+          this.handleQuery();
         }
       },
       //列表查询

+ 1 - 0
src/views/resourceDevice/pageList/instrumentLeisureComponentTable.vue

@@ -87,6 +87,7 @@
           this.handleQuery();
         }else{
           this.$set(this.queryParams,'ascOrDesc','');
+          this.handleQuery();
         }
       },
       //列表查询

+ 1 - 0
src/views/resourceDevice/pageList/instrumentRankingComponentTable.vue

@@ -94,6 +94,7 @@
         }else{
           this.$set(this.queryParams,'ascOrDesc','');
           this.$set(this.queryParams,'type','');
+          this.handleQuery();
         }
       },
       //列表查询

+ 1 - 1
src/views/safetyOverview/pageComponent/dangerComponents.vue

@@ -46,7 +46,7 @@
       return {
         propsData:{
           title:'危险源总数排行',
-          // checkType:'dangerComponents', //二级未开发-暂时注掉
+          checkType:'dangerComponents', //二级未开发-暂时注掉
         },
         //eCharts定时器
         eChartsTimer:null,

+ 1 - 1
src/views/safetyOverview/pageComponent/hazardousComponents.vue

@@ -48,7 +48,7 @@
       return {
         propsData:{
           title:'危化品存量排行',
-          // checkType:'hazardousComponents', //二级未开发-暂时注掉
+          checkType:'hazardousComponents',
         },
         totalNumber:0,
         totalAmount:0,

+ 39 - 5
src/views/safetyOverview/pageComponent/subComponents.vue

@@ -6,7 +6,6 @@
       <div class="sub-totality">
         <p class="sub-totality-name-left">实验室总数</p>
         <p class="sub-totality-num" v-for="(item,index) in totalityNum" :key="index">{{item}}</p>
-        <p class="sub-totality-num" v-if="!totalityNum[0]">0</p>
         <p class="sub-totality-name-right">间</p>
       </div>
       <div class="sub-sort-num">
@@ -28,23 +27,27 @@
       </div>
       <div id="subComponentsECharts"></div>
     </div>
+    <checkSelectComponents :propsOption="propsOption" :placeholder="'全校'" class="position-check-select"></checkSelectComponents>
   </div>
 </template>
 <script>
   import {
+    getDeptDropList,
     reportReportBigDataLabStateStatistics,
   } from "@/api/index";
   import titlePageImgComponents from '@/components/titlePageImgComponents.vue'
+  import checkSelectComponents from "@/components/checkSelectComponents.vue";
   export default {
     name: 'subComponents',
     components: {
-      titlePageImgComponents
+      titlePageImgComponents,
+      checkSelectComponents
     },
     data () {
       return {
         propsData:{
           title:'实验室状态统计',
-          // checkType:'subComponents', //二级未开发-暂时注掉
+          checkType:'subComponents',
         },
         //eCharts定时器
         eChartsTimer:null,
@@ -52,12 +55,18 @@
         useTotal:0,//使用数量
         availableTotal:0,//空闲数量
         exceptionalTotal:0,//异常数量
+        //选择器组件传参
+        propsOption:[
+          {label:'全校',value:'11'},
+        ],
+        deptId:0,
       }
     },
     created () {
 
     },
     mounted () {
+      this.getDeptDropList();
       this.timedRefresh();
     },
     methods: {
@@ -70,8 +79,15 @@
           self.getData();
         },1000*30);
       },
+      //组件方法
+      checkSelectData(value){
+        if(this.deptId != value){
+          this.$set(this,'deptId',value);
+          this.getData();
+        }
+      },
       getData(){
-        reportReportBigDataLabStateStatistics({deptId:0}).then( response => {
+        reportReportBigDataLabStateStatistics({deptId:this.deptId}).then( response => {
           let totalityNum = [];
           if(response.data.labTotal != '0'){
             response.data.labTotal = response.data.labTotal+'';
@@ -316,7 +332,19 @@
         let echartsBox = this.$echarts.init(document.getElementById('subComponentsECharts'));
         echartsBox.clear();
         echartsBox.setOption(option);
-      }
+      },
+      getDeptDropList(){
+        getDeptDropList({level: 2, deptType: 1 }).then(response => {
+          let list = [{label:'全校',value:'0'}];
+          for(let i=0;i<response.data.length;i++){
+            list.push({
+              label:response.data[i].deptShortName,
+              value:response.data[i].deptId,
+            })
+          }
+          this.$set(this,'propsOption',list);
+        });
+      },
     },
     beforeDestroy() {
       //清除定时器
@@ -332,6 +360,7 @@
   .subComponents{
     height:457px;
     width:800px;
+    position: relative;
     .eCharts-max-big-box{
       background: linear-gradient( 180deg, rgba(4,117,129,0.2) 0%, rgba(0,15,22,0) 100%);
       .sub-totality{
@@ -433,5 +462,10 @@
         height:239px;
       }
     }
+    .position-check-select{
+      position: absolute;
+      right:29px;
+      top:80px;
+    }
   }
 </style>

+ 45 - 37
src/views/safetyOverview/pageComponent/troubleDistributionComponents.vue

@@ -9,8 +9,8 @@
         <checkSelectComponents :propsOption="propsOption" :placeholder="'全校'" class="position-check-select"></checkSelectComponents>
       </div>
       <div class="eCharts-flex">
-        <div id="troubleDistributionEChartsLeft"></div>
-        <div id="troubleDistributionEChartsRight"></div>
+        <div id="troubleDistributionEChartsLeft" ref="leftBox"></div>
+        <div id="troubleDistributionEChartsRight" ref="rightBox"></div>
       </div>
     </div>
   </div>
@@ -32,21 +32,13 @@
       return {
         propsData:{
           title:'安全隐患分布',
-          // checkType:'troubleDistributionComponents', //二级未开发-暂时注掉
+          checkType:'troubleDistributionComponents',
         },
         //eCharts定时器
         eChartsTimer:null,
         //选择器组件传参
         propsOption:[
           {label:'全校',value:'11'},
-          {label:'农学院',value:'1'},
-          {label:'理学院',value:'2'},
-          {label:'生命科学',value:'3'},
-          {label:'园林艺术',value:'4'},
-          {label:'植物保护',value:'5'},
-          {label:'化学与药物',value:'6'},
-          {label:'资源环境',value:'7'},
-          {label:'国重楼',value:'8'},
         ],
         deptId:0,
       }
@@ -78,40 +70,56 @@
           let rightTextList = [];
           let leftMax = 0;
           let rightMax = 0;
-          for(let i=0;i<response.data.dangerOneList.length;i++){
-            if(leftMax < response.data.dangerOneList[i].indicatorCount){
-              leftMax = response.data.dangerOneList[i].indicatorCount;
+          if(response.data.dangerOneList){
+            for(let i=0;i<response.data.dangerOneList.length;i++){
+              if(leftMax < response.data.dangerOneList[i].indicatorCount){
+                leftMax = response.data.dangerOneList[i].indicatorCount;
+              }
             }
-          }
-          for(let i=0;i<response.data.dangerNoRectifyList.length;i++){
-            if(rightMax < response.data.dangerNoRectifyList[i].indicatorCount){
-              rightMax = response.data.dangerNoRectifyList[i].indicatorCount;
+            for(let i=0;i<response.data.dangerOneList.length;i++){
+              leftNameList.push({
+                text:response.data.dangerOneList[i].indicatorName,
+                max:leftMax,
+              })
+              leftDataList.push(response.data.dangerOneList[i].indicatorCount)
+              leftTextList.push(response.data.dangerOneList[i].indicatorRate+'%')
             }
+            this.eChartsMethodLeft(leftNameList,leftDataList,leftTextList);
+          }else{
+            leftNameList=[{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,}]
+            leftDataList = [0,0,0,0,0]
+            leftTextList = ['']
+            this.eChartsMethodLeft(leftNameList,leftDataList,leftTextList);
           }
-          for(let i=0;i<response.data.dangerOneList.length;i++){
-            leftNameList.push({
-              text:response.data.dangerOneList[i].indicatorName,
-              max:leftMax,
-            })
-            leftDataList.push(response.data.dangerOneList[i].indicatorCount)
-            leftTextList.push(response.data.dangerOneList[i].indicatorRate+'%')
-          }
-          for(let i=0;i<response.data.dangerNoRectifyList.length;i++){
-            rightNameList.push({
-              text:response.data.dangerNoRectifyList[i].indicatorName,
-              max:rightMax,
-            })
-            rightDataList.push(response.data.dangerNoRectifyList[i].indicatorCount)
-            rightTextList.push(response.data.dangerNoRectifyList[i].indicatorRate+'%')
+          if(response.data.dangerNoRectifyList){
+            for(let i=0;i<response.data.dangerNoRectifyList.length;i++){
+              if(rightMax < response.data.dangerNoRectifyList[i].indicatorCount){
+                rightMax = response.data.dangerNoRectifyList[i].indicatorCount;
+              }
+            }
+            for(let i=0;i<response.data.dangerNoRectifyList.length;i++){
+              rightNameList.push({
+                text:response.data.dangerNoRectifyList[i].indicatorName,
+                max:rightMax,
+              })
+              rightDataList.push(response.data.dangerNoRectifyList[i].indicatorCount)
+              rightTextList.push(response.data.dangerNoRectifyList[i].indicatorRate+'%')
+            }
+            this.eChartsMethodRight(rightNameList,rightDataList,rightTextList);
+          }else{
+            rightNameList=[{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,},{text:'暂无数据',max:0,}]
+            rightDataList = [0,0,0,0,0]
+            rightTextList = ['']
+            this.eChartsMethodRight(rightNameList,rightDataList,rightTextList);
           }
-          this.eChartsMethodLeft(leftNameList,leftDataList,leftTextList);
-          this.eChartsMethodRight(rightNameList,rightDataList,rightTextList);
         });
       },
       //组件方法
       checkSelectData(value){
-        this.$set(this,'deptId',value);
-        this.getData();
+        if(this.deptId != value){
+          this.$set(this,'deptId',value);
+          this.getData();
+        }
       },
       eChartsMethodLeft(leftNameList,leftDataList,leftTextList) {
         const indicatorList = leftNameList;

+ 1 - 1
src/views/safetyOverview/pageComponent/troubleRankingComponents.vue

@@ -40,7 +40,7 @@ import {
       return {
         propsData:{
           title:'安全隐患排行',
-          // checkType:'troubleRankingComponents', //二级未开发-暂时注掉
+          checkType:'troubleRankingComponents',
         },
         eChartsTimer:null,
         buttonType:0,

+ 46 - 68
src/views/safetyOverview/pageList/dangerComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -32,19 +32,14 @@
     <div class="table-list-box">
       <p class="table-list-p">数据列表</p>
       <div class="table-list">
-        <el-table class="table-box" :row-class-name="tableRowClassName"
+        <el-table class="table-box"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="危险源总数" prop="data3" width="440" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="危化品数" prop="data4" width="440" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="冷热设备数" prop="data5" width="440" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="新增危险源" prop="data6" width="440" show-overflow-tooltip/>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="危险源总数" prop="dangerousTotal" width="440" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="危化品数" prop="hazardTotal" width="440" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="冷热设备数" prop="deviceNum" width="440" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="新增危险源" prop="newDangerousTotal" width="440" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -59,7 +54,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataHazardDeptGroupCount } from "@/api/index";
   export default {
     name: 'dangerComponentsTable',
     data () {
@@ -70,8 +65,9 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         },
         //列表数据
         dataList:[],
@@ -92,72 +88,54 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'dangerousTotal'){
+          //危险源总数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',1);
+          this.handleQuery();
+        }else if(val.prop == 'hazardTotal'){
+          //危化品数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',2);
+          this.handleQuery();
+        }else if(val.prop == 'deviceNum'){
+          //冷热设备数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',3);
+          this.handleQuery();
+        }else if(val.prop == 'newDangerousTotal'){
+          //新增危险源
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',4);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'ascOrDesc',null);
+          this.$set(this.queryParams,'sortAttri',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              if(dataNameC[0]){
-                obj['data'+(o+1)] = dataNameC[getRandomInt(0,(dataNameC.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataHazardDeptGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         });
-        // this.getList();
-      },
-      tableRowClassName({row, rowIndex}) {
-        if (rowIndex  % 2 == 0) {
-          return 'warning-row';
-        } else {
-          return 'success-row';
-        }
-        return ''
+        this.getList();
       },
       //查询学院列表
       getDeptDropList(){

+ 61 - 73
src/views/safetyOverview/pageList/hazardousComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -32,33 +32,28 @@
     <div class="table-list-box">
       <p class="table-list-p">数据列表</p>
       <div class="table-list">
-        <el-table class="table-box" :row-class-name="tableRowClassName"
+        <el-table class="table-box"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="危化品总数" prop="data2" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="危化品种类" prop="data3" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="总重量" prop="data4" width="300" show-overflow-tooltip>
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="危化品总数" prop="hazardTotal" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="危化品种类" prop="hazardTypeCount" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="总重量" prop="hazardTotalWeight" width="300" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.data4}}kg
+              {{scope.row.hazardTotalWeight}}kg
             </template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="今日新增" prop="data5" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="已过期数" prop="data6" width="300" show-overflow-tooltip>
+          <el-table-column align="center" sortable="custom" label="今日新增" prop="dayStockTotal" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="已过期数" prop="expStockTotal" width="300" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.data6}}kg
+              {{scope.row.expStockTotal}}kg
             </template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="已过期总量" prop="data7" width="300" show-overflow-tooltip>
+          <el-table-column align="center" sortable="custom" label="已过期总量" prop="expStockTotalWeight" width="300" show-overflow-tooltip>
             <template slot-scope="scope">
-              {{scope.row.data7}}kg
+              {{scope.row.expStockTotalWeight}}kg
             </template>
           </el-table-column>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -73,7 +68,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataStockDeptGroupCount } from "@/api/index";
   export default {
     name: 'hazardousComponentsTable',
     data () {
@@ -84,8 +79,9 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         },
         //列表数据
         dataList:[],
@@ -106,72 +102,64 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'hazardTotal'){
+          //危化品总数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',1);
+          this.handleQuery();
+        }else if(val.prop == 'hazardTypeCount'){
+          //危化品种类
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',2);
+          this.handleQuery();
+        }else if(val.prop == 'hazardTotalWeight'){
+          //总重量
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',3);
+          this.handleQuery();
+        }else if(val.prop == 'dayStockTotal'){
+          //今日新增
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',4);
+          this.handleQuery();
+        }else if(val.prop == 'expStockTotal'){
+          //已过期数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',5);
+          this.handleQuery();
+        }else if(val.prop == 'expStockTotalWeight'){
+          //已过期总量
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',6);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'ascOrDesc',null);
+          this.$set(this.queryParams,'sortAttri',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              if(dataNameC[0]){
-                obj['data'+(o+1)] = dataNameC[getRandomInt(0,(dataNameC.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataStockDeptGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         });
-        // this.getList();
-      },
-      tableRowClassName({row, rowIndex}) {
-        if (rowIndex  % 2 == 0) {
-          return 'warning-row';
-        } else {
-          return 'success-row';
-        }
-        return ''
+        this.getList();
       },
       //查询学院列表
       getDeptDropList(){

+ 69 - 63
src/views/safetyOverview/pageList/subComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -35,20 +35,15 @@
         <el-table class="table-box" :row-class-name="tableRowClassName"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="实验室总数" prop="data2" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="使用数" prop="data3" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="空闲数" prop="data4" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="异常数" prop="data5" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="一级" prop="data6" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="二级" prop="data7" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="三级" prop="data8" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="四级" prop="data9" width="240" show-overflow-tooltip/>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="实验室总数" prop="subTotal" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="使用数" prop="subUseCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="空闲数" prop="subFreeCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="异常数" prop="subUnusualCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="一级" prop="subLevelOneCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="二级" prop="subLevelTwoCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="三级" prop="subLevelThreeCount" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="四级" prop="subLevelFourCount" width="240" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -63,7 +58,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataLabDeptGroupCount } from "@/api/index";
   export default {
     name: 'subComponentsTable',
     data () {
@@ -74,8 +69,9 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId :null,
+          sortAttri :null,
+          sortType :null,
         },
         //列表数据
         dataList:[],
@@ -96,64 +92,74 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'subTotal'){
+          //实验室总数
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',1);
+          this.handleQuery();
+        }else if(val.prop == 'subUseCount'){
+          //使用数
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',2);
+          this.handleQuery();
+        }else if(val.prop == 'subFreeCount'){
+          //空闲数
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',3);
+          this.handleQuery();
+        }else if(val.prop == 'subUnusualCount'){
+          //异常数
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',4);
+          this.handleQuery();
+        }else if(val.prop == 'subLevelOneCount'){
+          //一级
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',5);
+          this.handleQuery();
+        }else if(val.prop == 'subLevelTwoCount'){
+          //二级
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',6);
+          this.handleQuery();
+        }else if(val.prop == 'subLevelThreeCount'){
+          //三级
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',7);
+          this.handleQuery();
+        }else if(val.prop == 'subLevelFourCount'){
+          //四级
+          this.$set(this.queryParams,'sortAttri',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortType',8);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'sortAttri','');
+          this.$set(this.queryParams,'sortType',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              if(dataNameC[0]){
-                obj['data'+(o+1)] = dataNameC[getRandomInt(0,(dataNameC.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataLabDeptGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId :null,
+          sortAttri :null,
+          sortType :null,
         });
-        // this.getList();
+        this.getList();
       },
       tableRowClassName({row, rowIndex}) {
         if (rowIndex  % 2 == 0) {

+ 52 - 74
src/views/safetyOverview/pageList/troubleDistributionComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -32,28 +32,23 @@
     <div class="table-list-box">
       <p class="table-list-p">数据列表</p>
       <div class="table-list">
-        <el-table class="table-box" :row-class-name="tableRowClassName"
+        <el-table class="table-box"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="一级指标隐患" prop="data2" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="一级隐患占比" prop="data3" width="240" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.data3}}%</template>
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="一级指标隐患" prop="dangerOneNum" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" label="一级隐患占比" prop="dangerOneGdp" width="240" show-overflow-tooltip>
+            <template slot-scope="scope">{{scope.row.dangerOneGdp}}%</template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="二级指标隐患" prop="data4" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="二级隐患占比" prop="data5" width="240" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.data5}}%</template>
+          <el-table-column align="center" sortable="custom" label="二级指标隐患" prop="dangerTwoNum" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" label="二级隐患占比" prop="dangerTwoGdp" width="240" show-overflow-tooltip>
+            <template slot-scope="scope">{{scope.row.dangerTwoGdp}}%</template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="三级指标隐患" prop="data6" width="240" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="三级隐患占比" prop="data7" width="240" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.data7}}%</template>
+          <el-table-column align="center" sortable="custom" label="三级指标隐患" prop="dangerThreeNum" width="240" show-overflow-tooltip/>
+          <el-table-column align="center" label="三级隐患占比" prop="dangerThreeGdp" width="240" show-overflow-tooltip>
+            <template slot-scope="scope">{{scope.row.dangerThreeGdp}}%</template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="未完成整改隐患" prop="data8" width="240" show-overflow-tooltip/>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
+          <el-table-column align="center" sortable="custom" label="未完成整改隐患" prop="noRectifyNum" width="240" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -68,7 +63,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataDangerDistrGroupCount } from "@/api/index";
   export default {
     name: 'troubleDistributionComponentsTable',
     data () {
@@ -79,8 +74,9 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         },
         //列表数据
         dataList:[],
@@ -101,72 +97,54 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'dangerOneNum'){
+          //一级指标隐患
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',1);
+          this.handleQuery();
+        }else if(val.prop == 'dangerTwoNum'){
+          //二级指标隐患
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',2);
+          this.handleQuery();
+        }else if(val.prop == 'dangerThreeNum'){
+          //三级指标隐患
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',3);
+          this.handleQuery();
+        }else if(val.prop == 'noRectifyNum'){
+          //未完成整改隐患
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',4);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'ascOrDesc',null);
+          this.$set(this.queryParams,'sortAttri',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              obj['data'+(o+1)] = getRandomInt(1,100)
-            }else if(o == 4){
-              obj['data'+(o+1)] = getRandomInt(1,100)
-            }else if(o == 6){
-              obj['data'+(o+1)] = getRandomInt(1,100)
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataDangerDistrGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:"",
+          sortType:null,
+          sortAttri:null,
         });
-        // this.getList();
-      },
-      tableRowClassName({row, rowIndex}) {
-        if (rowIndex  % 2 == 0) {
-          return 'warning-row';
-        } else {
-          return 'success-row';
-        }
-        return ''
+        this.getList();
       },
       //查询学院列表
       getDeptDropList(){

+ 66 - 79
src/views/safetyOverview/pageList/troubleRankingComponentsTable.vue

@@ -13,8 +13,8 @@
       <p class="table-title-p">数据筛选</p>
       <el-form :model="queryParams" class="form-box" ref="queryForm"
                :inline="true" style="width:100%;">
-        <el-form-item label="学院:" prop="state">
-          <el-select v-model="queryParams.state"
+        <el-form-item label="学院:" prop="deptId">
+          <el-select v-model="queryParams.deptId"
                      placeholder="请选择学院"
                      style="width: 260px">
             <el-option
@@ -25,13 +25,13 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="周期:" prop="timeType" style="margin-left:30px!important;">
-          <el-select v-model="queryParams.timeType"
+        <el-form-item label="周期:" prop="cycleType" style="margin-left:30px!important;">
+          <el-select v-model="queryParams.cycleType"
                      placeholder="请选择周期"
                      style="width: 260px;">
-            <el-option key="1" label="年度" value="1"/>
-            <el-option key="2" label="季度" value="2"/>
-            <el-option key="3" label="月度" value="3"/>
+            <el-option key="0" label="年度" value="0"/>
+            <el-option key="1" label="季度" value="1"/>
+            <el-option key="2" label="月度" value="2"/>
           </el-select>
         </el-form-item>
         <p class="form-inquire-common-style-button" @click="handleQuery">查询</p>
@@ -41,23 +41,18 @@
     <div class="table-list-box">
       <p class="table-list-p">数据列表</p>
       <div class="table-list">
-        <el-table class="table-box" :row-class-name="tableRowClassName"
+        <el-table class="table-box"
                   :data="dataList" @sort-change="sortChange">
           <el-table-column align="center" label="序号"  width="150"  type="index"/>
-          <el-table-column align="center" label="学院" prop="data1"  show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="隐患总数" prop="data2" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="已整改" prop="data3" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="整改率" prop="data4" width="300" show-overflow-tooltip>
-            <template slot-scope="scope">{{scope.row.data4}}%</template>
+          <el-table-column align="center" label="学院" prop="deptName"  show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="隐患总数" prop="totalNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="已整改" prop="rectifyNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" label="整改率" prop="rectifyOdds" width="300" show-overflow-tooltip>
+            <template slot-scope="scope">{{scope.row.rectifyOdds}}%</template>
           </el-table-column>
-          <el-table-column align="center" sortable="custom" label="未整改" prop="data5" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="超期未整改" prop="data6" width="300" show-overflow-tooltip/>
-          <el-table-column align="center" sortable="custom" label="暂无法整改" prop="data7" width="300" show-overflow-tooltip/>
-          <!--<el-table-column align="center" label="创建时间" prop="createTime" width="200" show-overflow-tooltip>-->
-          <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>-->
-          <!--</template>-->
-          <!--</el-table-column>-->
+          <el-table-column align="center" sortable="custom" label="未整改" prop="notRectifyNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="超期未整改" prop="overdueNum" width="300" show-overflow-tooltip/>
+          <el-table-column align="center" sortable="custom" label="暂无法整改" prop="tempNum" width="300" show-overflow-tooltip/>
         </el-table>
         <pagination :page-sizes="[20, 30, 40, 50]"
                     v-show="total>0"
@@ -72,7 +67,7 @@
   </div>
 </template>
 <script>
-  import { getDeptDropList,} from "@/api/index";
+  import { getDeptDropList,reportReportBigDataDangerSortGroupCount } from "@/api/index";
   export default {
     name: 'troubleRankingComponentsTable',
     data () {
@@ -83,9 +78,10 @@
         queryParams:{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
-          timeType:null,
+          deptId:'',
+          cycleType:'',
+          sortType:null,
+          sortAttri:null,
         },
         //列表数据
         dataList:[],
@@ -106,74 +102,65 @@
       },
       //排序方法
       sortChange(val){
-
+        if(val.prop == 'totalNum'){
+          //隐患总数
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',1);
+          this.handleQuery();
+        }else if(val.prop == 'rectifyNum'){
+          //已整改
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',2);
+          this.handleQuery();
+        }else if(val.prop == 'rectifyOdds'){
+          //整改率
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',3);
+          this.handleQuery();
+        }else if(val.prop == 'notRectifyNum'){
+          //未整改
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',4);
+          this.handleQuery();
+        }else if(val.prop == 'overdueNum'){
+          //超期未整改
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',5);
+          this.handleQuery();
+        }else if(val.prop == 'tempNum'){
+          //暂无法整改
+          this.$set(this.queryParams,'sortType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+          this.$set(this.queryParams,'sortAttri',6);
+          this.handleQuery();
+        }else{
+          this.$set(this.queryParams,'ascOrDesc',null);
+          this.$set(this.queryParams,'sortAttri',null);
+          this.handleQuery();
+        }
       },
       //列表查询
       getList(){
-        let list = [];
-        let dataNameA = ['农学院','理学院','化学与药物','生命科学','园林艺术','植物保护','资源环境','国重楼'];
-        let dataNameB = [];
-        let dataNameC = [];
-        let maxNum = 20;
-        let num = 9;
-        function getRandomInt(min, max) {
-          min = Math.ceil(min); // 确保min是整数
-          max = Math.floor(max); // 确保max是整数
-          return Math.floor(Math.random() * (max - min + 1)) + min; // 返回介于min和max之间的整数
-        }
-        for(let i=0;i<maxNum;i++){
-          let obj = {};
-          for(let o=0;o<num;o++){
-            if(o == 0){
-              if(dataNameA[0]){
-                obj['data'+(o+1)] = dataNameA[getRandomInt(0,(dataNameA.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 1){
-              if(dataNameB[0]){
-                obj['data'+(o+1)] = dataNameB[getRandomInt(0,(dataNameB.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 2){
-              if(dataNameC[0]){
-                obj['data'+(o+1)] = dataNameC[getRandomInt(0,(dataNameC.length-1))]
-              }else{
-                obj['data'+(o+1)] = getRandomInt(1,500)
-              }
-            }else if(o == 3){
-              obj['data'+(o+1)] = getRandomInt(1,100)
-            }else{
-              obj['data'+(o+1)] = getRandomInt(1,500)
-            }
-          }
-          list.push(obj)
-        }
-        this.$set(this,'dataList',list);
+        reportReportBigDataDangerSortGroupCount(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
       },
       //查询按钮
       handleQuery(){
         this.$set(this.queryParams,'page',1);
-        // this.getList();
+        this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          searchValue:"",
-          state :null,
+          deptId:'',
+          cycleType:'',
+          sortType:null,
+          sortAttri:null,
         });
-        // this.getList();
-      },
-      tableRowClassName({row, rowIndex}) {
-        if (rowIndex  % 2 == 0) {
-          return 'warning-row';
-        } else {
-          return 'success-row';
-        }
-        return ''
+        this.getList();
       },
       //查询学院列表
       getDeptDropList(){