|
@@ -1,28 +1,32 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <u-navbar :title="titleName" :safeAreaInsetTop="true" left-icon="" @leftClick="menuShow">
|
|
|
+ <u-navbar
|
|
|
+ :title="titleName"
|
|
|
+ :safeAreaInsetTop="true"
|
|
|
+ left-icon=""
|
|
|
+ @leftClick="menuShow"
|
|
|
+ >
|
|
|
<view class="u-nav-slot" slot="left" v-if="!isShowDetail">
|
|
|
- <u-icon name="list" size="20"> </u-icon>
|
|
|
+ <u-icon name="arrow-left" size="20"> </u-icon>
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
-
|
|
|
+
|
|
|
<view class="main" v-if="isShowDetail">
|
|
|
<view class="flcard" v-if="isShow1">
|
|
|
<view class="typeBar">
|
|
|
<view class="icon-vent">
|
|
|
<text class="text-style">通风监测预警</text>
|
|
|
- <u-icon name="eye" @click="getDetail('vent')"></u-icon>
|
|
|
</view>
|
|
|
- <u-icon @click="toggleIsShow1" name="arrow-up"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow1" name="arrow-up-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard" v-else>
|
|
|
<view class="typeBar">
|
|
|
<text class="text-style">通风监测预警</text>
|
|
|
- <u-icon @click="toggleIsShow1" name="arrow-down"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow1" name="arrow-down-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard" v-show="isShow1">
|
|
|
+ <view class="flcard" @click="getDetail('vent')" v-show="isShow1">
|
|
|
<view class="datacard demo-layout bg-purple-light">
|
|
|
<view style="margin-top: 10rpx">
|
|
|
<text class="text-style1">{{ windData.zongjinfeng }}</text>
|
|
@@ -46,27 +50,33 @@
|
|
|
<view class="typeBar">
|
|
|
<view class="icon-vent">
|
|
|
<text class="text-style">火灾监测预警</text>
|
|
|
- <u-icon name="eye" @click="getDetail('fire')"></u-icon>
|
|
|
</view>
|
|
|
- <u-icon @click="toggleIsShow2" name="arrow-up"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow2" name="arrow-up-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard" v-else>
|
|
|
<view class="typeBar">
|
|
|
<text class="text-style">火灾监测预警</text>
|
|
|
- <u-icon @click="toggleIsShow2" name="arrow-down"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow2" name="arrow-down-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard" v-show="isShow2">
|
|
|
+ <view class="flcard" v-show="isShow2" @click="getDetail('fire')">
|
|
|
<view class="firecontainer">
|
|
|
<view class="title">
|
|
|
<span class="firetext">内因火灾</span>
|
|
|
</view>
|
|
|
<view class="firecard fire-style">
|
|
|
- <view v-for="(item, index) in internalInfo" :key="index" class="fire-item"
|
|
|
- v-if="item && Object.keys(item).length > 0">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in internalInfo"
|
|
|
+ :key="index"
|
|
|
+ class="fire-item"
|
|
|
+ v-if="item && Object.keys(item).length > 0"
|
|
|
+ >
|
|
|
<view style="margin-top: 20rpx">
|
|
|
- <text :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'">{{ item.value }}</text>
|
|
|
+ <text
|
|
|
+ :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'"
|
|
|
+ >{{ item.value }}</text
|
|
|
+ >
|
|
|
<view style="margin-top: 10rpx">{{ item.name }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -77,9 +87,16 @@
|
|
|
<span class="firetext">外因火灾</span>
|
|
|
</view>
|
|
|
<view class="firecard fire-style">
|
|
|
- <view v-for="(item, index) in externalInfo" :key="index" class="fire-item">
|
|
|
+ <view
|
|
|
+ v-for="(item, index) in externalInfo"
|
|
|
+ :key="index"
|
|
|
+ class="fire-item"
|
|
|
+ >
|
|
|
<view style="margin-top: 20rpx">
|
|
|
- <text :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'">{{ item.value }}</text>
|
|
|
+ <text
|
|
|
+ :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'"
|
|
|
+ >{{ item.value }}</text
|
|
|
+ >
|
|
|
<view style="margin-top: 10rpx">{{ item.name }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -90,25 +107,28 @@
|
|
|
<view class="typeBar">
|
|
|
<view class="icon-vent">
|
|
|
<text class="text-style">粉尘监测预警</text>
|
|
|
- <u-icon name="eye" @click="getDetail('dust')"></u-icon>
|
|
|
</view>
|
|
|
- <u-icon @click="toggleIsShow3" name="arrow-up"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow3" name="arrow-up-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard" v-else>
|
|
|
<view class="typeBar">
|
|
|
<text class="text-style">粉尘监测预警</text>
|
|
|
- <u-icon @click="toggleIsShow3" name="arrow-down"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow3" name="arrow-down-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard" v-show="isShow3">
|
|
|
+ <view class="flcard" v-show="isShow3" @click="getDetail('dust')">
|
|
|
<view class="firecard fire-style">
|
|
|
<view v-for="(value, key) in dustData" :key="key" class="fire-item">
|
|
|
<view style="margin-top: 20rpx">
|
|
|
- <image src="/static/warndata/alarm.svg" class="icon-style"
|
|
|
- :style="{ backgroundColor: key === 'alarm' ? 'red' : key }"></image>
|
|
|
+ <image
|
|
|
+ src="/static/warndata/alarm.svg"
|
|
|
+ class="icon-style"
|
|
|
+ :style="{ backgroundColor: key === 'alarm' ? 'red' : key }"
|
|
|
+ ></image>
|
|
|
<span style="margin-top: 10rpx">
|
|
|
- {{ dustMap[key] }} :{{ value }}</span>
|
|
|
+ {{ dustMap[key] }} :{{ value }}</span
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -118,23 +138,24 @@
|
|
|
<view class="typeBar">
|
|
|
<view class="icon-vent">
|
|
|
<text class="text-style">瓦斯监测预警</text>
|
|
|
- <u-icon name="eye" @click="getDetail('gas')"></u-icon>
|
|
|
</view>
|
|
|
- <u-icon @click="toggleIsShow4" name="arrow-up"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow4" name="arrow-up-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard" v-else>
|
|
|
<view class="typeBar">
|
|
|
<text class="text-style">瓦斯监测预警</text>
|
|
|
- <u-icon @click="toggleIsShow4" name="arrow-down"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow4" name="arrow-down-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard" v-show="isShow4">
|
|
|
+ <view class="flcard" v-show="isShow4" @click="getDetail('gas')">
|
|
|
<view class="firecontainer">
|
|
|
<view class="title">
|
|
|
- <span class="firetext" v-if="gasDevice.length > 0">安全监测系统监测点</span>
|
|
|
+ <span class="firetext" v-if="gasDevice.length > 0"
|
|
|
+ >安全监测系统监测点</span
|
|
|
+ >
|
|
|
</view>
|
|
|
- <view class="gascard" v-for="(item, index) in gasDevice">
|
|
|
+ <view class="gascard" v-for="(item, index) in gasDevice" :key="index">
|
|
|
<view style="margin-top: 20rpx">
|
|
|
<text class="text-style1">{{ item.gasNumber }}</text>
|
|
|
<view style="margin: 10rpx">{{ item.systemname }}</view>
|
|
@@ -143,7 +164,9 @@
|
|
|
</view>
|
|
|
<view class="firecontainer">
|
|
|
<view class="title">
|
|
|
- <span class="firetext" v-if="gasDevice.length > 0">瓦斯抽采系统监测点</span>
|
|
|
+ <span class="firetext" v-if="gasDevice.length > 0"
|
|
|
+ >瓦斯抽采系统监测点</span
|
|
|
+ >
|
|
|
</view>
|
|
|
<view class="gascontainer">
|
|
|
<view class="gascard" v-for="(item, index) in gasDevice">
|
|
@@ -159,21 +182,28 @@
|
|
|
<view class="typeBar">
|
|
|
<view class="icon-vent">
|
|
|
<text class="text-style">设备监测预警</text>
|
|
|
- <u-icon name="eye" @click="getDetail('device')"></u-icon>
|
|
|
</view>
|
|
|
- <u-icon @click="toggleIsShow5" name="arrow-up"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow5" name="arrow-up-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flcard" v-else>
|
|
|
<view class="typeBar">
|
|
|
<text class="text-style">设备监测预警</text>
|
|
|
- <u-icon @click="toggleIsShow5" name="arrow-down"></u-icon>
|
|
|
+ <u-icon @click="toggleIsShow5" name="arrow-down-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flcard demo-layout bg-purple-light" v-show="isShow5">
|
|
|
+ <view
|
|
|
+ class="flcard demo-layout bg-purple-light"
|
|
|
+ v-show="isShow5"
|
|
|
+ @click="getDetail('device')"
|
|
|
+ >
|
|
|
<view class="deviceCard">
|
|
|
- <view class="item-container" v-for="(item, index) in devicekindData" :key="index"
|
|
|
- :style="{ backgroundImage: itemBackground(item) }">
|
|
|
+ <view
|
|
|
+ class="item-container"
|
|
|
+ v-for="(item, index) in devicekindData"
|
|
|
+ :key="index"
|
|
|
+ :style="{ backgroundImage: itemBackground(item) }"
|
|
|
+ >
|
|
|
<view class="item">
|
|
|
<text style="margin-right: 10px">{{ item.name }}</text>
|
|
|
<text>{{ item.status }}</text>
|
|
@@ -190,20 +220,20 @@
|
|
|
|
|
|
<script>
|
|
|
import api from "@/api/api";
|
|
|
-import ventDetail from './components/vent-detail.vue'
|
|
|
-import deviceDetail from './components/device-detail.vue'
|
|
|
-import fireDetail from './components/fire-detail.vue'
|
|
|
-import dustDetail from './components/dust-detail.vue'
|
|
|
-import gasDetail from './components/gas-detail.vue'
|
|
|
+import ventDetail from "./components/vent-detail.vue";
|
|
|
+import deviceDetail from "./components/device-detail.vue";
|
|
|
+import fireDetail from "./components/fire-detail.vue";
|
|
|
+import dustDetail from "./components/dust-detail.vue";
|
|
|
+import gasDetail from "./components/gas-detail.vue";
|
|
|
|
|
|
export default {
|
|
|
props: {},
|
|
|
watch: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- titleName:'预警分析',
|
|
|
+ titleName: "预警分析",
|
|
|
isShowDetail: true,
|
|
|
- detailComponent: '',
|
|
|
+ detailComponent: "",
|
|
|
windData: {},
|
|
|
devicekindData: [],
|
|
|
fireData: [],
|
|
@@ -253,8 +283,14 @@ export default {
|
|
|
mounted() {
|
|
|
this.getWranInfo();
|
|
|
},
|
|
|
+ components: {
|
|
|
+ ventDetail,
|
|
|
+ deviceDetail,
|
|
|
+ fireDetail,
|
|
|
+ dustDetail,
|
|
|
+ gasDetail,
|
|
|
+ },
|
|
|
methods: {
|
|
|
-
|
|
|
//获取预警信息
|
|
|
getWranInfo() {
|
|
|
new Promise((resolve, reject) => {
|
|
@@ -283,31 +319,31 @@ export default {
|
|
|
},
|
|
|
//返回监测首页
|
|
|
menuShow() {
|
|
|
- this.isShowDetail = true
|
|
|
+ this.isShowDetail = true;
|
|
|
},
|
|
|
//跳转监测详情
|
|
|
getDetail(data) {
|
|
|
- this.isShowDetail = false
|
|
|
+ this.isShowDetail = false;
|
|
|
switch (data) {
|
|
|
- case 'vent':
|
|
|
- this.titleName='通风监测预警'
|
|
|
- this.detailComponent = ventDetail
|
|
|
+ case "vent":
|
|
|
+ this.titleName = "通风监测预警";
|
|
|
+ this.detailComponent = ventDetail;
|
|
|
break;
|
|
|
- case 'device':
|
|
|
- this.titleName='设备监测预警'
|
|
|
- this.detailComponent = deviceDetail
|
|
|
+ case "device":
|
|
|
+ this.titleName = "设备监测预警";
|
|
|
+ this.detailComponent = deviceDetail;
|
|
|
break;
|
|
|
- case 'fire':
|
|
|
- this.titleName='火灾监测预警'
|
|
|
- this.detailComponent = fireDetail
|
|
|
+ case "fire":
|
|
|
+ this.titleName = "火灾监测预警";
|
|
|
+ this.detailComponent = fireDetail;
|
|
|
break;
|
|
|
- case 'dust':
|
|
|
- this.titleName='粉尘监测预警'
|
|
|
- this.detailComponent = dustDetail
|
|
|
+ case "dust":
|
|
|
+ this.titleName = "粉尘监测预警";
|
|
|
+ this.detailComponent = dustDetail;
|
|
|
break;
|
|
|
- case 'gas':
|
|
|
- this.titleName='瓦斯监测预警'
|
|
|
- this.detailComponent = gasDetail
|
|
|
+ case "gas":
|
|
|
+ this.titleName = "瓦斯监测预警";
|
|
|
+ this.detailComponent = gasDetail;
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
@@ -373,10 +409,12 @@ export default {
|
|
|
text-align: center;
|
|
|
border-radius: 10px;
|
|
|
background: url(/static/model/windM3.png),
|
|
|
- linear-gradient(to right,
|
|
|
+ linear-gradient(
|
|
|
+ to right,
|
|
|
rgba(55, 135, 254, 0.08),
|
|
|
rgba(4, 184, 255, 0.08),
|
|
|
- rgba(60, 161, 237, 0.08));
|
|
|
+ rgba(60, 161, 237, 0.08)
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
.datacard1 {
|
|
@@ -386,10 +424,12 @@ export default {
|
|
|
height: 200rpx;
|
|
|
text-align: center;
|
|
|
border-radius: 10px;
|
|
|
- background: linear-gradient(to right,
|
|
|
- rgba(55, 135, 254, 0.08),
|
|
|
- rgba(4, 184, 255, 0.08),
|
|
|
- rgba(60, 161, 237, 0.08));
|
|
|
+ background: linear-gradient(
|
|
|
+ to right,
|
|
|
+ rgba(55, 135, 254, 0.08),
|
|
|
+ rgba(4, 184, 255, 0.08),
|
|
|
+ rgba(60, 161, 237, 0.08)
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
.title {
|
|
@@ -412,10 +452,12 @@ export default {
|
|
|
text-align: center;
|
|
|
border-radius: 10px;
|
|
|
margin-top: 10px;
|
|
|
- background: linear-gradient(to right,
|
|
|
- rgba(55, 135, 254, 0.08),
|
|
|
- rgba(4, 184, 255, 0.08),
|
|
|
- rgba(60, 161, 237, 0.08));
|
|
|
+ background: linear-gradient(
|
|
|
+ to right,
|
|
|
+ rgba(55, 135, 254, 0.08),
|
|
|
+ rgba(4, 184, 255, 0.08),
|
|
|
+ rgba(60, 161, 237, 0.08)
|
|
|
+ );
|
|
|
background-repeat: repeat;
|
|
|
}
|
|
|
|
|
@@ -482,10 +524,12 @@ export default {
|
|
|
border-radius: 10px;
|
|
|
margin: 10px;
|
|
|
background: url(/static/warndata/work.png),
|
|
|
- linear-gradient(to right,
|
|
|
+ linear-gradient(
|
|
|
+ to right,
|
|
|
rgba(55, 135, 254, 0.08),
|
|
|
rgba(4, 184, 255, 0.08),
|
|
|
- rgba(60, 161, 237, 0.08));
|
|
|
+ rgba(60, 161, 237, 0.08)
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
.icon-style {
|