|
|
@@ -1,20 +1,34 @@
|
|
|
<template>
|
|
|
<customHeader :options="options" @change="getSelectRow" :optionValue="optionValue"> 瓦斯监测预警 </customHeader>
|
|
|
<div class="gasWarn">
|
|
|
- <a-button v-if="!hasPermission('gasWarn:return')" preIcon="ant-design:rollback-outlined" type="text" size="small"
|
|
|
- style="position: absolute; left: 15px; top: 15px; color: #fff" @click="getBack">
|
|
|
+ <a-button
|
|
|
+ v-if="!hasPermission('gasWarn:return')"
|
|
|
+ preIcon="ant-design:rollback-outlined"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ style="position: absolute; left: 15px; top: 15px; color: #fff"
|
|
|
+ @click="getBack"
|
|
|
+ >
|
|
|
返回
|
|
|
</a-button>
|
|
|
<div class="alarm-menu">
|
|
|
<div class="type-btn">
|
|
|
- <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuListGas" :key="index"
|
|
|
- @click="btnClick(index)">
|
|
|
+ <div
|
|
|
+ :class="activeIndex == index ? 'btn1' : 'btn'"
|
|
|
+ v-for="(item, index) in typeMenuListGas"
|
|
|
+ :key="index"
|
|
|
+ @click="btnClick(index)"
|
|
|
+ >
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-btn">
|
|
|
- <div :class="activeIndex1 == ind ? 'btn1' : 'btn'" v-for="(item, ind) in menuList" :key="ind"
|
|
|
- @click="cardClick(ind, item)">
|
|
|
+ <div
|
|
|
+ :class="activeIndex1 == ind ? 'btn1' : 'btn'"
|
|
|
+ v-for="(item, ind) in menuList"
|
|
|
+ :key="ind"
|
|
|
+ @click="cardClick(ind, item)"
|
|
|
+ >
|
|
|
<div class="text">{{ item.name }}</div>
|
|
|
<div class="warn">{{ item.warn }}</div>
|
|
|
</div>
|
|
|
@@ -22,7 +36,6 @@
|
|
|
</div>
|
|
|
<div class="gas-content">
|
|
|
<div style="width: 100%; height: 100%" v-if="isShow == 'yjjc'">
|
|
|
-
|
|
|
<div class="top-area" v-if="isShowTop">
|
|
|
<div class="title-t">
|
|
|
<div class="text-t">瓦斯抽采泵信息</div>
|
|
|
@@ -31,7 +44,6 @@
|
|
|
<gasCcb :gasData="gasData" />
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div :class="isShowTop ? 'bot-area' : 'bot-area1'">
|
|
|
<MeasurePoint title="安全监控测点信息" :timeout="1000" :cards="cardListWs" :charts="chartListWs" />
|
|
|
</div>
|
|
|
@@ -43,129 +55,149 @@
|
|
|
<gasParamter />
|
|
|
</div>
|
|
|
<div style="width: 100%; height: 100%" v-else-if="isShow == 'gzzd'">
|
|
|
- <faultDiagnose :timeData="gzTime" :topData="topData" :xAxisPropType="xAxisPropType"
|
|
|
- :hisEchartData="hisEchartData" :echartData="echartData" @getSearchHis="getlistdaysData1" />
|
|
|
+ <faultDiagnose
|
|
|
+ :timeData="gzTime"
|
|
|
+ :topData="topData"
|
|
|
+ :xAxisPropType="xAxisPropType"
|
|
|
+ :hisEchartData="hisEchartData"
|
|
|
+ :echartData="echartData"
|
|
|
+ @getSearchHis="getlistdaysData1"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, onMounted, onUnmounted, computed } from 'vue';
|
|
|
-import { sysTypeWarnList, sysWarn, getDevice, listdays, bjlist, getHistoryData } from '../common.api';
|
|
|
-import { useSystemSelect } from '/@/hooks/vent/useSystemSelect';
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
-import CustomHeader from '/@/components/vent/customHeader.vue';
|
|
|
-import warnTargetGas from '../common/warnTargetGas.vue';
|
|
|
-import PipeWarn from '../common/PipeWarn.vue';
|
|
|
-import gasParamter from '../common/gasParamter.vue';
|
|
|
-import faultDiagnose from '../common/faultDiagnose.vue';
|
|
|
-import { getMonitorComponent, getMonitorFlag } from '../common.data';
|
|
|
-import { usePermission } from '/@/hooks/web/usePermission';
|
|
|
-import MeasurePoint from '../common/measurePoint.vue';
|
|
|
-import gasCcb from '../common/gasCcb.vue';
|
|
|
-import dayjs from 'dayjs';
|
|
|
-
|
|
|
-let typeMenuListGas = getMonitorComponent();
|
|
|
-let isflag = getMonitorFlag();
|
|
|
-const { hasPermission } = usePermission();
|
|
|
-const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
|
|
|
-//当前左侧激活菜单的索引
|
|
|
-let activeIndex1 = ref(0);
|
|
|
-//左侧数据列表
|
|
|
-let menuList = reactive<any[]>([]);
|
|
|
-//瓦斯顶部区域
|
|
|
-let gasData = reactive({});
|
|
|
-//瓦斯监控列表数据
|
|
|
-let cardListWs = reactive<any[]>([]);
|
|
|
-const chartListWs = reactive<any[]>([]);
|
|
|
-let router = useRouter();
|
|
|
-//监测/指标激活索引
|
|
|
-let activeIndex = ref(0);
|
|
|
-let isShow = ref('yjjc');
|
|
|
-//故障诊断开始时间
|
|
|
-let gzTime = ref('');
|
|
|
-//故障诊断顶部区域数据
|
|
|
-let topData = ref<any[]>([]);
|
|
|
-//根据诊断类型判断调用哪个历史数据接口
|
|
|
-let zdType = ref('');
|
|
|
-let historySearch = reactive({
|
|
|
- ttime_begin: '',
|
|
|
- ttime_end: '',
|
|
|
-});
|
|
|
-//实时历史图表
|
|
|
-let xAxisPropType = ref('');
|
|
|
-let hisEchartData = ref<any[]>([]);
|
|
|
-//报警历史图表
|
|
|
-let echartData = reactive<any>({
|
|
|
- maxData: {
|
|
|
- lengedData: '',
|
|
|
- data: [],
|
|
|
- },
|
|
|
- minData: {
|
|
|
- lengedData: '',
|
|
|
- data: [],
|
|
|
- },
|
|
|
- xData: [],
|
|
|
-});
|
|
|
-let isShowTop = ref(true)
|
|
|
-
|
|
|
-// https获取监测数据
|
|
|
-let timer: null | NodeJS.Timeout = null;
|
|
|
-function getMonitor(flag?) {
|
|
|
- timer = setTimeout(
|
|
|
- async () => {
|
|
|
- await getMenuList();
|
|
|
- if (timer) {
|
|
|
- timer = null;
|
|
|
- }
|
|
|
- getMonitor(false);
|
|
|
+ import { ref, reactive, onMounted, onUnmounted } from 'vue';
|
|
|
+ import { sysTypeWarnList, getDevice, listdays, bjlist, getHistoryData } from '../common.api';
|
|
|
+ import { useSystemSelect } from '/@/hooks/vent/useSystemSelect';
|
|
|
+ import { useRouter } from 'vue-router';
|
|
|
+ import CustomHeader from '/@/components/vent/customHeader.vue';
|
|
|
+ import warnTargetGas from '../common/warnTargetGas.vue';
|
|
|
+ import gasParamter from '../common/gasParamter.vue';
|
|
|
+ import faultDiagnose from '../common/faultDiagnose.vue';
|
|
|
+ import { getMonitorComponent, getMonitorFlag } from '../common.data';
|
|
|
+ import { usePermission } from '/@/hooks/web/usePermission';
|
|
|
+ import MeasurePoint from '../common/measurePoint.vue';
|
|
|
+ import gasCcb from '../common/gasCcb.vue';
|
|
|
+ import dayjs from 'dayjs';
|
|
|
+
|
|
|
+ const typeMenuListGas = getMonitorComponent();
|
|
|
+ const isflag = getMonitorFlag();
|
|
|
+ const { hasPermission } = usePermission();
|
|
|
+ const { options, optionValue, getSelectRow } = useSystemSelect('sys_surface_caimei');
|
|
|
+ const activeIndex1 = ref(0);
|
|
|
+ const menuList = reactive<any[]>([]);
|
|
|
+ const gasData = reactive<any>({});
|
|
|
+ const cardListWs = reactive<any[]>([]);
|
|
|
+ const chartListWs = reactive<any[]>([]);
|
|
|
+ const router = useRouter();
|
|
|
+ const activeIndex = ref(0);
|
|
|
+ const isShow = ref('yjjc');
|
|
|
+ const gzTime = ref('');
|
|
|
+ const topData = ref<any[]>([]);
|
|
|
+ const zdType = ref('');
|
|
|
+ const historySearch = reactive({
|
|
|
+ ttime_begin: '',
|
|
|
+ ttime_end: '',
|
|
|
+ });
|
|
|
+ const xAxisPropType = ref('');
|
|
|
+ const hisEchartData = ref<any[]>([]);
|
|
|
+ const echartData = reactive<any>({
|
|
|
+ maxData: {
|
|
|
+ lengedData: '',
|
|
|
+ data: [],
|
|
|
},
|
|
|
- flag ? 0 : 1000
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
-// https获取监测数据
|
|
|
-let timer1: null | NodeJS.Timeout = null;
|
|
|
-function getMonitor1(flag?) {
|
|
|
- timer1 = setTimeout(
|
|
|
- async () => {
|
|
|
- await getBjlist();
|
|
|
- if (timer1) {
|
|
|
- timer1 = null;
|
|
|
- }
|
|
|
- getMonitor1(false);
|
|
|
+ minData: {
|
|
|
+ lengedData: '',
|
|
|
+ data: [],
|
|
|
},
|
|
|
- flag ? 0 : 1000
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
-//返回首页
|
|
|
-function getBack() {
|
|
|
- router.push('/monitorChannel/monitor-alarm-home');
|
|
|
-}
|
|
|
-
|
|
|
-//获取右侧详情数据列表
|
|
|
-function getDetailList(param) {
|
|
|
- // listData.common = res;
|
|
|
- cardListWs.length = 0;
|
|
|
- chartListWs.length = 0;
|
|
|
- if (JSON.stringify(param) != '{}') {
|
|
|
+ xData: [],
|
|
|
+ });
|
|
|
+ const isShowTop = ref(true);
|
|
|
+
|
|
|
+ let timer: null | NodeJS.Timeout = null;
|
|
|
+ let timer1: null | NodeJS.Timeout = null;
|
|
|
+
|
|
|
+ function clearPollTimer() {
|
|
|
+ if (timer) {
|
|
|
+ clearTimeout(timer);
|
|
|
+ timer = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function clearAlarmTimer() {
|
|
|
+ if (timer1) {
|
|
|
+ clearTimeout(timer1);
|
|
|
+ timer1 = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function clearAllTimers() {
|
|
|
+ clearPollTimer();
|
|
|
+ clearAlarmTimer();
|
|
|
+ }
|
|
|
+
|
|
|
+ function getMonitor(flag?) {
|
|
|
+ clearPollTimer();
|
|
|
+ timer = setTimeout(
|
|
|
+ async () => {
|
|
|
+ await getMenuList();
|
|
|
+ timer = null;
|
|
|
+ getMonitor(false);
|
|
|
+ },
|
|
|
+ flag ? 0 : 1000
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ function getMonitor1(flag?) {
|
|
|
+ clearAlarmTimer();
|
|
|
+ timer1 = setTimeout(
|
|
|
+ async () => {
|
|
|
+ await getBjlist();
|
|
|
+ timer1 = null;
|
|
|
+ getMonitor1(false);
|
|
|
+ },
|
|
|
+ flag ? 0 : 1000
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ function getBack() {
|
|
|
+ router.push('/monitorChannel/monitor-alarm-home');
|
|
|
+ }
|
|
|
+
|
|
|
+ function formatWarnLevel(level) {
|
|
|
+ const map = {
|
|
|
+ '101': '低风险',
|
|
|
+ '102': '一般风险',
|
|
|
+ '103': '较大风险',
|
|
|
+ '104': '重大风险',
|
|
|
+ '201': '报警',
|
|
|
+ '10000': '数据超限',
|
|
|
+ '1001': '网络中断',
|
|
|
+ };
|
|
|
+ return map[level] || '正常';
|
|
|
+ }
|
|
|
+
|
|
|
+ function getDetailList(param) {
|
|
|
+ cardListWs.length = 0;
|
|
|
+ chartListWs.length = 0;
|
|
|
+ if (!param || JSON.stringify(param) === '{}' || !param.gas) return;
|
|
|
+
|
|
|
param.gas.forEach((el) => {
|
|
|
- el.strinstallpos = el.strinstallpos.indexOf('&') == -1 ? el.strinstallpos : el.strinstallpos.substring(0, el.strinstallpos.indexOf('&'));
|
|
|
+ el.strinstallpos =
|
|
|
+ el.strinstallpos.indexOf('&') == -1 ? el.strinstallpos : el.strinstallpos.substring(0, el.strinstallpos.indexOf('&'));
|
|
|
cardListWs.push({
|
|
|
label: '甲烷',
|
|
|
value: el.readData.gasC + '%' || '--',
|
|
|
- // value: 0,
|
|
|
listR: [
|
|
|
{ id: 0, label: '测点类型', dw: '', value: '瓦斯' },
|
|
|
{ id: 1, label: '测点位置', dw: '', value: el.strinstallpos || '--' },
|
|
|
- // { id: 2, label: '数据时间', value: el.readData.datetime || '--' },
|
|
|
{ id: 2, label: '数据时间', dw: '', value: el.readTime || '--' },
|
|
|
{ id: 3, label: '测点状态', dw: '', value: el.warnFlag },
|
|
|
],
|
|
|
});
|
|
|
- // 初始化预测曲线配置,分别为x轴时间、平均、最大、最小、实时
|
|
|
const avgParam = el.avgParam || {
|
|
|
avg_gas_value: 0,
|
|
|
max_gas_value: 0,
|
|
|
@@ -177,14 +209,12 @@ function getDetailList(param) {
|
|
|
data: [avgParam.avg_gas_value, avgParam.max_gas_value, avgParam.min_gas_value, el.readData.gasC],
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-//获取左侧菜单列表
|
|
|
-async function getMenuList() {
|
|
|
- let res = await sysTypeWarnList({ type: 'gas' });
|
|
|
- if (res.length != 0) {
|
|
|
+ async function getMenuList() {
|
|
|
+ const res = await sysTypeWarnList({ type: 'gas' });
|
|
|
+ if (!res || res.length === 0) return;
|
|
|
+
|
|
|
menuList.length = 0;
|
|
|
res.forEach((el) => {
|
|
|
menuList.push({
|
|
|
@@ -195,16 +225,18 @@ async function getMenuList() {
|
|
|
detail: el.detail,
|
|
|
});
|
|
|
});
|
|
|
- gasData = Object.assign({}, menuList[activeIndex1.value].detail);
|
|
|
- isShowTop.value = gasData.pump.length != 0 ? true : false
|
|
|
- getDetailList(menuList[activeIndex1.value].detail);
|
|
|
+
|
|
|
+ const detail = menuList[activeIndex1.value]?.detail || {};
|
|
|
+ Object.keys(gasData).forEach((key) => delete gasData[key]);
|
|
|
+ Object.assign(gasData, detail);
|
|
|
+ isShowTop.value = !!(gasData.pump && gasData.pump.length);
|
|
|
+ getDetailList(detail);
|
|
|
}
|
|
|
-}
|
|
|
-//寸草塔二矿左侧菜单
|
|
|
-async function getBjlist() {
|
|
|
- let res = await bjlist({ devicetype: 'gasmonitor*', pageNo: 1, pageSize: 100, isok: '0' });
|
|
|
- console.log(res, '寸草塔二矿左侧菜单');
|
|
|
- if (res && res.records.length != 0) {
|
|
|
+
|
|
|
+ async function getBjlist() {
|
|
|
+ const res = await bjlist({ devicetype: 'gasmonitor*', pageNo: 1, pageSize: 100, isok: '0' });
|
|
|
+ if (!res?.records?.length) return;
|
|
|
+
|
|
|
menuList.length = 0;
|
|
|
res.records.forEach((el) => {
|
|
|
menuList.push({
|
|
|
@@ -212,32 +244,31 @@ async function getBjlist() {
|
|
|
warn: '故障',
|
|
|
deviceID: el.deviceid,
|
|
|
time: el.createTime,
|
|
|
- // strtype: el.strtype,
|
|
|
- // detail: el.detail
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
gzTime.value = menuList[activeIndex1.value].time;
|
|
|
- let index = gzTime.value.indexOf(' ');
|
|
|
- let specificTime = dayjs(`${gzTime.value.substring(0, index)}T${gzTime.value.substring(index + 1)}`);
|
|
|
+ const index = gzTime.value.indexOf(' ');
|
|
|
+ const specificTime = dayjs(`${gzTime.value.substring(0, index)}T${gzTime.value.substring(index + 1)}`);
|
|
|
if (!historySearch.ttime_begin && !historySearch.ttime_end) {
|
|
|
historySearch.ttime_begin = specificTime.subtract(30, 'minute').format('YYYY-MM-DD HH:mm:ss');
|
|
|
historySearch.ttime_end = specificTime.add(30, 'minute').format('YYYY-MM-DD HH:mm:ss');
|
|
|
}
|
|
|
- //获取实时数据-报警历史
|
|
|
- getDeviceList(menuList[activeIndex1.value].deviceID);
|
|
|
- //获取历史数据
|
|
|
- getlistdaysData(menuList[activeIndex1.value].deviceID, historySearch);
|
|
|
+
|
|
|
+ const deviceID = menuList[activeIndex1.value].deviceID;
|
|
|
+ getDeviceList(deviceID);
|
|
|
+ getlistdaysData(deviceID, historySearch);
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-//获取实时数据-寸草塔二矿-报警历史
|
|
|
-async function getDeviceList(param) {
|
|
|
- let res = await getDevice({ ids: param, devicetype: 'gasmonitor' });
|
|
|
- if (res && res.msgTxt.length != 0) {
|
|
|
+ async function getDeviceList(param) {
|
|
|
+ const res = await getDevice({ ids: param, devicetype: 'gasmonitor' });
|
|
|
+ if (!res?.msgTxt?.length) return;
|
|
|
+
|
|
|
echartData.maxData.data.length = 0;
|
|
|
echartData.minData.data.length = 0;
|
|
|
echartData.xData.length = 0;
|
|
|
- let data = res.msgTxt[0].datalist[0];
|
|
|
+
|
|
|
+ const data = res.msgTxt[0].datalist[0];
|
|
|
topData.value = [
|
|
|
{
|
|
|
id: 0,
|
|
|
@@ -265,22 +296,7 @@ async function getDeviceList(param) {
|
|
|
label: '报警状态',
|
|
|
imgSrc: true,
|
|
|
icon: 'alarm-warning',
|
|
|
- value:
|
|
|
- data.warnLevel == '101'
|
|
|
- ? '低风险'
|
|
|
- : data.warnLevel == '102'
|
|
|
- ? '一般风险'
|
|
|
- : data.warnLevel == '103'
|
|
|
- ? '较大风险'
|
|
|
- : data.warnLevel == '104'
|
|
|
- ? '重大风险'
|
|
|
- : data.warnLevel == '201'
|
|
|
- ? '报警'
|
|
|
- : data.warnLevel == '10000'
|
|
|
- ? '数据超限'
|
|
|
- : data.warnLevel == '1001'
|
|
|
- ? '网络中断'
|
|
|
- : '正常',
|
|
|
+ value: formatWarnLevel(data.warnLevel),
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
@@ -290,414 +306,272 @@ async function getDeviceList(param) {
|
|
|
value: data.netStatus == '0' ? '断开' : '连接',
|
|
|
},
|
|
|
];
|
|
|
+
|
|
|
zdType.value = data.stationtype || '';
|
|
|
- let list = JSON.parse(data.readData.gasGlFaultDia);
|
|
|
+ const list = JSON.parse(data.readData.gasGlFaultDia);
|
|
|
echartData.maxData.data = [list.y1 || 0, list.y2 || 0];
|
|
|
echartData.minData.data = [list.y3 || 0, list.y4 || 0];
|
|
|
- echartData.xData = [...new Set([list.x1, list.x2, list.x3, list.x4])].sort((a, b) => a - b);
|
|
|
+ echartData.xData = [...new Set([list.x1, list.x2, list.x3, list.x4])].sort((a: any, b: any) => a - b);
|
|
|
}
|
|
|
-}
|
|
|
-//获取历史数据-寸草塔二矿
|
|
|
-async function getlistdaysData(Ids, param) {
|
|
|
- if (zdType.value != 'redis') {
|
|
|
- let res = await listdays({ strtype: 'gasmonitor_normal', gdeviceid: Ids, ...param });
|
|
|
- console.log(res, '获取历史数据-寸草塔二矿');
|
|
|
- xAxisPropType.value = 'ttime';
|
|
|
- let data = res.datalist.records;
|
|
|
- if (data.length != 0) {
|
|
|
+
|
|
|
+ async function getlistdaysData(Ids, param) {
|
|
|
+ if (zdType.value != 'redis') {
|
|
|
+ const res = await listdays({ strtype: 'gasmonitor_normal', gdeviceid: Ids, ...param });
|
|
|
+ xAxisPropType.value = 'ttime';
|
|
|
+ const data = res?.datalist?.records || [];
|
|
|
data.forEach((el) => {
|
|
|
Object.assign(el, el.readData);
|
|
|
});
|
|
|
- }
|
|
|
- hisEchartData.value = data;
|
|
|
- console.log(hisEchartData.value, ' hisEchartData.value');
|
|
|
- } else {
|
|
|
- let res = await getHistoryData({ pageNum: 1, pageSize: 100, deviceId: Ids, isEmployee: true, ...param });
|
|
|
- console.log(res, '获取历史数据-寸草塔二矿');
|
|
|
- xAxisPropType.value = 'time';
|
|
|
- hisEchartData.value = res['records'];
|
|
|
- }
|
|
|
-}
|
|
|
-async function getlistdaysData1(param) {
|
|
|
- historySearch.ttime_begin = param.ttime_begin;
|
|
|
- historySearch.ttime_end = param.ttime_end;
|
|
|
- let res = await listdays({ strtype: 'gasmonitor_normal', gdeviceid: menuList[activeIndex1.value].deviceID, ...historySearch });
|
|
|
- console.log(res, '获取历史数据-寸草塔二矿');
|
|
|
-
|
|
|
- if (zdType.value != 'redis') {
|
|
|
- let res = await listdays({ strtype: 'gasmonitor_normal', gdeviceid: menuList[activeIndex1.value].deviceID, ...historySearch });
|
|
|
- console.log(res, '获取历史数据-寸草塔二矿');
|
|
|
- xAxisPropType.value = 'ttime';
|
|
|
- let data = res.datalist.records;
|
|
|
- if (data.length != 0) {
|
|
|
- data.forEach((el) => {
|
|
|
- Object.assign(el, el.readData);
|
|
|
+ hisEchartData.value = data;
|
|
|
+ } else {
|
|
|
+ const res = await getHistoryData({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ deviceId: Ids,
|
|
|
+ isEmployee: true,
|
|
|
+ ...param,
|
|
|
});
|
|
|
+ xAxisPropType.value = 'time';
|
|
|
+ hisEchartData.value = res?.records || [];
|
|
|
}
|
|
|
- hisEchartData.value = data;
|
|
|
- } else {
|
|
|
- let res = await getHistoryData({ pageNum: 1, pageSize: 100, deviceId: menuList[activeIndex1.value].deviceID, isEmployee: true, ...param });
|
|
|
- console.log(res, '获取历史数据-寸草塔二矿');
|
|
|
- xAxisPropType.value = 'time';
|
|
|
- hisEchartData.value = res['records'];
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-//监测/预警指标选项切换
|
|
|
-function btnClick(ind) {
|
|
|
- activeIndex.value = ind;
|
|
|
- clearTimeout(timer);
|
|
|
- clearTimeout(timer1)
|
|
|
- switch (ind) {
|
|
|
- case 0:
|
|
|
- activeIndex1.value = 0;
|
|
|
+
|
|
|
+ async function getlistdaysData1(param) {
|
|
|
+ historySearch.ttime_begin = param.ttime_begin;
|
|
|
+ historySearch.ttime_end = param.ttime_end;
|
|
|
+ const deviceID = menuList[activeIndex1.value].deviceID;
|
|
|
+ await getlistdaysData(deviceID, { ...historySearch, ...param });
|
|
|
+ }
|
|
|
+
|
|
|
+ function btnClick(ind) {
|
|
|
+ activeIndex.value = ind;
|
|
|
+ clearAllTimers();
|
|
|
+ activeIndex1.value = 0;
|
|
|
+
|
|
|
+ if (ind === 0) {
|
|
|
isShow.value = 'yjjc';
|
|
|
getMonitor(true);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
+ } else if (ind === 1) {
|
|
|
if (isflag == '2') {
|
|
|
- activeIndex1.value = 0;
|
|
|
isShow.value = 'yjzb';
|
|
|
} else if (isflag == '1') {
|
|
|
- activeIndex1.value = 0;
|
|
|
isShow.value = 'gzzd';
|
|
|
getMonitor1(true);
|
|
|
} else {
|
|
|
- activeIndex1.value = 0;
|
|
|
isShow.value = '';
|
|
|
}
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- activeIndex1.value = 0;
|
|
|
+ } else if (ind === 2) {
|
|
|
isShow.value = 'wscs';
|
|
|
- break;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-//菜单选项切换
|
|
|
-function cardClick(ind, item) {
|
|
|
- clearTimeout(timer);
|
|
|
- clearTimeout(timer1)
|
|
|
- activeIndex1.value = ind;
|
|
|
- gzTime.value = item.time;
|
|
|
- chartListWs.length = 0;
|
|
|
- if (isflag != '1') {
|
|
|
- getMonitor(true);
|
|
|
- } else {
|
|
|
- getMonitor1(true);
|
|
|
+
|
|
|
+ function cardClick(ind, item) {
|
|
|
+ clearAllTimers();
|
|
|
+ activeIndex1.value = ind;
|
|
|
+ gzTime.value = item.time;
|
|
|
+ chartListWs.length = 0;
|
|
|
+ if (isflag != '1') {
|
|
|
+ getMonitor(true);
|
|
|
+ } else {
|
|
|
+ getMonitor1(true);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+ onMounted(() => {
|
|
|
+ getMonitor(true);
|
|
|
+ });
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- getMenuList();
|
|
|
- getMonitor(true);
|
|
|
-});
|
|
|
-onUnmounted(() => {
|
|
|
- if (timer) {
|
|
|
- clearTimeout(timer);
|
|
|
- timer = undefined;
|
|
|
- }
|
|
|
- if (timer1) {
|
|
|
- clearTimeout(timer1);
|
|
|
- timer1 = undefined;
|
|
|
- }
|
|
|
-});
|
|
|
+ onUnmounted(() => {
|
|
|
+ clearAllTimers();
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-@import '/@/design/theme.less';
|
|
|
+ @import '/@/design/theme.less';
|
|
|
+
|
|
|
+ @{theme-deepblue} {
|
|
|
+ .gasWarn {
|
|
|
+ --image-no-choice: url('/@/assets/images/themify/deepblue/fire/no-choice.png');
|
|
|
+ --image-choice: url('/@/assets/images/themify/deepblue/fire/choice.png');
|
|
|
+ --image-border: url('/@/assets/images/themify/deepblue/fire/border.png');
|
|
|
+ --image-bj1: url('/@/assets/images/themify/deepblue/fire/bj1.png');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-@{theme-deepblue} {
|
|
|
.gasWarn {
|
|
|
- --image-no-choice: url('/@/assets/images/themify/deepblue/fire/no-choice.png');
|
|
|
- --image-choice: url('/@/assets/images/themify/deepblue/fire/choice.png');
|
|
|
- --image-border: url('/@/assets/images/themify/deepblue/fire/border.png');
|
|
|
- --image-bj1: url('/@/assets/images/themify/deepblue/fire/bj1.png');
|
|
|
- --image-top-area: url('/@/assets/images/themify/deepblue/fire/top-area.png');
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.gasWarn {
|
|
|
- --image-no-choice: url('/@/assets/images/fire/no-choice.png');
|
|
|
- --image-choice: url('/@/assets/images/fire/choice.png');
|
|
|
- --image-border: url('/@/assets/images/fire/border.png');
|
|
|
- --image-bj1: url('/@/assets/images/fire/bj1.png');
|
|
|
- --image-top-area: url('/@/assets/images/fire/top-area.png');
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- padding: 80px 10px 15px 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- .alarm-menu {
|
|
|
+ --image-no-choice: url('/@/assets/images/fire/no-choice.png');
|
|
|
+ --image-choice: url('/@/assets/images/fire/choice.png');
|
|
|
+ --image-border: url('/@/assets/images/fire/border.png');
|
|
|
+ --image-bj1: url('/@/assets/images/fire/bj1.png');
|
|
|
+ width: 100%;
|
|
|
height: 100%;
|
|
|
- width: 15%;
|
|
|
-
|
|
|
- .type-btn {
|
|
|
- width: 100%;
|
|
|
- height: 28px;
|
|
|
- line-height: 28px;
|
|
|
- border: 1px solid var(--vent-warn-tab-border);
|
|
|
- margin-bottom: 20px;
|
|
|
- border-radius: 5px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- .btn {
|
|
|
- width: 33.33%;
|
|
|
- height: 100%;
|
|
|
- font-size: 14px;
|
|
|
- text-align: center;
|
|
|
- color: #fff;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+ padding: 80px 10px 15px 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .btn1 {
|
|
|
- width: 33.33%;
|
|
|
- height: 100%;
|
|
|
- font-size: 14px;
|
|
|
- color: #fff;
|
|
|
- text-align: center;
|
|
|
- border-radius: 2px;
|
|
|
- background: var(--vent-warn-tab-bg-actived);
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
+ .alarm-menu {
|
|
|
+ height: 100%;
|
|
|
+ width: 15%;
|
|
|
|
|
|
- .card-btn {
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 48px);
|
|
|
- overflow-y: auto;
|
|
|
-
|
|
|
- .btn {
|
|
|
- position: relative;
|
|
|
- width: 81%;
|
|
|
- height: 14%;
|
|
|
- margin-bottom: 10%;
|
|
|
- font-family: 'douyuFont';
|
|
|
- background: var(--image-no-choice) no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- cursor: pointer;
|
|
|
-
|
|
|
- .text {
|
|
|
- width: 80%;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 28px;
|
|
|
- font-size: 16px;
|
|
|
- color: var(--vent-table-action-link);
|
|
|
- text-align: center;
|
|
|
- transform: translate(-50%, 0);
|
|
|
- }
|
|
|
+ .type-btn {
|
|
|
+ width: 100%;
|
|
|
+ height: 28px;
|
|
|
+ line-height: 28px;
|
|
|
+ border: 1px solid var(--vent-warn-tab-border);
|
|
|
+ margin-bottom: 20px;
|
|
|
+ border-radius: 5px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .warn {
|
|
|
- width: 100%;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- bottom: 14px;
|
|
|
+ .btn {
|
|
|
+ width: 33.33%;
|
|
|
+ height: 100%;
|
|
|
font-size: 14px;
|
|
|
- color: #fff;
|
|
|
text-align: center;
|
|
|
- transform: translate(-50%, 0);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .btn1 {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- height: 14%;
|
|
|
- margin-bottom: 10%;
|
|
|
- font-family: 'douyuFont';
|
|
|
- background: var(--image-choice) no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- cursor: pointer;
|
|
|
-
|
|
|
- .text {
|
|
|
- width: 80%;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 28px;
|
|
|
- font-size: 16px;
|
|
|
- color: var(--vent-table-action-link);
|
|
|
- text-align: center;
|
|
|
- transform: translate(-62%, 0);
|
|
|
+ color: #fff;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
- .warn {
|
|
|
- width: 100%;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- bottom: 14px;
|
|
|
+ .btn1 {
|
|
|
+ width: 33.33%;
|
|
|
+ height: 100%;
|
|
|
font-size: 14px;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
- transform: translate(-60%, 0);
|
|
|
+ border-radius: 2px;
|
|
|
+ background: var(--vent-warn-tab-bg-actived);
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- .gas-content {
|
|
|
- position: relative;
|
|
|
- width: calc(85% - 10px);
|
|
|
- height: 100%;
|
|
|
- margin-left: 10px;
|
|
|
- padding: 15px;
|
|
|
- background: var(--image-border) no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- box-sizing: border-box;
|
|
|
+ .card-btn {
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 48px);
|
|
|
+ overflow-y: auto;
|
|
|
|
|
|
- .top-area {
|
|
|
- height: 356px;
|
|
|
- margin-bottom: 10px;
|
|
|
- padding: 10px;
|
|
|
- background: var(--image-bj1) no-repeat center;
|
|
|
- background-size: 100% 100%;
|
|
|
- box-sizing: border-box;
|
|
|
+ .btn {
|
|
|
+ position: relative;
|
|
|
+ width: 81%;
|
|
|
+ height: 14%;
|
|
|
+ margin-bottom: 10%;
|
|
|
+ font-family: 'douyuFont';
|
|
|
+ background: var(--image-no-choice) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ .text {
|
|
|
+ width: 80%;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 28px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: var(--vent-table-action-link);
|
|
|
+ text-align: center;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ }
|
|
|
|
|
|
- .title-t {
|
|
|
- height: 30px;
|
|
|
- margin-bottom: 10px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
+ .warn {
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 14px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .text-t {
|
|
|
+ .btn1 {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 14%;
|
|
|
+ margin-bottom: 10%;
|
|
|
font-family: 'douyuFont';
|
|
|
- font-size: 14px;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
- }
|
|
|
+ background: var(--image-choice) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+
|
|
|
+ .text {
|
|
|
+ width: 80%;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 28px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: var(--vent-table-action-link);
|
|
|
+ text-align: center;
|
|
|
+ transform: translate(-62%, 0);
|
|
|
+ }
|
|
|
|
|
|
- .content-t {
|
|
|
- width: 100%;
|
|
|
- height: 276px;
|
|
|
+ .warn {
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: 14px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ transform: translate(-60%, 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .bot-area {
|
|
|
- height: calc(100% - 356px);
|
|
|
- padding: 10px;
|
|
|
- background: var(--image-bj1) no-repeat center;
|
|
|
- background-size: 100% 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
-
|
|
|
- .bot-area1 {
|
|
|
+ .gas-content {
|
|
|
+ position: relative;
|
|
|
+ width: calc(85% - 10px);
|
|
|
height: 100%;
|
|
|
- padding: 10px 15px 0px 15px;
|
|
|
- background: var(--image-bj1) no-repeat center;
|
|
|
+ margin-left: 10px;
|
|
|
+ padding: 15px;
|
|
|
+ background: var(--image-border) no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
- .title-b {
|
|
|
- height: 30px;
|
|
|
+ .top-area {
|
|
|
+ height: 356px;
|
|
|
margin-bottom: 10px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
+ padding: 10px;
|
|
|
+ background: var(--image-bj1) no-repeat center;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
|
- .text-b {
|
|
|
- font-family: 'douyuFont';
|
|
|
- font-size: 14px;
|
|
|
- color: #fff;
|
|
|
+ .title-t {
|
|
|
+ height: 30px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .text-t {
|
|
|
+ font-family: 'douyuFont';
|
|
|
+ font-size: 14px;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-t {
|
|
|
+ width: 100%;
|
|
|
+ height: 276px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .content-b {
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 40px);
|
|
|
- overflow-y: auto;
|
|
|
+ .bot-area {
|
|
|
+ height: calc(100% - 356px);
|
|
|
+ padding: 10px;
|
|
|
+ background: var(--image-bj1) no-repeat center;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
|
|
|
- .content-b-item {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: flex-start;
|
|
|
- flex-wrap: wrap;
|
|
|
-
|
|
|
- .card-b {
|
|
|
- position: relative;
|
|
|
- width: 30%;
|
|
|
- height: 128px;
|
|
|
- margin: 0px 15px 15px 15px;
|
|
|
- background: var(--image-bot-area) no-repeat center;
|
|
|
- background-size: 100% 100%;
|
|
|
-
|
|
|
- .item-l {
|
|
|
- position: absolute;
|
|
|
- left: 32px;
|
|
|
- top: 50%;
|
|
|
- transform: translate(0, -50%);
|
|
|
- width: 89px;
|
|
|
- height: 98px;
|
|
|
- background: var(--image-bot-area1) no-repeat center;
|
|
|
-
|
|
|
- .label-l {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 7px;
|
|
|
- font-size: 14px;
|
|
|
- color: #fff;
|
|
|
- transform: translate(-50%, 0);
|
|
|
- }
|
|
|
-
|
|
|
- .value-l {
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 50px;
|
|
|
- transform: translate(-50%, 0);
|
|
|
- font-family: 'douyuFont';
|
|
|
- font-size: 14px;
|
|
|
- color: var(--vent-table-action-link);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .item-r {
|
|
|
- position: absolute;
|
|
|
- left: 132px;
|
|
|
- top: 50%;
|
|
|
- transform: translate(0, -50%);
|
|
|
- height: 128px;
|
|
|
- padding: 5px 0px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-around;
|
|
|
- box-sizing: border-box;
|
|
|
-
|
|
|
- .content-r {
|
|
|
- display: flex;
|
|
|
-
|
|
|
- span {
|
|
|
- font-size: 14px;
|
|
|
- color: #fff;
|
|
|
-
|
|
|
- &:first-child {
|
|
|
- display: inline-block;
|
|
|
- width: 68px;
|
|
|
- }
|
|
|
-
|
|
|
- &:last-child {
|
|
|
- display: inline-block;
|
|
|
- width: calc(100% - 68px);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .status-f {
|
|
|
- color: #ff0000;
|
|
|
- }
|
|
|
-
|
|
|
- .status-l {
|
|
|
- color: var(--vent-table-action-link);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .bot-area1 {
|
|
|
+ height: 100%;
|
|
|
+ padding: 10px 15px 0;
|
|
|
+ background: var(--image-bj1) no-repeat center;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</style>
|