WaterFacilityDashboard.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. <template>
  2. <div class="water-page">
  3. <div class="page-heading">
  4. <div class="page-title"><span class="page-title-icon"><el-icon><component :is="pageIcon" /></el-icon></span><div><h2>{{ title }}</h2><span class="muted">{{ view === 'gis' ? '设施分类图层、空间分布与详情联动' : '设施规模、状态与分类统计分析' }}</span></div></div>
  5. <div class="heading-actions">
  6. <template v-if="view === 'stats'">
  7. <el-select v-model="statusFilter" clearable placeholder="全部状态" class="status-select" @change="handleStatusChange">
  8. <el-option label="展示全部" value="" />
  9. <el-option v-for="option in statusOptions" :key="option.value" :label="option.label" :value="option.value" />
  10. </el-select>
  11. <el-checkbox-group v-model="selectedTypes" @change="handleTypeChange">
  12. <el-checkbox-button v-for="item in facilityTypes" :key="item.value" :value="item.value">{{ item.label }}</el-checkbox-button>
  13. </el-checkbox-group>
  14. </template>
  15. <el-checkbox-group v-if="view === 'gis'" v-model="selectedTypes" @change="loadData">
  16. <el-checkbox-button v-for="item in facilityTypes" :key="item.value" :value="item.value">{{ item.label }}</el-checkbox-button>
  17. </el-checkbox-group>
  18. <el-button v-if="view === 'stats'" type="success" plain icon="Download" :disabled="!selectedTypes.length" @click="exportData">导出</el-button>
  19. <el-button :icon="Refresh" @click="loadData">刷新</el-button>
  20. </div>
  21. </div>
  22. <div class="metric-grid">
  23. <div v-for="(item, index) in overview.slice(0, 5)" :key="item.label" class="metric">
  24. <div class="metric-icon"><el-icon><component :is="metricIcons[index % metricIcons.length]" /></el-icon></div>
  25. <div class="metric-body">
  26. <span>{{ item.label }}</span>
  27. <div class="metric-value"><strong>{{ item.value }}</strong><small>{{ item.unit }}</small></div>
  28. </div>
  29. </div>
  30. </div>
  31. <template v-if="view === 'gis'">
  32. <el-card shadow="never" class="map-card" v-loading="loading">
  33. <div class="map-legend"><span v-for="item in facilityTypes" :key="item.value"><i :style="{ background: item.color }"></i>{{ item.label }}</span></div>
  34. <div class="facility-map">
  35. <svg class="pipe-layer" viewBox="0 0 100 100" preserveAspectRatio="none">
  36. <polyline v-for="line in mapLines" :key="line.id" :points="line.points" fill="none" stroke="#64748b" stroke-width="0.75" vector-effect="non-scaling-stroke" />
  37. </svg>
  38. <button v-for="point in mapPoints" :key="point.id" class="facility-point" :style="pointStyle(point)" :title="point.name" @click="openFeature(point)">
  39. <span></span><b>{{ point.name || point.code || point.typeName }}</b>
  40. </button>
  41. <el-empty v-if="!mapPoints.length && !mapLines.length" description="暂无设施空间数据" />
  42. </div>
  43. </el-card>
  44. </template>
  45. <template v-else>
  46. <div class="chart-grid">
  47. <el-card shadow="never" class="chart-card">
  48. <template #header><div class="card-title"><el-icon><Histogram /></el-icon><span>设施数量与状态</span></div></template>
  49. <div ref="barChartRef" class="chart"></div>
  50. </el-card>
  51. <el-card shadow="never" class="chart-card">
  52. <template #header><div class="card-title"><el-icon><PieChart /></el-icon><span>设施类型占比</span></div></template>
  53. <div ref="pieChartRef" class="chart"></div>
  54. </el-card>
  55. </div>
  56. <el-card shadow="never" class="table-card">
  57. <template #header><div class="card-title"><el-icon><DataLine /></el-icon><span>统计明细</span></div></template>
  58. <el-table :data="rows" stripe border v-loading="loading">
  59. <el-table-column prop="section" min-width="180" show-overflow-tooltip>
  60. <template #header>
  61. <div class="table-header">
  62. <span>统计项</span>
  63. <el-tooltip content="按设施类型汇总的关键统计指标" placement="top">
  64. <el-icon><InfoFilled /></el-icon>
  65. </el-tooltip>
  66. </div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="name" label="统计分组" min-width="150" show-overflow-tooltip>
  70. <template #default="{ row }">
  71. <el-tag v-if="row.tagType" :type="row.tagType" effect="light">{{ row.name }}</el-tag>
  72. <span v-else>{{ row.name }}</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column prop="value" label="数值" width="110" />
  76. <el-table-column prop="unit" label="单位" width="90" />
  77. <el-table-column prop="description" label="说明" min-width="260" show-overflow-tooltip>
  78. <template #header>
  79. <div class="table-header">
  80. <span>说明</span>
  81. <el-tooltip content="当前行的统计口径和数据来源" placement="top">
  82. <el-icon><InfoFilled /></el-icon>
  83. </el-tooltip>
  84. </div>
  85. </template>
  86. </el-table-column>
  87. </el-table>
  88. <el-empty v-if="!rows.length" :description="selectedTypes.length ? '暂无统计数据' : '请至少选择一类设施'" />
  89. </el-card>
  90. </template>
  91. <el-drawer v-model="detailVisible" class="detail-drawer" title="供水设施详情" direction="rtl" size="560px" append-to-body><el-descriptions :column="1" border><el-descriptions-item v-for="(value, key) in detail" :key="key" :label="key">{{ value ?? '-' }}</el-descriptions-item></el-descriptions></el-drawer>
  92. </div>
  93. </template>
  94. <script setup>
  95. import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
  96. import { useRoute } from 'vue-router'
  97. import { DataAnalysis, DataLine, Histogram, InfoFilled, Location, MapLocation, PieChart, Refresh, Setting } from '@element-plus/icons-vue'
  98. import { saveAs } from 'file-saver'
  99. import * as echarts from 'echarts'
  100. import { getDicts } from '@/api/system/dict/data'
  101. import { exportPipeNetworkStatistics, getPipeNetworkDashboard, getWaterFacilityDetail, getWaterFacilityFeatures, getWaterFacilityOverview } from '@/api/pipeNetwork/waterSupply'
  102. import {
  103. FACILITY_SECTION_TYPES,
  104. buildPipeNetworkStatisticsQuery,
  105. flattenStatisticMetrics,
  106. formatStatisticRow,
  107. getFacilityStatusOptions,
  108. resolveFacilityStatusLabel,
  109. resolveFacilityStatusTagType
  110. } from '@/utils/waterFacilityStatisticsModel'
  111. import { normalizeMapPoints, unwrapResponse } from '@/utils/waterSupplyModel'
  112. const props = defineProps({ title: { type: String, required: true }, view: { type: String, default: 'stats' } })
  113. const pageIcon = computed(() => props.view === 'gis' ? MapLocation : DataAnalysis)
  114. const metricIcons = [Location, Setting, DataAnalysis, MapLocation]
  115. const route = useRoute()
  116. const facilityTypes = [
  117. { label: '水源地', value: 'source', color: '#3b82f6' },
  118. { label: '水厂', value: 'plant', color: '#22c55e' },
  119. { label: '泵站', value: 'pumpStation', color: '#f97316' },
  120. { label: '管网', value: 'pipe', color: '#06b6d4' },
  121. { label: '用水户', value: 'user', color: '#ef4446' }
  122. ]
  123. const STATUS_CATEGORY_LABELS = {
  124. abnormal: { source: '异常', plant: '停产', pumpStation: '故障停运', pipe: '异常', user: '停用' },
  125. warning: { pumpStation: '检修中', pipe: '维护中', user: '欠费' }
  126. }
  127. const overview = ref([])
  128. const rows = ref([])
  129. const mapPoints = ref([])
  130. const mapLines = ref([])
  131. const routeTypes = String(route.query.type || '').split(',').map(item => item.trim()).filter(Boolean)
  132. const selectedTypes = ref(routeTypes.length ? facilityTypes.map(item => item.value).filter(item => routeTypes.includes(item)) : facilityTypes.map(item => item.value))
  133. const statusFilter = ref(String(route.query.status || ''))
  134. const loading = ref(false)
  135. const detailVisible = ref(false)
  136. const detail = ref({})
  137. const levelDict = ref([])
  138. const barChartRef = ref()
  139. const pieChartRef = ref()
  140. let barChart
  141. let pieChart
  142. const statusOptions = computed(() => getFacilityStatusOptions(selectedTypes.value))
  143. const handleTypeChange = () => {
  144. const options = getFacilityStatusOptions(selectedTypes.value)
  145. if (!options.some(option => option.value === statusFilter.value)) statusFilter.value = ''
  146. loadData()
  147. }
  148. const handleStatusChange = value => {
  149. if (value === undefined || value === null) return
  150. statusFilter.value = String(value ?? '')
  151. loadData()
  152. }
  153. const typeColor = type => facilityTypes.find(item => item.value === type)?.color || '#2563eb'
  154. const statusCategoryLabel = category => {
  155. const labels = new Set()
  156. selectedTypes.value.forEach(type => {
  157. const label = STATUS_CATEGORY_LABELS[category]?.[type]
  158. if (label) labels.add(label)
  159. })
  160. return labels.size ? [...labels].join(' / ') : category === 'normal' ? '正常' : '未知'
  161. }
  162. const resolveLevelLabel = name => {
  163. const item = levelDict.value.find(d => String(d.value) === String(name))
  164. if (item) return item.label
  165. const raw = name === null || name === undefined ? '' : String(name).trim()
  166. if (!raw) return '未知等级'
  167. return /^[A-Za-z]/.test(raw) ? '未知等级' : raw
  168. }
  169. const clearStatistics = async () => {
  170. overview.value = []
  171. rows.value = []
  172. await renderCharts([])
  173. }
  174. const renderCharts = async facilityOverview => {
  175. await nextTick()
  176. barChart?.dispose(); pieChart?.dispose()
  177. if (!barChartRef.value || !pieChartRef.value) return
  178. const labels = facilityOverview.map(item => item.facilityTypeName || item.name || item.facilityType)
  179. const statusSeries = [
  180. { key: 'normalCount', name: '正常', color: '#22c55e' },
  181. { key: 'abnormalCount', name: statusCategoryLabel('abnormal'), color: '#ef4444' },
  182. { key: 'warningCount', name: statusCategoryLabel('warning'), color: '#f97316' },
  183. { key: 'unknownCount', name: '未知', color: '#94a3b8' }
  184. ].filter(series => facilityOverview.some(item => Number(item[series.key] || 0) > 0))
  185. const totalFacilities = facilityOverview.reduce((total, item) => total + Number(item.totalCount || 0), 0)
  186. barChart = echarts.init(barChartRef.value)
  187. barChart.setOption({
  188. tooltip: { trigger: 'axis', axisPointer: { type: 'shadow', shadowStyle: { color: 'rgba(37, 99, 235, 0.06)' } } },
  189. legend: { top: 0, icon: 'circle', itemWidth: 9, itemHeight: 9, textStyle: { color: '#475569' } },
  190. grid: { left: 48, right: 20, top: 46, bottom: 36 },
  191. xAxis: { type: 'category', data: labels, axisLine: { lineStyle: { color: '#cbd5e1' } }, axisLabel: { color: '#475569' } },
  192. yAxis: { type: 'value', minInterval: 1, axisLine: { show: false }, axisLabel: { color: '#64748b' }, splitLine: { lineStyle: { color: '#e2e8f0', type: 'dashed' } } },
  193. series: statusSeries.map(series => ({
  194. name: series.name,
  195. type: 'bar',
  196. stack: 'status',
  197. barWidth: 24,
  198. data: facilityOverview.map(item => Number(item[series.key] || 0)),
  199. itemStyle: {
  200. borderRadius: [6, 6, 0, 0],
  201. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  202. { offset: 0, color: series.color },
  203. { offset: 1, color: `${series.color}33` }
  204. ]),
  205. shadowColor: 'rgba(15, 23, 42, 0.12)',
  206. shadowBlur: 8,
  207. shadowOffsetY: 4
  208. }
  209. }))
  210. })
  211. pieChart = echarts.init(pieChartRef.value)
  212. pieChart.setOption({
  213. tooltip: { trigger: 'item' },
  214. legend: { bottom: 0, icon: 'circle', itemWidth: 9, itemHeight: 9, textStyle: { color: '#475569' } },
  215. title: {
  216. text: String(totalFacilities),
  217. subtext: '设施总数',
  218. left: 'center',
  219. top: '33%',
  220. textStyle: { color: '#1e293b', fontSize: 24, fontWeight: 700 },
  221. subtextStyle: { color: '#64748b', fontSize: 12 }
  222. },
  223. series: [{
  224. type: 'pie',
  225. radius: ['52%', '72%'],
  226. center: ['50%', '45%'],
  227. data: facilityOverview.map(item => ({
  228. name: item.facilityTypeName || item.name || item.facilityType,
  229. value: Number(item.totalCount || 0),
  230. itemStyle: { color: typeColor(item.facilityType) }
  231. })),
  232. label: { formatter: '{b}\n{d}%', color: '#475569', lineHeight: 18 },
  233. itemStyle: { borderColor: '#fff', borderWidth: 3, borderRadius: 8 },
  234. emphasis: { scaleSize: 8 }
  235. }]
  236. })
  237. }
  238. const buildMap = features => {
  239. const rawPoints = []
  240. const rawLines = []
  241. features.forEach(feature => {
  242. const coordinates = feature.geometry?.coordinates || []
  243. const properties = feature.properties || {}
  244. if (feature.geometry?.type === 'Point') rawPoints.push({ ...properties, id: feature.id, longitude: coordinates[0], latitude: coordinates[1], type: properties.facilityType, typeName: properties.facilityTypeName })
  245. if (feature.geometry?.type === 'LineString' && coordinates.length > 1) rawLines.push({ id: feature.id, properties, coordinates })
  246. })
  247. const coordinatePoints = [...rawPoints, ...rawLines.flatMap(line => line.coordinates.map((coordinate, index) => ({ id: `${line.id}-${index}`, longitude: coordinate[0], latitude: coordinate[1] })))]
  248. const positions = new Map(normalizeMapPoints(coordinatePoints).map(item => [item.id, item]))
  249. mapPoints.value = rawPoints.map(point => ({ ...point, ...positions.get(point.id) })).filter(point => Number.isFinite(point.mapX))
  250. mapLines.value = rawLines.map(line => ({ ...line, points: line.coordinates.map((_, index) => positions.get(`${line.id}-${index}`)).filter(Boolean).map(point => `${point.mapX},${point.mapY}`).join(' ') })).filter(line => line.points)
  251. }
  252. const loadData = async () => {
  253. loading.value = true
  254. try {
  255. if (props.view === 'gis') {
  256. const [overviewResponse, featureResponse] = await Promise.all([getWaterFacilityOverview(), getWaterFacilityFeatures({ types: selectedTypes.value.join(',') })])
  257. const summary = unwrapResponse(overviewResponse) || []
  258. overview.value = summary.filter(item => item.facilityType !== 'total').map(item => ({ label: item.facilityTypeName, value: item.geoCompleteCount ?? 0, unit: '个点位' }))
  259. buildMap(unwrapResponse(featureResponse)?.features || [])
  260. } else {
  261. if (!selectedTypes.value.length) {
  262. await clearStatistics()
  263. return
  264. }
  265. const params = buildPipeNetworkStatisticsQuery({
  266. facilityTypes: selectedTypes.value,
  267. status: statusFilter.value
  268. })
  269. const data = unwrapResponse(await getPipeNetworkDashboard(params)) || {}
  270. const facilityOverview = Array.isArray(data.facilityOverview) ? data.facilityOverview : []
  271. overview.value = facilityOverview.map(item => ({ label: item.facilityTypeName || item.facilityType, value: item.totalCount ?? 0, unit: '项' }))
  272. rows.value = Object.entries(data)
  273. .filter(([section]) => section !== 'facilityOverview')
  274. .flatMap(([section, value]) => flattenStatisticMetrics(section, value))
  275. .map(item => formatStatisticRow(item.section, item, { levelLabel: resolveLevelLabel }))
  276. await renderCharts(facilityOverview)
  277. }
  278. } catch (error) { overview.value = []; rows.value = []; mapPoints.value = []; mapLines.value = []; console.warn(`[${props.title}] 数据加载失败`, error) } finally { loading.value = false }
  279. }
  280. const exportData = async () => {
  281. if (props.view === 'stats' && !selectedTypes.value.length) return
  282. try {
  283. const params = buildPipeNetworkStatisticsQuery({
  284. facilityTypes: selectedTypes.value,
  285. status: statusFilter.value
  286. })
  287. const blob = await exportPipeNetworkStatistics(params)
  288. saveAs(new Blob([blob]), `管网数据统计分析_${new Date().toISOString().slice(0, 10)}.xlsx`)
  289. } catch (error) {
  290. console.warn('管网统计导出失败', error)
  291. }
  292. }
  293. const pointStyle = point => ({ left: `${point.mapX}%`, top: `${point.mapY}%`, color: typeColor(point.type) })
  294. const openFeature = async point => { try { const response = await getWaterFacilityDetail(point.type, point.id?.split(':').pop()); detail.value = unwrapResponse(response) || point; detailVisible.value = true } catch {} }
  295. const resizeCharts = () => { barChart?.resize(); pieChart?.resize() }
  296. onMounted(() => { getDicts('pipe_network_level').then(response => { levelDict.value = response.data || [] }); loadData(); window.addEventListener('resize', resizeCharts) })
  297. onBeforeUnmount(() => { window.removeEventListener('resize', resizeCharts); barChart?.dispose(); pieChart?.dispose() })
  298. </script>
  299. <style lang="scss">
  300. @use './waterSupplyPageTheme.scss';
  301. </style>
  302. <style scoped>
  303. .water-page {
  304. padding: 20px;
  305. min-height: calc(100vh - 84px);
  306. background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 45%, #eef2f7 100%);
  307. }
  308. .page-heading {
  309. display: flex;
  310. justify-content: space-between;
  311. align-items: center;
  312. gap: 16px;
  313. margin-bottom: 18px;
  314. }
  315. .page-title {
  316. display: flex;
  317. align-items: center;
  318. gap: 12px;
  319. }
  320. .page-title-icon {
  321. display: grid;
  322. place-items: center;
  323. width: 42px;
  324. height: 42px;
  325. border-radius: 8px;
  326. color: #fff;
  327. background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  328. box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
  329. }
  330. .page-heading h2 {
  331. margin: 0 0 4px;
  332. font-size: 20px;
  333. color: #1e293b;
  334. }
  335. .muted {
  336. font-size: 13px;
  337. color: #64748b;
  338. }
  339. .heading-actions {
  340. display: flex;
  341. align-items: center;
  342. gap: 12px;
  343. }
  344. .status-select {
  345. width: 180px;
  346. }
  347. .metric-grid {
  348. display: grid;
  349. grid-template-columns: repeat(5, minmax(160px, 1fr));
  350. gap: 14px;
  351. margin-bottom: 16px;
  352. }
  353. .metric {
  354. display: flex;
  355. align-items: center;
  356. gap: 14px;
  357. min-width: 0;
  358. padding: 16px 18px;
  359. background: #fff;
  360. border: 1px solid #e2e8f0;
  361. border-radius: 8px;
  362. box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  363. }
  364. .metric-icon {
  365. position: static;
  366. flex: 0 0 42px;
  367. display: grid;
  368. place-items: center;
  369. width: 42px;
  370. height: 42px;
  371. border-radius: 8px;
  372. color: #2563eb;
  373. background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  374. }
  375. .metric-icon .el-icon {
  376. font-size: 22px;
  377. }
  378. .metric-body span {
  379. display: block;
  380. overflow: hidden;
  381. text-overflow: ellipsis;
  382. white-space: nowrap;
  383. margin-bottom: 3px;
  384. color: #64748b;
  385. font-size: 13px;
  386. }
  387. .metric-value {
  388. display: flex;
  389. align-items: baseline;
  390. gap: 5px;
  391. min-width: 0;
  392. }
  393. .metric-value strong {
  394. color: #1e293b;
  395. font-size: 24px;
  396. line-height: 1.2;
  397. }
  398. .metric-value small {
  399. color: #94a3b8;
  400. }
  401. .chart-grid {
  402. display: grid;
  403. grid-template-columns: 1fr 1fr;
  404. gap: 16px;
  405. margin-bottom: 16px;
  406. }
  407. .chart-card,
  408. .table-card {
  409. border: 1px solid #e2e8f0;
  410. border-radius: 8px;
  411. box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  412. }
  413. .card-title {
  414. display: flex;
  415. align-items: center;
  416. gap: 8px;
  417. color: #1e293b;
  418. font-weight: 600;
  419. }
  420. .card-title .el-icon {
  421. color: #2563eb;
  422. font-size: 18px;
  423. }
  424. .chart {
  425. height: 320px;
  426. }
  427. .table-card :deep(.el-card__body) {
  428. padding-top: 0;
  429. }
  430. .table-card :deep(.el-table__header th) {
  431. color: #475569;
  432. background: #f8fafc;
  433. }
  434. .table-header {
  435. display: flex;
  436. align-items: center;
  437. gap: 5px;
  438. }
  439. .table-header .el-icon {
  440. color: #94a3b8;
  441. cursor: help;
  442. }
  443. .map-card {
  444. min-height: 580px;
  445. }
  446. .map-legend {
  447. display: flex;
  448. gap: 18px;
  449. margin-bottom: 12px;
  450. color: #475569;
  451. font-size: 13px;
  452. }
  453. .map-legend i {
  454. display: inline-block;
  455. width: 9px;
  456. height: 9px;
  457. margin-right: 6px;
  458. border-radius: 50%;
  459. }
  460. .facility-map {
  461. position: relative;
  462. height: 500px;
  463. overflow: hidden;
  464. border: 1px solid #dbe6f2;
  465. border-radius: 8px;
  466. background-color: #f8fbff;
  467. background-image: linear-gradient(#eaf0f6 1px, transparent 1px), linear-gradient(90deg, #eaf0f6 1px, transparent 1px);
  468. background-size: 40px 40px;
  469. }
  470. .pipe-layer {
  471. position: absolute;
  472. inset: 0;
  473. width: 100%;
  474. height: 100%;
  475. overflow: visible;
  476. }
  477. .facility-point {
  478. position: absolute;
  479. padding: 0;
  480. border: 0;
  481. background: transparent;
  482. color: #2563eb;
  483. cursor: pointer;
  484. text-align: center;
  485. transform: translate(-50%, -50%);
  486. }
  487. .facility-point span {
  488. display: block;
  489. width: 15px;
  490. height: 15px;
  491. margin: auto;
  492. border: 3px solid #fff;
  493. border-radius: 50%;
  494. background: currentColor;
  495. box-shadow: 0 0 0 3px currentColor;
  496. }
  497. .facility-point b {
  498. display: block;
  499. margin-top: 4px;
  500. color: #334155;
  501. font-size: 11px;
  502. white-space: nowrap;
  503. }
  504. .facility-map :deep(.el-empty) {
  505. position: absolute;
  506. inset: 0;
  507. }
  508. @media (max-width: 1100px) {
  509. .metric-grid {
  510. grid-template-columns: repeat(3, minmax(0, 1fr));
  511. }
  512. .heading-actions {
  513. align-items: flex-end;
  514. flex-direction: column;
  515. }
  516. }
  517. @media (max-width: 800px) {
  518. .page-heading {
  519. align-items: flex-start;
  520. flex-direction: column;
  521. }
  522. .chart-grid,
  523. .metric-grid {
  524. grid-template-columns: 1fr;
  525. }
  526. .heading-actions {
  527. align-items: flex-start;
  528. }
  529. .heading-actions :deep(.el-checkbox-group) {
  530. display: flex;
  531. flex-wrap: wrap;
  532. }
  533. }
  534. </style>