zhaobao преди 2 години
родител
ревизия
51558da743

+ 1 - 1
src/api/goaf/dangerApi.js

@@ -89,6 +89,6 @@ export function goafhdangerstatis(data) {
   return request({
     url: "/goaf/goafhdangerstatis",
     method: 'get',
-    data
+    params: data
   })
 }

+ 4 - 4
src/views/home/components/ReportTask.vue → src/views/home/components/CheckWarnReport.vue

@@ -28,7 +28,7 @@
 import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
 import { getDangerByList } from '@/api/goaf/dangerApi'
 export default {
-    name:"WarnReport",
+    name:"CheckWarnReport",
     components:{
         Vue3SeamlessScroll,
     },
@@ -52,11 +52,11 @@ export default {
         },
         load(){
             getDangerByList({
+                hdangerType:0,
                 status: 4
             }).then((res)=>{
-                let items=res.data.filter(item=>item.hdangerType===0)
-                this.total=items.length
-                this.items=items
+                this.total=res.data.length
+                this.items=res.data
             })
         }
     }

+ 3 - 3
src/views/home/components/SensorWarningInfo.vue

@@ -52,11 +52,11 @@ export default {
         },
         load(){
             getDangerByList({
+                hdangerType:1,
                 status: 4
             }).then((res)=>{
-                let items=res.data.filter(item=>item.hdangerType===1)
-                this.total=items.length
-                this.items=items
+                this.total=res.data.length
+                this.items=res.data
             })
         }
     }

+ 35 - 16
src/views/home/components/SensorWarningStatistics.vue

@@ -2,47 +2,47 @@
     <div class="item warning-statistics">
         <div class="title">
             <span class="name">传感器预警统计</span>
-            <span class="number">24</span>
+            <span class="number">{{total}}</span>
         </div>
         <div class="container">
             <div class="lf">
                 <div class="head">
                     <div class="head-item">
-                        <div class="number">0</div>
+                        <div class="number">{{ data.goafHdangerLevelSeriousNum }}</div>
                         <div class="name">危急</div>
                     </div>
                     <div class="head-item">
-                        <div class="number">0</div>
+                        <div class="number">{{ data.goafHdangerLevelMajorNum }}</div>
                         <div class="name">危险</div>
                     </div>
                     <div class="head-item">
-                        <div class="number">0</div>
+                        <div class="number">{{ data.goafHdangerLevelGeneralNum }}</div>
                         <div class="name">威胁</div>
                     </div>
                     <div class="head-item">
-                        <div class="number">0</div>
+                        <div class="number">{{ data.goafHdangerLevelLowerNum }}</div>
                         <div class="name">异常</div>
                     </div>
                 </div>
                 <div class="status">
                     <div class="status-item">
                         <div class="name">待整改</div>
-                        <div class="number">2</div>
+                        <div class="number">{{ data.goafHdangerStatusTorectifyNum }}</div>
                     </div>                  
                     <div class="status-item">
                         <div class="name">待验收</div>
-                        <div class="number">3</div>
+                        <div class="number">{{ data.goafHdangerStatusToacceptNum }}</div>
                     </div>    
                     <div class="status-item">
                         <div class="name">已完成</div>
-                        <div class="number">19</div>
+                        <div class="number">{{ data.goafHdangerLevelSeriousNum }}</div>
                     </div>    
                 </div>
             </div>
             <div class="chart-cont">
-                <el-progress type="circle" :percentage="25" :width="120" color="#2affff" :stroke-width="8">   
+                <el-progress type="circle" :percentage="rectify_rate" :width="120" color="#2affff" :stroke-width="8">   
                     <template #default="{ percentage }">
-                        <span style="color:#fff;font-size: 20px;font-weight: bold;">{{ 80 }}%</span>
+                        <span style="color:#fff;font-size: 20px;font-weight: bold;">{{ rectify_rate }}%</span>
                     </template>
                 </el-progress>
                 <p>整改完成率</p>             
@@ -53,12 +53,31 @@
 <script>
 export default {
     name:"SensorWarningStatistics",
-    props:{
-        data:{
-            type:Object,
-            default:{
-
-            }
+    data(){
+        return{
+             data:{
+                "goafHdangerLevelGeneralNum":0,
+                "goafHdangerLevelLowerNum": 0,
+                "goafHdangerLevelMajorNum": 0,
+                "goafHdangerLevelSeriousNum": 0,
+                "goafHdangerStatusCancelNum": 0,
+                "goafHdangerStatusCompleteNum": 0,
+                "goafHdangerStatusToacceptNum": 0,
+                "goafHdangerStatusToforreviewlNum": 0,
+                "goafHdangerStatusTorectifyNum": 0,
+                "goafHdangerStatusTosubmitNum": 0,
+             },
+             "rectify_rate":0,
+             'total':0
+        }
+    },
+    methods:{
+        loadData(data){
+            let total=data.goafHdangerLevelGeneralNum+data.goafHdangerLevelLowerNum+data.goafHdangerLevelMajorNum+data.goafHdangerLevelSeriousNum
+            let rectify_rate=total>0?(data.goafHdangerStatusCompleteNum/total):0
+            this.data=data
+            this.total=total
+            this.rectify_rate=(rectify_rate*100).toFixed(1)
         }
     }
 }

+ 4 - 4
src/views/home/components/WarnReport.vue → src/views/home/components/TodayCheckTask.vue

@@ -25,7 +25,7 @@ import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
 import { goaftaskList } from '@/api/goaf/task'
 import {parseTime} from '@/utils'
 export default {
-    name:"WarnReport",
+    name:"TodayCheckTask",
     components:{
         Vue3SeamlessScroll,
     },
@@ -49,11 +49,11 @@ export default {
             let y= date.getFullYear()
             let m=date.getMonth()+1
             let d=date.getDate()
-            let expectedStartDate=parseTime(new Date(`${y}-${m}-${d}-`))
-            let expectedEndDate=parseTime(new Date(`${y}-${m}-${d+1}-`))
+            let expectedStartDate=parseTime(new Date(`${y}-${m}-${d}`))
+            let expectedEndDate=parseTime(new Date(`${y}-${m}-${d+1}`))
             goaftaskList({
                 expectedStartDate,
-                expectedEndDate,                
+                expectedEndDate              
             }).then((res)=>{
                 let complete=res.data.filter(item=>item.status===1).length
                 let unfinished=res.data.length-complete

+ 1 - 1
src/views/home/components/WarningStatistics.vue

@@ -40,7 +40,7 @@
                 </div>
             </div>
             <div class="chart-cont">
-                <el-progress type="circle" :percentage="25" :width="120" color="#2affff" :stroke-width="8">   
+                <el-progress type="circle" :percentage="rectify_rate" :width="120" color="#2affff" :stroke-width="8">   
                     <template #default="{ percentage }">
                         <span style="color:#fff;font-size: 20px;font-weight: bold;">{{ rectify_rate }}%</span>
                     </template>

+ 4 - 4
src/views/home/components/index.js

@@ -1,6 +1,6 @@
 import WarningStatistics from './WarningStatistics.vue'
-import WarnReport from './WarnReport.vue'
-import ReportTask from './ReportTask.vue'
+import CheckWarnReport from './CheckWarnReport.vue'
+import TodayCheckTask from './TodayCheckTask.vue'
 
 import SensorStatus from './SensorStatus.vue'
 import SensorWarningStatistics from './SensorWarningStatistics.vue'
@@ -11,8 +11,8 @@ import Map from './Map/index.vue'
 
 export  {
     WarningStatistics,
-    WarnReport,
-    ReportTask,
+    TodayCheckTask,
+    CheckWarnReport,
     SensorStatus,
     SensorWarningStatistics,
     SensorWarningInfo,

+ 18 - 11
src/views/home/index.vue

@@ -2,17 +2,17 @@
 <div class="home-view">
     <div class="side-left">
         <warning-statistics ref="warning-statistics" />
-        <report-task />  
-        <warn-report /> 
+        <check-warn-report />  
+        <today-check-task /> 
     </div>
     <div class="main">
         <Map ref="map" />
     </div>
     <div class="side-right">
         <sensor-status ref="sensor-status" />
-        <sensor-warning-statistics  />
-        <sensor-warning-info :data="reportData" /> 
-        <sensor-info-statistics :data="reportData" ref="sensor-info-statistics" />         
+        <sensor-warning-statistics ref="sensor-warning-statistics"  />
+        <sensor-warning-info  /> 
+        <sensor-info-statistics ref="sensor-info-statistics" />         
     </div>
 </div>
 </template>
@@ -24,8 +24,8 @@ import { useStore } from '@/store/modules/user'
 const store=useStore()
 import {   
     WarningStatistics,
-    WarnReport,
-    ReportTask,
+    TodayCheckTask,
+    CheckWarnReport,
     SensorStatus,
     SensorWarningStatistics,
     SensorWarningInfo,
@@ -36,8 +36,8 @@ import {
     name:'Home',
     components:{
         WarningStatistics,
-        WarnReport,
-        ReportTask,
+        TodayCheckTask,
+        CheckWarnReport,
         SensorStatus,
         SensorWarningStatistics,
         SensorWarningInfo,
@@ -96,10 +96,17 @@ import {
             }
         },
         getWarniStatisticsdata(){
-            //隐患统计            
-            goafhdangerstatis().then((res)=>{
+            //预警统计            
+            goafhdangerstatis({
+                hdangerType:0
+            }).then((res)=>{
                 this.$refs['warning-statistics'].loadData(res.data)
             })
+            goafhdangerstatis({
+                hdangerType:1
+            }).then((res)=>{
+                this.$refs['sensor-warning-statistics'].loadData(res.data)
+            })
         }
     }
  }

+ 9 - 1
src/views/particulars/check.vue

@@ -232,8 +232,16 @@ import {  getGoafBaseInfo } from '@/api/goaf/info'
                 taskTitle:"",
                 expectedStartDate:new Date(),
                 expectedEndDate:"",
-                goafName:""         
+                goafId: '',
+                goafOrebelt: '',
+                goafOrebody: '',
+                goafOreheight: '',
+                goafName:"",
+                goafDevName:""      
             }
+            this.goafOrebodys=[]
+            this.goafOreheights=[]
+            this.goafNames=[]  
             this.getData()
         },
         handleSizeChange(limit){

+ 3 - 0
src/views/particulars/goaf_info.vue

@@ -143,6 +143,9 @@ import { NumConvertLM ,parseTime} from '@/utils'
                 goafName:"",
                 goafDevName:""   
             }
+            this.goafOrebodys=[]
+            this.goafOreheights=[]
+            this.goafNames=[]  
             this.getData()
         },
         handleSizeChange(limit){

+ 8 - 8
src/views/particulars/sensor.vue

@@ -21,7 +21,7 @@
             <div class="lf">
                 <div class="search-container">
                     <div class="search-item">
-                        <el-input v-model="conditions.goafDevName"  class="input" placeholder="请输入传感器名称" />
+                        <el-input v-model="conditions.goafDevName"  class="input" placeholder="请输入设备编号" />
                     </div>
                     <div class="search-item">
                         <span>预警等级:</span>
@@ -155,6 +155,7 @@ import { NumConvertLM } from '@/utils'
                 goafName:"",
                 goafDevName:"",
                 hdangerLevel:"",
+                goafDevTypename:""
                 // start:0,
                 // end:0
             }, 
@@ -170,11 +171,6 @@ import { NumConvertLM } from '@/utils'
                 {name:"有害气体传感器",id:"4",path:"/particulars/goaf-info"},
                 {name:"视频监控",id:"5",path:"/particulars/goaf-info"},
             ],
-            tabs:[
-                {name:"Ⅲ号",id:"1"},
-                {name:"770",id:"2"},
-                {name:"32001",id:"3"},
-            ],
             options:[
                 {label:1,value:2},
                 {label:2,value:3},
@@ -247,9 +243,13 @@ import { NumConvertLM } from '@/utils'
                 goafName:"",
                 goafDevName:"",
                 hdangerLevel:"",
-                start:0,
-                end:0           
+                goafDevTypename:"",
+                // start:0,
+                // end:0           
             }
+            this.goafOrebodys=[]
+            this.goafOreheights=[]
+            this.goafNames=[]  
             this.getData()
         },
         handleSizeChange(limit){

+ 118 - 15
src/views/particulars/video.vue

@@ -2,15 +2,25 @@
     <div class="video-page">
         <header></header>
         <div class="tab">
-            <div :class="activetab===item.id?'active item':'item'" v-for="item in tabs" :key="item.id" @click="changeTab(item)">{{ item.name }}</div>  
+            <el-select v-model="conditions.goafOrebelt" placeholder="矿带"  @change="changeArea(1)" style="width:120px" clearable>
+                <el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item" :label="item" />
+            </el-select>
+            <el-select v-model="conditions.goafOrebody" placeholder="矿体"  @change="changeArea(2)" style="width:120px;margin:0 12px;">
+                <el-option v-for="(item,index) in goafOrebodys" :key="index" :value="item.goafOrebody" :label="item.goafOrebody" />
+            </el-select>
+            <el-select v-model="conditions.goafOreheight" placeholder="中段"  @change="changeArea(3)" style="width:120px">
+                <el-option v-for="(item,index) in goafOreheights" :key="index" :value="item.goafOreheight" :label="item.goafOreheight" />
+            </el-select>   
         </div>
         <div class="container">
             <div class="lf">
-                <!-- <div class="search-container">
-                    <el-input v-model="search.code"  class="input" placeholder="请输入采空区编号" />
+                <div class="search-container">
+                    <el-select v-model="conditions.goafId" placeholder="采空区编号"  @change="changeArea(4)" style="width:210px;margin:0 12px;">
+                        <el-option v-for="item in goafNames" :key="item.goafId" :value="item.goafId" :label="item.goafName" />
+                    </el-select>  
                     <div class="bt search" @click="searchSubmit">查询</div>
                     <div class="bt" @click="resetSubmit">重置</div>
-                </div> -->
+                </div>
                 <div class="lf-container"> 
                     <div class="video-container">
                         <div class="item" v-for="(item,index) in 10" :key="index" @click="showVideo(item)">
@@ -38,6 +48,7 @@
 <script>
 import AlertChart from './components/AlertChart.vue'
 import WarnChart from './components/WarnChart.vue'
+import {  getGoafBaseInfo } from '@/api/goaf/info'
  export default {
     name:"particulars_video",
     components:{
@@ -58,9 +69,21 @@ import WarnChart from './components/WarnChart.vue'
                 {name:"770",id:"2"},
                 {name:"32001",id:"3"},
             ],
-            search:{
-                code:""
-            }                     
+            conditions: {
+                page: 1,
+                limit: 10,
+                goafId: '',
+                goafOrebelt: '',
+                goafOrebody: '',
+                goafOreheight: '',
+                goafName:"",
+                goafDevName:""
+            }, 
+            goafList: [],
+            goafOrebelts: [],
+            goafOrebodys: [],
+            goafOreheights: [],
+            goafNames: [],                  
         }
     },
     created(){
@@ -68,21 +91,36 @@ import WarnChart from './components/WarnChart.vue'
     },
     methods:{
         init(){
-
+            getGoafBaseInfo().then((res) => {
+                const goafOrebelts = res.data.map(item => item.goafOrebelt)
+                this.goafOrebelts = [...new Set(goafOrebelts)]
+                this.goafList = res.data
+            })  
         },
         changeHead(item){
             this.activeId=item.id
         },
-        changeTab(item){
-            this.activetab=item.id
-        },
         searchSubmit(){
-
+            this.getData()
         },
         resetSubmit(){
-            this.search={
-                code:""           
+            this.conditions={
+                page: 1,
+                limit: 10,
+                goafId: '',
+                goafOrebelt: '',
+                goafOrebody: '',
+                goafOreheight: '',
+                goafName:"",
+                goafDevName:""
             }
+            this.goafOrebodys=[]
+            this.goafOreheights=[]
+            this.goafNames=[]  
+            this.getData()
+        },
+        getData(){
+
         },
         showVideo(item){
             this.video={
@@ -90,12 +128,77 @@ import WarnChart from './components/WarnChart.vue'
                 name:"{Ⅲ号-770-32008}:封堵口"
             }
             this.videoDialogVisible=true;
-        }
+        },
+        changeArea(type) {
+            const goafs = this.deeepClone(this.goafList)
+            let goafOrebodys = this.deeepClone(this.goafOrebodys)
+            let goafOreheights = this.deeepClone(this.goafOreheights)
+            let goafNames = this.deeepClone(this.goafNames)
+            if (type === 1) {
+                goafOrebodys = goafs.filter(item => item.goafOrebelt === this.conditions.goafOrebelt)
+                this.goafOrebodys = goafOrebodys
+                this.goafOreheights = []
+                this.goafNames = []
+                this.conditions.goafOrebody = ''
+                this.conditions.goafOreheight = ''
+                this.conditions.goafName = ''
+                this.conditions.goafId = ''
+            } else if (type === 2) {
+                goafOreheights = goafs.filter(item => (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
+                this.goafOreheights = goafOreheights
+                this.goafNames = []
+                this.conditions.goafOreheight = ''
+                this.conditions.goafName = ''
+                this.conditions.goafId = ''
+            } else if (type === 3) {
+                goafNames = goafs.filter(item => (item.goafOreheight === this.conditions.goafOreheight) && (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
+                this.goafNames = goafNames
+                this.conditions.goafName = ''
+                this.conditions.goafId = ''
+            } else {
+                for (let i = 0; i < goafNames.length; i++) {
+                if (this.conditions.goafId === goafNames[i].goafId) {
+                    this.conditions.goafName = goafNames[i].goafName
+                }
+                }
+            }
+            this.$forceUpdate()
+        },        
+        deeepClone(params) {
+            return JSON.parse(JSON.stringify(params))
+        } 
     }
  }
 </script>
 <style lang="scss" scoped>
 .video-page{
+    .search-item{
+        display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-bottom: 14px;
+            span{
+                font-family: 'Ping Hei';
+                font-size: 14px;
+                line-height: 1;
+                color: rgba(255, 255, 255, 0.7);
+            }
+        }
+        .input,.select,.el-date-editor{
+            width: 180px;
+            margin-right:16px;
+            color: #fff;
+        }
+        ::v-deep{
+            .el-input__wrapper{
+                background-color:  rgba(8, 128, 255, 0.2);
+                border: 0;
+                box-shadow: none;               
+            }
+            .el-input__inner{
+                color: #fff;
+            }
+    } 
     .video-dialog{
         position: fixed;
         z-index: 999;