gHome.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297
  1. <script setup>
  2. import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
  3. import * as echarts from 'echarts'
  4. import { Odometer, CircleCheckFilled, VideoCameraFilled, WarnTriangleFilled } from '@element-plus/icons-vue'
  5. import { convertPipeline, convertPoints } from '@/utils/coordTransform'
  6. import { getGasDashboardSummary } from '@/api/pipeNetwork/basic'
  7. const nowText = ref('2025/12/31 12:59:59')
  8. const weekText = ref('星期三')
  9. const mapError = ref('')
  10. const loading = ref(false)
  11. // ========== 仪表盘数据 ==========
  12. const dashboardData = ref({})
  13. const baseCards = computed(() => {
  14. const bs = dashboardData.value.baseStats || {}
  15. return [
  16. { label: '监测点总数', value: bs.totalPoints || 0, unit: '个', icon: Odometer, color: '#60b8ff' },
  17. { label: '在线监测点', value: bs.onlinePoints || 0, unit: '个', icon: CircleCheckFilled, color: '#52e0a8' },
  18. { label: '离线监测点', value: bs.offlinePoints || 0, unit: '个', icon: VideoCameraFilled, color: '#ff8e8e' },
  19. { label: '异常设备', value: bs.alarmCount || 0, unit: '个', icon: WarnTriangleFilled, color: '#ffb54d' }
  20. ]
  21. })
  22. const operationSummary = computed(() => {
  23. const ps = dashboardData.value.pipeStats || {}
  24. return [
  25. { label: '管网总长度', value: (ps.totalLength || 0) + 'km' },
  26. { label: '燃气管网', value: (ps.gasNetworks || 0) + '条' },
  27. { label: '管网总数', value: (ps.totalNetworks || 0) + '条' }
  28. ]
  29. })
  30. const repairRecords = computed(() => {
  31. const list = dashboardData.value.repairTrend || []
  32. if (list.length > 0) return list
  33. return [
  34. { month: '1月', value: 0 }, { month: '2月', value: 0 }, { month: '3月', value: 0 },
  35. { month: '4月', value: 0 }, { month: '5月', value: 0 }, { month: '6月', value: 0 }
  36. ]
  37. })
  38. const pointRows = computed(() => {
  39. const list = dashboardData.value.pointRows || []
  40. return list.length > 0 ? list : [{ id: 1, name: '暂无数据', time: '--', value: '--', status: '离线' }]
  41. })
  42. const equipmentRows = computed(() => {
  43. const list = dashboardData.value.equipmentRows || []
  44. return list.length > 0 ? list : [{ id: 1, name: '暂无数据', code: '--', location: '--', status: '--' }]
  45. })
  46. const warningRows = computed(() => {
  47. const list = dashboardData.value.warningRows || []
  48. return list.length > 0 ? list : [{ level: '中', title: '暂无告警', code: '--', time: '--:--:--', desc: '当前无告警信息', tag: '正常' }]
  49. })
  50. const hazardSummary = computed(() => {
  51. const map = dashboardData.value.hazardStats || {}
  52. return [
  53. { label: '重大隐患', value: map['重大隐患'] || 0, color: '#ff3030' },
  54. { label: '较大隐患', value: map['较大隐患'] || 0, color: '#ff9f1a' },
  55. { label: '一般隐患', value: map['一般隐患'] || 0, color: '#f3e64d' }
  56. ]
  57. })
  58. const mapKpis = computed(() => {
  59. const bs = dashboardData.value.baseStats || {}
  60. const es = dashboardData.value.equipmentStats || {}
  61. const total = bs.totalPoints || 0
  62. const online = bs.onlinePoints || 0
  63. return [
  64. { label: '在线率', value: total > 0 ? (online / total * 100).toFixed(1) + '%' : '--' },
  65. { label: '压力均值', value: (es.avgPressure || 0) + 'MPa' },
  66. { label: '今日告警', value: (es.todayAlarm || 0) + '条' }
  67. ]
  68. })
  69. const pipelineLines = [
  70. {
  71. name: '燃气1',
  72. color: '#ff3030',
  73. points: [
  74. [110.404947, 28.433419],
  75. [110.404836, 28.433429],
  76. [110.403275, 28.433571],
  77. [110.401084, 28.433876],
  78. [110.399601, 28.433876],
  79. [110.398112, 28.433979],
  80. [110.396717, 28.434314],
  81. [110.394299, 28.434538],
  82. [110.394352, 28.434887],
  83. [110.391969, 28.434985],
  84. [110.384374, 28.435695],
  85. [110.381418, 28.43559],
  86. [110.377993, 28.436193],
  87. [110.376062, 28.436385],
  88. [110.374231, 28.43655],
  89. [110.372584, 28.437107],
  90. [110.371292, 28.4377],
  91. [110.370581, 28.438198],
  92. [110.369831, 28.438821]
  93. ]
  94. },
  95. {
  96. name: '燃气2',
  97. color: '#ff3030',
  98. points: [
  99. [110.361433, 28.454979],
  100. [110.362363, 28.453169],
  101. [110.362851, 28.452213],
  102. [110.364377, 28.452443],
  103. [110.365138, 28.45246],
  104. [110.366462, 28.452157],
  105. [110.369549, 28.451441],
  106. [110.37219, 28.450897],
  107. [110.372753, 28.450901],
  108. [110.373875, 28.451194],
  109. [110.373913, 28.451107],
  110. [110.374597, 28.451476]
  111. ]
  112. }
  113. ]
  114. const pipePoints = [
  115. { name: 'A点', value: '0.22MPa', lng: 110.362363, lat: 28.453169 },
  116. { name: 'B点', value: '0.24MPa', lng: 110.366462, lat: 28.452157 },
  117. { name: 'C点', value: '0.18MPa', lng: 110.373875, lat: 28.451194},
  118. { name: 'D点', value: '0.23MPa', lng: 110.401084, lat: 28.433876 },
  119. { name: 'E点', value: '0.25MPa', lng: 110.391969, lat: 28.434985 },
  120. { name: 'F点', value: '0.19MPa', lng: 110.376062, lat: 28.436385 },
  121. { name: 'G点', value: '0.21MPa', lng: 110.370581, lat: 28.438198}
  122. ]
  123. const mapWrapRef = ref(null)
  124. const repairChartRef = ref(null)
  125. const hazardChartRef = ref(null)
  126. let mapInstance = null
  127. let repairChart = null
  128. let hazardChart = null
  129. let clockTimer = null
  130. function formatWeek(day) {
  131. return ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'][day]
  132. }
  133. function pad(value) {
  134. return String(value).padStart(2, '0')
  135. }
  136. function updateClock() {
  137. const now = new Date()
  138. nowText.value = `${now.getFullYear()}/${pad(now.getMonth() + 1)}/${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`
  139. weekText.value = formatWeek(now.getDay())
  140. }
  141. function initRepairChart() {
  142. if (!repairChartRef.value) return
  143. repairChart?.dispose()
  144. repairChart = echarts.init(repairChartRef.value)
  145. const data = repairRecords.value
  146. repairChart.setOption({
  147. grid: { left: 30, right: 12, top: 20, bottom: 24, containLabel: true },
  148. xAxis: {
  149. type: 'category',
  150. data: data.map(item => item.month),
  151. axisLine: { lineStyle: { color: 'rgba(91, 167, 219, 0.8)' } },
  152. axisLabel: { color: '#d2efff' }
  153. },
  154. yAxis: {
  155. type: 'value',
  156. splitLine: { lineStyle: { color: 'rgba(91, 167, 219, 0.18)' } },
  157. axisLine: { show: false },
  158. axisLabel: { color: '#d2efff' }
  159. },
  160. tooltip: { trigger: 'axis' },
  161. series: [{
  162. type: 'bar',
  163. barWidth: 24,
  164. data: data.map(item => item.value),
  165. itemStyle: {
  166. borderRadius: [6, 6, 0, 0],
  167. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  168. { offset: 0, color: '#38d8ff' },
  169. { offset: 1, color: '#166dff' }
  170. ])
  171. }
  172. }]
  173. })
  174. }
  175. function initHazardChart() {
  176. if (!hazardChartRef.value) return
  177. hazardChart?.dispose()
  178. hazardChart = echarts.init(hazardChartRef.value)
  179. const data = hazardSummary.value
  180. hazardChart.setOption({
  181. grid: { left: 18, right: 18, top: 10, bottom: 10, containLabel: true },
  182. xAxis: {
  183. type: 'value',
  184. splitLine: { show: false },
  185. axisLine: { show: false },
  186. axisTick: { show: false },
  187. axisLabel: { show: false }
  188. },
  189. yAxis: {
  190. type: 'category',
  191. data: data.map(item => item.label),
  192. axisLine: { show: false },
  193. axisTick: { show: false },
  194. axisLabel: { color: '#d2efff', fontSize: 13 }
  195. },
  196. tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
  197. series: [{
  198. type: 'bar',
  199. data: data.map(item => ({ value: item.value, itemStyle: { color: item.color, borderRadius: 10 } })),
  200. barWidth: 14,
  201. label: { show: true, position: 'right', color: '#fff', fontWeight: 'bold' },
  202. showBackground: true,
  203. backgroundStyle: { color: 'rgba(255,255,255,0.08)', borderRadius: 10 }
  204. }]
  205. })
  206. }
  207. function waitForBMapGL() {
  208. return new Promise((resolve, reject) => {
  209. if (window.BMapGL) {
  210. resolve(window.BMapGL)
  211. return
  212. }
  213. let attempts = 0
  214. const timer = setInterval(() => {
  215. attempts += 1
  216. if (window.BMapGL) {
  217. clearInterval(timer)
  218. resolve(window.BMapGL)
  219. return
  220. }
  221. if (attempts >= 100) {
  222. clearInterval(timer)
  223. reject(new Error('百度地图加载超时'))
  224. }
  225. }, 200)
  226. })
  227. }
  228. function addPipeLine(BMapGL, pipe) {
  229. const bmapPoints = pipe.points.map(([lng, lat]) => new BMapGL.Point(lng, lat))
  230. const polyline = new BMapGL.Polyline(bmapPoints, {
  231. strokeColor: pipe.color,
  232. strokeWeight: 4,
  233. strokeOpacity: 0.95
  234. })
  235. mapInstance.addOverlay(polyline)
  236. bmapPoints.forEach((point, index) => {
  237. const ring = new BMapGL.Circle(point, 14, {
  238. strokeColor: '#ff3030',
  239. strokeWeight: 2,
  240. strokeOpacity: 0.7,
  241. fillColor: 'rgba(255,48,48,0.08)',
  242. fillOpacity: 0.18
  243. })
  244. mapInstance.addOverlay(ring)
  245. })
  246. }
  247. function addPipePoint(BMapGL, point) {
  248. const markerPoint = new BMapGL.Point(point.lng, point.lat)
  249. const marker = new BMapGL.Marker(markerPoint)
  250. mapInstance.addOverlay(marker)
  251. const label = new BMapGL.Label(`${point.name} ${point.value}`, { offset: new BMapGL.Size(-42, -40) })
  252. label.setPosition(markerPoint)
  253. label.setStyle({
  254. color: '#d8faff',
  255. background: 'rgba(18, 68, 112, 0.75)',
  256. border: '1px solid rgba(255, 48, 48, 0.55)',
  257. borderRadius: '8px',
  258. padding: '5px 8px',
  259. fontSize: '12px'
  260. })
  261. mapInstance.addOverlay(label)
  262. }
  263. async function initMap() {
  264. if (!mapWrapRef.value) return
  265. try {
  266. const BMapGL = await waitForBMapGL()
  267. mapInstance = new BMapGL.Map(mapWrapRef.value, { enableMapClick: true })
  268. const center = new BMapGL.Point(110.3965, 28.4638)
  269. mapInstance.centerAndZoom(center, 15)
  270. mapInstance.enableScrollWheelZoom(true)
  271. mapInstance.setMapStyleV2({ styleId: 'a0f4e6e6f9e7a6c5d8e7f7e7f7e7f7e5' })
  272. const bdPipelineLines = pipelineLines.map(pipe => convertPipeline(pipe))
  273. const bdPipePoints = convertPoints(pipePoints)
  274. bdPipelineLines.forEach(pipe => addPipeLine(BMapGL, pipe))
  275. bdPipePoints.forEach(point => addPipePoint(BMapGL, point))
  276. } catch (error) {
  277. mapError.value = '百度地图加载失败,请检查地图脚本或网络连接。'
  278. }
  279. }
  280. function handleResize() {
  281. repairChart?.resize()
  282. hazardChart?.resize()
  283. }
  284. async function loadDashboardData() {
  285. loading.value = true
  286. try {
  287. const res = await getGasDashboardSummary()
  288. dashboardData.value = res.data || {}
  289. } catch (e) { console.error(e) } finally { loading.value = false }
  290. }
  291. onMounted(async () => {
  292. updateClock()
  293. clockTimer = window.setInterval(updateClock, 1000)
  294. await loadDashboardData()
  295. await nextTick()
  296. initRepairChart()
  297. initHazardChart()
  298. initMap()
  299. window.addEventListener('resize', handleResize)
  300. })
  301. onBeforeUnmount(() => {
  302. if (clockTimer) window.clearInterval(clockTimer)
  303. window.removeEventListener('resize', handleResize)
  304. repairChart?.dispose()
  305. hazardChart?.dispose()
  306. mapInstance = null
  307. })
  308. </script>
  309. <template>
  310. <div class="gas-home-screen">
  311. <div class="screen-header">
  312. <div class="header-time">{{ nowText }} {{ weekText }}</div>
  313. <div class="header-title-wrap">
  314. <div class="header-title">燃气管网安全运行监测系统</div>
  315. <div class="header-subtitle">Gas Pipeline Operation Dashboard</div>
  316. </div>
  317. <div class="header-tags">
  318. <span class="header-tag">实时监测</span>
  319. <span class="header-tag">管网运行</span>
  320. <span class="header-tag">隐患预警</span>
  321. </div>
  322. </div>
  323. <div class="screen-body">
  324. <div class="side-panel left-panel">
  325. <section class="panel-card base-card">
  326. <div class="panel-title">基础概况</div>
  327. <div class="base-grid">
  328. <div v-for="item in baseCards" :key="item.label" class="base-item">
  329. <div class="base-icon" :style="{ background: item.color }">
  330. <component :is="item.icon" class="base-icon-svg" />
  331. </div>
  332. <div class="base-text">
  333. <div class="base-label">{{ item.label }}</div>
  334. <div class="base-value">{{ item.value }}<span>{{ item.unit }}</span></div>
  335. </div>
  336. </div>
  337. </div>
  338. </section>
  339. <section class="panel-card">
  340. <div class="panel-title">维修趋势</div>
  341. <div ref="repairChartRef" class="chart-box repair-chart"></div>
  342. </section>
  343. <section class="panel-card table-card">
  344. <div class="panel-title">监测点数据</div>
  345. <div class="table-wrap">
  346. <table class="data-table">
  347. <thead>
  348. <tr>
  349. <th>序号</th>
  350. <th>监测点</th>
  351. <th>时间</th>
  352. <th>数值</th>
  353. <th>状态</th>
  354. </tr>
  355. </thead>
  356. <tbody>
  357. <tr v-for="row in pointRows" :key="row.id">
  358. <td>{{ row.id }}</td>
  359. <td :title="`${row.name || '-'} / ${row.deviceName || row.deviceCode || '-'}`">{{ row.name }} / {{ row.deviceName || row.deviceCode || '-' }}</td>
  360. <td :title="row.time">{{ row.time }}</td>
  361. <td :title="row.value">{{ row.value }}</td>
  362. <td :class="['status-cell', row.status === '在线' ? 'ok' : row.status === '预警' ? 'warn' : 'off']">{{ row.status }}</td>
  363. </tr>
  364. </tbody>
  365. </table>
  366. </div>
  367. </section>
  368. </div>
  369. <div class="center-panel">
  370. <div class="map-stage">
  371. <div class="map-stage-top">
  372. <div class="summary-strip">
  373. <div v-for="item in operationSummary" :key="item.label" class="summary-item">
  374. <span class="summary-label">{{ item.label }}</span>
  375. <strong class="summary-value">{{ item.value }}</strong>
  376. </div>
  377. </div>
  378. <div class="map-kpis">
  379. <div v-for="item in mapKpis" :key="item.label" class="map-kpi">
  380. <span>{{ item.label }}</span>
  381. <strong>{{ item.value }}</strong>
  382. </div>
  383. </div>
  384. </div>
  385. <div ref="mapWrapRef" class="map-view"></div>
  386. <div v-if="mapError" class="map-error">{{ mapError }}</div>
  387. <div class="map-panel info-panel">
  388. <div class="mini-title">当前管网信息</div>
  389. <div class="mini-row"><span>管网总长度</span><strong>{{ (dashboardData.pipeStats && dashboardData.pipeStats.totalLength) || 0 }}km</strong></div>
  390. <div class="mini-row"><span>燃气管网</span><strong>{{ (dashboardData.pipeStats && dashboardData.pipeStats.gasNetworks) || 0 }}条</strong></div>
  391. <div class="mini-row"><span>设备总数</span><strong>{{ (dashboardData.equipmentStats && dashboardData.equipmentStats.totalEquipment) || 0 }}台</strong></div>
  392. </div>
  393. <div class="map-panel point-panel">
  394. <div class="mini-title">当前管点信息</div>
  395. <div class="mini-row"><span>监测点总数</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.totalPoints) || 0 }}个</strong></div>
  396. <div class="mini-row"><span>在线监测点</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.onlinePoints) || 0 }}个</strong></div>
  397. <div class="mini-row"><span>离线监测点</span><strong>{{ (dashboardData.baseStats && dashboardData.baseStats.offlinePoints) || 0 }}个</strong></div>
  398. </div>
  399. </div>
  400. </div>
  401. <div class="side-panel right-panel">
  402. <section class="panel-card">
  403. <div class="panel-title">设备运行</div>
  404. <div class="table-wrap equipment-wrap">
  405. <table class="data-table compact-table">
  406. <thead>
  407. <tr>
  408. <th>序号</th>
  409. <th>设备名称</th>
  410. <th>设备编号</th>
  411. <th>位置</th>
  412. <th>状态</th>
  413. </tr>
  414. </thead>
  415. <tbody>
  416. <tr v-for="row in equipmentRows" :key="row.id">
  417. <td>{{ row.id }}</td>
  418. <td>{{ row.name }}</td>
  419. <td>{{ row.code }}</td>
  420. <td>{{ row.location }}</td>
  421. <td>{{ row.status }}</td>
  422. </tr>
  423. </tbody>
  424. </table>
  425. </div>
  426. </section>
  427. <section class="panel-card warning-card">
  428. <div class="panel-title">告警动态</div>
  429. <div class="warning-scroll">
  430. <div class="warning-list">
  431. <div v-for="(item, index) in warningRows" :key="index" class="warning-item" :class="item.level === '高' ? 'danger' : 'notice'">
  432. <div class="warning-side">
  433. <div class="warning-badge">{{ item.level }}</div>
  434. <div class="warning-tag">{{ item.tag }}</div>
  435. </div>
  436. <div class="warning-main">
  437. <div class="warning-title-row">
  438. <span class="warning-title">{{ item.title }}</span>
  439. <span class="warning-time">{{ item.time }}</span>
  440. </div>
  441. <div class="warning-code">{{ item.code }}</div>
  442. <div class="warning-desc">{{ item.desc }}</div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </section>
  448. <section class="panel-card hazard-card">
  449. <div class="panel-title">隐患统计</div>
  450. <div class="hazard-summary three-col">
  451. <div v-for="item in hazardSummary" :key="item.label" class="hazard-summary-item">
  452. <span class="hazard-dot" :style="{ background: item.color }"></span>
  453. <span>{{ item.label }}</span>
  454. <strong :style="{ color: item.color }">{{ item.value }}项</strong>
  455. </div>
  456. </div>
  457. <div ref="hazardChartRef" class="chart-box hazard-chart"></div>
  458. </section>
  459. </div>
  460. </div>
  461. <a href="https://deerflow.tech" target="_blank" class="deerflow-mark" title="Created By Deerflow">
  462. <span class="deerflow-diamond">◆</span>
  463. <span class="deerflow-text">Deerflow</span>
  464. </a>
  465. </div>
  466. </template>
  467. <style scoped lang="scss">
  468. .gas-home-screen {
  469. min-height: 100vh;
  470. color: #fff;
  471. background:
  472. linear-gradient(180deg, rgba(14, 42, 70, 0.96), rgba(8, 20, 37, 1)),
  473. radial-gradient(circle at center, rgba(36, 122, 184, 0.18), transparent 58%),
  474. #081425;
  475. position: relative;
  476. }
  477. .gas-home-screen::before {
  478. content: '';
  479. position: absolute;
  480. inset: 0;
  481. pointer-events: none;
  482. z-index: 0;
  483. background:
  484. radial-gradient(circle at 28% 32%, rgba(56, 216, 255, 0.06) 0%, transparent 45%),
  485. radial-gradient(circle at 72% 58%, rgba(22, 109, 255, 0.05) 0%, transparent 40%),
  486. radial-gradient(circle at 50% 85%, rgba(56, 216, 255, 0.04) 0%, transparent 35%);
  487. animation: bgPulse 8s ease-in-out infinite alternate;
  488. }
  489. @keyframes bgPulse {
  490. 0% { opacity: 0.6; }
  491. 100% { opacity: 1; }
  492. }
  493. .screen-header {
  494. height: 72px;
  495. padding: 0 24px;
  496. display: grid;
  497. grid-template-columns: 320px 1fr 320px;
  498. align-items: center;
  499. position: relative;
  500. z-index: 1;
  501. background: linear-gradient(90deg, rgba(27, 98, 155, 0.95), rgba(18, 53, 98, 0.95));
  502. border-bottom: 1px solid rgba(93, 194, 255, 0.28);
  503. }
  504. .screen-header::after {
  505. content: '';
  506. position: absolute;
  507. bottom: -1px;
  508. left: 5%;
  509. width: 90%;
  510. height: 1px;
  511. background: linear-gradient(90deg, transparent, rgba(56, 216, 255, 0.7), rgba(22, 109, 255, 0.7), transparent);
  512. animation: headerGlow 4s ease-in-out infinite alternate;
  513. }
  514. @keyframes headerGlow {
  515. 0% { opacity: 0.4; }
  516. 100% { opacity: 1; }
  517. }
  518. .header-time {
  519. font-size: 18px;
  520. font-weight: 700;
  521. letter-spacing: 1.5px;
  522. color: #ddf6ff;
  523. font-variant-numeric: tabular-nums;
  524. text-shadow: 0 0 18px rgba(56, 216, 255, 0.35);
  525. }
  526. .header-title-wrap {
  527. text-align: center;
  528. }
  529. .header-title {
  530. font-size: 30px;
  531. font-weight: 800;
  532. letter-spacing: 3px;
  533. background: linear-gradient(180deg, #e8f6ff 0%, #8fd6ff 100%);
  534. -webkit-background-clip: text;
  535. -webkit-text-fill-color: transparent;
  536. background-clip: text;
  537. }
  538. .header-subtitle {
  539. margin-top: 4px;
  540. color: rgba(196, 234, 255, 0.65);
  541. font-size: 11px;
  542. letter-spacing: 3px;
  543. text-transform: uppercase;
  544. }
  545. .header-tags {
  546. display: flex;
  547. justify-content: flex-end;
  548. gap: 8px;
  549. }
  550. .header-tag {
  551. padding: 6px 14px;
  552. border: 1px solid rgba(117, 206, 255, 0.35);
  553. border-radius: 16px;
  554. color: #d8f5ff;
  555. background: rgba(13, 77, 128, 0.45);
  556. font-size: 12px;
  557. letter-spacing: 1px;
  558. transition: all 0.3s;
  559. cursor: default;
  560. }
  561. .header-tag:hover {
  562. border-color: rgba(117, 206, 255, 0.7);
  563. background: rgba(13, 77, 128, 0.65);
  564. box-shadow: 0 0 16px rgba(56, 216, 255, 0.15);
  565. }
  566. .screen-body {
  567. height: calc(100vh - 72px);
  568. padding: 12px;
  569. display: grid;
  570. grid-template-columns: 360px 1fr 360px;
  571. gap: 12px;
  572. position: relative;
  573. z-index: 1;
  574. }
  575. .side-panel,
  576. .center-panel {
  577. min-height: 0;
  578. }
  579. .left-panel,
  580. .right-panel {
  581. display: grid;
  582. gap: 12px;
  583. }
  584. .left-panel {
  585. grid-template-rows: 220px 220px 1fr;
  586. }
  587. .right-panel {
  588. grid-template-rows: 250px 260px 1fr;
  589. }
  590. .panel-card {
  591. min-height: 0;
  592. padding: 14px;
  593. position: relative;
  594. background: linear-gradient(180deg, rgba(13, 33, 56, 0.88), rgba(10, 25, 42, 0.88));
  595. border: 1px solid rgba(65, 158, 219, 0.22);
  596. border-radius: 12px;
  597. box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  598. transition: border-color 0.4s;
  599. }
  600. .panel-card::after {
  601. content: '';
  602. position: absolute;
  603. top: -1px;
  604. left: 20px;
  605. right: 20px;
  606. height: 1px;
  607. border-radius: 1px;
  608. background: linear-gradient(90deg, transparent, rgba(56, 216, 255, 0.25), transparent);
  609. pointer-events: none;
  610. }
  611. .panel-card:hover {
  612. border-color: rgba(65, 158, 219, 0.38);
  613. }
  614. .panel-title {
  615. position: relative;
  616. padding-left: 16px;
  617. margin-bottom: 14px;
  618. color: #8fe5ff;
  619. font-size: 18px;
  620. font-weight: 800;
  621. letter-spacing: 1px;
  622. }
  623. .panel-title::before {
  624. content: '';
  625. position: absolute;
  626. left: 0;
  627. top: 3px;
  628. width: 4px;
  629. height: 20px;
  630. border-radius: 2px;
  631. background: linear-gradient(180deg, #28d7ff, #1776ff);
  632. box-shadow: 0 0 10px rgba(40, 215, 255, 0.5);
  633. }
  634. .base-grid {
  635. display: grid;
  636. grid-template-columns: repeat(2, minmax(0, 1fr));
  637. gap: 14px;
  638. }
  639. .base-card {
  640. background: linear-gradient(180deg, rgba(10, 30, 53, 0.95), rgba(9, 24, 42, 0.95));
  641. }
  642. .base-grid {
  643. grid-template-columns: repeat(2, minmax(0, 1fr));
  644. gap: 12px;
  645. }
  646. .base-item {
  647. display: flex;
  648. align-items: center;
  649. gap: 14px;
  650. min-height: 72px;
  651. padding: 14px;
  652. border-radius: 14px;
  653. background: linear-gradient(180deg, rgba(20, 57, 89, 0.45), rgba(18, 44, 72, 0.35));
  654. border: 1px solid rgba(97, 190, 255, 0.12);
  655. transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  656. cursor: default;
  657. position: relative;
  658. overflow: hidden;
  659. }
  660. .base-item::before {
  661. content: '';
  662. position: absolute;
  663. inset: 0;
  664. border-radius: 14px;
  665. background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.03), transparent 70%);
  666. pointer-events: none;
  667. transition: opacity 0.35s;
  668. opacity: 0;
  669. }
  670. .base-item:hover {
  671. transform: translateY(-2px);
  672. border-color: rgba(97, 190, 255, 0.35);
  673. box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(97, 190, 255, 0.1) inset;
  674. }
  675. .base-item:hover::before {
  676. opacity: 1;
  677. }
  678. .base-icon {
  679. width: 48px;
  680. height: 48px;
  681. border-radius: 16px;
  682. display: flex;
  683. align-items: center;
  684. justify-content: center;
  685. flex: 0 0 48px;
  686. position: relative;
  687. transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
  688. }
  689. .base-item:hover .base-icon {
  690. transform: scale(1.08);
  691. box-shadow: 0 0 28px rgba(56, 216, 255, 0.3);
  692. }
  693. .base-icon-svg {
  694. width: 26px;
  695. height: 26px;
  696. color: #fff;
  697. transition: transform 0.35s;
  698. }
  699. .base-item:hover .base-icon-svg {
  700. transform: scale(1.1);
  701. }
  702. .base-text {
  703. min-width: 0;
  704. }
  705. .base-label {
  706. color: #c0dff5;
  707. font-size: 12px;
  708. letter-spacing: 1px;
  709. text-transform: uppercase;
  710. }
  711. .base-value {
  712. margin-top: 4px;
  713. color: #fff;
  714. font-size: 32px;
  715. font-weight: 800;
  716. line-height: 1;
  717. font-variant-numeric: tabular-nums;
  718. letter-spacing: -0.5px;
  719. }
  720. .base-value span {
  721. margin-left: 4px;
  722. color: #90d9ff;
  723. font-size: 12px;
  724. font-weight: 500;
  725. letter-spacing: 0;
  726. }
  727. .chart-box {
  728. width: 100%;
  729. height: calc(100% - 36px);
  730. }
  731. .table-card,
  732. .warning-card,
  733. .hazard-card {
  734. overflow: hidden;
  735. }
  736. .table-wrap {
  737. height: calc(100% - 38px);
  738. overflow: auto;
  739. }
  740. .data-table {
  741. width: 100%;
  742. border-collapse: collapse;
  743. table-layout: fixed;
  744. }
  745. .data-table thead {
  746. background: rgba(24, 122, 198, 0.55);
  747. }
  748. .data-table thead th {
  749. font-weight: 700;
  750. letter-spacing: 0.5px;
  751. color: #b9e4ff;
  752. }
  753. .data-table th,
  754. .data-table td {
  755. padding: 10px 6px;
  756. color: #f4fbff;
  757. text-align: center;
  758. font-size: 13px;
  759. border-bottom: 1px solid rgba(130, 194, 231, 0.1);
  760. white-space: nowrap;
  761. overflow: hidden;
  762. text-overflow: ellipsis;
  763. }
  764. .data-table tbody tr {
  765. transition: background 0.25s;
  766. }
  767. .data-table tbody tr:nth-child(odd) {
  768. background: rgba(133, 196, 242, 0.10);
  769. }
  770. .data-table tbody tr:nth-child(even) {
  771. background: rgba(133, 196, 242, 0.04);
  772. }
  773. .data-table tbody tr:hover {
  774. background: rgba(56, 216, 255, 0.12);
  775. }
  776. .compact-table th,
  777. .compact-table td {
  778. padding: 9px 4px;
  779. }
  780. .status-cell.ok {
  781. color: #6effc4;
  782. position: relative;
  783. }
  784. .status-cell.warn {
  785. color: #ffe16a;
  786. }
  787. .status-cell.off {
  788. color: #ff8e8e;
  789. }
  790. .status-cell::before {
  791. content: '';
  792. display: inline-block;
  793. width: 6px;
  794. height: 6px;
  795. border-radius: 50%;
  796. margin-right: 6px;
  797. vertical-align: middle;
  798. }
  799. .status-cell.ok::before {
  800. background: #6effc4;
  801. box-shadow: 0 0 6px rgba(110, 255, 196, 0.6);
  802. }
  803. .status-cell.warn::before {
  804. background: #ffe16a;
  805. box-shadow: 0 0 6px rgba(255, 225, 106, 0.6);
  806. }
  807. .status-cell.off::before {
  808. background: #ff8e8e;
  809. box-shadow: 0 0 6px rgba(255, 142, 142, 0.6);
  810. }
  811. .center-panel {
  812. position: relative;
  813. }
  814. .map-stage {
  815. position: relative;
  816. height: 100%;
  817. overflow: hidden;
  818. border-radius: 12px;
  819. border: 1px solid rgba(56, 159, 223, 0.2);
  820. background: rgba(8, 20, 37, 0.64);
  821. box-shadow: 0 0 40px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(8, 30, 60, 0.3);
  822. }
  823. .map-stage-top {
  824. position: absolute;
  825. top: 14px;
  826. left: 14px;
  827. right: 14px;
  828. z-index: 3;
  829. display: flex;
  830. justify-content: space-between;
  831. gap: 12px;
  832. pointer-events: none;
  833. }
  834. .summary-strip,
  835. .map-kpis {
  836. display: flex;
  837. gap: 10px;
  838. }
  839. .summary-item,
  840. .map-kpi {
  841. min-width: 110px;
  842. padding: 10px 14px;
  843. border-radius: 10px;
  844. background: rgba(8, 31, 54, 0.82);
  845. border: 1px solid rgba(79, 177, 238, 0.18);
  846. backdrop-filter: blur(8px);
  847. transition: all 0.3s;
  848. }
  849. .summary-label,
  850. .map-kpi span {
  851. display: block;
  852. color: #91d7ff;
  853. font-size: 12px;
  854. letter-spacing: 0.5px;
  855. }
  856. .summary-value,
  857. .map-kpi strong {
  858. display: block;
  859. margin-top: 4px;
  860. color: #fff;
  861. font-size: 22px;
  862. font-weight: 800;
  863. letter-spacing: 1px;
  864. }
  865. .map-view {
  866. width: 100%;
  867. height: 100%;
  868. }
  869. .map-error {
  870. position: absolute;
  871. inset: 0;
  872. display: flex;
  873. align-items: center;
  874. justify-content: center;
  875. color: #ffd3d3;
  876. background: rgba(5, 10, 20, 0.72);
  877. z-index: 4;
  878. }
  879. .map-panel {
  880. position: absolute;
  881. z-index: 3;
  882. width: 190px;
  883. padding: 14px;
  884. border-radius: 12px;
  885. background: rgba(8, 31, 54, 0.82);
  886. border: 1px solid rgba(79, 177, 238, 0.18);
  887. backdrop-filter: blur(10px);
  888. }
  889. .info-panel {
  890. left: 18px;
  891. bottom: 20px;
  892. }
  893. .point-panel {
  894. right: 18px;
  895. bottom: 20px;
  896. }
  897. .mini-title {
  898. margin-bottom: 10px;
  899. color: #8fe5ff;
  900. font-size: 14px;
  901. font-weight: 700;
  902. letter-spacing: 0.5px;
  903. }
  904. .mini-row {
  905. display: flex;
  906. justify-content: space-between;
  907. margin-top: 6px;
  908. padding: 4px 0;
  909. color: #d6efff;
  910. font-size: 13px;
  911. border-bottom: 1px solid rgba(130, 194, 231, 0.06);
  912. }
  913. .mini-row:last-child {
  914. border-bottom: none;
  915. }
  916. .warning-scroll {
  917. height: calc(100% - 38px);
  918. overflow-y: auto;
  919. padding-right: 4px;
  920. }
  921. .warning-scroll::-webkit-scrollbar {
  922. width: 5px;
  923. }
  924. .warning-scroll::-webkit-scrollbar-thumb {
  925. border-radius: 999px;
  926. background: rgba(96, 180, 235, 0.3);
  927. }
  928. .warning-scroll::-webkit-scrollbar-track {
  929. background: transparent;
  930. }
  931. .warning-list {
  932. display: grid;
  933. gap: 10px;
  934. }
  935. .warning-item {
  936. display: flex;
  937. gap: 12px;
  938. align-items: stretch;
  939. padding: 14px;
  940. border-radius: 14px;
  941. border: 1px solid rgba(255, 108, 108, 0.1);
  942. background: linear-gradient(180deg, rgba(72, 24, 38, 0.42), rgba(49, 19, 31, 0.30));
  943. transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  944. position: relative;
  945. overflow: hidden;
  946. }
  947. .warning-item::before {
  948. content: '';
  949. position: absolute;
  950. left: 0;
  951. top: 12px;
  952. bottom: 12px;
  953. width: 3px;
  954. border-radius: 0 3px 3px 0;
  955. transition: all 0.35s;
  956. }
  957. .warning-item.danger::before {
  958. background: linear-gradient(180deg, #ff5858, #ff3030);
  959. box-shadow: 0 0 12px rgba(255, 58, 58, 0.5);
  960. animation: dangerPulse 2s ease-in-out infinite;
  961. }
  962. .warning-item.notice::before {
  963. background: linear-gradient(180deg, #ffc635, #ff9f1a);
  964. box-shadow: 0 0 10px rgba(255, 198, 53, 0.35);
  965. }
  966. @keyframes dangerPulse {
  967. 0%, 100% { opacity: 0.6; }
  968. 50% { opacity: 1; }
  969. }
  970. .warning-item:hover {
  971. transform: translateX(3px);
  972. }
  973. .warning-item.danger:hover {
  974. border-color: rgba(255, 108, 108, 0.25);
  975. box-shadow: 0 4px 20px rgba(255, 58, 58, 0.1);
  976. }
  977. .warning-item.notice:hover {
  978. border-color: rgba(255, 201, 92, 0.2);
  979. box-shadow: 0 4px 20px rgba(255, 198, 53, 0.08);
  980. }
  981. .warning-item.notice {
  982. border-color: rgba(255, 201, 92, 0.1);
  983. background: linear-gradient(180deg, rgba(78, 63, 23, 0.28), rgba(48, 43, 20, 0.18));
  984. }
  985. .warning-side {
  986. width: 52px;
  987. flex: 0 0 52px;
  988. display: flex;
  989. flex-direction: column;
  990. gap: 8px;
  991. align-items: center;
  992. }
  993. .warning-badge {
  994. width: 34px;
  995. height: 34px;
  996. border-radius: 10px;
  997. display: flex;
  998. align-items: center;
  999. justify-content: center;
  1000. font-size: 13px;
  1001. font-weight: 800;
  1002. color: #fff;
  1003. transition: transform 0.3s;
  1004. }
  1005. .warning-item:hover .warning-badge {
  1006. transform: scale(1.1);
  1007. }
  1008. .warning-tag {
  1009. width: 100%;
  1010. padding: 3px 0;
  1011. border-radius: 999px;
  1012. text-align: center;
  1013. font-size: 10px;
  1014. letter-spacing: 0.5px;
  1015. color: #dcefff;
  1016. background: rgba(255, 255, 255, 0.06);
  1017. }
  1018. .warning-item.danger .warning-badge {
  1019. background: rgba(255, 58, 58, 0.28);
  1020. color: #ff8787;
  1021. }
  1022. .warning-item.danger .warning-title {
  1023. color: #ffd8d8;
  1024. }
  1025. .warning-item.notice .warning-badge {
  1026. background: rgba(255, 198, 53, 0.2);
  1027. color: #ffd45d;
  1028. }
  1029. .warning-item.notice .warning-title {
  1030. color: #fff2c4;
  1031. }
  1032. .warning-main {
  1033. min-width: 0;
  1034. flex: 1;
  1035. }
  1036. .warning-title-row {
  1037. display: flex;
  1038. align-items: flex-start;
  1039. justify-content: space-between;
  1040. gap: 8px;
  1041. }
  1042. .warning-title {
  1043. font-weight: 700;
  1044. font-size: 16px;
  1045. line-height: 1.2;
  1046. }
  1047. .warning-time,
  1048. .warning-code,
  1049. .warning-desc {
  1050. color: #dcefff;
  1051. font-size: 12px;
  1052. }
  1053. .warning-time {
  1054. color: #b6dfff;
  1055. white-space: nowrap;
  1056. }
  1057. .warning-code {
  1058. margin: 6px 0 4px;
  1059. color: #9ad8ff;
  1060. }
  1061. .warning-desc {
  1062. line-height: 1.5;
  1063. }
  1064. .hazard-summary {
  1065. display: flex;
  1066. gap: 12px;
  1067. margin-bottom: 10px;
  1068. }
  1069. .hazard-summary.three-col {
  1070. justify-content: space-between;
  1071. }
  1072. .hazard-summary-item {
  1073. display: flex;
  1074. align-items: center;
  1075. gap: 8px;
  1076. font-size: 13px;
  1077. padding: 8px 12px;
  1078. border-radius: 10px;
  1079. background: rgba(255, 255, 255, 0.03);
  1080. border: 1px solid rgba(255, 255, 255, 0.04);
  1081. transition: all 0.3s;
  1082. }
  1083. .hazard-summary-item:hover {
  1084. background: rgba(255, 255, 255, 0.06);
  1085. border-color: rgba(255, 255, 255, 0.08);
  1086. }
  1087. .hazard-dot {
  1088. width: 8px;
  1089. height: 24px;
  1090. display: inline-block;
  1091. border-radius: 4px;
  1092. box-shadow: 0 0 10px currentColor;
  1093. }
  1094. .hazard-chart {
  1095. height: 160px;
  1096. }
  1097. .equipment-wrap {
  1098. height: calc(100% - 38px);
  1099. }
  1100. :deep(.BMap_cpyCtrl),
  1101. :deep(.anchorBL) {
  1102. display: none !important;
  1103. }
  1104. .deerflow-mark {
  1105. position: fixed;
  1106. bottom: 14px;
  1107. right: 18px;
  1108. z-index: 10;
  1109. display: flex;
  1110. align-items: center;
  1111. gap: 6px;
  1112. text-decoration: none;
  1113. opacity: 0.28;
  1114. transition: opacity 0.4s;
  1115. }
  1116. .deerflow-mark:hover {
  1117. opacity: 0.6;
  1118. }
  1119. .deerflow-diamond {
  1120. font-size: 10px;
  1121. color: #8fe5ff;
  1122. }
  1123. .deerflow-text {
  1124. font-size: 11px;
  1125. letter-spacing: 1px;
  1126. color: #8fe5ff;
  1127. font-weight: 500;
  1128. }
  1129. @media (max-width: 1500px) {
  1130. .screen-body {
  1131. grid-template-columns: 320px 1fr 320px;
  1132. }
  1133. .header-title {
  1134. font-size: 24px;
  1135. }
  1136. .summary-item,
  1137. .map-kpi {
  1138. min-width: 96px;
  1139. }
  1140. }
  1141. </style>