warndata.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726
  1. <template>
  2. <view class="container">
  3. <u-navbar
  4. :title="titleName"
  5. :safeAreaInsetTop="true"
  6. :fixed="true"
  7. height="50px"
  8. bgColor="transparent"
  9. titleStyle="fw600 fs-18"
  10. leftIconColor="#303133"
  11. @leftClick="onLeftClick"
  12. >
  13. <view class="u-nav-slot" slot="left">
  14. <u-icon name="arrow-left" size="20" color="#303133"></u-icon>
  15. </view>
  16. </u-navbar>
  17. <view class="menupage">
  18. <view class="main" v-if="isShowDetail">
  19. <view class="warn-list">
  20. <!-- 通风监测预警 -->
  21. <view class="warn-section vent-section">
  22. <view class="vent-card">
  23. <view class="vent-card-header" @click.stop="toggleIsShow1">
  24. <text class="warn-card-title">通风监测预警</text>
  25. <view class="warn-card-action">
  26. <text class="warn-action-text">{{
  27. isShow1 ? "收起" : "展开"
  28. }}</text>
  29. <u-icon
  30. :name="isShow1 ? 'arrow-up' : 'arrow-down'"
  31. color="#1890ff"
  32. size="14"
  33. ></u-icon>
  34. </view>
  35. </view>
  36. <view v-show="isShow1">
  37. <view class="vent-card-divider"></view>
  38. <view class="vent-card-content" @click="getDetail('vent')">
  39. <view class="vent-metrics-row">
  40. <view class="vent-metric-card">
  41. <text class="vent-metric-value">{{
  42. windData.zongjinfeng || "--"
  43. }}</text>
  44. <text class="vent-metric-label">总进风量(m³/min)</text>
  45. </view>
  46. <view class="vent-metric-card">
  47. <text class="vent-metric-value">{{
  48. windData.zonghuifeng || "--"
  49. }}</text>
  50. <text class="vent-metric-label">总回风量(m³/min)</text>
  51. </view>
  52. <view class="vent-metric-card">
  53. <text class="vent-metric-value">{{
  54. xufengliang || "--"
  55. }}</text>
  56. <text class="vent-metric-label">总需风量(m³/min)</text>
  57. </view>
  58. </view>
  59. <view class="vent-risk-panel">
  60. <view
  61. class="vent-risk-item"
  62. v-for="(risk, rIndex) in ventRiskList"
  63. :key="rIndex"
  64. >
  65. <view
  66. class="risk-icon"
  67. :style="{ background: risk.color }"
  68. >
  69. <u-icon
  70. name="error-circle-fill"
  71. color="#ffffff"
  72. size="12"
  73. ></u-icon>
  74. </view>
  75. <text class="risk-text"
  76. >{{ risk.label }}: {{ risk.value }}</text
  77. >
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 设备监测预警 -->
  85. <view class="warn-section device-section">
  86. <view class="device-card">
  87. <view class="device-card-header" @click.stop="toggleIsShow5">
  88. <text class="warn-card-title">设备监测预警</text>
  89. <view class="warn-card-action">
  90. <text class="warn-action-text">{{
  91. isShow5 ? "收起" : "展开"
  92. }}</text>
  93. <u-icon
  94. :name="isShow5 ? 'arrow-up' : 'arrow-down'"
  95. color="#2b7cff"
  96. size="14"
  97. ></u-icon>
  98. </view>
  99. </view>
  100. <view v-show="isShow5">
  101. <view class="device-card-divider"></view>
  102. <view class="device-card-content" @click="getDetail('device')">
  103. <view class="device-grid">
  104. <view
  105. class="device-item-card"
  106. v-for="(item, index) in deviceList"
  107. :key="index"
  108. >
  109. <image
  110. class="device-item-icon"
  111. :src="getDeviceIcon(item)"
  112. mode="aspectFit"
  113. ></image>
  114. <view class="device-item-bar">
  115. <text class="device-item-name">{{ item.name }}</text>
  116. <view class="device-status-tag">
  117. <text class="device-item-status">{{
  118. item.status
  119. }}</text>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 火灾监测预警 -->
  129. <view class="warn-section fire-section" v-if="getCode != 'lblt'">
  130. <view class="fire-card">
  131. <view class="fire-card-header" @click.stop="toggleIsShow2">
  132. <text class="warn-card-title">火灾监测预警</text>
  133. <view class="warn-card-action">
  134. <text class="warn-action-text">{{
  135. isShow2 ? "收起" : "展开"
  136. }}</text>
  137. <u-icon
  138. :name="isShow2 ? 'arrow-up' : 'arrow-down'"
  139. color="#2b7cff"
  140. size="14"
  141. ></u-icon>
  142. </view>
  143. </view>
  144. <view v-show="isShow2">
  145. <view class="fire-card-divider"></view>
  146. <view class="fire-card-content" @click="getDetail('fire')">
  147. <view class="fire-block">
  148. <view class="fire-block-header">
  149. <!-- <view class="fire-block-deco">
  150. <view class="fire-deco-line"></view>
  151. <view class="fire-deco-line"></view>
  152. </view> -->
  153. <text class="fire-block-title">内因火灾</text>
  154. <!-- <view class="fire-block-line"></view> -->
  155. </view>
  156. <view class="fire-grid">
  157. <view
  158. class="fire-data-card"
  159. v-for="(item, index) in internalFireList"
  160. :key="'internal-' + index"
  161. >
  162. <view class="fire-icon-box">
  163. <image
  164. class="fire-icon"
  165. :src="getFireIcon(item)"
  166. mode="aspectFit"
  167. ></image>
  168. </view>
  169. <view class="fire-data-info">
  170. <text
  171. :class="[
  172. 'fire-data-value',
  173. isFireValueWarn(item) ? 'fire-value-warn' : '',
  174. ]"
  175. >{{ item.value }}</text
  176. >
  177. <text class="fire-data-label"
  178. >{{ item.monitorcode }}{{ getFireUnit(item) }}</text
  179. >
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. <view class="fire-block fire-block-external">
  185. <view class="fire-block-header">
  186. <!-- <view class="fire-block-deco">
  187. <view class="fire-deco-line"></view>
  188. <view class="fire-deco-line"></view>
  189. </view> -->
  190. <text class="fire-block-title">外因火灾</text>
  191. <!-- <view class="fire-block-line"></view> -->
  192. </view>
  193. <view class="fire-grid">
  194. <view
  195. class="fire-data-card"
  196. v-for="(item, index) in externalFireList"
  197. :key="'external-' + index"
  198. >
  199. <view class="fire-icon-box">
  200. <image
  201. class="fire-icon"
  202. :src="getFireIcon(item)"
  203. mode="aspectFit"
  204. ></image>
  205. </view>
  206. <view class="fire-data-info">
  207. <text
  208. :class="[
  209. 'fire-data-value',
  210. isFireValueWarn(item) ? 'fire-value-warn' : '',
  211. ]"
  212. >{{ item.value }}</text
  213. >
  214. <text class="fire-data-label"
  215. >{{ item.monitorcode }}{{ getFireUnit(item) }}</text
  216. >
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <!-- 粉尘监测预警 -->
  226. <view class="warn-section dust-section" v-if="getCode != 'lblt'">
  227. <view class="dust-card">
  228. <view class="dust-card-header" @click.stop="toggleIsShow3">
  229. <text class="warn-card-title">粉尘监测预警</text>
  230. <view class="warn-card-action">
  231. <text class="warn-action-text">{{
  232. isShow3 ? "收起" : "展开"
  233. }}</text>
  234. <u-icon
  235. :name="isShow3 ? 'arrow-up' : 'arrow-down'"
  236. color="#2b7cff"
  237. size="14"
  238. ></u-icon>
  239. </view>
  240. </view>
  241. <view v-show="isShow3">
  242. <view class="dust-card-divider"></view>
  243. <view class="dust-card-content" @click="getDetail('dust')">
  244. <view class="dust-alarm-bar">
  245. <view class="dust-alarm-icon-wrap">
  246. <image
  247. class="dust-alarm-icon"
  248. src="/static/warndata/报警.svg"
  249. mode="aspectFit"
  250. ></image>
  251. </view>
  252. <text class="dust-alarm-label">报警:</text>
  253. <text class="dust-alarm-value">{{ dustAlarmCount }}</text>
  254. </view>
  255. <view class="dust-risk-row">
  256. <view
  257. class="dust-risk-card"
  258. v-for="(risk, index) in dustRiskList"
  259. :key="index"
  260. :style="{ background: risk.bg }"
  261. >
  262. <view
  263. class="dust-risk-icon"
  264. :style="{ background: risk.iconBg }"
  265. >
  266. <image
  267. class="dust-risk-icon-img"
  268. src="/static/warndata/风险.svg"
  269. mode="aspectFit"
  270. ></image>
  271. </view>
  272. <text class="dust-risk-value">{{ risk.value }}</text>
  273. <text class="dust-risk-label">{{ risk.label }}</text>
  274. </view>
  275. </view>
  276. </view>
  277. </view>
  278. </view>
  279. </view>
  280. <!-- 瓦斯监测预警 -->
  281. <view class="warn-section gas-section" v-if="getCode != 'lblt'">
  282. <view class="gas-card">
  283. <view class="gas-card-header" @click.stop="toggleIsShow4">
  284. <text class="warn-card-title">瓦斯监测预警</text>
  285. <view class="warn-card-action">
  286. <text class="warn-action-text">{{
  287. isShow4 ? "收起" : "展开"
  288. }}</text>
  289. <u-icon
  290. :name="isShow4 ? 'arrow-up' : 'arrow-down'"
  291. color="#2b7cff"
  292. size="14"
  293. ></u-icon>
  294. </view>
  295. </view>
  296. <view v-show="isShow4">
  297. <view class="gas-card-divider"></view>
  298. <view class="gas-card-content" @click="getDetail('gas')">
  299. <view class="gas-block" v-if="gasDevice.length > 0">
  300. <view class="gas-block-header">
  301. <!-- <view class="gas-block-deco">
  302. <view class="gas-deco-line"></view>
  303. <view class="gas-deco-line"></view>
  304. </view> -->
  305. <text class="gas-block-title">安全监测系统监测点</text>
  306. <text class="gas-block-count">{{ gasSafeTotal }}</text>
  307. <!-- <view class="gas-block-line"></view> -->
  308. </view>
  309. <view class="gas-grid">
  310. <view
  311. class="gas-data-card"
  312. v-for="(item, index) in gasDevice"
  313. :key="'safe-' + index"
  314. >
  315. <view class="gas-icon-box">
  316. <image
  317. class="gas-icon"
  318. src="/static/warndata/监测点.svg"
  319. mode="aspectFit"
  320. ></image>
  321. </view>
  322. <view class="gas-data-info">
  323. <text class="gas-data-value">{{
  324. item.gasNumber
  325. }}</text>
  326. <text class="gas-data-label">{{
  327. item.systemname
  328. }}</text>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. <view
  334. class="gas-block gas-block-second"
  335. v-if="gasDevice.length > 0"
  336. >
  337. <view class="gas-block-header">
  338. <!-- <view class="gas-block-deco">
  339. <view class="gas-deco-line"></view>
  340. <view class="gas-deco-line"></view>
  341. </view> -->
  342. <text class="gas-block-title">瓦斯抽采系统监测点</text>
  343. <text class="gas-block-count">{{ gasPumpTotal }}</text>
  344. <!-- <view class="gas-block-line"></view> -->
  345. </view>
  346. <view class="gas-grid">
  347. <view
  348. class="gas-data-card"
  349. v-for="(item, index) in gasDevice"
  350. :key="'pump-' + index"
  351. >
  352. <view class="gas-icon-box">
  353. <image
  354. class="gas-icon"
  355. src="/static/warndata/监测点.svg"
  356. mode="aspectFit"
  357. ></image>
  358. </view>
  359. <view class="gas-data-info">
  360. <text class="gas-data-value">{{
  361. item.pumpNumber
  362. }}</text>
  363. <text class="gas-data-label">{{
  364. item.systemname
  365. }}</text>
  366. </view>
  367. </view>
  368. </view>
  369. </view>
  370. </view>
  371. </view>
  372. </view>
  373. </view>
  374. </view>
  375. </view>
  376. <view class="main" v-else>
  377. <ventDetail v-if="Type == 'vent'"></ventDetail>
  378. <deviceDetail v-if="Type == 'device'"></deviceDetail>
  379. <fireDetail v-if="Type == 'fire'"></fireDetail>
  380. <dustDetail v-if="Type == 'dust'"></dustDetail>
  381. <gasDetail v-if="Type == 'gas'"></gasDetail>
  382. </view>
  383. </view>
  384. </view>
  385. </template>
  386. <script>
  387. import api from "@/api/api";
  388. import ventDetail from "./components/vent-detail.vue";
  389. import deviceDetail from "./components/device-detail.vue";
  390. import fireDetail from "./components/fire-detail.vue";
  391. import dustDetail from "./components/dust-detail.vue";
  392. import gasDetail from "./components/gas-detail.vue";
  393. export default {
  394. props: {},
  395. watch: {},
  396. data() {
  397. return {
  398. backPic0: "",
  399. backPic: "",
  400. titleName: "预警监测",
  401. isShowDetail: true,
  402. detailComponent: null,
  403. windData: {},
  404. devicekindData: [],
  405. fireData: [],
  406. gasData: [],
  407. dustData: {},
  408. dustTotalcount: 0,
  409. dustLevelstatus: "",
  410. gasDevice: [],
  411. externalInfo: [],
  412. internalInfo: [],
  413. xufengliang: "", //总需风量
  414. imageMap: {
  415. atomizing: "atomizing.png",
  416. ballvalve: "ballvalve.png",
  417. dedustefan: "dedustefan.png",
  418. drilling: "drilling.png",
  419. dustdev: "dustdev.png",
  420. fanlocal: "fanlocal.png",
  421. fanmain: "fanmain.png",
  422. forcFan: "forcFan.png",
  423. gasmonitor: "gasmonitor.png",
  424. gate: "gate.png",
  425. location: "location.png",
  426. nitrogen: "nitrogen.png",
  427. pulping: "pulping.png",
  428. pump: "pump.png",
  429. rebroadcast: "rebroadcast.png",
  430. safetymonitor: "safetymonitor.png",
  431. spary: "spary.png",
  432. unit: "unit.png",
  433. window: "window.png",
  434. windrect: "windrect.png",
  435. wintest: "wintest.png",
  436. },
  437. dustMap: {
  438. alarm: "报警",
  439. blue: "低风险",
  440. orange: "重大风险",
  441. red: "较大风险",
  442. yellow: "一般风险",
  443. },
  444. isShow1: true,
  445. isShow2: false,
  446. isShow3: false,
  447. isShow4: false,
  448. isShow5: true,
  449. Type: "", // 当前点击的类型
  450. };
  451. },
  452. mounted() {
  453. this.$nextTick(() => {
  454. this.getWarnInfo();
  455. });
  456. },
  457. components: {
  458. ventDetail,
  459. deviceDetail,
  460. fireDetail,
  461. dustDetail,
  462. gasDetail,
  463. },
  464. methods: {
  465. //获取预警信息
  466. getWarnInfo() {
  467. return new Promise((resolve, reject) => {
  468. api
  469. .getWarnInfo()
  470. .then((response) => {
  471. if (response.data.code == 200) {
  472. this.windData = response.data.result.ventInfo;
  473. this.devicekindData = response.data.result.info.devicekindInfo;
  474. this.fireData = response.data.result.info.sysInfo.fireS;
  475. const externalInfo1 = this.fireData.summaryInfo.external;
  476. const internalInfo1 = this.fireData.summaryInfo.internal;
  477. for (let key in externalInfo1) {
  478. if (!externalInfo1.hasOwnProperty(key)) continue;
  479. const item = externalInfo1[key];
  480. // 跳过空对象(如 ch4val: {})
  481. if (Object.keys(item).length === 0) continue;
  482. if (item.code == "coval") {
  483. item.monitorcode = "一氧化碳";
  484. } else if (item.code == "ch4val") {
  485. item.monitorcode = "甲烷";
  486. } else if (item.code == "o2val") {
  487. item.monitorcode = "氧气";
  488. } else if (item.code == "co2val") {
  489. item.monitorcode = "二氧化碳";
  490. } else if (item.code == "fmax") {
  491. item.monitorcode = "温度";
  492. } else if (item.code == "chval") {
  493. item.monitorcode = "乙炔";
  494. } else if (item.code == "ch2val") {
  495. item.monitorcode = "乙烯";
  496. } else if (item.code == "temperature") {
  497. item.monitorcode = "温度";
  498. } else if (item.code == "gasval") {
  499. item.monitorcode = "瓦斯";
  500. } else if (item.code == "fireval") {
  501. item.monitorcode = "温度";
  502. } else if (item.code == "smokeval") {
  503. item.monitorcode = "烟雾";
  504. }
  505. }
  506. for (let key in internalInfo1) {
  507. if (!internalInfo1.hasOwnProperty(key)) continue;
  508. const item = internalInfo1[key];
  509. // 跳过空对象(如 ch4val: {})
  510. if (Object.keys(item).length === 0) continue;
  511. if (item.code == "coval") {
  512. item.monitorcode = "一氧化碳";
  513. } else if (item.code == "ch4val") {
  514. item.monitorcode = "甲烷";
  515. } else if (item.code == "o2val") {
  516. item.monitorcode = "氧气";
  517. } else if (item.code == "co2val") {
  518. item.monitorcode = "二氧化碳";
  519. } else if (item.code == "chval") {
  520. item.monitorcode = "乙炔";
  521. } else if (item.code == "ch2val") {
  522. item.monitorcode = "乙烯";
  523. } else if (item.code == "fmax") {
  524. item.monitorcode = "温度";
  525. } else if (item.code == "temperature") {
  526. item.monitorcode = "温度";
  527. } else if (item.code == "gasval") {
  528. item.monitorcode = "瓦斯";
  529. } else if (item.code == "fireval") {
  530. item.monitorcode = "温度";
  531. } else if (item.code == "smokeval") {
  532. item.monitorcode = "烟雾";
  533. }
  534. }
  535. this.externalInfo = externalInfo1;
  536. this.internalInfo = internalInfo1;
  537. this.gasData = response.data.result.info.sysInfo.gasS;
  538. this.gasDevice = this.gasData.devices;
  539. this.xufengliang = this.windData.sysdata.xufengliang;
  540. const dusting =
  541. response.data.result.info.devicekindInfo.dusting || {};
  542. this.dustData = dusting;
  543. this.dustTotalcount = dusting.totalcount;
  544. this.dustLevelstatus = dusting.levelstatus;
  545. } else {
  546. reject(response);
  547. }
  548. })
  549. .catch((error) => {
  550. console.log("catch===>response", response);
  551. reject(error);
  552. });
  553. });
  554. },
  555. //左上角返回键:详情页返回预警列表页,预警列表页返回首页
  556. onLeftClick() {
  557. if (!this.isShowDetail) {
  558. this.menuShow();
  559. return;
  560. }
  561. this.$emit("changePage", "device");
  562. },
  563. //返回监测首页
  564. menuShow() {
  565. this.isShowDetail = true;
  566. },
  567. //跳转监测详情
  568. getDetail(data) {
  569. this.isShowDetail = false;
  570. this.Type = data; // 将当前点击的类型存储到 Type 中
  571. },
  572. toggleIsShow1() {
  573. this.isShow1 = !this.isShow1; // 切换 isShow 的值
  574. },
  575. toggleIsShow2() {
  576. this.isShow2 = !this.isShow2; // 切换 isShow 的值
  577. },
  578. toggleIsShow3() {
  579. this.isShow3 = !this.isShow3; // 切换 isShow 的值
  580. },
  581. toggleIsShow4() {
  582. this.isShow4 = !this.isShow4; // 切换 isShow 的值
  583. },
  584. toggleIsShow5() {
  585. this.isShow5 = !this.isShow5; // 切换 isShow 的值
  586. },
  587. getDeviceIcon(item) {
  588. const iconNameMap = {
  589. atomizing: "喷淋",
  590. dedustefan: "除尘器",
  591. drilling: "跟机喷雾",
  592. dustdev: "喷粉",
  593. fanlocal: "局扇",
  594. fanmain: "主扇",
  595. forcFan: "压风",
  596. gasmonitor: "抽采管路",
  597. gate: "风门",
  598. location: "人员定位",
  599. nitrogen: "注氮",
  600. pulping: "注浆",
  601. pump: "瓦斯泵",
  602. rebroadcast: "语音扩播",
  603. safetymonitor: "安全监控",
  604. spary: "喷淋",
  605. spray: "喷淋",
  606. unit: "评价单元",
  607. window: "风窗",
  608. wintest: "测风装置",
  609. };
  610. const iconName = iconNameMap[item.code] || item.name || "评价单元";
  611. return `/static/warndata/${iconName} – 1.png`;
  612. },
  613. getFireIcon(item) {
  614. const monitor = item.monitorcode || "";
  615. if (monitor.indexOf("上隅角") >= 0) {
  616. return "/static/warndata/上隅角.svg";
  617. }
  618. if (monitor === "温度") {
  619. return "/static/warndata/监测点.svg";
  620. }
  621. if (monitor === "烟雾") {
  622. return "/static/warndata/风险.svg";
  623. }
  624. if (monitor === "火焰") {
  625. return "/static/warndata/报警.svg";
  626. }
  627. const codeMap = {
  628. coval: "CO.svg",
  629. ch4val: "CH4.svg",
  630. ch2val: "C2H4.svg",
  631. chval: "C2H4.svg",
  632. co2val: "CO2.svg",
  633. o2val: "上隅角.svg",
  634. };
  635. return `/static/warndata/${codeMap[item.code] || "监测点.svg"}`;
  636. },
  637. getFireUnit(item) {
  638. if (
  639. item.code === "o2val" ||
  640. item.code === "co2val" ||
  641. item.code === "ch4val" ||
  642. item.code === "smokeval"
  643. ) {
  644. return "(%)";
  645. }
  646. if (
  647. item.code === "fmax" ||
  648. item.code === "temperature" ||
  649. item.code === "fireval"
  650. ) {
  651. return "(℃)";
  652. }
  653. return "(ppm)";
  654. },
  655. isFireValueWarn(item) {
  656. return item.Maxlevel > 0;
  657. },
  658. },
  659. computed: {
  660. internalFireList() {
  661. if (!this.internalInfo) return [];
  662. const list = Array.isArray(this.internalInfo)
  663. ? this.internalInfo
  664. : Object.values(this.internalInfo);
  665. return list.filter((item) => item && Object.keys(item).length > 0);
  666. },
  667. externalFireList() {
  668. if (!this.externalInfo) return [];
  669. const list = Array.isArray(this.externalInfo)
  670. ? this.externalInfo
  671. : Object.values(this.externalInfo);
  672. return list.filter((item) => item && Object.keys(item).length > 0);
  673. },
  674. deviceList() {
  675. if (!this.devicekindData) return [];
  676. const list = Array.isArray(this.devicekindData)
  677. ? this.devicekindData
  678. : Object.values(this.devicekindData);
  679. return list.filter((item) => item && item.name);
  680. },
  681. getCode() {
  682. return uni.getStorageSync("apiCode");
  683. },
  684. ventRiskList() {
  685. const data = this.windData || {};
  686. const sys = data.sysdata || {};
  687. const getVal = (key) => {
  688. if (data[key] !== undefined && data[key] !== null && data[key] !== "") {
  689. return data[key];
  690. }
  691. if (sys[key] !== undefined && sys[key] !== null && sys[key] !== "") {
  692. return sys[key];
  693. }
  694. return 0;
  695. };
  696. return [
  697. { label: "低风险", color: "#1890ff", value: getVal("blue") },
  698. { label: "一般风险", color: "#f5a623", value: getVal("yellow") },
  699. { label: "较大风险", color: "#ff7a00", value: getVal("red") },
  700. { label: "重大风险", color: "#ff4d4f", value: getVal("orange") },
  701. { label: "报警", color: "#e90000", value: getVal("alarm") },
  702. ];
  703. },
  704. dustAlarmCount() {
  705. const data = this.dustData || {};
  706. if (
  707. data.alarm !== undefined &&
  708. data.alarm !== null &&
  709. data.alarm !== ""
  710. ) {
  711. return data.alarm;
  712. }
  713. return 0;
  714. },
  715. dustRiskList() {
  716. const data = this.dustData || {};
  717. const getVal = (key) => {
  718. if (data[key] !== undefined && data[key] !== null && data[key] !== "") {
  719. return data[key];
  720. }
  721. return 0;
  722. };
  723. return [
  724. {
  725. label: "低风险",
  726. bg: "#e6f7ff",
  727. iconBg: "#1890ff",
  728. value: getVal("blue"),
  729. },
  730. {
  731. label: "一般风险",
  732. bg: "#fffbe6",
  733. iconBg: "#faad14",
  734. value: getVal("yellow"),
  735. },
  736. {
  737. label: "较大风险",
  738. bg: "#fff7e6",
  739. iconBg: "#ff8c00",
  740. value: getVal("red"),
  741. },
  742. {
  743. label: "重大风险",
  744. bg: "#fff1f0",
  745. iconBg: "#f5222d",
  746. value: getVal("orange"),
  747. },
  748. ];
  749. },
  750. gasSafeTotal() {
  751. if (!this.gasDevice || !this.gasDevice.length) return 0;
  752. return this.gasDevice.reduce((sum, item) => {
  753. const num = Number(item.gasNumber);
  754. return sum + (isNaN(num) ? 0 : num);
  755. }, 0);
  756. },
  757. gasPumpTotal() {
  758. if (!this.gasDevice || !this.gasDevice.length) return 0;
  759. return this.gasDevice.reduce((sum, item) => {
  760. const num = Number(item.pumpNumber);
  761. return sum + (isNaN(num) ? 0 : num);
  762. }, 0);
  763. },
  764. },
  765. };
  766. </script>
  767. <style lang="scss" scoped>
  768. .nameStyle {
  769. color: #000000;
  770. font-size: 15px;
  771. }
  772. .container {
  773. // display: flex;
  774. // flex-direction: column;
  775. // min-height: 100vh;
  776. // background: linear-gradient(180deg, #c8d8f8 0%, #f5f7fa 320rpx, #f5f7fa 100%);
  777. }
  778. .menupage {
  779. height: calc(100vh - 101px);
  780. margin-top: 50px;
  781. overflow-y: auto;
  782. }
  783. .main {
  784. margin-top: 10px;
  785. display: flex;
  786. flex-direction: column;
  787. flex: 1;
  788. width: 100%;
  789. padding: 0 24rpx 40rpx;
  790. box-sizing: border-box;
  791. background: transparent;
  792. }
  793. .warn-list {
  794. width: 100%;
  795. }
  796. .warn-section {
  797. margin-bottom: 20rpx;
  798. }
  799. .warn-card-header {
  800. display: flex;
  801. flex-direction: row;
  802. align-items: center;
  803. justify-content: space-between;
  804. background: #f9f9fb;
  805. border-radius: 16rpx;
  806. padding: 28rpx 24rpx;
  807. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  808. }
  809. .warn-card-title {
  810. font-size: 30rpx;
  811. font-weight: 600;
  812. color: #000000;
  813. }
  814. .warn-card-action {
  815. display: flex;
  816. flex-direction: row;
  817. align-items: center;
  818. }
  819. .warn-action-text {
  820. font-size: 14px;
  821. color: #0065f8;
  822. margin-right: 3px;
  823. font-weight: 500;
  824. }
  825. .warn-card-body {
  826. margin-top: 12rpx;
  827. padding: 20rpx;
  828. background: #ffffff;
  829. border-radius: 16rpx;
  830. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  831. overflow: hidden;
  832. }
  833. /* ===== 通风监测预警 ===== */
  834. .vent-section {
  835. margin-bottom: 20rpx;
  836. }
  837. .vent-card {
  838. background: #ffffff;
  839. border-radius: 16rpx;
  840. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  841. overflow: hidden;
  842. }
  843. .vent-card-header {
  844. display: flex;
  845. flex-direction: row;
  846. align-items: center;
  847. justify-content: space-between;
  848. padding: 28rpx 24rpx;
  849. }
  850. .vent-card-divider {
  851. height: 1rpx;
  852. background: #eef0f4;
  853. margin: 0 24rpx;
  854. }
  855. .vent-card-content {
  856. padding: 20rpx 24rpx 24rpx;
  857. }
  858. .vent-metrics-row {
  859. display: flex;
  860. flex-direction: row;
  861. justify-content: space-between;
  862. }
  863. .vent-metric-card {
  864. flex: 1;
  865. margin: 0 6rpx;
  866. padding: 24rpx 8rpx;
  867. border-radius: 12rpx;
  868. background: linear-gradient(
  869. to bottom,
  870. rgba(175, 195, 252, 0.6) 0%,
  871. rgba(175, 195, 252, 0.1) 100%
  872. );
  873. display: flex;
  874. flex-direction: column;
  875. align-items: center;
  876. justify-content: center;
  877. box-sizing: border-box;
  878. }
  879. .vent-metric-card:first-child {
  880. margin-left: 0;
  881. }
  882. .vent-metric-card:last-child {
  883. margin-right: 0;
  884. }
  885. .vent-metric-value {
  886. font-size: 28rpx;
  887. font-weight: 700;
  888. color: #0065f8;
  889. line-height: 1.3;
  890. text-align: center;
  891. word-break: break-all;
  892. }
  893. .vent-metric-label {
  894. margin-top: 10rpx;
  895. font-size: 24rpx;
  896. color: #000000;
  897. line-height: 1.3;
  898. text-align: center;
  899. }
  900. .vent-risk-panel {
  901. margin-top: 16rpx;
  902. padding: 24rpx 16rpx;
  903. border-radius: 12rpx;
  904. background: linear-gradient(
  905. to bottom,
  906. rgba(175, 195, 252, 0.6) 0%,
  907. rgba(175, 195, 252, 0.1) 100%
  908. );
  909. display: flex;
  910. flex-direction: row;
  911. flex-wrap: wrap;
  912. }
  913. .vent-risk-item {
  914. width: 33.33%;
  915. display: flex;
  916. flex-direction: row;
  917. align-items: center;
  918. margin-bottom: 20rpx;
  919. box-sizing: border-box;
  920. padding-right: 8rpx;
  921. }
  922. .vent-risk-item:nth-child(n + 4) {
  923. margin-bottom: 0;
  924. }
  925. .risk-icon {
  926. width: 32rpx;
  927. height: 32rpx;
  928. border-radius: 50%;
  929. display: flex;
  930. align-items: center;
  931. justify-content: center;
  932. flex-shrink: 0;
  933. margin-right: 8rpx;
  934. }
  935. .risk-text {
  936. font-size: 24rpx;
  937. color: #000000;
  938. line-height: 1.3;
  939. overflow: hidden;
  940. text-overflow: ellipsis;
  941. white-space: nowrap;
  942. }
  943. .vent-section .warn-action-text {
  944. color: #0065f8;
  945. }
  946. /* ===== 设备监测预警 ===== */
  947. .device-section {
  948. margin-bottom: 20rpx;
  949. }
  950. .device-card {
  951. background: #ffffff;
  952. border-radius: 16rpx;
  953. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  954. overflow: hidden;
  955. }
  956. .device-card-header {
  957. display: flex;
  958. flex-direction: row;
  959. align-items: center;
  960. justify-content: space-between;
  961. padding: 28rpx 24rpx 24rpx;
  962. }
  963. .device-card-divider {
  964. height: 1rpx;
  965. background: #eef0f4;
  966. margin: 0 24rpx;
  967. }
  968. .device-card-content {
  969. padding: 24rpx 24rpx 28rpx;
  970. }
  971. .device-section .warn-action-text {
  972. color: #0065f8;
  973. }
  974. .device-grid {
  975. display: flex;
  976. flex-direction: row;
  977. flex-wrap: wrap;
  978. justify-content: space-between;
  979. }
  980. .device-item-card {
  981. position: relative;
  982. width: calc(50% - 10rpx);
  983. height: 80rpx;
  984. margin-bottom: 30rpx;
  985. box-sizing: border-box;
  986. background: url("../../static/warndata/1-3.png") no-repeat center;
  987. background-size: 100% 100%;
  988. }
  989. .device-item-icon {
  990. position: absolute;
  991. left: 8rpx;
  992. top: -40rpx;
  993. width: 104rpx;
  994. height: 104rpx;
  995. z-index: 2;
  996. }
  997. .device-item-bar {
  998. position: absolute;
  999. left: 28rpx;
  1000. right: 0;
  1001. top: 50%;
  1002. transform: translateY(-50%);
  1003. height: 88rpx;
  1004. display: flex;
  1005. flex-direction: row;
  1006. align-items: center;
  1007. padding-left: 90rpx;
  1008. padding-right: 74rpx;
  1009. padding-top: 12rpx;
  1010. box-sizing: border-box;
  1011. // background: linear-gradient(90deg, #d0e7ff 0%, #eef6ff 55%, #ffffff 100%);
  1012. // clip-path: polygon(0 0, calc(100% - 18rpx) 0, 100% 100%, 0 100%);
  1013. }
  1014. .device-item-name {
  1015. flex: 1;
  1016. min-width: 0;
  1017. font-size: 26rpx;
  1018. color: #000000;
  1019. line-height: 1.3;
  1020. overflow: hidden;
  1021. text-overflow: ellipsis;
  1022. white-space: nowrap;
  1023. }
  1024. .device-status-tag {
  1025. position: absolute;
  1026. right: 20rpx;
  1027. top: 12rpx;
  1028. bottom: 0;
  1029. width: 72rpx;
  1030. display: flex;
  1031. align-items: center;
  1032. justify-content: center;
  1033. // background: linear-gradient(135deg, #afc3fc 0%, #82aaff 100%);
  1034. // clip-path: polygon(14rpx 0, 100% 0, 100% 100%, 0 100%);
  1035. }
  1036. .device-item-status {
  1037. font-size: 26rpx;
  1038. font-weight: 700;
  1039. font-style: italic;
  1040. color: #0065f8;
  1041. line-height: 1.2;
  1042. }
  1043. /* ===== 火灾监测预警 ===== */
  1044. .fire-section {
  1045. margin-bottom: 20rpx;
  1046. }
  1047. .fire-card {
  1048. background: #ffffff;
  1049. border-radius: 16rpx;
  1050. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1051. overflow: hidden;
  1052. }
  1053. .fire-card-header {
  1054. display: flex;
  1055. flex-direction: row;
  1056. align-items: center;
  1057. justify-content: space-between;
  1058. padding: 28rpx 24rpx 24rpx;
  1059. }
  1060. .fire-card-divider {
  1061. height: 1rpx;
  1062. background: #eef0f4;
  1063. margin: 0 24rpx;
  1064. }
  1065. .fire-card-content {
  1066. padding: 24rpx 24rpx 28rpx;
  1067. }
  1068. .fire-section .warn-action-text {
  1069. color: #0065f8;
  1070. }
  1071. .fire-block {
  1072. margin-bottom: 8rpx;
  1073. }
  1074. .fire-block-external {
  1075. margin-top: 24rpx;
  1076. margin-bottom: 0;
  1077. }
  1078. .fire-block-header {
  1079. display: flex;
  1080. flex-direction: row;
  1081. align-items: center;
  1082. height: 28px;
  1083. width: 100%;
  1084. margin-bottom: 20rpx;
  1085. padding-left: 30rpx;
  1086. background: url("../../static/warndata/1-1.png") no-repeat center;
  1087. background-size: 100% 100%;
  1088. }
  1089. .fire-block-deco {
  1090. display: flex;
  1091. flex-direction: row;
  1092. align-items: center;
  1093. margin-right: 12rpx;
  1094. flex-shrink: 0;
  1095. }
  1096. .fire-deco-line {
  1097. width: 6rpx;
  1098. height: 28rpx;
  1099. background: #0065f8;
  1100. transform: skewX(-18deg);
  1101. margin-right: 6rpx;
  1102. border-radius: 2rpx;
  1103. }
  1104. .fire-block-title {
  1105. font-size: 28rpx;
  1106. font-weight: 600;
  1107. color: #000;
  1108. margin-right: 16rpx;
  1109. flex-shrink: 0;
  1110. }
  1111. .fire-block-line {
  1112. flex: 1;
  1113. height: 28rpx;
  1114. background: linear-gradient(
  1115. 90deg,
  1116. #d0e7ff 0%,
  1117. #eef5ff 72%,
  1118. rgba(238, 245, 255, 0) 100%
  1119. );
  1120. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1121. }
  1122. .fire-grid {
  1123. display: flex;
  1124. flex-direction: row;
  1125. flex-wrap: wrap;
  1126. justify-content: space-between;
  1127. }
  1128. .fire-data-card {
  1129. width: calc(50% - 10rpx);
  1130. margin-bottom: 16rpx;
  1131. padding: 20rpx 16rpx;
  1132. border-radius: 12rpx;
  1133. background: linear-gradient(
  1134. to bottom,
  1135. rgba(175, 195, 252, 0.6) 0%,
  1136. rgba(175, 195, 252, 0.1) 100%
  1137. );
  1138. display: flex;
  1139. flex-direction: row;
  1140. align-items: center;
  1141. box-sizing: border-box;
  1142. }
  1143. .fire-icon-box {
  1144. width: 72rpx;
  1145. height: 72rpx;
  1146. border-radius: 12rpx;
  1147. background: linear-gradient(135deg, #4d9dff 0%, #0065f8 100%);
  1148. display: flex;
  1149. align-items: center;
  1150. justify-content: center;
  1151. flex-shrink: 0;
  1152. margin-right: 16rpx;
  1153. box-shadow: 4rpx 6rpx 0 rgba(43, 124, 255, 0.12);
  1154. }
  1155. .fire-icon {
  1156. width: 44rpx;
  1157. height: 44rpx;
  1158. }
  1159. .fire-data-info {
  1160. flex: 1;
  1161. min-width: 0;
  1162. }
  1163. .fire-data-value {
  1164. display: block;
  1165. font-size: 32rpx;
  1166. font-weight: 700;
  1167. color: #0065f8;
  1168. line-height: 1.2;
  1169. word-break: break-all;
  1170. }
  1171. .fire-value-warn {
  1172. color: #ff0000;
  1173. }
  1174. .fire-data-label {
  1175. display: block;
  1176. margin-top: 8rpx;
  1177. font-size: 24rpx;
  1178. color: #000;
  1179. line-height: 1.35;
  1180. word-break: break-all;
  1181. }
  1182. /* ===== 粉尘监测预警 ===== */
  1183. .dust-section {
  1184. margin-bottom: 20rpx;
  1185. }
  1186. .dust-card {
  1187. background: #ffffff;
  1188. border-radius: 16rpx;
  1189. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1190. overflow: hidden;
  1191. }
  1192. .dust-card-header {
  1193. display: flex;
  1194. flex-direction: row;
  1195. align-items: center;
  1196. justify-content: space-between;
  1197. padding: 28rpx 24rpx 24rpx;
  1198. }
  1199. .dust-card-divider {
  1200. height: 1rpx;
  1201. background: #eef0f4;
  1202. margin: 0 24rpx;
  1203. }
  1204. .dust-card-content {
  1205. padding: 24rpx 24rpx 28rpx;
  1206. }
  1207. .dust-section .warn-action-text {
  1208. color: #0065f8;
  1209. }
  1210. .dust-alarm-bar {
  1211. display: flex;
  1212. flex-direction: row;
  1213. align-items: center;
  1214. padding: 24rpx 28rpx;
  1215. border-radius: 12rpx;
  1216. background: #fff1f0;
  1217. margin-bottom: 16rpx;
  1218. }
  1219. .dust-alarm-icon-wrap {
  1220. width: 56rpx;
  1221. height: 56rpx;
  1222. border-radius: 50%;
  1223. background: #f5222d;
  1224. display: flex;
  1225. align-items: center;
  1226. justify-content: center;
  1227. margin-right: 16rpx;
  1228. box-shadow: 0 0 0 6rpx rgba(245, 34, 45, 0.12);
  1229. flex-shrink: 0;
  1230. }
  1231. .dust-alarm-icon {
  1232. width: 32rpx;
  1233. height: 32rpx;
  1234. }
  1235. .dust-alarm-label {
  1236. flex: 1;
  1237. font-size: 28rpx;
  1238. color: #000;
  1239. font-weight: 600;
  1240. }
  1241. .dust-alarm-value {
  1242. font-size: 32rpx;
  1243. font-weight: 700;
  1244. color: #000;
  1245. }
  1246. .dust-risk-row {
  1247. display: flex;
  1248. flex-direction: row;
  1249. justify-content: space-between;
  1250. }
  1251. .dust-risk-card {
  1252. position: relative;
  1253. width: calc(25% - 9rpx);
  1254. padding: 20rpx 8rpx 16rpx;
  1255. border-radius: 12rpx;
  1256. display: flex;
  1257. flex-direction: column;
  1258. align-items: center;
  1259. box-sizing: border-box;
  1260. min-height: 140rpx;
  1261. }
  1262. .dust-risk-icon {
  1263. position: absolute;
  1264. top: 12rpx;
  1265. left: 12rpx;
  1266. width: 28rpx;
  1267. height: 28rpx;
  1268. border-radius: 6rpx;
  1269. display: flex;
  1270. align-items: center;
  1271. justify-content: center;
  1272. }
  1273. .dust-risk-icon-img {
  1274. width: 18rpx;
  1275. height: 18rpx;
  1276. }
  1277. .dust-risk-value {
  1278. margin-top: 24rpx;
  1279. font-size: 36rpx;
  1280. font-weight: 700;
  1281. color: #000;
  1282. line-height: 1.2;
  1283. }
  1284. .dust-risk-label {
  1285. margin-top: 8rpx;
  1286. font-size: 24rpx;
  1287. color: #000;
  1288. line-height: 1.3;
  1289. text-align: center;
  1290. }
  1291. /* ===== 瓦斯监测预警 ===== */
  1292. .gas-section {
  1293. margin-bottom: 20rpx;
  1294. }
  1295. .gas-card {
  1296. background: #ffffff;
  1297. border-radius: 16rpx;
  1298. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1299. overflow: hidden;
  1300. }
  1301. .gas-card-header {
  1302. display: flex;
  1303. flex-direction: row;
  1304. align-items: center;
  1305. justify-content: space-between;
  1306. padding: 28rpx 24rpx 24rpx;
  1307. }
  1308. .gas-card-divider {
  1309. height: 1rpx;
  1310. background: #eef0f4;
  1311. margin: 0 24rpx;
  1312. }
  1313. .gas-card-content {
  1314. padding: 24rpx 24rpx 28rpx;
  1315. }
  1316. .gas-section .warn-action-text {
  1317. color: #0065f8;
  1318. }
  1319. .gas-block {
  1320. margin-bottom: 8rpx;
  1321. }
  1322. .gas-block-second {
  1323. margin-top: 24rpx;
  1324. margin-bottom: 0;
  1325. }
  1326. .gas-block-header {
  1327. height: 28px;
  1328. display: flex;
  1329. flex-direction: row;
  1330. align-items: center;
  1331. margin-bottom: 20rpx;
  1332. padding-left: 30rpx;
  1333. background: url("../../static/warndata/1-1.png") no-repeat center;
  1334. background-size: 100% 100%;
  1335. }
  1336. .gas-block-deco {
  1337. display: flex;
  1338. flex-direction: row;
  1339. align-items: center;
  1340. margin-right: 12rpx;
  1341. flex-shrink: 0;
  1342. }
  1343. .gas-deco-line {
  1344. width: 6rpx;
  1345. height: 28rpx;
  1346. color: #0065f8;
  1347. transform: skewX(-18deg);
  1348. margin-right: 6rpx;
  1349. border-radius: 2rpx;
  1350. }
  1351. .gas-block-title {
  1352. font-size: 28rpx;
  1353. font-weight: 600;
  1354. color: #000;
  1355. margin-right: 10rpx;
  1356. flex-shrink: 0;
  1357. }
  1358. .gas-block-count {
  1359. font-size: 28rpx;
  1360. font-weight: 700;
  1361. color: #0065f8;
  1362. margin-right: 16rpx;
  1363. flex-shrink: 0;
  1364. }
  1365. .gas-block-line {
  1366. flex: 1;
  1367. height: 28rpx;
  1368. background: linear-gradient(
  1369. 90deg,
  1370. #d0e7ff 0%,
  1371. #eef5ff 72%,
  1372. rgba(238, 245, 255, 0) 100%
  1373. );
  1374. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1375. }
  1376. .gas-grid {
  1377. display: flex;
  1378. flex-direction: row;
  1379. flex-wrap: wrap;
  1380. justify-content: flex-start;
  1381. }
  1382. .gas-data-card {
  1383. width: calc(33.33% - 8rpx);
  1384. margin-bottom: 16rpx;
  1385. margin-right: 20rpx;
  1386. padding: 16rpx 10rpx;
  1387. border-radius: 12rpx;
  1388. background: linear-gradient(
  1389. to bottom,
  1390. rgba(175, 195, 252, 0.6) 0%,
  1391. rgba(175, 195, 252, 0.1) 100%
  1392. );
  1393. display: flex;
  1394. flex-direction: row;
  1395. align-items: center;
  1396. box-sizing: border-box;
  1397. }
  1398. .gas-icon-box {
  1399. width: 56rpx;
  1400. height: 56rpx;
  1401. border-radius: 10rpx;
  1402. background: linear-gradient(135deg, #4d9dff 0%, #0065f8 100%);
  1403. display: flex;
  1404. align-items: center;
  1405. justify-content: center;
  1406. flex-shrink: 0;
  1407. margin-right: 10rpx;
  1408. box-shadow: 3rpx 4rpx 0 rgba(43, 124, 255, 0.12);
  1409. }
  1410. .gas-icon {
  1411. width: 34rpx;
  1412. height: 34rpx;
  1413. }
  1414. .gas-data-info {
  1415. flex: 1;
  1416. min-width: 0;
  1417. }
  1418. .gas-data-value {
  1419. display: block;
  1420. font-size: 30rpx;
  1421. font-weight: 700;
  1422. color: #0065f8;
  1423. line-height: 1.2;
  1424. word-break: break-all;
  1425. }
  1426. .gas-data-label {
  1427. display: block;
  1428. margin-top: 6rpx;
  1429. font-size: 24rpx;
  1430. color: #000;
  1431. line-height: 1.3;
  1432. overflow: hidden;
  1433. text-overflow: ellipsis;
  1434. white-space: nowrap;
  1435. }
  1436. .text-style {
  1437. font-weight: bold;
  1438. }
  1439. .flcard {
  1440. padding: 20rpx;
  1441. background-color: #ffffff;
  1442. margin-bottom: 5rpx;
  1443. }
  1444. .datacard {
  1445. width: 32.5%;
  1446. margin: 1px;
  1447. float: left;
  1448. height: 74px;
  1449. line-height: 27px;
  1450. border-radius: 5px;
  1451. background: url(/static/model/windM3.png),
  1452. linear-gradient(
  1453. to right,
  1454. rgba(55, 135, 254, 0.08),
  1455. rgba(4, 184, 255, 0.08),
  1456. rgba(60, 161, 237, 0.08)
  1457. );
  1458. background-repeat: no-repeat;
  1459. background-size: 100% 100%;
  1460. background-position: right;
  1461. }
  1462. .datacard1 {
  1463. width: 100%;
  1464. margin: 2px;
  1465. float: left;
  1466. height: 200rpx;
  1467. text-align: center;
  1468. border-radius: 10px;
  1469. background: linear-gradient(
  1470. to right,
  1471. rgba(55, 135, 254, 0.08),
  1472. rgba(4, 184, 255, 0.08),
  1473. rgba(60, 161, 237, 0.08)
  1474. );
  1475. }
  1476. .title {
  1477. position: relative;
  1478. width: 100%;
  1479. height: 50rpx;
  1480. background: url("../../static/warndata/1-1.png");
  1481. background-repeat: no-repeat;
  1482. background-size: 100% 100%;
  1483. display: flex;
  1484. /* 将父级元素设置为 Flex 容器 */
  1485. align-items: center;
  1486. /* 垂直居中子元素 */
  1487. }
  1488. .firecard {
  1489. width: 100%;
  1490. padding: 10px;
  1491. float: left;
  1492. text-align: center;
  1493. border-radius: 10px;
  1494. }
  1495. .firetext {
  1496. margin: 20px;
  1497. }
  1498. .text-style1 {
  1499. color: #0065f8;
  1500. font-weight: bold;
  1501. font-size: 17px;
  1502. margin-left: 5px;
  1503. }
  1504. .red-text-style {
  1505. color: #ff0000;
  1506. font-weight: bold;
  1507. font-size: 16px;
  1508. }
  1509. .firecontainer {
  1510. margin-top: 10px;
  1511. }
  1512. .fire-style {
  1513. display: flex;
  1514. flex-wrap: wrap;
  1515. }
  1516. .fire-item1 {
  1517. width: 45%;
  1518. margin: 16rpx;
  1519. background: linear-gradient(
  1520. to right,
  1521. rgba(55, 135, 254, 0.08),
  1522. rgba(4, 184, 255, 0.08)
  1523. );
  1524. }
  1525. .gascontainer {
  1526. display: flex;
  1527. }
  1528. .gascard {
  1529. width: 47%;
  1530. border-radius: 10px;
  1531. margin: 10px;
  1532. display: flex;
  1533. background: linear-gradient(
  1534. to right,
  1535. rgba(55, 135, 254, 0.08),
  1536. rgba(4, 184, 255, 0.08),
  1537. rgba(60, 161, 237, 0.08)
  1538. );
  1539. flex-direction: row;
  1540. justify-content: space-between;
  1541. }
  1542. .gas-right {
  1543. margin-right: 10px;
  1544. width: 60px;
  1545. height: 60px;
  1546. background: url(/static/warndata/gas.png);
  1547. background-repeat: no-repeat;
  1548. background-size: 100% 100%;
  1549. }
  1550. .safecard {
  1551. width: 47%;
  1552. border-radius: 10px;
  1553. margin: 10px;
  1554. display: flex;
  1555. background: linear-gradient(
  1556. to right,
  1557. rgba(55, 135, 254, 0.08),
  1558. rgba(4, 184, 255, 0.08),
  1559. rgba(60, 161, 237, 0.08)
  1560. );
  1561. flex-direction: row;
  1562. justify-content: space-between;
  1563. }
  1564. .safe-container {
  1565. display: flex;
  1566. width: 100%;
  1567. height: 70px;
  1568. align-items: center;
  1569. display: flex;
  1570. justify-content: space-between;
  1571. }
  1572. .right {
  1573. margin-right: 10px;
  1574. width: 60px;
  1575. height: 60px;
  1576. background: url(/static/warndata/safety.png);
  1577. background-repeat: no-repeat;
  1578. background-size: 100% 100%;
  1579. }
  1580. .icon-style {
  1581. margin-right: 8px;
  1582. width: 13px;
  1583. height: 13px;
  1584. border-radius: 4px;
  1585. }
  1586. .typeBar {
  1587. display: flex;
  1588. justify-content: space-between;
  1589. .icon-vent {
  1590. display: flex;
  1591. .u-icon--right {
  1592. margin: 0px 5px;
  1593. }
  1594. }
  1595. }
  1596. </style>