| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- <template>
- <div class="ignition-view overview-view">
- <!-- 左:矿井采空区概览 -->
- <Module class="overview-module" :x="20" :y="114" :width="393" :height="576" title="矿井采空区概览">
- <div class="overview-panel">
- <div v-for="item in overview" :key="item.label" class="goaf-item">
- <span class="goaf-icon">
- <img src="@/assets/images/vent/home/selfIgnition/goaf-icon.svg" alt="" />
- </span>
- <span class="goaf-label">{{ item.label }}:</span>
- <span class="goaf-value">{{ item.value }}</span>
- </div>
- </div>
- </Module>
- <!-- 左下:安装设备情况 -->
- <Module class="install-module" :x="20" :y="722" :width="393" :height="336" title="安装设备情况">
- <div class="install-panel">
- <div
- v-for="(device, index) in devices"
- :key="`${device.name}-${index}`"
- class="install-item"
- :class="index % 2 === 0 ? 'is-blue' : 'is-green'"
- >
- <span class="install-icon">
- <img v-if="deviceIcon(device.name)" :src="deviceIcon(device.name)" alt="" />
- </span>
- <span class="install-name">{{ device.name }}</span>
- <span class="install-metric"
- >安装:<em>{{ device.installed }}</em
- >套</span
- >
- <span class="install-metric"
- >运行:<em>{{ device.running }}</em
- >套</span
- >
- </div>
- </div>
- </Module>
- <!-- 右下:分级预警表 -->
- <Module class="table-module" :x="433" :y="722" :width="1465" :height="336" title="矿井采空区分级预警">
- <div class="warning-table-panel">
- <div class="warning-table">
- <div class="table-head">
- <span class="col-index">序号</span>
- <span class="col-name">采空区名称</span>
- <span class="col-seam">所属煤层</span>
- <span class="col-level">预警等级</span>
- <span class="col-safety">安全评价等级</span>
- </div>
- <div class="table-body">
- <div v-for="row in warnings" :key="row.id" class="table-row">
- <span class="col-index">{{ row.id }}</span>
- <span class="col-name">{{ row.name }}</span>
- <span class="col-seam">{{ row.seam }}</span>
- <span class="col-level level-cell">
- <img v-if="row.level && row.level !== '未预警'" class="level-icon warning-icon" :src="warningLevelIcon" alt="" />
- <span :title="row.level">{{ row.level }}</span>
- </span>
- <span class="col-safety level-cell">
- <img v-if="showSafetyIcon(row.safetyLevel || row.level)" class="level-icon safety-icon" :src="safetyLevelIcon" alt="" />
- <span :title="row.safetyLevel || row.level">{{ row.safetyLevel || row.level }}</span>
- </span>
- </div>
- <div v-for="n in emptyRowCount" :key="`empty-${n}`" class="table-row table-row-empty"></div>
- </div>
- </div>
- </div>
- </Module>
- </div>
- </template>
- <script lang="ts" setup>
- import { computed } from 'vue';
- import Module from './Module.vue';
- import type { DeviceInstallItem, GoafOverviewItem, WarningRow } from '../data';
- import bundleMonitorIcon from '@/assets/images/vent/home/selfIgnition/install-bundle-monitor.svg';
- import fiberTemperatureIcon from '@/assets/images/vent/home/selfIgnition/install-fiber-temperature.svg';
- import sealedMonitorIcon from '@/assets/images/vent/home/selfIgnition/install-sealed-monitor.svg';
- import warningLevelIcon from '@/assets/images/vent/home/selfIgnition/level-warning.svg';
- import safetyLevelIcon from '@/assets/images/vent/home/selfIgnition/level-safety.svg';
- const props = defineProps<{
- overview: GoafOverviewItem[];
- devices: DeviceInstallItem[];
- warnings: WarningRow[];
- }>();
- const DEVICE_ICONS: Record<string, string> = {
- 束管监测: bundleMonitorIcon,
- 光纤测温: fiberTemperatureIcon,
- 密闭监测: sealedMonitorIcon,
- };
- function deviceIcon(name: string) {
- return DEVICE_ICONS[name] || '';
- }
- function showSafetyIcon(level: string | undefined) {
- return !!level && level !== '安全' && level !== '未评价';
- }
- // 表体固定 5 行视口,数据不足时用空行补足;超过 5 行时在表体内部滚动
- const emptyRowCount = computed(() => Math.max(0, 5 - props.warnings.length));
- </script>
- <style lang="less" scoped>
- @import '/@/views/vent/home/selfIgnition/scrollbar.less';
- .overview-view {
- position: absolute;
- inset: 0;
- }
- .overview-panel {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- gap: 24px;
- height: 100%;
- padding: 0px 10px 0px 20px;
- box-sizing: border-box;
- overflow-x: hidden;
- overflow-y: auto;
- scrollbar-gutter: stable;
- .scrollbar-cyan();
- }
- .goaf-item {
- position: relative;
- display: flex;
- align-items: center;
- flex: none;
- height: 48px;
- padding: 0 14px 0 60px;
- box-sizing: border-box;
- border: none;
- border-radius: 5px;
- overflow: hidden;
- background-color: #072b49;
- background-image: url('@/assets/images/vent/home/selfIgnition/card-bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- .goaf-icon {
- position: absolute;
- left: 2px;
- width: 50px;
- height: 50px;
- background: url('@/assets/images/vent/home/selfIgnition/list-icon-bg.png') no-repeat center / 100% 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- img {
- width: 20px;
- height: 15px;
- }
- }
- .goaf-label {
- flex: 1;
- color: #fff;
- font-size: 16px;
- font-weight: 600;
- letter-spacing: 0;
- }
- .goaf-value {
- display: inline-block;
- color: #eaffff;
- font-family: Arial, sans-serif;
- font-size: 19px;
- font-weight: 800;
- font-style: italic;
- line-height: 1;
- letter-spacing: 1px;
- transform: scaleX(1.2);
- transform-origin: right center;
- }
- .install-panel {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- height: 100%;
- padding: 8px 0;
- box-sizing: border-box;
- overflow-x: hidden;
- overflow-y: auto;
- .scrollbar-cyan();
- }
- .install-item {
- --install-icon-bg: url('@/assets/images/vent/home/selfIgnition/install-icon-blue.png');
- --install-name-bg: url('@/assets/images/vent/home/selfIgnition/install-name-blue.png');
- --install-metric-bg: url('@/assets/images/vent/home/selfIgnition/install-metric-blue.png');
- display: flex;
- align-items: center;
- flex: none;
- height: 69px;
- padding: 0 20px 0 12px;
- box-sizing: border-box;
- &.is-green {
- --install-icon-bg: url('@/assets/images/vent/home/selfIgnition/install-icon-green.png');
- --install-name-bg: url('@/assets/images/vent/home/selfIgnition/install-name-green.png');
- --install-metric-bg: url('@/assets/images/vent/home/selfIgnition/install-metric-green.png');
- }
- }
- .install-icon {
- position: relative;
- z-index: 4;
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 0 0 40px;
- width: 40px;
- height: 35px;
- margin-right: -32px;
- background: var(--install-icon-bg) no-repeat center / 100% 100%;
- img {
- width: 20px;
- height: 20px;
- }
- }
- .install-name {
- position: relative;
- z-index: 3;
- display: flex;
- align-items: center;
- flex: 0 0 124px;
- height: 34px;
- padding-left: 34px;
- box-sizing: border-box;
- background: var(--install-name-bg) no-repeat center / 100% 100%;
- color: #fff;
- font-size: 15px;
- font-weight: 600;
- letter-spacing: 0;
- white-space: nowrap;
- }
- .install-metric {
- position: relative;
- z-index: 1;
- display: flex;
- align-items: center;
- flex: 1 1 0;
- min-width: 0;
- height: 34px;
- margin-left: -9px;
- padding-left: 16px;
- box-sizing: border-box;
- background: var(--install-metric-bg) no-repeat center / 100% 100%;
- color: #eefcff;
- font-size: 15px;
- font-weight: 500;
- white-space: nowrap;
- & + & {
- z-index: 2;
- }
- em {
- margin: 0 2px;
- color: #3df6ff;
- font-family: Arial, sans-serif;
- font-style: italic;
- font-size: 18px;
- font-weight: 700;
- line-height: 1;
- text-shadow: 0 0 5px rgba(61, 246, 255, 0.45);
- }
- }
- .warning-table-panel {
- display: flex;
- flex-direction: column;
- height: 100%;
- padding: 8px 22px 0;
- box-sizing: border-box;
- }
- .warning-table {
- flex: 1 1 auto;
- height: 100%;
- min-height: 0;
- box-sizing: border-box;
- overflow-y: auto;
- border: 1px solid rgba(61, 246, 255, 0.55);
- background: rgba(6, 30, 52, 0.2);
- .scrollbar-cyan();
- }
- .table-head,
- .table-row {
- display: flex;
- align-items: center;
- text-align: center;
- }
- .table-head {
- position: sticky;
- top: 0;
- z-index: 1;
- height: 39px;
- box-sizing: border-box;
- color: #3df6ff;
- font-size: 15px;
- font-weight: 500;
- letter-spacing: 1px;
- background: #062441;
- border-bottom: 1px solid rgba(61, 246, 255, 0.5);
- }
- .table-row {
- height: 42px;
- box-sizing: border-box;
- color: #fff;
- font-size: 15px;
- background: #093354;
- border-top: 1px solid rgba(61, 246, 255, 0.14);
- &:nth-child(even) {
- background: #0d4167;
- }
- }
- .table-row-empty {
- color: transparent;
- }
- .col-index {
- width: 9%;
- }
- .col-name {
- width: 24%;
- }
- .col-seam {
- width: 18%;
- }
- .col-level {
- width: 24%;
- }
- .col-safety {
- width: 25%;
- }
- .level-cell {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 7px;
- min-width: 0;
- > span {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- .level-icon {
- flex: none;
- object-fit: contain;
- }
- .warning-icon {
- width: 14px;
- height: 14px;
- }
- .safety-icon {
- width: 12px;
- height: 15px;
- }
- </style>
|