|
@@ -8,7 +8,7 @@
|
|
|
<basicCard3 :card3List="card3List" :warningLevel="warningLevel" @toggleChange="toggleChange"></basicCard3>
|
|
|
</div>
|
|
|
<div class="composite-bot-box">
|
|
|
-
|
|
|
+
|
|
|
<div class="search-area">
|
|
|
<div class="area-title">束管系统监测</div>
|
|
|
<RangePicker v-model="TimeRange" size="small" style="width: 260px" :show-time="{ format: 'HH:mm:ss' }"
|
|
@@ -18,7 +18,7 @@
|
|
|
<div class="content-area">
|
|
|
<basicEchartLine :gridV="gridV" :echartData="echartData"></basicEchartLine>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -35,17 +35,7 @@ import { getFireAreaInfo, getMbRealData, getMbHistoryData } from './goaf.api'
|
|
|
|
|
|
|
|
|
let TimeRange = ref<any>([dayjs().subtract(60, 'minute').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')]) //查询时间
|
|
|
-let card3List = reactive<any[]>([
|
|
|
- // { title: 'O2(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'N2(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'CO(ppm)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'CO2(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'CH4(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'C2H4(ppm)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'C2H2(ppm)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'H2(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
- // { title: 'NO2(%)', ndLabel: '浓度 : ', ndVal: '14.79', tLabel: '时间 : ', tVal: '2023-05-14 15:26:24', aLabel: '位置 : ', aVal: '81203综放工作面' },
|
|
|
-])
|
|
|
+let card3List = reactive<any[]>([])
|
|
|
|
|
|
//左侧菜单树
|
|
|
const treeData = reactive<any[]>([])
|
|
@@ -67,6 +57,22 @@ let echartData = reactive({
|
|
|
legendName: ['实时值', '预测值']
|
|
|
})
|
|
|
|
|
|
+// https获取监测数据
|
|
|
+let timer: null | NodeJS.Timeout = null;
|
|
|
+function getMonitor() {
|
|
|
+ timer = setTimeout(
|
|
|
+ async () => {
|
|
|
+ //工作面
|
|
|
+ await getFireAreaInfos()
|
|
|
+ if (timer) {
|
|
|
+ timer = null;
|
|
|
+ }
|
|
|
+ getMonitor();
|
|
|
+ },
|
|
|
+ 5000
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
//时间选项切换
|
|
|
function onDataChange(value, dateString) {
|
|
|
TimeRange.value = [dateString[0], dateString[1]]
|
|
@@ -85,11 +91,11 @@ function selectChange(treeNode) {
|
|
|
//获取左侧菜单树
|
|
|
async function getFireAreaInfos() {
|
|
|
const res = await getFireAreaInfo({ fireCauseType: 2 })
|
|
|
- // treeData.length = 0
|
|
|
if (res.length != 0) {
|
|
|
+ treeData.length = 0
|
|
|
res.forEach((el, ind) => {
|
|
|
if (el.areaType == 1) {
|
|
|
- treeData.push({ name: el.areaName, value: el.ind, id: el.ind, pid: null, areaCode: el.areaCode,warningLevel:el.warningLevel })
|
|
|
+ treeData.push({ name: el.areaName, value: el.ind, id: el.ind, pid: null, areaCode: el.areaCode, warningLevel: el.warningLevel })
|
|
|
}
|
|
|
})
|
|
|
areaCode.value = treeData[0]['areaCode']
|
|
@@ -101,10 +107,11 @@ async function getFireAreaInfos() {
|
|
|
|
|
|
//获取密闭监测实时数据
|
|
|
async function getMbRealDataList() {
|
|
|
- card3List.length=0
|
|
|
+
|
|
|
let res = await getMbRealData({ areaCode: areaCode.value })
|
|
|
console.log(res, '密闭监测实时数据------')
|
|
|
if (res.length != 0) {
|
|
|
+ card3List.length = 0
|
|
|
res.forEach(el => {
|
|
|
card3List.push({ title: el.type, ndLabel: '浓度 : ', ndVal: el.currentValue, tLabel: '时间 : ', tVal: el.time, aLabel: '位置 : ', aVal: el.position })
|
|
|
})
|
|
@@ -121,12 +128,12 @@ function toggleChange(title) {
|
|
|
}
|
|
|
//获取密闭图表数据
|
|
|
async function getMbHistoryDataList() {
|
|
|
+
|
|
|
+ let res = await getMbHistoryData({ areaCode: areaCode.value, type: type.value, startTime: TimeRange.value[0], endTime: TimeRange.value[1] })
|
|
|
+ console.log(res, '密闭图表数据------')
|
|
|
echartData.xData.length = 0
|
|
|
echartData.yData.length = 0
|
|
|
echartData.yData1.length = 0
|
|
|
- let res = await getMbHistoryData({ areaCode: areaCode.value, type: type.value, startTime: TimeRange.value[0], endTime: TimeRange.value[1] })
|
|
|
- console.log(res, '密闭图表数据------')
|
|
|
-
|
|
|
res.time.forEach(el => {
|
|
|
echartData.xData.push(el)
|
|
|
})
|
|
@@ -138,6 +145,7 @@ async function getMbHistoryDataList() {
|
|
|
|
|
|
onMounted(() => {
|
|
|
getFireAreaInfos()
|
|
|
+ getMonitor()
|
|
|
|
|
|
})
|
|
|
</script>
|
|
@@ -189,7 +197,7 @@ onMounted(() => {
|
|
|
justify-content: space-between;
|
|
|
height: 30px;
|
|
|
|
|
|
- .area-title{
|
|
|
+ .area-title {
|
|
|
color: #fff;
|
|
|
font-family: douyuFont;
|
|
|
font-size: 16px;
|