123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790 |
- <template>
- <div class="fireHome">
- <!-- 模型区域 -->
- <!-- <div class="moduleArea">
- <iframe src="http://82.157.13.146:18224/valkyrja" width="100%" height="100%" frameborder="0"></iframe>
- </div> -->
- <div class="main-container">
- <transition name="fade" mode="out-in">
- <div class="left-area" v-if="isShow">
- <!-- 左上区域 -->
- <div class="left-t">
- <div class="tcontent-area">
- <div class="tcontent-l">
- <div>全矿井</div>
- <div>监测区域</div>
- </div>
- <div class="tcontent-c">
- <div
- style="margin-bottom: 15px;color: #1fb3f7; font-size: 24px;font-weight:bolder;letter-spacing:10px;">
- 低风险</div>
- <div style="color: #fff; font-size: 12px">自燃倾向性等级 : 容易自燃</div>
- </div>
- <div class="tcontent-r">火灾风险</div>
- </div>
- </div>
- <!-- 左中区域 -->
- <div class="left-c">
- <DanelBd :moduleName="'工作面风险监测'" :contentStyle="{ contentH: '450px' }">
- <workJc :heightT="'30%'" :heightB="'70%'" :echartData="echartDataWork" :cardData="cardData" />
- </DanelBd>
- </div>
- <!-- 左下区域 -->
- <div class="left-b">
- <DanelBd :moduleName="'密闭采空区监测系统'" :contentStyle="{ contentH: '245px' }" commonTitle="selected"
- :selectValue="areaCodeMb" :selectList="selectListMb" @change-select="changeSelect">
- <emptyJc :emptyData="emptyData" />
- </DanelBd>
- </div>
- <!-- 左底部区域 -->
- <!-- <div class="left-f">
- <DanelBd :moduleName="'GIS重点区域风险监测'" :contentStyle="{ contentH: '0px' }" commonTitle="switchs" />
- </div> -->
- </div>
- </transition>
- <div :class="isShow ? 'center-area' : 'center-area1'">
- <div :class="isShow ? 'center-t' : 'center-t1'">
- <div class="center-scalc" @click="getScalc">
- <div class="scalc-line"></div>
- <div class="scalc-line"></div>
- <div class="scalc-line"></div>
- </div>
- <iframe src="http://172.16.253.23:91/valkyrja/?type=tf" width="100%" height="100%" frameborder="0"></iframe>
- </div>
- <transition name="fade" mode="out-in">
- <div class="center-b" v-if="isShow">
- <DanelBd :moduleName="'工作面束管监测'" :selectValue="pointCode" :moduleSelect="moduleSelect"
- :contentStyle="{ contentH: '245px' }" commonTitle="selected" :selectList="selectList"
- @change-select="changeSelect">
- <fiberBunbleJc :bunbleData="bunbleData" />
- </DanelBd>
- </div>
- </transition>
- </div>
- <transition name="fade" mode="out-in">
- <div class="right-area" v-if="isShow">
- <!-- 右上区域 -->
- <div class="right-t">
- <DanelBd :moduleName="''" :contentStyle="{ contentH: '121px' }">
- <systemJc />
- </DanelBd>
- </div>
- <!-- 右中区域 -->
- <div class="right-c">
- <DanelBd :moduleName="'带式输送机防灭火监控系统'" :contentStyle="{ contentH: '180px' }" commonTitle="selected"
- :selectList="selectListDs" :selectValue="dsCode" @change-select="changeSelect">
- <outFireJc :outFireData="outFireData" />
- </DanelBd>
- </div>
- <!-- 右下区域 -->
- <div class="right-b">
- <DanelBd :moduleName="'变电硐室防灭火监控系统'" :contentStyle="{ contentH: '195px' }" commonTitle="selected"
- :selectList="selectListBd" :selectValue="pointCodeBd" @change-select="changeSelect">
- <substationJc :echartDatas="echartDatas" />
- </DanelBd>
- </div>
- <!-- 右底部区域 -->
- <div class="right-f">
- <DanelBd :moduleName="'安全监控系统'" :contentStyle="{ contentH: '245px' }" commonTitle="selected"
- :selectList="selectListAq" :selectValue="pointCodeAq" @change-select="changeSelect">
- <safetyJc :safetyHead="safetyHead" :safetyList="safetyList" />
- </DanelBd>
- </div>
- </div>
- </transition>
- </div>
- </div>
- </template>
- <script setup lang="ts">
- import { ref, reactive, onMounted, onUnmounted } from 'vue';
- import DanelBd from '../../common/danelBd.vue';
- import workJc from './components/workJc.vue';
- import emptyJc from './components/emptyJc.vue';
- import fiberBunbleJc from './components/fiberBunbleJc.vue';
- import systemJc from './components/systemJc.vue';
- import outFireJc from './components/outFireJc.vue';
- import substationJc from './components/substationJc.vue';
- import safetyJc from './components/safetyJc.vue';
- import {
- getFireAreaInfo,
- getMbRealData,
- getSgjcPointInfo,
- getSgjcRealDataByPointCode,
- getInfosByAreaCode,
- getGxcwHistoryDataByPointCode,
- getZcHfWd,
- getHeadingFace,
- getMainTrafficYw,
- getDsWd,
- getFireWarningCntByType
- } from './firehome.api';
- let moduleSelect = reactive([
- { label: '工作面束管监测' },
- // { label: '工作面光钎监测' },
- ]);
- //是否显示左侧区域和右侧区域
- let isShow = ref(true);
- let areaCode = ref('');
- let pointCode = ref('');
- let areaCodeMb = ref('');
- let dsCode = ref('');
- let areaCodeBd = ref('');
- let pointCodeBd = ref('');
- let pointCodeAq = ref('one');
- //工作面风险监测数据
- let echartDataWork = ref<any[]>([]);
- let cardData = reactive<any[]>([]);
- let selectList = reactive<any[]>([]);
- let bunbleData = reactive<any[]>([]);
- //密闭采空区数据
- let selectListMb = reactive<any[]>([]);
- let emptyData = reactive<any>([]);
- //带式输送机防灭火监控系统
- let selectListDs = reactive<any[]>([]);
- let outFireData = reactive<any[]>([]);
- //变电硐室
- let selectListBd = reactive<any[]>([]);
- let echartDatas = reactive({
- xData: [],
- yData: [],
- yData1: [],
- });
- //安全监控
- let selectListAq = reactive<any[]>([
- { label: '综放工作面传感器监测', value: 'one' },
- { label: '掘进工作面传感器监测', value: 'two' },
- { label: '主运输系统传感器监测', value: 'three' },
- { label: '机电硐室及配电点传感器监测', value: 'four' },
- ]);
- let safetyHead = reactive<any[]>([]);
- let safetyList = reactive<any[]>([]);
- //隐藏和显示左右侧区域
- function getScalc() {
- isShow.value = !isShow.value;
- }
- // https获取监测数据
- let timer: null | NodeJS.Timeout = null;
- function getMonitor() {
- timer = setTimeout(async () => {
- //工作面
- await getFireWarningCntByTypeList();
- await getFireAreaInfoList();
- //密闭
- await getFireAreaInfoListMb();
- //带式
- await getFireAreaInfoListDs();
- //变电硐室
- await getFireAreaInfoListBd();
- //安全监控
- await getTableList();
- if (timer) {
- timer = null;
- }
- getMonitor();
- }, 5000);
- }
- //下拉选项切换
- function changeSelect(data) {
- switch (data.label) {
- case '密闭采空区监测系统':
- areaCodeMb.value = data.value;
- getMbRealDataList();
- break;
- case '工作面束管监测':
- pointCode.value = data.value;
- getSgjcRealDataByPointCodeList();
- break;
- case '带式输送机防灭火监控系统':
- dsCode.value = data.value;
- getFireAreaInfoListDs();
- break;
- case '变电硐室防灭火监控系统':
- pointCodeBd.value = data.value;
- getGxcwHistoryDataByPointCodeList();
- break;
- case '安全监控系统':
- pointCodeAq.value = data.value;
- getTableList();
- break;
- }
- }
- //获取工作面风险监测图表数据
- async function getFireWarningCntByTypeList() {
- let res = await getFireWarningCntByType({ areaType: 2 })
- if (res.length != 0) {
- echartDataWork.value = res
- }
- }
- //获取工作面风险监测数据
- async function getFireAreaInfoList() {
- let res = await getFireAreaInfo({ fireCauseType: 2 });
- if (res.length != 0) {
- cardData.length = 0;
- let data = res.filter((v) => v.areaType == 2);
- data.forEach((el) => {
- cardData.push({
- title: '风险',
- val:
- el.warningLevel == 1
- ? '低'
- : el.warningLevel == 2
- ? '中'
- : el.warningLevel == 3
- ? '较大'
- : el.warningLevel == 4
- ? '重大'
- : '--',
- label: el.areaName,
- title1: '温度最大值',
- val1: el.infoTypeTwo.maxTemperature,
- });
- });
- areaCode.value = data[0].areaCode;
- //工作面束管监测
- getSgjcPointInfoList();
- }
- }
- //获取密闭下拉列表
- async function getFireAreaInfoListMb() {
- let res = await getFireAreaInfo({ fireCauseType: 2 });
- if (res.length != 0) {
- selectListMb.length = 0;
- let dataMb = res.filter((m) => m.areaType == 1);
- dataMb.forEach((m) => {
- selectListMb.push({ label: m.areaName, value: m.areaCode });
- });
- areaCodeMb.value = areaCodeMb.value ? areaCodeMb.value : selectListMb[0]['value'];
- //获取密闭监测实时信息
- getMbRealDataList();
- }
- }
- //获取密闭监测实时信息
- async function getMbRealDataList() {
- let res = await getMbRealData({ areaCode: areaCodeMb.value });
- emptyData.length = 0;
- res.forEach((el) => {
- emptyData.push({ label: el.name, val: el.currentValue, unit: el.unit });
- });
- }
- //工作面束管监测
- async function getSgjcPointInfoList() {
- let res = await getSgjcPointInfo({ areaCode: areaCode.value });
- if (res.length != 0) {
- selectList.length = 0;
- res.forEach((el) => {
- selectList.push({ label: el.pointName, value: el.pointCode });
- });
- pointCode.value = pointCode.value ? pointCode.value : selectList[0]['value'];
- //获取工作面束管测点实时数据
- getSgjcRealDataByPointCodeList();
- }
- }
- //获取工作面束管测点实时数据
- async function getSgjcRealDataByPointCodeList() {
- let res = await getSgjcRealDataByPointCode({ pointCode: pointCode.value });
- if (res.length != 0) {
- bunbleData.length = 0;
- res.forEach((el) => {
- bunbleData.push({
- type: el.name,
- label: '最大浓度',
- val: el.currentValue,
- label1: '位置',
- val1: el.position,
- label2: '时间',
- val2: el.time,
- unit: el.unit,
- });
- });
- }
- }
- //带式输送机防灭火监控系统
- async function getFireAreaInfoListDs() {
- const res = await getFireAreaInfo({});
- if (res.length != 0) {
- selectListDs.length = 0;
- outFireData.length = 0;
- let dataDs = res.filter((m) => m.areaType == 4);
- dataDs.forEach((el) => {
- selectListDs.push({ label: el.areaName, value: el.areaName });
- });
- dsCode.value = dsCode.value ? dsCode.value : selectListDs[0].value;
- let dataName = dataDs.filter((v) => v.areaName == dsCode.value)[0];
- outFireData.push(
- { title: '光纤预警', val: dataName.infoTypeTwo.maxTemperature, dw: '℃', label: '最高温度' },
- {
- title: '一氧化碳预警',
- val: dataName.infoTypeTwo.returnAirCornerCO,
- dw: 'ppm',
- label: '最高浓度',
- },
- { title: '烟雾预警', val: dataName.infoTypeTwo.hazard, dw: '', label: '状态' },
- { title: '火焰预警', val: '--', dw: '', label: '状态' },
- { title: '喷粉阀门', val: '--', dw: '', label: '开关量' },
- );
- }
- }
- //变电硐室防灭火监控系统
- async function getFireAreaInfoListBd() {
- const res = await getFireAreaInfo({});
- if (res.length != 0) {
- let dataBd = res.filter((m) => m.areaType == 5);
- areaCodeBd.value = dataBd[0].areaCode;
- //获取光钎条数及测点编号
- getInfosByAreaCodeList();
- }
- }
- //获取光钎条数及测点编号
- async function getInfosByAreaCodeList() {
- let res = await getInfosByAreaCode({ areaCode: areaCodeBd.value });
- if (res.length != 0) {
- selectListBd.length = 0;
- res.forEach((el) => {
- selectListBd.push({
- label: el.pointName,
- value: el.pointCode,
- });
- });
- pointCodeBd.value = pointCodeBd.value ? pointCodeBd.value : selectListBd[0].value;
- //获取光钎测温图表数据
- getGxcwHistoryDataByPointCodeList();
- }
- }
- //获取光钎测温图表数据
- async function getGxcwHistoryDataByPointCodeList() {
- let res = await getGxcwHistoryDataByPointCode({ pointCode: pointCodeBd.value });
- echartDatas.xData.length = 0;
- echartDatas.yData.length = 0;
- echartDatas.yData1.length = 0;
- res.time.forEach((el) => {
- echartDatas.xData.push(el);
- });
- res.maxValue.forEach((el) => {
- echartDatas.yData.push(el);
- });
- res.minValue.forEach((el) => {
- echartDatas.yData1.push(el);
- });
- }
- //获取安全监控列表数据
- function getTableList() {
- switch (pointCodeAq.value) {
- case 'one':
- getZcHfWdList();
- break;
- case 'two':
- getHeadingFaceList();
- break;
- case 'three':
- getMainTrafficYwList();
- break;
- case 'four':
- getDsWdList();
- break;
- default:
- getZcHfWdList();
- break;
- }
- }
- //获取综放工作面传感器监测数据
- async function getZcHfWdList() {
- let res = await getZcHfWd();
- safetyHead.length = 0;
- safetyList.length = 0;
- safetyHead.push(
- { label: '测点位置' },
- { label: '温度(°C)' },
- { label: '预警级别' },
- // { label: '时间' },
- );
- if (res.length != 0) {
- res.forEach((el) => {
- safetyList.push({
- address: el.nodePlacement,
- temp: el.detectValue || '-',
- grade: el.warningMsg,
- // time: el.dateTime,
- });
- });
- }
- }
- //获取掘进工作面传感器监测数据
- async function getHeadingFaceList() {
- let res = await getHeadingFace();
- safetyHead.length = 0;
- safetyList.length = 0;
- safetyHead.push(
- { label: '测点位置' },
- { label: 'CO浓度(%)' },
- { label: '温度' },
- { label: '预警级别' },
- // { label: '时间' },
- );
- if (res.length != 0) {
- res.forEach((el) => {
- safetyList.push({
- address: el.name,
- nd: el.co || '-',
- temp: el.wd || '-',
- grade: el.warningMsg,
- // time: el.dateTime,
- });
- });
- }
- }
- //获取运输系统烟雾传感器数据
- async function getMainTrafficYwList() {
- let res = await getMainTrafficYw();
- safetyHead.length = 0;
- safetyList.length = 0;
- safetyHead.push(
- { label: '测点位置' },
- { label: '温度(°C)' },
- { label: '预警级别' },
- // { label: '时间' },
- );
- if (res.length != 0) {
- res.forEach((el) => {
- safetyList.push({
- address: el.nodePlacement,
- temp: el.detectValue || '-',
- grade: el.warningMsg,
- // time: el.dateTime,
- });
- });
- }
- }
- //获取机电硐室传感器数据
- async function getDsWdList() {
- let res = await getDsWd();
- safetyHead.length = 0;
- safetyList.length = 0;
- safetyHead.push(
- { label: '测点位置' },
- { label: '温度(°C)' },
- { label: '预警级别' },
- // { label: '时间' },
- );
- if (res.length != 0) {
- res.forEach((el) => {
- safetyList.push({
- address: el.nodePlacement,
- temp: el.detectValue || '-',
- grade: el.warningMsg,
- // time: el.dateTime,
- });
- });
- }
- }
- onMounted(() => {
- //工作面
- getFireWarningCntByTypeList();
- getFireAreaInfoList();
- //密闭
- getFireAreaInfoListMb();
- //带式
- getFireAreaInfoListDs();
- //变电硐室
- getFireAreaInfoListBd();
- //安全监控
- getTableList();
- getMonitor();
- });
- onUnmounted(() => {
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- });
- </script>
- <style lang="less" scoped>
- @font-face {
- font-family: douyuFont;
- src: url('../../../../assets/font/douyuFont.otf');
- }
- .fireHome {
- position: relative;
- width: 100%;
- height: 928px;
- .moduleArea {
- width: 100%;
- height: 100%;
- }
- .main-container {
- display: flex;
- position: absolute;
- top: 0;
- left: 0;
- box-sizing: border-box;
- justify-content: space-between;
- width: 100%;
- height: 100%;
- padding: 15px 10px;
- .left-area {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- // width: 30%;
- width: 392px;
- height: 100%;
- margin-right: 15px;
- .left-t {
- position: relative;
- width: 100%;
- // height: 121px;
- height: 100px;
- background: url('../../../../assets/images/fire/firehome/qkjaq.png') no-repeat center;
- background-size: 100% 100%;
- .tcontent-area {
- display: flex;
- position: absolute;
- top: 50%;
- left: 0;
- box-sizing: border-box;
- align-items: center;
- justify-content: space-around;
- width: 100%;
- height: 90px;
- padding: 0 15px;
- transform: translate(0, -50%);
- .tcontent-l {
- display: flex;
- flex: 1;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- height: 100%;
- color: #9da5aa;
- font-size: 14px;
- font-weight: bold;
- letter-spacing: 2px;
- }
- .tcontent-c {
- display: flex;
- flex: 3;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- height: 100%;
- }
- .tcontent-r {
- display: flex;
- flex: 1;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- height: 100%;
- color: #9da5aa;
- font-size: 14px;
- font-weight: bold;
- letter-spacing: 2px;
- }
- }
- }
- .left-c {
- width: 100%;
- }
- .left-b {
- width: 100%;
- }
- // .left-f {
- // width: 100%;
- // }
- }
- .center-area {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- width: calc(100% - 814px);
- .center-t {
- position: relative;
- width: 100%;
- height: calc(100% - 295px);
- margin-bottom: 15px;
- overflow: hidden;
- .center-scalc {
- position: absolute;
- top: 0;
- left: 0;
- width: 44px;
- height: 44px;
- border-radius: 50%;
- background-color: #000;
- box-shadow: 0 0 15px 1px rgb(31 179 247 / 70%) inset;
- cursor: pointer;
- .scalc-line {
- position: absolute;
- left: 50%;
- width: 22px;
- height: 3px;
- transform: translate(-50%, 0);
- background-color: #fff;
- &:nth-child(1) {
- top: 14px;
- }
- &:nth-child(2) {
- top: 21px;
- }
- &:nth-child(3) {
- bottom: 13px;
- }
- }
- }
- }
- .center-b {
- width: 100%;
- height: 280px;
- }
- }
- .center-area1 {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- .center-t1 {
- position: relative;
- width: 100%;
- height: 100%;
- margin-bottom: 15px;
- overflow: hidden;
- .center-scalc {
- position: absolute;
- top: 0;
- left: 0;
- width: 44px;
- height: 44px;
- border-radius: 50%;
- background-color: #000;
- box-shadow: 0 0 15px 1px rgb(31 179 247 / 70%) inset;
- cursor: pointer;
- .scalc-line {
- position: absolute;
- left: 50%;
- width: 22px;
- height: 3px;
- transform: translate(-50%, 0);
- background-color: #fff;
- &:nth-child(1) {
- top: 14px;
- }
- &:nth-child(2) {
- top: 21px;
- }
- &:nth-child(3) {
- bottom: 13px;
- }
- }
- }
- }
- }
- .right-area {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- // width: 30%;
- width: 392px;
- height: 100%;
- margin-left: 15px;
- .right-t {
- width: 100%;
- }
- .right-c {
- width: 100%;
- }
- .right-b {
- width: 100%;
- }
- .right-f {
- width: 100%;
- }
- }
- }
- /* fade.css */
- .fade-enter-active {
- transition: opacity 2.5s ease;
- /* 设置过渡时间为1秒 */
- }
- .fade-leave-active {
- transition: opacity 0.5s ease;
- /* 设置过渡时间为1秒 */
- }
- .fade-enter,
- .fade-leave-to {
- opacity: 0;
- /* 初始状态为不可见 */
- }
- }
- </style>
|