|
@@ -4,30 +4,38 @@
|
|
|
<basicTree :treeData="treeData" @selectChange="selectChange"></basicTree>
|
|
|
</div>
|
|
|
<div class="dustWarn-right-box">
|
|
|
- <div class="warn-top-box">
|
|
|
- <basicCard4 :cardData4="cardData4" :warningLevel="warningLevel" @toggleDustCards="toggleDustCards"></basicCard4>
|
|
|
- </div>
|
|
|
- <div class="warn-top-box1">
|
|
|
- <basicCard5 :cardData5="cardData5"></basicCard5>
|
|
|
- </div>
|
|
|
- <div class="warn-bot-box">
|
|
|
- <div class="search-area">
|
|
|
- <div class="area-title">粉尘监测预警</div>
|
|
|
+ <div style="width:100%;height:100%"
|
|
|
+ v-if="cardData4.length != 0 || echartData.xData.length != 0 || echartData.yData.length != 0 || echartData.yData1.length != 0">
|
|
|
+ <div class="warn-top-box">
|
|
|
+ <basicCard4 :cardData4="cardData4" :warningLevel="warningLevel" @toggleDustCards="toggleDustCards"></basicCard4>
|
|
|
+ </div>
|
|
|
+ <div class="warn-top-box1">
|
|
|
+ <!-- <basicCard5 :cardData5="cardData5"></basicCard5> -->
|
|
|
+ <basicCard1 :cardContentList1="cardData5"></basicCard1>
|
|
|
</div>
|
|
|
- <div class="content-area">
|
|
|
- <basicEchartLine :gridV="gridV" :echartData="echartData"></basicEchartLine>
|
|
|
+ <div class="warn-bot-box">
|
|
|
+ <div class="search-area">
|
|
|
+ <div class="area-title">粉尘监测预警</div>
|
|
|
+ </div>
|
|
|
+ <div class="content-area">
|
|
|
+ <basicEchartLine :gridV="gridV" :echartData="echartData"></basicEchartLine>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="display: flex;align-items: center;justify-content: center;width:100%;height:100%;" v-else>
|
|
|
+ <img style="width:252px; height:172px" src="../../../../assets/images/nodata.png" alt="">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, onMounted,onUnmounted } from 'vue';
|
|
|
+import { ref, reactive, onMounted, onUnmounted } from 'vue';
|
|
|
import basicTree from '../../common/basicTree.vue'
|
|
|
import basicCard4 from '../../common/basicCard4.vue';
|
|
|
-import basicCard5 from '../../common/basicCard5.vue';
|
|
|
+// import basicCard5 from '../../common/basicCard5.vue';
|
|
|
+import basicCard1 from '../../common/basicCard1.vue'
|
|
|
import basicEchartLine from '../../common/basicEchartLine.vue';
|
|
|
import { getAreaTypeList, getRealSensorDataByType, getDustInfos, historyAndForecast } from './dustWarnAnalysis.api'
|
|
|
|
|
@@ -39,10 +47,10 @@ let warningLevel = ref('')//风险等级
|
|
|
|
|
|
let cardData4 = reactive<any[]>([])
|
|
|
let cardData5 = reactive<any[]>([
|
|
|
- { id: 0, val: 0 },
|
|
|
- { id: 1, val: 0 },
|
|
|
- { id: 2, val: 0 },
|
|
|
- { id: 3, val: 0 },
|
|
|
+ { id: 0, label:'粉尘浓度(mg/m³)',value:'' },
|
|
|
+ { id: 1, label:'总尘浓度(mg/m³)',value:''},
|
|
|
+ { id: 2, label:'呼尘加权容许浓度(mg/m³)',value:''},
|
|
|
+ { id: 3, label:'爆炸浓度(mg/m³)',value:''},
|
|
|
])
|
|
|
|
|
|
|
|
@@ -118,7 +126,7 @@ async function getRealSensorDataByTypeList() {
|
|
|
]
|
|
|
})
|
|
|
})
|
|
|
- sensorCode.value =sensorCode.value ? sensorCode.value : cardData4[0]['sensorCode']
|
|
|
+ sensorCode.value = sensorCode.value ? sensorCode.value : cardData4[0]['sensorCode']
|
|
|
//获取单项数据
|
|
|
getDustInfosList()
|
|
|
}
|
|
@@ -134,10 +142,10 @@ function toggleDustCards(data) {
|
|
|
async function getDustInfosList() {
|
|
|
let res = await getDustInfos({ sensorCode: sensorCode.value })
|
|
|
console.log(res, '单项数据------')
|
|
|
- cardData5[0].val = res.dustDensity
|
|
|
- cardData5[1].val = res.dustDensityAverage
|
|
|
- cardData5[2].val = res.dustDensityAverage40
|
|
|
- cardData5[3].val = res.explodeDensity
|
|
|
+ cardData5[0].value = res.dustDensity
|
|
|
+ cardData5[1].value = res.dustDensityAverage
|
|
|
+ cardData5[2].value = res.dustDensityAverage40
|
|
|
+ cardData5[3].value = res.explodeDensity
|
|
|
|
|
|
//获取粉尘图表数据
|
|
|
historyAndForecastList(res.areaCode)
|
|
@@ -165,11 +173,11 @@ onMounted(() => {
|
|
|
getMonitor()
|
|
|
})
|
|
|
onUnmounted(() => {
|
|
|
- if (timer) {
|
|
|
- clearTimeout(timer);
|
|
|
- timer = null;
|
|
|
- }
|
|
|
- });
|
|
|
+ if (timer) {
|
|
|
+ clearTimeout(timer);
|
|
|
+ timer = null;
|
|
|
+ }
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -226,7 +234,8 @@ onUnmounted(() => {
|
|
|
|
|
|
.area-title {
|
|
|
color: #fff;
|
|
|
- font-family: douyuFont;
|
|
|
+ // font-family: douyuFont;
|
|
|
+ font-family: "Microsoft YaHei", sans-serif;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|