| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <template>
- <CustomBadges class="w-1710px ml-100px mt-50px" :badges="unitHeaderBadges" />
- <div class="monitor-container">
- <transition enter-active-class="animate__animated animate__fadeInLeft" leave-active-class="animate__animated animate__fadeOutLeft">
- <div class="lr left-box" v-if="loading">
- <ventBox1>
- <template #title>
- <div>评价单元基础信息</div>
- </template>
- <template #container>
- <ListItem
- v-for="(item, index) in gasUnitBase"
- :key="index"
- class="w-100% mb-5px"
- :value="get(dataSource, item.code)"
- :label="item.title"
- labelWidth="200px"
- />
- </template>
- </ventBox1>
- <ventBox1 class="vent-margin-t-10">
- <template #title>
- <div>单元累计抽采混量</div>
- </template>
- <template #container>
- <CustomChart :chart-config="gasUnitHlOption" :chart-data="mockGasUnitHlData" height="280px" />
- </template>
- </ventBox1>
- </div>
- </transition>
- <transition enter-active-class="animate__animated animate__fadeInRight" leave-active-class="animate__animated animate__fadeOutRight">
- <div class="lr right-box" v-if="loading">
- <div class="item-box">
- <ventBox1>
- <template #title>
- <div>实时监测数据</div>
- </template>
- <template #container>
- <ListItem
- v-for="(item, index) in gasUnitMonitor"
- :key="index"
- class="w-100% mb-5px"
- :value="get(dataSource, item.code)"
- :label="item.title"
- labelWidth="200px"
- />
- </template>
- </ventBox1>
- <ventBox1 class="vent-margin-t-10">
- <template #title>
- <div>单元累计抽采纯量</div>
- </template>
- <template #container>
- <CustomChart :chart-config="gasUnitClOption" :chart-data="mockGasUnitClData" height="280px" />
- </template>
- </ventBox1>
- </div>
- </div>
- </transition>
- </div>
- </template>
- <script setup lang="ts">
- import { onBeforeMount, ref, onMounted, onUnmounted } from 'vue';
- import ventBox1 from '/@/components/vent/ventBox1.vue';
- import CustomBadges from './customHeader.vue';
- import {
- gasUnitMonitor,
- unitHeaderBadges,
- gasUnitBase,
- gasUnitHlOption,
- mockGasUnitHlData,
- gasUnitClOption,
- mockGasUnitClData,
- } from '../gasAssessment.data';
- import ListItem from '@/views/vent/gas/components/list/listItem.vue';
- import { get } from '@/utils/ventutil';
- import CustomChart from '@/views/vent/home/configurable/components/detail/CustomChart.vue';
- import { list } from '../gasAssessment.api';
- let props = withDefaults(
- defineProps<{
- unitId: string;
- }>(),
- {
- unitId: '',
- }
- );
- const loading = ref(false);
- const dataSource = ref({});
- // // https获取监测数据
- let timer: null | NodeJS.Timeout = null;
- function getMonitor(flag?) {
- if (Object.prototype.toString.call(timer) === '[object Null]') {
- timer = setTimeout(
- async () => {
- const res = await list({ ids: props.unitId, pagetype: 'normal' });
- if (res.msgTxt && res.msgTxt[0]) {
- const data = res.msgTxt[0].datalist[0] || [];
- dataSource.value = Object.assign(data, data['readData']);
- if (timer) {
- timer = null;
- }
- getMonitor();
- }
- if (timer) {
- timer = null;
- }
- await getMonitor();
- },
- flag ? 0 : 1000
- );
- }
- }
- onBeforeMount(() => {});
- onMounted(async () => {
- getMonitor(true);
- loading.value = true;
- });
- onUnmounted(() => {
- if (timer) {
- clearTimeout(timer);
- }
- });
- </script>
- <style lang="less">
- @import '/@/design/vent/modal.less';
- .@{ventSpace}-select-dropdown {
- background: #ffffff !important;
- border-bottom: 1px solid rgba(236, 236, 236, 0.4);
- backdrop-filter: blur(10px);
- .@{ventSpace}-select-item-option-selected,
- .@{ventSpace}-select-item-option-active {
- background-color: #ffffff33 !important;
- }
- .@{ventSpace}-select-item:hover {
- background-color: #ffffff33 !important;
- }
- }
- </style>
- <style lang="less" scoped>
- @ventSpace: zxm;
- @import '/@/design/vent/modal.less';
- @import '@/views/vent/monitorManager/comment/less/workFace.less';
- .bg {
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- position: absolute;
- pointer-events: auto;
- z-index: 0;
- }
- .monitor-container {
- height: 850px;
- pointer-events: none;
- }
- .modal-monitor {
- position: absolute;
- z-index: -1;
- flex-direction: row-reverse;
- .main-container {
- background-color: #00000078;
- }
- .monitor-item {
- width: 180px;
- display: flex;
- flex-direction: row;
- width: auto;
- margin-bottom: 3px;
- .monitor-title {
- width: 120px;
- color: #7af5ff;
- font-weight: 400;
- font-size: 13px;
- }
- .monitor-val {
- color: #ffb700;
- display: flex;
- width: auto;
- .val {
- width: 60px;
- font-size: 13px;
- text-align: center;
- }
- .unit {
- color: #ffffffbb;
- font-size: 13px;
- }
- }
- }
- .title {
- text-align: center;
- }
- }
- .left-box {
- width: 360px;
- }
- .gas-pump-item {
- padding: 3px 0;
- }
- .param-set {
- color: #45d3fd;
- cursor: pointer;
- &:hover {
- color: #38a6c8;
- }
- }
- .input-item {
- margin: 3px 0 !important;
- .value {
- width: 80px;
- text-align: center;
- }
- }
- .data-group {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- padding-bottom: 8px;
- .data-item {
- width: calc(50% - 10px);
- display: flex;
- justify-content: space-between;
- line-height: 24px;
- background-image: linear-gradient(to right, #39a3ff00, #39a3ff10, #39a3ff02);
- margin: 4px 0;
- }
- .value {
- color: #00eefffe;
- }
- .data-item1 {
- width: 100%;
- line-height: 24px;
- background-image: linear-gradient(to right, #39a3ff00, #39a3ff10, #39a3ff02);
- margin: 4px 0;
- }
- }
- .base-title {
- line-height: 26px;
- position: relative;
- padding-left: 15px;
- color: #9bf2ff;
- &::after {
- content: '';
- position: absolute;
- display: block;
- width: 4px;
- height: 12px;
- top: 8px;
- left: 5px;
- background: #45d3fd;
- border-radius: 4px;
- }
- }
- .detail {
- border: 1px solid #9bf2ff88;
- padding: 0 5px;
- background-color: #ffffff11;
- margin-right: 4px;
- &:hover {
- background-color: #ffffff05;
- }
- }
- </style>
|