Selaa lähdekoodia

Merge remote-tracking branch 'origin/lifeline_develop_siping' into lifeline_develop_siping

彭宇 5 päivää sitten
vanhempi
commit
52cb16ca70

+ 22 - 0
src/api/data.js

@@ -21,3 +21,25 @@ export function getPipeLengthByPressureLevel() {
     method: 'get',
   })
 }
+
+/**
+ * 预警信息
+ * @returns {*}
+ */
+export function countByWarningCategory() {
+  return request({
+    url: '/sooka-digital-construction/ability/countByWarningCategory',
+    method: 'get',
+  })
+}
+/**
+ * 根据企业查小区
+ * @returns {*}
+ */
+export function getCommunityByDeptId() {
+  return request({
+    url: '/sooka-digital-construction/gas/getCommunityByDeptId?deptId='+deviceCode,
+    method: 'get',
+  })
+}
+

+ 2 - 2
src/api/sentinel.js

@@ -19,7 +19,7 @@ export function selectBrandList() {
 // 查询哨兵设备统计详情
 export function selectDailyThreshold(deviceCode) {
   return request({
-    url: `/sooka-digital-construction/deviceInfo/selectDailyThreshold/${deviceCode}`,
+    url: `/sooka-digital-construction/deviceThreshold/selectDailyThreshold/${deviceCode}`,
     method: 'get'
   })
 }
@@ -27,7 +27,7 @@ export function selectDailyThreshold(deviceCode) {
 // 根据设备id查询设备详情
 export function selectByDeviceId({id}) {
   return request({
-    url: `/sooka-digital-construction/deviceInfo/selectByDeviceId/${id}`,
+    url: `/sooka-digital-construction/deviceInfo/${id}`,
     method: 'get'
   })
 }

+ 1 - 1
src/views/SenEquipmentCenter.vue

@@ -253,7 +253,7 @@
             },
             yAxis: { gridIndex: 0 },
             grid: { top: '55%' },
-            color: ["#6cb956", "#629ab2"],
+            color: ["#28717d", "#629ab2"],
             series: [
               {
                 type: 'bar',

+ 41 - 73
src/views/SenWarningCenter.vue

@@ -7,88 +7,40 @@
 
 <template>
     <div>
-        <div class="warning_left" style="top: 70px;">
-			<h4>可燃气体泄露预警</h4>
-            <h2>3056</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 240px;">
-			<h4>位移预警</h4>
-            <h2>355</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 410px;">
-			<h4>振动预警</h4>
-            <h2>937</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 580px;">
-			<h4>水位预警</h4>
-            <h2>37</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 747px;">
-			<h4>异常流量预警</h4>
-            <h2>86</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="con_right con_left_js" style="top: 70px;">
-			<div class="list_tit">可燃气体泄露预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 240px;">
-			<div class="list_tit">位移预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 410px;">
-			<div class="list_tit">振动预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 580px;">
-			<div class="list_tit">水位预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 747px;">
-			<div class="list_tit">异常流量预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
+      <div class="warning_left" :class="'warning_'+index" v-for="(item,index) in option" >
+        <h4>{{item.typeName}}</h4>
+        <h2>{{item.count}}</h2>
+        <img src="@/assets/images/warningBg.png">
+      </div>
+      <div class="con_right con_left_js" :class="'warning_'+index" v-for="(item,index) in option" >
+        <div class="list_tit">{{item.typeName}}说明</div>
+        <!-- 预警说明内容主体 -->
+              <div class="text_content">
+                  <h4>预警名称:{{item.typeName}}</h4>
+                  <h4>预警描述:{{item.warningDescription}}</h4>
+                  <h4>告警阈值:{{item.concentrationUp}};紧急阈值:{{item.urgentUp}}</h4>
+              </div>
+      </div>
     </div>
 </template>
 
 <script>
+import {countByWarningCategory} from "@/api/data";
 export default {
     data(){
-        return {
-        }
+      return {
+        option:[],
+      }
     },
     mounted(){
+      this.countByWarningCategory();
     },
     methods:{
+      countByWarningCategory(){
+        countByWarningCategory().then(req => {
+          this.option = req.data;
+        })
+      }
     }
 }
 </script>
@@ -131,6 +83,22 @@ export default {
 	.con_left_js {
 		width: 400px !important;
 	}
+    .warning_0{
+      top: 70px !important;
+    }
+    .warning_1{
+      top: 240px !important;
+    }
+    .warning_2{
+      top: 410px !important;
+    }
+    .warning_3{
+      top: 580px !important;
+    }
+    .warning_4{
+      top: 747px !important;
+    }
+
 
     .warning_left{
         position: absolute;
@@ -164,4 +132,4 @@ export default {
     }
 
 
-</style>
+</style>

+ 1 - 1
src/views/SentryCockpit.vue

@@ -747,7 +747,7 @@
 						data: data,
 					},
 					tooltip: {
-						formatter: "{a}:<br/>{b}: {c}",
+						formatter: "{a}:<br/>{b}: {c}",
 					},
 					series: [
 						// 主要展示层的

+ 21 - 9
src/views/useCenter.vue

@@ -5,7 +5,7 @@
     <div class="con_left">
       <div style="color: #FFF;display: flex;justify-content: space-between">
         <div class="left-top-botton " :class="index === botIndex ? 'active':''" v-for="(item,index) in enterpriseList"
-             @click="botIndex = index">{{ item }}
+             @click="getCommunityByDeptId(item.id)">{{ item.name }}
         </div>
       </div>
       <el-input
@@ -14,12 +14,14 @@
         v-model="input1">
       </el-input>
       <dl class="sp_list">
-        <dt><span class="dt1" style="width: 180px">名称</span><span class="dt2" style="width: 120px">用户数量</span>
+        <dt><span class="dt1" style="width: 130px">名称</span><span class="dt2" style="width: 120px">用户数量</span><span class="dt3" style="width: 30px">定位</span>
         </dt>
         <div class="hei_scroll" style="height: 46vh">
-          <dd v-for="item in 30">
-            <span class="dt1" style="width: 180px">xxxxxxxxx-{{ item }}</span>
-            <span class="dt2" style="width: 120px">1212</span>
+          <dd v-for="item in communityList">
+            <span class="dt1" style="width: 130px">{{ item.communityName }}</span>
+            <span class="dt2" style="width: 120px">{{ item.personNum }}</span>
+            <span class="dt3" style="width: 30px"><img
+              src="../assets/images/sentinel/hz_list_d.png"/></span>
           </dd>
         </div>
       </dl>
@@ -80,14 +82,12 @@
 
 <script>
 import Cookies from 'js-cookie'
-import {getUserProfile} from "@/api/system/user";
-
 import '../assets/styles/hz_body.css';
 
 import {
   selectConfigKey
 } from "@/api/system/config";
-import { userStats } from '@/api/data'
+import { userStats,getCommunityByDeptId } from '@/api/data'
 // import * as echarts from 'echarts'
 let echarts = require("echarts");
 export default {
@@ -114,6 +114,7 @@ export default {
       this.title = '四平市智慧哨兵监管平台'
     }, 1000);
     this.userStats();
+    this.getCommunityByDeptId(314459);
   },
   data() {
     return {
@@ -123,7 +124,13 @@ export default {
       input: '',
       input1: '',
       title: '四平市智慧哨兵监管平台',
-      enterpriseList: ["奥德", "华生", "港华", "润发"],
+      enterpriseList: [
+        {name:'华生',id:314459},
+        {name:'港华',id:314462},
+        {name:'奥德',id:314453},
+        {name:'润发',id:314454},
+      ],
+      communityList:[],
       userListSearch:[
         {name:'张利',number:'15602523655'},
         {name:'李明',number:'13812345678'},
@@ -154,6 +161,11 @@ export default {
     }
   },
   methods: {
+    getCommunityByDeptId(id){
+      getCommunityByDeptId(id).then(req => {
+        this.communityList = req.data;
+      })
+    },
     //设备分析
     chart() {
       const chartDom = this.$refs.chart;