| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375 |
- <script setup>
- import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
- import * as echarts from 'echarts'
- import { Odometer, CircleCheckFilled, VideoCameraFilled, WarnTriangleFilled } from '@element-plus/icons-vue'
- import { wgs84ToBd09 } from '@/utils/coordTransform'
- import { getGasDashboardSummary, getGisPipeLines } from '@/api/pipeNetwork/basic'
- const nowText = ref('2025/12/31 12:59:59')
- const weekText = ref('星期三')
- const mapError = ref('')
- const loading = ref(false)
- // ========== 仪表盘数据 ==========
- const dashboardData = ref({})
- const baseCards = computed(() => {
- const bs = dashboardData.value.baseStats || {}
- return [
- { label: '燃气设备', value: bs.totalEquipments || 0, unit: '台', icon: Odometer, color: '#60b8ff' },
- { label: '在线设备', value: bs.onlineEquipments || 0, unit: '台', icon: CircleCheckFilled, color: '#52e0a8' },
- { label: '离线设备', value: bs.offlineEquipments || 0, unit: '台', icon: VideoCameraFilled, color: '#ff8e8e' },
- { label: '异常设备', value: bs.alarmCount || 0, unit: '台', icon: WarnTriangleFilled, color: '#ffb54d' }
- ]
- })
- const operationSummary = computed(() => {
- const ps = dashboardData.value.pipeStats || {}
- return [
- { label: '管网总长度', value: (ps.totalLength || 0) + 'km' },
- { label: '燃气管网', value: (ps.gasNetworks || 0) + '条' }
- ]
- })
- const repairRecords = computed(() => {
- const list = dashboardData.value.repairTrend || []
- if (list.length > 0) return list
- return [
- { month: '1月', value: 0 }, { month: '2月', value: 0 }, { month: '3月', value: 0 },
- { month: '4月', value: 0 }, { month: '5月', value: 0 }, { month: '6月', value: 0 }
- ]
- })
- const pointRows = computed(() => {
- const list = dashboardData.value.pointRows || []
- return list.length > 0 ? list : [{ id: 1, name: '暂无数据', time: '--', value: '--', status: '离线' }]
- })
- const equipmentRows = computed(() => {
- const list = dashboardData.value.equipmentRows || []
- return list.length > 0 ? list : [{ id: 1, name: '暂无数据', code: '--', location: '--', status: '--' }]
- })
- const warningRows = computed(() => {
- const list = dashboardData.value.warningRows || []
- return list.length > 0 ? list : [{ level: '中', title: '暂无告警', code: '--', time: '--:--:--', desc: '当前无告警信息', tag: '正常' }]
- })
- const hazardSummary = computed(() => {
- const map = dashboardData.value.hazardStats || {}
- return [
- { label: '重大隐患', value: map['重大隐患'] || 0, color: '#ff3030' },
- { label: '较大隐患', value: map['较大隐患'] || 0, color: '#ff9f1a' },
- { label: '一般隐患', value: map['一般隐患'] || 0, color: '#f3e64d' }
- ]
- })
- const mapKpis = computed(() => {
- const bs = dashboardData.value.baseStats || {}
- const es = dashboardData.value.equipmentStats || {}
- const onlineRate = bs.onlineRate
- const avgPressure = es.avgPressure
- return [
- { label: '在线率', value: onlineRate != null ? Number(onlineRate).toFixed(1) + '%' : '--' },
- { label: '压力均值', value: avgPressure != null ? Number(avgPressure).toFixed(2) + 'MPa' : '--' },
- { label: '今日告警', value: (es.todayAlarm || 0) + '条' }
- ]
- })
- /** 压力最新采集时间,用于说明均值取自哪个时刻 */
- const pressureTimeText = computed(() => {
- const text = dashboardData.value.pressureUpdatedAt
- if (!text) return '--'
- return text.length > 8 ? text.slice(-8) : text
- })
- const mapWrapRef = ref(null)
- const repairChartRef = ref(null)
- const hazardChartRef = ref(null)
- let mapInstance = null
- let repairChart = null
- let hazardChart = null
- let clockTimer = null
- function formatWeek(day) {
- return ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'][day]
- }
- function pad(value) {
- return String(value).padStart(2, '0')
- }
- function updateClock() {
- const now = new Date()
- nowText.value = `${now.getFullYear()}/${pad(now.getMonth() + 1)}/${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`
- weekText.value = formatWeek(now.getDay())
- }
- function initRepairChart() {
- if (!repairChartRef.value) return
- // 定时刷新时复用已有实例,避免整块图表重建闪烁
- if (!repairChart) {
- repairChart = echarts.init(repairChartRef.value)
- }
- const data = repairRecords.value
- repairChart.setOption({
- grid: { left: 30, right: 12, top: 20, bottom: 24, containLabel: true },
- xAxis: {
- type: 'category',
- data: data.map(item => item.month),
- axisLine: { lineStyle: { color: 'rgba(91, 167, 219, 0.8)' } },
- axisLabel: { color: '#d2efff' }
- },
- yAxis: {
- type: 'value',
- splitLine: { lineStyle: { color: 'rgba(91, 167, 219, 0.18)' } },
- axisLine: { show: false },
- axisLabel: { color: '#d2efff' }
- },
- tooltip: { trigger: 'axis' },
- series: [{
- type: 'bar',
- barWidth: 24,
- data: data.map(item => item.value),
- itemStyle: {
- borderRadius: [6, 6, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#38d8ff' },
- { offset: 1, color: '#166dff' }
- ])
- }
- }]
- })
- }
- function initHazardChart() {
- if (!hazardChartRef.value) return
- if (!hazardChart) {
- hazardChart = echarts.init(hazardChartRef.value)
- }
- const data = hazardSummary.value
- hazardChart.setOption({
- grid: { left: 18, right: 18, top: 10, bottom: 10, containLabel: true },
- xAxis: {
- type: 'value',
- splitLine: { show: false },
- axisLine: { show: false },
- axisTick: { show: false },
- axisLabel: { show: false }
- },
- yAxis: {
- type: 'category',
- data: data.map(item => item.label),
- axisLine: { show: false },
- axisTick: { show: false },
- axisLabel: { color: '#d2efff', fontSize: 13 }
- },
- tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
- series: [{
- type: 'bar',
- data: data.map(item => ({ value: item.value, itemStyle: { color: item.color, borderRadius: 10 } })),
- barWidth: 14,
- label: { show: true, position: 'right', color: '#fff', fontWeight: 'bold' },
- showBackground: true,
- backgroundStyle: { color: 'rgba(255,255,255,0.08)', borderRadius: 10 }
- }]
- })
- }
- function waitForBMapGL() {
- return new Promise((resolve, reject) => {
- if (window.BMapGL) {
- resolve(window.BMapGL)
- return
- }
- let attempts = 0
- const timer = setInterval(() => {
- attempts += 1
- if (window.BMapGL) {
- clearInterval(timer)
- resolve(window.BMapGL)
- return
- }
- if (attempts >= 100) {
- clearInterval(timer)
- reject(new Error('百度地图加载超时'))
- }
- }, 200)
- })
- }
- /** 管网状态 → 线条颜色,取值见字典 pipe_network_status:0 正常 / 1 维护中 / 2 异常 */
- const PIPE_STATUS_COLOR = { 0: '#ff4d4f', 1: '#ffb020', 2: '#ff1f1f' }
- /** 压力点状态 → 标签配色 */
- const PRESSURE_STATUS_STYLE = {
- normal: { border: 'rgba(82, 224, 168, 0.75)', text: '#d8ffe9' },
- warning: { border: 'rgba(255, 181, 77, 0.85)', text: '#ffe9c7' },
- danger: { border: 'rgba(255, 48, 48, 0.9)', text: '#ffd6d6' },
- offline: { border: 'rgba(150, 170, 190, 0.7)', text: '#cfd8e3' }
- }
- /** 地图叠加物,刷新时整体清除后重画 */
- let pipeOverlays = []
- let pressureOverlays = []
- function clearOverlays(overlays) {
- if (mapInstance) {
- overlays.forEach(overlay => mapInstance.removeOverlay(overlay))
- }
- return []
- }
- /**
- * 绘制燃气管段
- *
- * 燃气管网每条记录只有起终点坐标,按状态着色,不再逐点画装饰圆(数百条管段会拖慢地图)。
- */
- function drawPipelines(BMapGL, features) {
- pipeOverlays = clearOverlays(pipeOverlays)
- features.forEach(feature => {
- const props = feature.properties || {}
- const coordinates = feature.geometry && feature.geometry.coordinates
- if (!Array.isArray(coordinates) || coordinates.length < 2) return
- const path = coordinates
- .map(([lng, lat]) => {
- const [bdLng, bdLat] = wgs84ToBd09(Number(lng), Number(lat))
- return new BMapGL.Point(bdLng, bdLat)
- })
- .filter(point => !Number.isNaN(point.lng) && !Number.isNaN(point.lat))
- if (path.length < 2) return
- const status = String(props.status == null ? '' : props.status)
- const line = new BMapGL.Polyline(path, {
- strokeColor: PIPE_STATUS_COLOR[status] || PIPE_STATUS_COLOR[0],
- strokeWeight: status === '2' ? 5 : 4,
- strokeOpacity: 0.92
- })
- mapInstance.addOverlay(line)
- pipeOverlays.push(line)
- })
- }
- /**
- * 绘制压力监测点,标签显示站点名称与最新压力值
- */
- function drawPressurePoints(BMapGL, points) {
- pressureOverlays = clearOverlays(pressureOverlays)
- points.forEach(point => {
- const lng = Number(point.lng)
- const lat = Number(point.lat)
- if (!lng || !lat) return
- const [bdLng, bdLat] = wgs84ToBd09(lng, lat)
- const position = new BMapGL.Point(bdLng, bdLat)
- const marker = new BMapGL.Marker(position)
- mapInstance.addOverlay(marker)
- pressureOverlays.push(marker)
- const style = PRESSURE_STATUS_STYLE[String(point.status || 'normal')] || PRESSURE_STATUS_STYLE.normal
- const pressureText = point.latestPressure == null
- ? '--'
- : (Number(point.latestPressure) / 1000).toFixed(2) + 'MPa'
- const label = new BMapGL.Label(`${point.name || '压力点'} ${pressureText}`, {
- offset: new BMapGL.Size(-48, -44)
- })
- label.setPosition(position)
- label.setStyle({
- color: style.text,
- background: 'rgba(12, 46, 82, 0.86)',
- border: `1px solid ${style.border}`,
- borderRadius: '8px',
- padding: '5px 9px',
- fontSize: '12px',
- lineHeight: '16px',
- whiteSpace: 'nowrap'
- })
- mapInstance.addOverlay(label)
- pressureOverlays.push(label)
- })
- }
- /** 按管网实际范围自动缩放,只有一条管段时按固定级别定位 */
- function fitPipeView(BMapGL, features) {
- const points = []
- features.forEach(feature => {
- const coordinates = feature.geometry && feature.geometry.coordinates
- if (!Array.isArray(coordinates)) return
- coordinates.forEach(([lng, lat]) => {
- const [bdLng, bdLat] = wgs84ToBd09(Number(lng), Number(lat))
- points.push(new BMapGL.Point(bdLng, bdLat))
- })
- })
- if (!points.length) return
- if (points.length === 1) {
- mapInstance.centerAndZoom(points[0], 16)
- return
- }
- mapInstance.setViewport(points)
- }
- /** 拉取燃气管网数据并上图 */
- async function loadPipeLines(BMapGL) {
- try {
- const res = await getGisPipeLines({ networkType: '0' })
- const features = (res.data && res.data.features) || []
- if (!features.length) {
- mapError.value = '暂无燃气管网坐标数据,请先在管网基础数据中补齐起终点经纬度。'
- return
- }
- mapError.value = ''
- drawPipelines(BMapGL, features)
- fitPipeView(BMapGL, features)
- } catch (error) {
- console.error('[燃气大屏] 加载燃气管网失败', error)
- mapError.value = '燃气管网数据加载失败,请稍后重试。'
- }
- }
- async function initMap() {
- if (!mapWrapRef.value) return
- try {
- const BMapGL = await waitForBMapGL()
- mapInstance = new BMapGL.Map(mapWrapRef.value, { enableMapClick: true })
- const center = new BMapGL.Point(110.3965, 28.4638)
- mapInstance.centerAndZoom(center, 15)
- mapInstance.enableScrollWheelZoom(true)
- mapInstance.setMapStyleV2({ styleId: 'a0f4e6e6f9e7a6c5d8e7f7e7f7e7f7e5' })
- drawPressurePoints(BMapGL, dashboardData.value.pressurePoints || [])
- await loadPipeLines(BMapGL)
- } catch (error) {
- mapError.value = '百度地图加载失败,请检查地图脚本或网络连接。'
- }
- }
- /** 定时刷新压力点位,不重建底图 */
- function refreshPressureLayer() {
- if (!mapInstance || !window.BMapGL) return
- drawPressurePoints(window.BMapGL, dashboardData.value.pressurePoints || [])
- }
- function handleResize() {
- repairChart?.resize()
- hazardChart?.resize()
- }
- /** 仪表盘刷新间隔(毫秒),压力点位与在线率按此周期同步最新采集值 */
- const REFRESH_INTERVAL = 30 * 1000
- let refreshTimer = null
- async function loadDashboardData(silent = false) {
- if (!silent) loading.value = true
- try {
- const res = await getGasDashboardSummary()
- dashboardData.value = res.data || {}
- refreshPressureLayer()
- if (silent) {
- initRepairChart()
- initHazardChart()
- }
- } catch (e) {
- console.error('[燃气大屏] 加载仪表盘数据失败', e)
- } finally {
- if (!silent) loading.value = false
- }
- }
- onMounted(async () => {
- updateClock()
- clockTimer = window.setInterval(updateClock, 1000)
- await loadDashboardData()
- await nextTick()
- initRepairChart()
- initHazardChart()
- await initMap()
- refreshTimer = window.setInterval(() => loadDashboardData(true), REFRESH_INTERVAL)
- window.addEventListener('resize', handleResize)
- })
- onBeforeUnmount(() => {
- if (clockTimer) window.clearInterval(clockTimer)
- if (refreshTimer) window.clearInterval(refreshTimer)
- window.removeEventListener('resize', handleResize)
- repairChart?.dispose()
- hazardChart?.dispose()
- pipeOverlays = []
- pressureOverlays = []
- mapInstance = null
- })
- </script>
- <template>
- <div class="gas-home-screen">
- <div class="screen-header">
- <div class="header-time">{{ nowText }} {{ weekText }}</div>
- <div class="header-title-wrap">
- <div class="header-title">燃气管网安全运行监测系统</div>
- <div class="header-subtitle">Gas Pipeline Operation Dashboard</div>
- </div>
- <div class="header-tags">
- <span class="header-tag">实时监测</span>
- <span class="header-tag">管网运行</span>
- <span class="header-tag">隐患预警</span>
- </div>
- </div>
- <div class="screen-body">
- <div class="side-panel left-panel">
- <section class="panel-card base-card">
- <div class="panel-title">基础概况</div>
- <div class="base-grid">
- <div v-for="item in baseCards" :key="item.label" class="base-item">
- <div class="base-icon" :style="{ background: item.color }">
- <component :is="item.icon" class="base-icon-svg" />
- </div>
- <div class="base-text">
- <div class="base-label">{{ item.label }}</div>
- <div class="base-value">{{ item.value }}<span>{{ item.unit }}</span></div>
- </div>
- </div>
- </div>
- </section>
- <section class="panel-card">
- <div class="panel-title">维修趋势</div>
- <div ref="repairChartRef" class="chart-box repair-chart"></div>
- </section>
- <section class="panel-card table-card">
- <div class="panel-title">监测点数据</div>
- <div class="table-wrap">
- <table class="data-table">
- <thead>
- <tr>
- <th>序号</th>
- <th>监测点</th>
- <th>时间</th>
- <th>数值</th>
- <th>状态</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="row in pointRows" :key="row.id">
- <td>{{ row.id }}</td>
- <td :title="`${row.name || '-'} / ${row.deviceName || row.deviceCode || '-'}`">{{ row.name }} / {{ row.deviceName || row.deviceCode || '-' }}</td>
- <td :title="row.time">{{ row.time }}</td>
- <td :title="row.value">{{ row.value }}</td>
- <td :class="['status-cell', row.status === '在线' ? 'ok' : row.status === '预警' ? 'warn' : 'off']">{{ row.status }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </section>
- </div>
- <div class="center-panel">
- <div class="map-stage">
- <!-- 管网、在线率、压力、告警合并为一条指标条,按份均分宽度,窄屏也不会溢出 -->
- <div class="map-stage-top">
- <div v-for="item in operationSummary" :key="item.label" class="summary-item">
- <span class="summary-label">{{ item.label }}</span>
- <strong class="summary-value">{{ item.value }}</strong>
- </div>
- <div v-for="item in mapKpis" :key="item.label" class="map-kpi">
- <span>{{ item.label }}</span>
- <strong>{{ item.value }}</strong>
- </div>
- </div>
- <div ref="mapWrapRef" class="map-view"></div>
- <div v-if="mapError" class="map-error">{{ mapError }}</div>
- <div class="map-panel info-panel">
- <div class="mini-title">当前管网信息</div>
- <div class="mini-row"><span>管网总长度</span><strong>{{ (dashboardData.pipeStats && dashboardData.pipeStats.totalLength) || 0 }}km</strong></div>
- <div class="mini-row"><span>燃气管网</span><strong>{{ (dashboardData.pipeStats && dashboardData.pipeStats.gasNetworks) || 0 }}条</strong></div>
- <div class="mini-row"><span>设备总数</span><strong>{{ (dashboardData.equipmentStats && dashboardData.equipmentStats.totalEquipment) || 0 }}台</strong></div>
- <div class="mini-row" :title="dashboardData.pressureUpdatedAt || '暂无压力采集时间'">
- <span>压力采集</span><strong>{{ pressureTimeText }}</strong>
- </div>
- </div>
- <div class="map-panel point-panel">
- <div class="mini-title">当前管点信息</div>
- <div class="mini-row"><span>监测点总数</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.totalPoints) || 0 }}个</strong></div>
- <div class="mini-row"><span>在线监测点</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.onlinePoints) || 0 }}个</strong></div>
- <div class="mini-row"><span>离线监测点</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.offlinePoints) || 0 }}个</strong></div>
- </div>
- </div>
- </div>
- <div class="side-panel right-panel">
- <section class="panel-card">
- <div class="panel-title">设备运行</div>
- <div class="table-wrap equipment-wrap">
- <table class="data-table compact-table">
- <thead>
- <tr>
- <th>序号</th>
- <th>设备名称</th>
- <th>设备编号</th>
- <th>位置</th>
- <th>状态</th>
- </tr>
- </thead>
- <tbody>
- <tr v-for="row in equipmentRows" :key="row.id">
- <td>{{ row.id }}</td>
- <td>{{ row.name }}</td>
- <td>{{ row.code }}</td>
- <td>{{ row.location }}</td>
- <td>{{ row.status }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </section>
- <section class="panel-card warning-card">
- <div class="panel-title">告警动态</div>
- <div class="warning-scroll">
- <div class="warning-list">
- <div v-for="(item, index) in warningRows" :key="index" class="warning-item" :class="item.level === '高' ? 'danger' : 'notice'">
- <div class="warning-side">
- <div class="warning-badge">{{ item.level }}</div>
- <div class="warning-tag">{{ item.tag }}</div>
- </div>
- <div class="warning-main">
- <div class="warning-title-row">
- <span class="warning-title">{{ item.title }}</span>
- <span class="warning-time">{{ item.time }}</span>
- </div>
- <div class="warning-code">{{ item.code }}</div>
- <div class="warning-desc">{{ item.desc }}</div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <section class="panel-card hazard-card">
- <div class="panel-title">隐患统计</div>
- <div class="hazard-summary three-col">
- <div v-for="item in hazardSummary" :key="item.label" class="hazard-summary-item">
- <span class="hazard-dot" :style="{ background: item.color }"></span>
- <span>{{ item.label }}</span>
- <strong :style="{ color: item.color }">{{ item.value }}项</strong>
- </div>
- </div>
- <div ref="hazardChartRef" class="chart-box hazard-chart"></div>
- </section>
- </div>
- </div>
- <a href="https://deerflow.tech" target="_blank" class="deerflow-mark" title="Created By Deerflow">
- <span class="deerflow-diamond">◆</span>
- <span class="deerflow-text">Deerflow</span>
- </a>
- </div>
- </template>
- <style scoped lang="scss">
- .gas-home-screen {
- min-height: 100vh;
- color: #fff;
- background:
- linear-gradient(180deg, rgba(14, 42, 70, 0.96), rgba(8, 20, 37, 1)),
- radial-gradient(circle at center, rgba(36, 122, 184, 0.18), transparent 58%),
- #081425;
- position: relative;
- }
- .gas-home-screen::before {
- content: '';
- position: absolute;
- inset: 0;
- pointer-events: none;
- z-index: 0;
- background:
- radial-gradient(circle at 28% 32%, rgba(56, 216, 255, 0.06) 0%, transparent 45%),
- radial-gradient(circle at 72% 58%, rgba(22, 109, 255, 0.05) 0%, transparent 40%),
- radial-gradient(circle at 50% 85%, rgba(56, 216, 255, 0.04) 0%, transparent 35%);
- animation: bgPulse 8s ease-in-out infinite alternate;
- }
- @keyframes bgPulse {
- 0% { opacity: 0.6; }
- 100% { opacity: 1; }
- }
- .screen-header {
- height: 72px;
- padding: 0 24px;
- display: grid;
- grid-template-columns: 320px 1fr 320px;
- align-items: center;
- position: relative;
- z-index: 1;
- background: linear-gradient(90deg, rgba(27, 98, 155, 0.95), rgba(18, 53, 98, 0.95));
- border-bottom: 1px solid rgba(93, 194, 255, 0.28);
- }
- .screen-header::after {
- content: '';
- position: absolute;
- bottom: -1px;
- left: 5%;
- width: 90%;
- height: 1px;
- background: linear-gradient(90deg, transparent, rgba(56, 216, 255, 0.7), rgba(22, 109, 255, 0.7), transparent);
- animation: headerGlow 4s ease-in-out infinite alternate;
- }
- @keyframes headerGlow {
- 0% { opacity: 0.4; }
- 100% { opacity: 1; }
- }
- .header-time {
- font-size: 18px;
- font-weight: 700;
- letter-spacing: 1.5px;
- color: #ddf6ff;
- font-variant-numeric: tabular-nums;
- text-shadow: 0 0 18px rgba(56, 216, 255, 0.35);
- }
- .header-title-wrap {
- text-align: center;
- }
- .header-title {
- font-size: 30px;
- font-weight: 800;
- letter-spacing: 3px;
- background: linear-gradient(180deg, #e8f6ff 0%, #8fd6ff 100%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
- }
- .header-subtitle {
- margin-top: 4px;
- color: rgba(196, 234, 255, 0.65);
- font-size: 11px;
- letter-spacing: 3px;
- text-transform: uppercase;
- }
- .header-tags {
- display: flex;
- justify-content: flex-end;
- gap: 8px;
- }
- .header-tag {
- padding: 6px 14px;
- border: 1px solid rgba(117, 206, 255, 0.35);
- border-radius: 16px;
- color: #d8f5ff;
- background: rgba(13, 77, 128, 0.45);
- font-size: 12px;
- letter-spacing: 1px;
- transition: all 0.3s;
- cursor: default;
- }
- .header-tag:hover {
- border-color: rgba(117, 206, 255, 0.7);
- background: rgba(13, 77, 128, 0.65);
- box-shadow: 0 0 16px rgba(56, 216, 255, 0.15);
- }
- .screen-body {
- height: calc(100vh - 72px);
- padding: 12px;
- display: grid;
- grid-template-columns: 360px 1fr 360px;
- gap: 12px;
- position: relative;
- z-index: 1;
- }
- .side-panel,
- .center-panel {
- min-height: 0;
- }
- .left-panel,
- .right-panel {
- display: grid;
- gap: 12px;
- }
- .left-panel {
- grid-template-rows: 220px 220px 1fr;
- }
- .right-panel {
- grid-template-rows: 250px 260px 1fr;
- }
- .panel-card {
- min-height: 0;
- padding: 14px;
- position: relative;
- background: linear-gradient(180deg, rgba(13, 33, 56, 0.88), rgba(10, 25, 42, 0.88));
- border: 1px solid rgba(65, 158, 219, 0.22);
- border-radius: 12px;
- box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
- transition: border-color 0.4s;
- }
- .panel-card::after {
- content: '';
- position: absolute;
- top: -1px;
- left: 20px;
- right: 20px;
- height: 1px;
- border-radius: 1px;
- background: linear-gradient(90deg, transparent, rgba(56, 216, 255, 0.25), transparent);
- pointer-events: none;
- }
- .panel-card:hover {
- border-color: rgba(65, 158, 219, 0.38);
- }
- .panel-title {
- position: relative;
- padding-left: 16px;
- margin-bottom: 14px;
- color: #8fe5ff;
- font-size: 18px;
- font-weight: 800;
- letter-spacing: 1px;
- }
- .panel-title::before {
- content: '';
- position: absolute;
- left: 0;
- top: 3px;
- width: 4px;
- height: 20px;
- border-radius: 2px;
- background: linear-gradient(180deg, #28d7ff, #1776ff);
- box-shadow: 0 0 10px rgba(40, 215, 255, 0.5);
- }
- .base-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 14px;
- }
- .base-card {
- background: linear-gradient(180deg, rgba(10, 30, 53, 0.95), rgba(9, 24, 42, 0.95));
- }
- .base-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 12px;
- }
- .base-item {
- display: flex;
- align-items: center;
- gap: 14px;
- min-height: 72px;
- padding: 14px;
- border-radius: 14px;
- background: linear-gradient(180deg, rgba(20, 57, 89, 0.45), rgba(18, 44, 72, 0.35));
- border: 1px solid rgba(97, 190, 255, 0.12);
- transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
- cursor: default;
- position: relative;
- overflow: hidden;
- }
- .base-item::before {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: 14px;
- background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.03), transparent 70%);
- pointer-events: none;
- transition: opacity 0.35s;
- opacity: 0;
- }
- .base-item:hover {
- transform: translateY(-2px);
- border-color: rgba(97, 190, 255, 0.35);
- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(97, 190, 255, 0.1) inset;
- }
- .base-item:hover::before {
- opacity: 1;
- }
- .base-icon {
- width: 48px;
- height: 48px;
- border-radius: 16px;
- display: flex;
- align-items: center;
- justify-content: center;
- flex: 0 0 48px;
- position: relative;
- transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
- }
- .base-item:hover .base-icon {
- transform: scale(1.08);
- box-shadow: 0 0 28px rgba(56, 216, 255, 0.3);
- }
- .base-icon-svg {
- width: 26px;
- height: 26px;
- color: #fff;
- transition: transform 0.35s;
- }
- .base-item:hover .base-icon-svg {
- transform: scale(1.1);
- }
- .base-text {
- min-width: 0;
- }
- .base-label {
- color: #c0dff5;
- font-size: 12px;
- letter-spacing: 1px;
- text-transform: uppercase;
- }
- .base-value {
- margin-top: 4px;
- color: #fff;
- font-size: 32px;
- font-weight: 800;
- line-height: 1;
- font-variant-numeric: tabular-nums;
- letter-spacing: -0.5px;
- }
- .base-value span {
- margin-left: 4px;
- color: #90d9ff;
- font-size: 12px;
- font-weight: 500;
- letter-spacing: 0;
- }
- .chart-box {
- width: 100%;
- height: calc(100% - 36px);
- }
- .table-card,
- .warning-card,
- .hazard-card {
- overflow: hidden;
- }
- .table-wrap {
- height: calc(100% - 38px);
- overflow: auto;
- }
- .data-table {
- width: 100%;
- border-collapse: collapse;
- table-layout: fixed;
- }
- .data-table thead {
- background: rgba(24, 122, 198, 0.55);
- }
- .data-table thead th {
- font-weight: 700;
- letter-spacing: 0.5px;
- color: #b9e4ff;
- }
- .data-table th,
- .data-table td {
- padding: 10px 6px;
- color: #f4fbff;
- text-align: center;
- font-size: 13px;
- border-bottom: 1px solid rgba(130, 194, 231, 0.1);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .data-table tbody tr {
- transition: background 0.25s;
- }
- .data-table tbody tr:nth-child(odd) {
- background: rgba(133, 196, 242, 0.10);
- }
- .data-table tbody tr:nth-child(even) {
- background: rgba(133, 196, 242, 0.04);
- }
- .data-table tbody tr:hover {
- background: rgba(56, 216, 255, 0.12);
- }
- .compact-table th,
- .compact-table td {
- padding: 9px 4px;
- }
- .status-cell.ok {
- color: #6effc4;
- position: relative;
- }
- .status-cell.warn {
- color: #ffe16a;
- }
- .status-cell.off {
- color: #ff8e8e;
- }
- .status-cell::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 50%;
- margin-right: 6px;
- vertical-align: middle;
- }
- .status-cell.ok::before {
- background: #6effc4;
- box-shadow: 0 0 6px rgba(110, 255, 196, 0.6);
- }
- .status-cell.warn::before {
- background: #ffe16a;
- box-shadow: 0 0 6px rgba(255, 225, 106, 0.6);
- }
- .status-cell.off::before {
- background: #ff8e8e;
- box-shadow: 0 0 6px rgba(255, 142, 142, 0.6);
- }
- .center-panel {
- position: relative;
- }
- .map-stage {
- position: relative;
- height: 100%;
- overflow: hidden;
- border-radius: 12px;
- border: 1px solid rgba(56, 159, 223, 0.2);
- background: rgba(8, 20, 37, 0.64);
- box-shadow: 0 0 40px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(8, 30, 60, 0.3);
- }
- .map-stage-top {
- position: absolute;
- top: 14px;
- left: 14px;
- right: 14px;
- z-index: 3;
- display: flex;
- align-items: stretch;
- gap: 8px;
- pointer-events: none;
- }
- .summary-item,
- .map-kpi {
- flex: 1 1 0;
- min-width: 0;
- padding: 8px 10px;
- border-radius: 10px;
- background: rgba(8, 31, 54, 0.82);
- border: 1px solid rgba(79, 177, 238, 0.18);
- backdrop-filter: blur(8px);
- transition: all 0.3s;
- overflow: hidden;
- }
- .summary-label,
- .map-kpi span {
- display: block;
- color: #91d7ff;
- font-size: 12px;
- letter-spacing: 0.5px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .summary-value,
- .map-kpi strong {
- display: block;
- margin-top: 4px;
- color: #fff;
- font-size: 20px;
- font-weight: 800;
- letter-spacing: 0.5px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .map-view {
- width: 100%;
- height: 100%;
- }
- .map-error {
- position: absolute;
- inset: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #ffd3d3;
- background: rgba(5, 10, 20, 0.72);
- z-index: 4;
- }
- .map-panel {
- position: absolute;
- z-index: 3;
- width: 190px;
- padding: 14px;
- border-radius: 12px;
- background: rgba(8, 31, 54, 0.82);
- border: 1px solid rgba(79, 177, 238, 0.18);
- backdrop-filter: blur(10px);
- }
- .info-panel {
- left: 18px;
- bottom: 20px;
- }
- .point-panel {
- right: 18px;
- bottom: 20px;
- }
- .mini-title {
- margin-bottom: 10px;
- color: #8fe5ff;
- font-size: 14px;
- font-weight: 700;
- letter-spacing: 0.5px;
- }
- .mini-row {
- display: flex;
- justify-content: space-between;
- margin-top: 6px;
- padding: 4px 0;
- color: #d6efff;
- font-size: 13px;
- border-bottom: 1px solid rgba(130, 194, 231, 0.06);
- }
- .mini-row:last-child {
- border-bottom: none;
- }
- .warning-scroll {
- height: calc(100% - 38px);
- overflow-y: auto;
- padding-right: 4px;
- }
- .warning-scroll::-webkit-scrollbar {
- width: 5px;
- }
- .warning-scroll::-webkit-scrollbar-thumb {
- border-radius: 999px;
- background: rgba(96, 180, 235, 0.3);
- }
- .warning-scroll::-webkit-scrollbar-track {
- background: transparent;
- }
- .warning-list {
- display: grid;
- gap: 10px;
- }
- .warning-item {
- display: flex;
- gap: 12px;
- align-items: stretch;
- padding: 14px;
- border-radius: 14px;
- border: 1px solid rgba(255, 108, 108, 0.1);
- background: linear-gradient(180deg, rgba(72, 24, 38, 0.42), rgba(49, 19, 31, 0.30));
- transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
- position: relative;
- overflow: hidden;
- }
- .warning-item::before {
- content: '';
- position: absolute;
- left: 0;
- top: 12px;
- bottom: 12px;
- width: 3px;
- border-radius: 0 3px 3px 0;
- transition: all 0.35s;
- }
- .warning-item.danger::before {
- background: linear-gradient(180deg, #ff5858, #ff3030);
- box-shadow: 0 0 12px rgba(255, 58, 58, 0.5);
- animation: dangerPulse 2s ease-in-out infinite;
- }
- .warning-item.notice::before {
- background: linear-gradient(180deg, #ffc635, #ff9f1a);
- box-shadow: 0 0 10px rgba(255, 198, 53, 0.35);
- }
- @keyframes dangerPulse {
- 0%, 100% { opacity: 0.6; }
- 50% { opacity: 1; }
- }
- .warning-item:hover {
- transform: translateX(3px);
- }
- .warning-item.danger:hover {
- border-color: rgba(255, 108, 108, 0.25);
- box-shadow: 0 4px 20px rgba(255, 58, 58, 0.1);
- }
- .warning-item.notice:hover {
- border-color: rgba(255, 201, 92, 0.2);
- box-shadow: 0 4px 20px rgba(255, 198, 53, 0.08);
- }
- .warning-item.notice {
- border-color: rgba(255, 201, 92, 0.1);
- background: linear-gradient(180deg, rgba(78, 63, 23, 0.28), rgba(48, 43, 20, 0.18));
- }
- .warning-side {
- width: 52px;
- flex: 0 0 52px;
- display: flex;
- flex-direction: column;
- gap: 8px;
- align-items: center;
- }
- .warning-badge {
- width: 34px;
- height: 34px;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- font-weight: 800;
- color: #fff;
- transition: transform 0.3s;
- }
- .warning-item:hover .warning-badge {
- transform: scale(1.1);
- }
- .warning-tag {
- width: 100%;
- padding: 3px 0;
- border-radius: 999px;
- text-align: center;
- font-size: 10px;
- letter-spacing: 0.5px;
- color: #dcefff;
- background: rgba(255, 255, 255, 0.06);
- }
- .warning-item.danger .warning-badge {
- background: rgba(255, 58, 58, 0.28);
- color: #ff8787;
- }
- .warning-item.danger .warning-title {
- color: #ffd8d8;
- }
- .warning-item.notice .warning-badge {
- background: rgba(255, 198, 53, 0.2);
- color: #ffd45d;
- }
- .warning-item.notice .warning-title {
- color: #fff2c4;
- }
- .warning-main {
- min-width: 0;
- flex: 1;
- }
- .warning-title-row {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 8px;
- }
- .warning-title {
- font-weight: 700;
- font-size: 16px;
- line-height: 1.2;
- }
- .warning-time,
- .warning-code,
- .warning-desc {
- color: #dcefff;
- font-size: 12px;
- }
- .warning-time {
- color: #b6dfff;
- white-space: nowrap;
- }
- .warning-code {
- margin: 6px 0 4px;
- color: #9ad8ff;
- }
- .warning-desc {
- line-height: 1.5;
- }
- .hazard-summary {
- display: flex;
- gap: 12px;
- margin-bottom: 10px;
- }
- .hazard-summary.three-col {
- justify-content: space-between;
- }
- .hazard-summary-item {
- display: flex;
- align-items: center;
- gap: 8px;
- font-size: 13px;
- padding: 8px 12px;
- border-radius: 10px;
- background: rgba(255, 255, 255, 0.03);
- border: 1px solid rgba(255, 255, 255, 0.04);
- transition: all 0.3s;
- }
- .hazard-summary-item:hover {
- background: rgba(255, 255, 255, 0.06);
- border-color: rgba(255, 255, 255, 0.08);
- }
- .hazard-dot {
- width: 8px;
- height: 24px;
- display: inline-block;
- border-radius: 4px;
- box-shadow: 0 0 10px currentColor;
- }
- .hazard-chart {
- height: 160px;
- }
- .equipment-wrap {
- height: calc(100% - 38px);
- }
- :deep(.BMap_cpyCtrl),
- :deep(.anchorBL) {
- display: none !important;
- }
- .deerflow-mark {
- position: fixed;
- bottom: 14px;
- right: 18px;
- z-index: 10;
- display: flex;
- align-items: center;
- gap: 6px;
- text-decoration: none;
- opacity: 0.28;
- transition: opacity 0.4s;
- }
- .deerflow-mark:hover {
- opacity: 0.6;
- }
- .deerflow-diamond {
- font-size: 10px;
- color: #8fe5ff;
- }
- .deerflow-text {
- font-size: 11px;
- letter-spacing: 1px;
- color: #8fe5ff;
- font-weight: 500;
- }
- @media (max-width: 1500px) {
- .screen-body {
- grid-template-columns: 320px 1fr 320px;
- }
- .header-title {
- font-size: 24px;
- }
- .summary-item,
- .map-kpi {
- min-width: 0;
- padding: 7px 8px;
- }
- .summary-label,
- .map-kpi span {
- font-size: 11px;
- }
- .summary-value,
- .map-kpi strong {
- font-size: 16px;
- }
- }
- </style>
|