|
@@ -1,477 +1,57 @@
|
|
|
<template>
|
|
|
<div class="fireMonitor">
|
|
|
- <div class="fireMon-left-box">
|
|
|
- <basicTree :treeData="treeData" @selectChange="selectChange"></basicTree>
|
|
|
- </div>
|
|
|
- <div class="fireMon-right-box">
|
|
|
- <div style="width:100%;height:100%" v-if="echartDataGx.xData.length!=0||echartDataGx.yData.length!=0 || echartDataGx.yData1.length!=0 || card3List.length!=0 || echartData.xData.length!=0 || echartData.yData.length!=0 || echartData.yData1.length!=0 ">
|
|
|
- <!-- 光钎 -->
|
|
|
- <div class="fire-top-box" v-if="flagShow == 'gx' || flagShow == 'all'">
|
|
|
- <basicCard2 :cardContentList2="cardContentList2"></basicCard2>
|
|
|
- </div>
|
|
|
- <div :class="flagShow == 'gx' ? 'fire-bot-box' : 'fire-bot-box1'" v-if="flagShow == 'gx' || flagShow == 'all'">
|
|
|
- <div class="gx-center-item-title">
|
|
|
- <div class="item-left">光钎测温系统温度实时监测</div>
|
|
|
- <a-select style="width: 180px" :options="gxSelectList" size="small" placeholder="请选择" v-model:value="gxSelect" allowClear @change="pointChange"></a-select>
|
|
|
- </div>
|
|
|
- <div class="gx-center-item-content">
|
|
|
- <basicEchartLine :gridV="gridV" :echartData="echartDataGx"></basicEchartLine>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <!-- 束管 -->
|
|
|
- <div class="composite-top-box" v-if="flagShow == 'sg' || flagShow == 'all'">
|
|
|
- <div class="composite-search">
|
|
|
- <a-select style="width: 180px" :options="selectListSg" size="small" placeholder="请选择" v-model:value="pointCode" allowClear @change="changeSg" ></a-select>
|
|
|
- </div>
|
|
|
- <div class="composite-content">
|
|
|
- <basicCard3 :card3List="card3List" :warningLevel="warningLevel" @toggleChange="toggleChange"></basicCard3>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="composite-bot-box" v-if="flagShow == 'sg' || flagShow == 'all'">
|
|
|
- <div class="search-area">
|
|
|
- <div class="area-title">束管系统监测</div>
|
|
|
- <a-range-picker v-model:value="TimeRange" :format="dateFormat" @change="onDataChange" />
|
|
|
- </div>
|
|
|
- <div class="content-area">
|
|
|
- <basicEchartLine :gridV="gridV" :echartData="echartData"></basicEchartLine>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
+ <div class="top-box">
|
|
|
+ <!-- <div class="table-box">
|
|
|
+ <basicSensor :sensorTitle="sensorTitle" :sensorList="sensorList" :headList="headList" />
|
|
|
</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 class="table-box">
|
|
|
+ <basicSensor :sensorTitle="sensorTitle" :sensorList="sensorList" :headList="headList" />
|
|
|
</div>
|
|
|
+ <div class="table-box">
|
|
|
+ <basicSensor :sensorTitle="sensorTitle" :sensorList="sensorList" :headList="headList" />
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
+ <div class="bot-box"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref, reactive, onMounted } from 'vue'
|
|
|
-import basicTree from '../../common/basicTree.vue'
|
|
|
-import basicCard2 from '../../common/basicCard2.vue';
|
|
|
-import basicCard3 from '../../common/basicCard3.vue';
|
|
|
-import basicEchartLine from '../../common/basicEchartLine.vue';
|
|
|
-import { getAssetURL } from '../../../../utils/ui';
|
|
|
-import dayjs, { Dayjs } from 'dayjs';
|
|
|
-import { getFireAreaInfo, getInfosByAreaCode, getGxcwHistoryDataByPointCode, getSgjcPointInfo, getSgjcRealDataByPointCode, getSgjcHistoryData } from './fireMonitor.api'
|
|
|
-
|
|
|
-let cardContentList2 = reactive([
|
|
|
- { imgSrcL: getAssetURL('workPlaceWarn/jd-jcjl.png'), labelL: '平均温度(°C)', valL: '', imgSrcR: getAssetURL('workPlaceWarn/jd-pjwd.png'), labelR: '监测距离(m)', valR: '', },
|
|
|
- { imgSrcL: getAssetURL('workPlaceWarn/temp.png'), labelL: '最高温度(°C)', valL: '', imgSrcR: '', labelR: '位置(m)', valR: '' },
|
|
|
- { imgSrcL: getAssetURL('workPlaceWarn/jd-zdwd.png'), labelL: '最低温度(°C)', valL: '', imgSrcR: '', labelR: '位置(m)', valR: '' },
|
|
|
-])
|
|
|
-
|
|
|
-let areaCode = ref('')
|
|
|
-let warningLevel = ref('')//风险等级
|
|
|
-let flagShow = ref('')
|
|
|
-let gasType = ref('')
|
|
|
-let pointCode = ref('')
|
|
|
-let dateFormat = ref('YYYY-MM-DD');
|
|
|
-let TimeRange = ref<[Dayjs, Dayjs]>([dayjs(dayjs(new Date().getTime()).format('YYYY-MM-DD'), dateFormat.value), dayjs(dayjs(new Date().getTime()+ 24 * 60 * 60 * 1000).format('YYYY-MM-DD'), dateFormat.value)])
|
|
|
-//数据随便写的,不符合实际情况,因为懒得改
|
|
|
-const treeData = reactive<any[]>([])
|
|
|
-
|
|
|
-let card3List = reactive<any[]>([])
|
|
|
-
|
|
|
-let gridV = reactive({
|
|
|
- top: '8%',
|
|
|
- left: '3%',
|
|
|
- right: '3%',
|
|
|
- bottom: '10%',
|
|
|
-})
|
|
|
-
|
|
|
-let echartData = reactive(
|
|
|
- {
|
|
|
- xData: [],
|
|
|
- yData: [],
|
|
|
- yData1: [],
|
|
|
- legendName: ['实时值']
|
|
|
- }
|
|
|
-)
|
|
|
-
|
|
|
-let echartDataGx = reactive(
|
|
|
- {
|
|
|
- xData: [],
|
|
|
- yData: [],
|
|
|
- yData1: [],
|
|
|
- legendName: ['最高温度', '最低温度']
|
|
|
- }
|
|
|
-)
|
|
|
-
|
|
|
-let gxSelectList = reactive<any[]>([])
|
|
|
-let gxSelect = ref('')
|
|
|
-
|
|
|
-let selectListSg=reactive<any[]>([])
|
|
|
-
|
|
|
-// 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 = [value[0], value[1]]
|
|
|
-}
|
|
|
-
|
|
|
-//获取左侧菜单树
|
|
|
-async function getFireAreaInfos() {
|
|
|
- const res = await getFireAreaInfo({})
|
|
|
- if (res.length != 0) {
|
|
|
- treeData.length = 0
|
|
|
- res.forEach((el, ind) => {
|
|
|
- if (el.areaType == 5) {
|
|
|
- treeData.push({ name: el.areaName, value: el.ind, id: el.ind, pid: null, areaCode: el.areaCode, gxcwCnt: el.gxcwCnt, sgjcCnt: el.sgjcCnt, infoTypeTwo: el.infoTypeTwo, warningLevel: el.warningLevel })
|
|
|
- }
|
|
|
- })
|
|
|
- areaCode.value = areaCode.value ? areaCode.value : treeData[0]['areaCode']
|
|
|
- warningLevel.value = treeData[0].warningLevel == 1 ? '低风险' : treeData[0].warningLevel == 2 ? '中风险' : treeData[0].warningLevel == 3 ? '较高风险' : treeData[0].warningLevel == 4 ? '重大风险' : '--'
|
|
|
- cardContentList2[0]['valL'] = treeData[0].infoTypeTwo.aveTemperature
|
|
|
- cardContentList2[0]['valR'] = '-'
|
|
|
- cardContentList2[1]['valL'] = treeData[0].infoTypeTwo.maxTemperature
|
|
|
- cardContentList2[1]['valR'] = '-'
|
|
|
- cardContentList2[2]['valL'] = treeData[0].infoTypeTwo.minTemperature
|
|
|
- cardContentList2[2]['valR'] = '-'
|
|
|
- if (treeData[0]['gxcwCnt'] > 0 && treeData[0]['sgjcCnt'] > 0) {
|
|
|
- flagShow.value = 'all'
|
|
|
- //获取工作面光钎条数及测点编号
|
|
|
- getInfosByAreaCodeList()
|
|
|
- //获取工作面束管测点编号列表
|
|
|
- getSgjcPointInfoList()
|
|
|
-
|
|
|
- } else if (treeData[0]['gxcwCnt'] > 0) {
|
|
|
- flagShow.value = 'gx'
|
|
|
- //获取光钎条数及测点编号
|
|
|
- getInfosByAreaCodeList()
|
|
|
- } else if (treeData[0]['sgjcCnt'] > 0) {
|
|
|
- flagShow.value = 'sg'
|
|
|
- //获取工作面束管测点编号列表
|
|
|
- getSgjcPointInfoList()
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//点击左侧树节点
|
|
|
-function selectChange(treeNode) {
|
|
|
- areaCode.value = treeData.filter((v) => v.name == treeNode.node.dataRef.title)[0]['areaCode']
|
|
|
- let level = treeData.filter((m) => m.name == treeNode.node.dataRef.title)[0]['warningLevel']
|
|
|
- warningLevel.value = level == 1 ? '低风险' : level == 2 ? '中风险' : level == 3 ? '较高风险' : level == 4 ? '重大风险' : '--'
|
|
|
- let data = treeData.filter((a) => a.name == treeNode.node.dataRef.title)[0]
|
|
|
- cardContentList2[0]['valL'] = data.infoTypeTwo.aveTemperature
|
|
|
- cardContentList2[1]['valL'] = data.infoTypeTwo.maxTemperature
|
|
|
- cardContentList2[2]['valL'] = data.infoTypeTwo.minTemperature
|
|
|
- cardContentList2[0]['valR'] = '-'
|
|
|
- cardContentList2[1]['valR'] = '-'
|
|
|
- cardContentList2[2]['valR'] = '-'
|
|
|
- let gxcwCnt = treeData.filter((g) => g.name == treeNode.node.dataRef.title)[0]['gxcwCnt']
|
|
|
- let sgjcCnt = treeData.filter((s) => s.name == treeNode.node.dataRef.title)[0]['sgjcCnt']
|
|
|
- if (gxcwCnt > 0 && sgjcCnt > 0) {
|
|
|
- flagShow.value = 'all'
|
|
|
- //获取工作面光钎条数及测点编号
|
|
|
- getInfosByAreaCodeList()
|
|
|
- //获取工作面束管测点编号列表
|
|
|
- getSgjcPointInfoList()
|
|
|
- } else if (gxcwCnt > 0) {
|
|
|
- flagShow.value = 'gx'
|
|
|
- //获取工作面光钎条数及测点编号
|
|
|
- getInfosByAreaCodeList()
|
|
|
-
|
|
|
- } else if (sgjcCnt > 0) {
|
|
|
- flagShow.value = 'sg'
|
|
|
- //获取工作面束管测点编号列表
|
|
|
- getSgjcPointInfoList()
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//获取光钎条数及测点编号
|
|
|
-async function getInfosByAreaCodeList() {
|
|
|
- let res = await getInfosByAreaCode({ areaCode: areaCode.value })
|
|
|
- if (res.length != 0) {
|
|
|
- gxSelectList.length = 0
|
|
|
- res.forEach(el => {
|
|
|
- gxSelectList.push({
|
|
|
- label: el.pointName,
|
|
|
- value: el.pointCode,
|
|
|
- })
|
|
|
- })
|
|
|
- gxSelect.value = gxSelect.value ? gxSelect.value : res[0]['pointCode']
|
|
|
- //获取光钎测温图表数据
|
|
|
- getGxcwHistoryDataByPointCodeList()
|
|
|
- }
|
|
|
-}
|
|
|
-//光钎测温测点编号选项切换
|
|
|
-function pointChange(val) {
|
|
|
- gxSelect.value = val
|
|
|
- getGxcwHistoryDataByPointCodeList()
|
|
|
-}
|
|
|
-//获取光钎测温图表数据
|
|
|
-async function getGxcwHistoryDataByPointCodeList() {
|
|
|
- let res = await getGxcwHistoryDataByPointCode({ pointCode: gxSelect.value })
|
|
|
- echartDataGx.xData.length = 0
|
|
|
- echartDataGx.yData.length = 0
|
|
|
- echartDataGx.yData1.length = 0
|
|
|
- res.time.forEach(el => {
|
|
|
- echartDataGx.xData.push(el)
|
|
|
- })
|
|
|
- res.maxValue.forEach(el => {
|
|
|
- echartDataGx.yData.push(el)
|
|
|
- })
|
|
|
- res.minValue.forEach(el => {
|
|
|
- echartDataGx.yData1.push(el)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-//束管选项切换
|
|
|
-function changeSg(val){
|
|
|
- pointCode.value =val
|
|
|
- getSgjcRealDataByPointCodeList()
|
|
|
-}
|
|
|
-//获取束管测点编号列表
|
|
|
-async function getSgjcPointInfoList() {
|
|
|
- let res = await getSgjcPointInfo({ areaCode: areaCode.value })
|
|
|
- if (res.length != 0) {
|
|
|
- selectListSg.length=0
|
|
|
- res.forEach(el=>{
|
|
|
- selectListSg.push({label:el.pointName,value:el.pointCode})
|
|
|
- })
|
|
|
- pointCode.value = pointCode.value ? pointCode.value : res[0]['pointCode']
|
|
|
- //获取工作面束管测点实时数据
|
|
|
- getSgjcRealDataByPointCodeList()
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//获取束管测点实时数据
|
|
|
-async function getSgjcRealDataByPointCodeList() {
|
|
|
- let res = await getSgjcRealDataByPointCode({ pointCode: pointCode.value })
|
|
|
- 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 })
|
|
|
- })
|
|
|
- gasType.value = gasType.value ? gasType.value : card3List[0]['title']
|
|
|
- //获取束管曲线数据
|
|
|
- getSgjcHistoryDataList()
|
|
|
- }
|
|
|
-}
|
|
|
-//获取束管曲线数据
|
|
|
-async function getSgjcHistoryDataList() {
|
|
|
- let startTime=`${dayjs(TimeRange.value[0]).format('YYYY-MM-DD')} 00:00:00`
|
|
|
- let endTime=`${dayjs(TimeRange.value[1]).format('YYYY-MM-DD')} 00:00:00`
|
|
|
- let res = await getSgjcHistoryData({ pointCode: pointCode.value, type: gasType.value, startTime: startTime, endTime: endTime })
|
|
|
- echartData.xData.length = 0
|
|
|
- echartData.yData.length = 0
|
|
|
- echartData.yData1.length = 0
|
|
|
- res.time.forEach(el => {
|
|
|
- echartData.xData.push(el)
|
|
|
- })
|
|
|
- res.value.forEach(el => {
|
|
|
- echartData.yData.push(el)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-//束管选项切换
|
|
|
-function toggleChange(title) {
|
|
|
- gasType.value = title
|
|
|
- getSgjcHistoryDataList()
|
|
|
-}
|
|
|
+// import basicSensor from '../../common/basicSensor.vue';
|
|
|
|
|
|
+onMounted(()=>{})
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- getFireAreaInfos()
|
|
|
- getMonitor()
|
|
|
-})
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.fireMonitor {
|
|
|
- display: flex;
|
|
|
position: relative;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
width: calc(100% - 20px);
|
|
|
height: 928px;
|
|
|
margin: 0 10px;
|
|
|
background: #282828;
|
|
|
|
|
|
- .fireMon-left-box {
|
|
|
- width: 220px;
|
|
|
- height: 100%;
|
|
|
+ .top-box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 100%;
|
|
|
+ height: calc(70% - 15px);
|
|
|
+ margin-bottom: 15px;
|
|
|
background-color: rgb(27 35 39 / 80%);
|
|
|
- }
|
|
|
-
|
|
|
- .fireMon-right-box {
|
|
|
- box-sizing: border-box;
|
|
|
- width: calc(100% - 230px);
|
|
|
- height: 100%;
|
|
|
- margin-left: 10px;
|
|
|
- padding: 15px 10px;
|
|
|
- overflow-y: auto;
|
|
|
- background-color: rgb(27 35 39 / 80%);
|
|
|
-
|
|
|
- .fire-top-box {
|
|
|
- width: 100%;
|
|
|
- height: 110px;
|
|
|
- margin-bottom: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .fire-bot-box {
|
|
|
- box-sizing: border-box;
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 125px);
|
|
|
- // margin-bottom: 15px;
|
|
|
- padding: 10px 15px;
|
|
|
- background-color: rgb(41 49 53 / 80%);
|
|
|
-
|
|
|
- .gx-center-item-title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- height: 30px;
|
|
|
-
|
|
|
- .item-left {
|
|
|
- color: #fff;
|
|
|
- // font-family: douyuFont;
|
|
|
- font-family: "Microsoft YaHei", sans-serif;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .gx-center-item-content {
|
|
|
- height: calc(100% - 30px);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .fire-bot-box1 {
|
|
|
- box-sizing: border-box;
|
|
|
- width: 100%;
|
|
|
- height: 242px;
|
|
|
- margin-bottom: 15px;
|
|
|
- padding: 10px 15px;
|
|
|
- background-color: rgb(41 49 53 / 80%);
|
|
|
-
|
|
|
- .gx-center-item-title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- height: 30px;
|
|
|
-
|
|
|
- .item-left {
|
|
|
- color: #fff;
|
|
|
- // font-family: douyuFont;
|
|
|
- font-family: "Microsoft YaHei", sans-serif;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .gx-center-item-content {
|
|
|
- height: calc(100% - 30px);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .composite-top-box {
|
|
|
- width: 100%;
|
|
|
- height: 290px;
|
|
|
- margin-bottom: 15px;
|
|
|
-
|
|
|
- .composite-search{
|
|
|
- display: flex;
|
|
|
- box-sizing: border-box;
|
|
|
- align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
- height: 40px;
|
|
|
- padding: 0 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .composite-content{
|
|
|
- height: calc(100% - 40px);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .composite-bot-box {
|
|
|
- box-sizing: border-box;
|
|
|
- width: 100%;
|
|
|
- height: calc(100% - 305px);
|
|
|
- padding: 10px 15px;
|
|
|
- border: 1px solid #1e96cd;
|
|
|
- background-color: rgb(41 49 53 / 80%);
|
|
|
-
|
|
|
- .search-area {
|
|
|
- display: flex;
|
|
|
- box-sizing: border-box;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- height: 30px;
|
|
|
-
|
|
|
- .area-title {
|
|
|
- color: #fff;
|
|
|
- // font-family: douyuFont;
|
|
|
- font-family: "Microsoft YaHei", sans-serif;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .content-area {
|
|
|
- height: calc(100% - 30px);
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
+ // .table-box{
|
|
|
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
+ .bot-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 30%;
|
|
|
+ background-color: rgb(27 35 39 / 80%);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-:deep(.vMonitor-picker) {
|
|
|
- border: none !important;
|
|
|
- background-color: rgb(15 64 88) !important;
|
|
|
- box-shadow: none;
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-picker-input >input) {
|
|
|
- color: #a1dff8 !important;
|
|
|
- text-align: center !important;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-:deep(.vMonitor-picker-separator) {
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-picker-active-bar) {
|
|
|
- display: none !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-picker-suffix) {
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-select-selector) {
|
|
|
- border: none !important;
|
|
|
- background-color: rgb(15 64 88) !important;
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-select-selection-placeholder) {
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
-
|
|
|
-:deep(.vMonitor-select-arrow) {
|
|
|
- color: #a1dff8 !important;
|
|
|
-}
|
|
|
</style>
|