|
@@ -1,19 +1,32 @@
|
|
|
<template>
|
|
|
<view class="gas-detail">
|
|
|
- <u-tabs class="devic-box-tab" :current="PageCur" :list="tabList" @click="NavChange"></u-tabs>
|
|
|
+ <u-tabs
|
|
|
+ class="devic-box-tab"
|
|
|
+ :current="PageCur"
|
|
|
+ :list="tabList"
|
|
|
+ @click="NavChange"
|
|
|
+ ></u-tabs>
|
|
|
<view class="gas-content" v-if="PageCur == 0">
|
|
|
<view class="search-area">
|
|
|
<view class="search-l">
|
|
|
-
|
|
|
<view class="search-item" @click="getChangeJcd">
|
|
|
<text class="search-label">监测点:</text>
|
|
|
- <u--input inputAlign="center" v-model="searchText" placeholder="请选择监测点" suffixIcon="arrow-right"
|
|
|
- suffixIconStyle="color: #909399"></u--input>
|
|
|
- <u-action-sheet :show="showJcd" :actions="selectList" title="请选择监测点" @close="showJcd = false"
|
|
|
- @select="selectChangeJcd">
|
|
|
+ <u--input
|
|
|
+ inputAlign="center"
|
|
|
+ v-model="searchText"
|
|
|
+ placeholder="请选择监测点"
|
|
|
+ suffixIcon="arrow-right"
|
|
|
+ suffixIconStyle="color: #909399"
|
|
|
+ ></u--input>
|
|
|
+ <u-action-sheet
|
|
|
+ :show="showJcd"
|
|
|
+ :actions="selectList"
|
|
|
+ title="请选择监测点"
|
|
|
+ @close="showJcd = false"
|
|
|
+ @select="selectChangeJcd"
|
|
|
+ >
|
|
|
</u-action-sheet>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
<view class="search-r">
|
|
|
<!-- <image src="/static/model/alarmTrue.svg" alt="" class="icon-style" /> -->
|
|
@@ -23,9 +36,13 @@
|
|
|
</view>
|
|
|
<view class="top-area">
|
|
|
<view class="top-title">
|
|
|
- <view style="font-weight: bold;">瓦斯抽采泵信息</view>
|
|
|
+ <view style="font-weight: bold">瓦斯抽采泵信息</view>
|
|
|
</view>
|
|
|
- <view class="top-content" v-for="(item, index) in topContentList" :key="index">
|
|
|
+ <view
|
|
|
+ class="top-content"
|
|
|
+ v-for="(item, index) in topContentList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<view class="content-title">{{ item.strinstallpos }}</view>
|
|
|
<view class="content-item-box">
|
|
|
<view class="content-item">
|
|
@@ -35,46 +52,54 @@
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readData.coVal || '--' }}</view>
|
|
|
+ <view class="item-value">{{
|
|
|
+ item.readData.coVal || "--"
|
|
|
+ }}</view>
|
|
|
<view class="item-label">输入管道内一氧化碳(ppm)</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
|
- <view class="item-value">{{ item.readData.gas1 || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readData.gas1 || "--" }}</view>
|
|
|
<view class="item-label">管路出口处瓦斯</view>
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readData.gas2 || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readData.gas2 || "--" }}</view>
|
|
|
<view class="item-label">泵站内瓦斯</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
|
- <view class="item-value">{{ item.readData.gas3 || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readData.gas3 || "--" }}</view>
|
|
|
<view class="item-label">输入管道内瓦斯</view>
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readData.gas4 || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readData.gas4 || "--" }}</view>
|
|
|
<view class="item-label">管道输出瓦斯</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
|
- <view class="item-value">{{ item.readData.mixedTraffic || '--' }}</view>
|
|
|
+ <view class="item-value">{{
|
|
|
+ item.readData.mixedTraffic || "--"
|
|
|
+ }}</view>
|
|
|
<view class="item-label">输入管道内工混流量</view>
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readData.standardTraffic || '--' }}</view>
|
|
|
+ <view class="item-value">{{
|
|
|
+ item.readData.standardTraffic || "--"
|
|
|
+ }}</view>
|
|
|
<view class="item-label">输入管道内标况流量</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
|
- <view class="item-value">{{ item.readData.totalGasDrainage || '--' }}</view>
|
|
|
+ <view class="item-value">{{
|
|
|
+ item.readData.totalGasDrainage || "--"
|
|
|
+ }}</view>
|
|
|
<view class="item-label">瓦斯抽放量</view>
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
@@ -84,15 +109,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="bot-area">
|
|
|
<view class="top-title">
|
|
|
- <view style="font-weight: bold;">安全监测点信息</view>
|
|
|
+ <view style="font-weight: bold">安全监测点信息</view>
|
|
|
</view>
|
|
|
- <view class="top-content" v-for="(item, index) in botContentList" :key="index">
|
|
|
- <view class="content-title">{{ item.strinstallpos || '--' }}</view>
|
|
|
+ <view
|
|
|
+ class="top-content"
|
|
|
+ v-for="(item, index) in botContentList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <view class="content-title">{{ item.strinstallpos || "--" }}</view>
|
|
|
<view class="content-item-box">
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
@@ -101,70 +129,59 @@
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readData.gasC || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readData.gasC || "--" }}</view>
|
|
|
<view class="item-label">甲烷</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-item">
|
|
|
<view class="item-l">
|
|
|
- <view class="item-value">{{ item.warnFlag || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.warnFlag || "--" }}</view>
|
|
|
<view class="item-label">测点状态</view>
|
|
|
</view>
|
|
|
<view class="item-c"></view>
|
|
|
<view class="item-r">
|
|
|
- <view class="item-value">{{ item.readTime || '--' }}</view>
|
|
|
+ <view class="item-value">{{ item.readTime || "--" }}</view>
|
|
|
<view class="item-label">数据时间</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import api from "@/api/api";
|
|
|
-import moment from 'moment'
|
|
|
+import moment from "moment";
|
|
|
export default {
|
|
|
- name: 'gasDetail',
|
|
|
+ name: "gasDetail",
|
|
|
props: {},
|
|
|
watch: {},
|
|
|
data() {
|
|
|
return {
|
|
|
timeRan: Number(new Date()),
|
|
|
- timer: '',
|
|
|
+ timer: "",
|
|
|
PageCur: "0",
|
|
|
- tabList: [
|
|
|
- { name: '预警监测' },
|
|
|
- { name: '预警指标' },
|
|
|
- ],
|
|
|
+ tabList: [{ name: "预警监测" }, { name: "预警指标" }],
|
|
|
// isShowSelect: true,
|
|
|
showJcd: false,
|
|
|
- searchText: '',
|
|
|
+ searchText: "",
|
|
|
selectList: [],
|
|
|
topContentList: [],
|
|
|
botContentList: [],
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
- this.timer = null
|
|
|
- clearTimeout(this.timer)
|
|
|
+ this.timer = null;
|
|
|
+ clearTimeout(this.timer);
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getTabList()
|
|
|
+ this.getTabList();
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
-
|
|
|
NavChange: function (item) {
|
|
|
- clearTimeout(this.timer)
|
|
|
+ clearTimeout(this.timer);
|
|
|
this.PageCur = item.index;
|
|
|
if (this.PageCur == 0) {
|
|
|
this.getMonitor(this.selectList[this.PageCur].deviceID, true);
|
|
@@ -172,19 +189,18 @@ export default {
|
|
|
},
|
|
|
|
|
|
getChangeJcd() {
|
|
|
- this.showJcd = true
|
|
|
-
|
|
|
+ this.showJcd = true;
|
|
|
},
|
|
|
selectChangeJcd(e) {
|
|
|
- clearTimeout(this.timer)
|
|
|
- this.searchText = e.name
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ this.searchText = e.name;
|
|
|
this.getMonitor(e.deviceID, true);
|
|
|
},
|
|
|
getMonitor(deviceID, flag) {
|
|
|
- let than = this
|
|
|
+ let than = this;
|
|
|
than.timer = setTimeout(
|
|
|
async () => {
|
|
|
- await than.getSysWarnList(deviceID, 'gas');
|
|
|
+ await than.getSysWarnList(deviceID, "gas");
|
|
|
if (than.timer) {
|
|
|
than.timer = null;
|
|
|
}
|
|
@@ -197,19 +213,19 @@ export default {
|
|
|
getTabList() {
|
|
|
new Promise((resolve, reject) => {
|
|
|
api
|
|
|
- .sysTypeWarn({ type: 'gas' })
|
|
|
+ .sysTypeWarn({ type: "gas" })
|
|
|
.then((response) => {
|
|
|
if (response.data.code == 200 && response.data.result.length != 0) {
|
|
|
- let result = response.data.result
|
|
|
- this.selectList = result.map((el) => {//lxh
|
|
|
+ let result = response.data.result;
|
|
|
+ this.selectList = result.map((el) => {
|
|
|
+ //lxh
|
|
|
return {
|
|
|
name: el.systemname,
|
|
|
deviceID: el.id,
|
|
|
};
|
|
|
});
|
|
|
- this.searchText = this.selectList[0].name
|
|
|
+ this.searchText = this.selectList[0].name;
|
|
|
this.getMonitor(this.selectList[0].deviceID, true);
|
|
|
-
|
|
|
} else {
|
|
|
reject(response);
|
|
|
}
|
|
@@ -227,9 +243,9 @@ export default {
|
|
|
.sysWarn({ sysid: id, type: type })
|
|
|
.then((response) => {
|
|
|
if (response.data.code == 200) {
|
|
|
- let data = response.data.result
|
|
|
- this.topContentList = data.pump
|
|
|
- this.botContentList = data.gas
|
|
|
+ let data = response.data.result;
|
|
|
+ this.topContentList = data.pump;
|
|
|
+ this.botContentList = data.gas;
|
|
|
} else {
|
|
|
reject(response);
|
|
|
}
|
|
@@ -255,7 +271,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.gas-content {
|
|
|
- height: 704px;
|
|
|
+ height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
overflow-y: auto;
|
|
|
|
|
@@ -266,7 +282,7 @@ export default {
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
|
|
|
.search-l {
|
|
@@ -281,11 +297,9 @@ export default {
|
|
|
align-items: center;
|
|
|
|
|
|
.search-label {
|
|
|
-
|
|
|
text-align: right;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.search-r {
|
|
@@ -307,14 +321,13 @@ export default {
|
|
|
font-weight: bold;
|
|
|
color: #0eb4fc;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.top-area {
|
|
|
width: 100%;
|
|
|
padding: 0px 10px;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
@@ -322,7 +335,7 @@ export default {
|
|
|
.bot-area {
|
|
|
width: 100%;
|
|
|
padding: 0px 10px;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
@@ -341,7 +354,7 @@ export default {
|
|
|
line-height: 26px;
|
|
|
padding: 0px 20px;
|
|
|
font-size: 12px;
|
|
|
- background: url('/static/warndata/title.png') no-repeat;
|
|
|
+ background: url("/static/warndata/title.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
|
|
@@ -353,7 +366,12 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- 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)
|
|
|
+ );
|
|
|
border-radius: 10px;
|
|
|
margin-bottom: 5px;
|
|
|
|
|
@@ -370,7 +388,13 @@ export default {
|
|
|
width: 4px;
|
|
|
height: 70%;
|
|
|
border-left: 2px solid;
|
|
|
- border-image: linear-gradient(to bottom, transparent, rgba(140, 203, 254, 1), transparent) 1 1 1;
|
|
|
+ border-image: linear-gradient(
|
|
|
+ to bottom,
|
|
|
+ transparent,
|
|
|
+ rgba(140, 203, 254, 1),
|
|
|
+ transparent
|
|
|
+ )
|
|
|
+ 1 1 1;
|
|
|
}
|
|
|
|
|
|
.item-r {
|
|
@@ -402,7 +426,7 @@ export default {
|
|
|
width: 100%;
|
|
|
padding: 10px;
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
}
|
|
|
|
|
@@ -410,7 +434,7 @@ export default {
|
|
|
width: 100%;
|
|
|
padding: 10px 40px;
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
}
|
|
|
|
|
@@ -418,7 +442,7 @@ export default {
|
|
|
width: 100%;
|
|
|
padding: 10px;
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
margin-bottom: 2px;
|
|
|
}
|
|
|
|
|
@@ -427,7 +451,7 @@ export default {
|
|
|
width: 100%;
|
|
|
padding: 8px 10px;
|
|
|
box-sizing: border-box;
|
|
|
- background-color: #FFF;
|
|
|
+ background-color: #fff;
|
|
|
|
|
|
// margin-bottom: 2px;
|
|
|
.u-button {
|
|
@@ -441,7 +465,7 @@ export default {
|
|
|
padding: 0px 20px;
|
|
|
margin-bottom: 10px;
|
|
|
font-size: 12px;
|
|
|
- background: url('/static/warndata/title.png') no-repeat;
|
|
|
+ background: url("/static/warndata/title.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
|
|
@@ -475,7 +499,7 @@ export default {
|
|
|
line-height: 26px;
|
|
|
padding-left: 20px;
|
|
|
font-size: 12px;
|
|
|
- background: url('/static/warndata/title.png') no-repeat;
|
|
|
+ background: url("/static/warndata/title.png") no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
|