warndata.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791
  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/warning.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/fx.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/jcd.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/jcd.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. Minepressure: "矿压",
  590. bundleReport: "束管日报",
  591. door: "防火门",
  592. dustdev: "喷粉",
  593. modelsensor: "传感器",
  594. imgFireDet: "图像型火灾探测器",
  595. led: "LED屏",
  596. gasDay: "人工瓦斯巡检",
  597. footageGas: "进尺与瓦斯涌出",
  598. fanmain: "主通风机",
  599. vehicle: "车辆定位",
  600. dusting: "粉尘",
  601. obfurage: "密闭",
  602. gaspatrol: "瓦斯巡检",
  603. bundleSpyReport: "色谱仪报表",
  604. pump: "瓦斯抽采泵",
  605. dustsensor: "粉尘传感器",
  606. fiber: "光纤测温",
  607. bundletube: "束管监测",
  608. forcFan: "压风机",
  609. spray: "喷淋",
  610. dustReport: "粉尘报表",
  611. nitrogen: "制氮",
  612. transferpoint: "转载点",
  613. gasvalve: "瓦斯管道阀门",
  614. windrect: "测风装置",
  615. drilling: "抽采钻孔辅助设计",
  616. audVisAlarm: "声光报警器",
  617. atomizing: "喷雾设备",
  618. ballvalve: "球阀",
  619. safetymonitor: "安全监控",
  620. dedustefan: "除尘风机",
  621. unit: "评价单元",
  622. gasmonitor: "瓦斯监测",
  623. fanlocal: "局部通风机",
  624. gaspipe: "瓦斯管道",
  625. duaSpeCamera: "双光谱摄像机",
  626. gate: "自动风门",
  627. window: "自动风窗",
  628. rebroadcast: "语音扩播",
  629. pulping: "制浆",
  630. };
  631. // 设备图标文件名已由中文名改为中文首字母缩写
  632. const iconFileMap = {
  633. 矿压: "ky",
  634. 束管日报: "sgrb",
  635. 防火门: "fhm",
  636. 喷粉: "pf",
  637. 传感器: "cgq",
  638. 图像型火灾探测器: "tx",
  639. LED屏: "led",
  640. 人工瓦斯巡检: "rgws",
  641. 进尺与瓦斯涌出: "jcyws",
  642. 主通风机: "zs",
  643. 车辆定位: "cldw",
  644. 粉尘: "fenchen",
  645. 密闭: "mb",
  646. 瓦斯巡检: "wsxj",
  647. 色谱仪报表: "spy",
  648. 瓦斯抽采泵: "wsb",
  649. 粉尘传感器: "fenchen",
  650. 光纤测温: "default",
  651. 束管监测: "default",
  652. 压风机: "yf",
  653. 喷淋: "pl",
  654. 粉尘报表: "sgrb",
  655. 制氮: "zd",
  656. 转载点: "default",
  657. 瓦斯管道阀门: "wsxj",
  658. 测风装置: "cfzz",
  659. 抽采钻孔辅助设计: "jcyws",
  660. 声光报警器: "default",
  661. 喷雾设备: "pl",
  662. 球阀: "qf",
  663. 安全监控: "aqjk",
  664. 除尘风机: "ccq",
  665. 评价单元: "default",
  666. 瓦斯监测: "wsjc",
  667. 局部通风机: "js",
  668. 瓦斯管道: "wsgd",
  669. 双光谱摄像机: "sgpsx",
  670. 自动风门: "fm",
  671. 自动风窗: "fc",
  672. 语音扩播: "yykb",
  673. 制浆: "zj",
  674. };
  675. const deviceName = iconNameMap[item.code] || item.name;
  676. const iconName = iconFileMap[deviceName] || "default";
  677. return `/static/warndata/${iconName}.png`;
  678. },
  679. getFireIcon(item) {
  680. const monitor = item.monitorcode || "";
  681. if (monitor.indexOf("上隅角") >= 0) {
  682. return "/static/warndata/syj.svg";
  683. }
  684. if (monitor === "温度") {
  685. return "/static/warndata/jcd.svg";
  686. }
  687. if (monitor === "烟雾") {
  688. return "/static/warndata/fx.svg";
  689. }
  690. if (monitor === "火焰") {
  691. return "/static/warndata/warning.svg";
  692. }
  693. const codeMap = {
  694. coval: "CO.svg",
  695. ch4val: "CH4.svg",
  696. ch2val: "C2H4.svg",
  697. chval: "C2H4.svg",
  698. co2val: "CO2.svg",
  699. o2val: "syj.svg",
  700. };
  701. return `/static/warndata/${codeMap[item.code] || "jcd.svg"}`;
  702. },
  703. getFireUnit(item) {
  704. if (
  705. item.code === "o2val" ||
  706. item.code === "co2val" ||
  707. item.code === "ch4val" ||
  708. item.code === "smokeval"
  709. ) {
  710. return "(%)";
  711. }
  712. if (
  713. item.code === "fmax" ||
  714. item.code === "temperature" ||
  715. item.code === "fireval"
  716. ) {
  717. return "(℃)";
  718. }
  719. return "(ppm)";
  720. },
  721. isFireValueWarn(item) {
  722. return item.Maxlevel > 0;
  723. },
  724. },
  725. computed: {
  726. internalFireList() {
  727. if (!this.internalInfo) return [];
  728. const list = Array.isArray(this.internalInfo)
  729. ? this.internalInfo
  730. : Object.values(this.internalInfo);
  731. return list.filter((item) => item && Object.keys(item).length > 0);
  732. },
  733. externalFireList() {
  734. if (!this.externalInfo) return [];
  735. const list = Array.isArray(this.externalInfo)
  736. ? this.externalInfo
  737. : Object.values(this.externalInfo);
  738. return list.filter((item) => item && Object.keys(item).length > 0);
  739. },
  740. deviceList() {
  741. if (!this.devicekindData) return [];
  742. const list = Array.isArray(this.devicekindData)
  743. ? this.devicekindData
  744. : Object.values(this.devicekindData);
  745. return list.filter((item) => item && item.name);
  746. },
  747. getCode() {
  748. return uni.getStorageSync("apiCode");
  749. },
  750. ventRiskList() {
  751. const data = this.windData || {};
  752. const sys = data.sysdata || {};
  753. const getVal = (key) => {
  754. if (data[key] !== undefined && data[key] !== null && data[key] !== "") {
  755. return data[key];
  756. }
  757. if (sys[key] !== undefined && sys[key] !== null && sys[key] !== "") {
  758. return sys[key];
  759. }
  760. return 0;
  761. };
  762. return [
  763. { label: "低风险", color: "#1890ff", value: getVal("blue") },
  764. { label: "一般风险", color: "#f5a623", value: getVal("yellow") },
  765. { label: "较大风险", color: "#ff7a00", value: getVal("red") },
  766. { label: "重大风险", color: "#ff4d4f", value: getVal("orange") },
  767. { label: "报警", color: "#e90000", value: getVal("alarm") },
  768. ];
  769. },
  770. dustAlarmCount() {
  771. const data = this.dustData || {};
  772. if (
  773. data.alarm !== undefined &&
  774. data.alarm !== null &&
  775. data.alarm !== ""
  776. ) {
  777. return data.alarm;
  778. }
  779. return 0;
  780. },
  781. dustRiskList() {
  782. const data = this.dustData || {};
  783. const getVal = (key) => {
  784. if (data[key] !== undefined && data[key] !== null && data[key] !== "") {
  785. return data[key];
  786. }
  787. return 0;
  788. };
  789. return [
  790. {
  791. label: "低风险",
  792. bg: "#e6f7ff",
  793. iconBg: "#1890ff",
  794. value: getVal("blue"),
  795. },
  796. {
  797. label: "一般风险",
  798. bg: "#fffbe6",
  799. iconBg: "#faad14",
  800. value: getVal("yellow"),
  801. },
  802. {
  803. label: "较大风险",
  804. bg: "#fff7e6",
  805. iconBg: "#ff8c00",
  806. value: getVal("red"),
  807. },
  808. {
  809. label: "重大风险",
  810. bg: "#fff1f0",
  811. iconBg: "#f5222d",
  812. value: getVal("orange"),
  813. },
  814. ];
  815. },
  816. gasSafeTotal() {
  817. if (!this.gasDevice || !this.gasDevice.length) return 0;
  818. return this.gasDevice.reduce((sum, item) => {
  819. const num = Number(item.gasNumber);
  820. return sum + (isNaN(num) ? 0 : num);
  821. }, 0);
  822. },
  823. gasPumpTotal() {
  824. if (!this.gasDevice || !this.gasDevice.length) return 0;
  825. return this.gasDevice.reduce((sum, item) => {
  826. const num = Number(item.pumpNumber);
  827. return sum + (isNaN(num) ? 0 : num);
  828. }, 0);
  829. },
  830. },
  831. };
  832. </script>
  833. <style lang="scss" scoped>
  834. .nameStyle {
  835. color: #000000;
  836. font-size: 15px;
  837. }
  838. .container {
  839. // display: flex;
  840. // flex-direction: column;
  841. // min-height: 100vh;
  842. // background: linear-gradient(180deg, #c8d8f8 0%, #f5f7fa 320rpx, #f5f7fa 100%);
  843. }
  844. .menupage {
  845. height: calc(100vh - 101px - var(--status-bar-height, 0px));
  846. margin-top: calc(50px + var(--status-bar-height, 0px));
  847. overflow-y: auto;
  848. }
  849. .main {
  850. margin-top: 10px;
  851. display: flex;
  852. flex-direction: column;
  853. flex: 1;
  854. width: 100%;
  855. padding: 0 24rpx 40rpx;
  856. box-sizing: border-box;
  857. background: transparent;
  858. }
  859. .warn-list {
  860. width: 100%;
  861. }
  862. .warn-section {
  863. margin-bottom: 20rpx;
  864. }
  865. .warn-card-header {
  866. display: flex;
  867. flex-direction: row;
  868. align-items: center;
  869. justify-content: space-between;
  870. background: #f9f9fb;
  871. border-radius: 16rpx;
  872. padding: 28rpx 24rpx;
  873. }
  874. .warn-card-title {
  875. font-size: 30rpx;
  876. font-weight: 600;
  877. color: #000000;
  878. }
  879. .warn-card-action {
  880. display: flex;
  881. flex-direction: row;
  882. align-items: center;
  883. }
  884. .warn-action-text {
  885. font-size: 14px;
  886. color: #0065f8;
  887. margin-right: 3px;
  888. font-weight: 500;
  889. }
  890. .warn-card-body {
  891. margin-top: 12rpx;
  892. padding: 20rpx;
  893. background: #ffffff;
  894. border-radius: 16rpx;
  895. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  896. overflow: hidden;
  897. }
  898. /* ===== 通风监测预警 ===== */
  899. .vent-section {
  900. margin-bottom: 20rpx;
  901. }
  902. .vent-card {
  903. background: #ffffff;
  904. border-radius: 16rpx;
  905. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  906. overflow: hidden;
  907. }
  908. .vent-card-header {
  909. display: flex;
  910. flex-direction: row;
  911. align-items: center;
  912. justify-content: space-between;
  913. padding: 28rpx 24rpx;
  914. }
  915. .vent-card-divider {
  916. height: 1rpx;
  917. background: #eef0f4;
  918. margin: 0 24rpx;
  919. }
  920. .vent-card-content {
  921. padding: 20rpx 24rpx 24rpx;
  922. }
  923. .vent-metrics-row {
  924. display: flex;
  925. flex-direction: row;
  926. justify-content: space-between;
  927. }
  928. .vent-metric-card {
  929. flex: 1;
  930. margin: 0 6rpx;
  931. padding: 24rpx 8rpx;
  932. border-radius: 12rpx;
  933. background: linear-gradient(
  934. to bottom,
  935. rgba(175, 195, 252, 0.6) 0%,
  936. rgba(175, 195, 252, 0.1) 100%
  937. );
  938. display: flex;
  939. flex-direction: column;
  940. align-items: center;
  941. justify-content: center;
  942. box-sizing: border-box;
  943. }
  944. .vent-metric-card:first-child {
  945. margin-left: 0;
  946. }
  947. .vent-metric-card:last-child {
  948. margin-right: 0;
  949. }
  950. .vent-metric-value {
  951. font-size: 28rpx;
  952. font-weight: 700;
  953. color: #0065f8;
  954. line-height: 1.3;
  955. text-align: center;
  956. word-break: break-all;
  957. }
  958. .vent-metric-label {
  959. margin-top: 10rpx;
  960. font-size: 24rpx;
  961. color: #000000;
  962. line-height: 1.3;
  963. text-align: center;
  964. }
  965. .vent-risk-panel {
  966. margin-top: 16rpx;
  967. padding: 24rpx 16rpx;
  968. border-radius: 12rpx;
  969. background: linear-gradient(
  970. to bottom,
  971. rgba(175, 195, 252, 0.6) 0%,
  972. rgba(175, 195, 252, 0.1) 100%
  973. );
  974. display: flex;
  975. flex-direction: row;
  976. flex-wrap: wrap;
  977. }
  978. .vent-risk-item {
  979. width: 33.33%;
  980. display: flex;
  981. flex-direction: row;
  982. align-items: center;
  983. margin-bottom: 20rpx;
  984. box-sizing: border-box;
  985. padding-right: 8rpx;
  986. }
  987. .vent-risk-item:nth-child(n + 4) {
  988. margin-bottom: 0;
  989. }
  990. .risk-icon {
  991. width: 32rpx;
  992. height: 32rpx;
  993. border-radius: 50%;
  994. display: flex;
  995. align-items: center;
  996. justify-content: center;
  997. flex-shrink: 0;
  998. margin-right: 8rpx;
  999. }
  1000. .risk-text {
  1001. font-size: 24rpx;
  1002. color: #000000;
  1003. line-height: 1.3;
  1004. overflow: hidden;
  1005. text-overflow: ellipsis;
  1006. white-space: nowrap;
  1007. }
  1008. .vent-section .warn-action-text {
  1009. color: #0065f8;
  1010. }
  1011. /* ===== 设备监测预警 ===== */
  1012. .device-section {
  1013. margin-bottom: 20rpx;
  1014. }
  1015. .device-card {
  1016. background: #f9f9fb;
  1017. border-radius: 16rpx;
  1018. border: 1rpx solid #fff;
  1019. overflow: hidden;
  1020. }
  1021. .device-card-header {
  1022. display: flex;
  1023. flex-direction: row;
  1024. align-items: center;
  1025. justify-content: space-between;
  1026. padding: 28rpx 24rpx 24rpx;
  1027. }
  1028. .device-card-divider {
  1029. height: 1rpx;
  1030. background: #eef0f4;
  1031. margin: 0 24rpx;
  1032. }
  1033. .device-card-content {
  1034. padding: 24rpx 24rpx 28rpx;
  1035. }
  1036. .device-section .warn-action-text {
  1037. color: #0065f8;
  1038. }
  1039. .device-grid {
  1040. display: flex;
  1041. flex-direction: row;
  1042. flex-wrap: wrap;
  1043. justify-content: space-between;
  1044. }
  1045. .device-item-card {
  1046. position: relative;
  1047. width: calc(50% - 10rpx);
  1048. height: 80rpx;
  1049. margin-bottom: 30rpx;
  1050. box-sizing: border-box;
  1051. background: url("../../static/warndata/1-3.png") no-repeat center;
  1052. background-size: 100% 100%;
  1053. }
  1054. .device-item-icon {
  1055. position: absolute;
  1056. left: 8rpx;
  1057. top: -40rpx;
  1058. width: 104rpx;
  1059. height: 104rpx;
  1060. z-index: 2;
  1061. }
  1062. .device-item-bar {
  1063. position: absolute;
  1064. left: 44rpx;
  1065. right: 0;
  1066. top: 50%;
  1067. transform: translateY(-50%);
  1068. height: 88rpx;
  1069. display: flex;
  1070. flex-direction: row;
  1071. align-items: center;
  1072. padding-left: 90rpx;
  1073. padding-right: 74rpx;
  1074. padding-top: 12rpx;
  1075. box-sizing: border-box;
  1076. // background: linear-gradient(90deg, #d0e7ff 0%, #eef6ff 55%, #ffffff 100%);
  1077. // clip-path: polygon(0 0, calc(100% - 18rpx) 0, 100% 100%, 0 100%);
  1078. }
  1079. .device-item-name {
  1080. flex: 1;
  1081. min-width: 0;
  1082. font-size: 26rpx;
  1083. color: #000000;
  1084. line-height: 1.3;
  1085. overflow: hidden;
  1086. text-overflow: ellipsis;
  1087. white-space: nowrap;
  1088. }
  1089. .device-status-tag {
  1090. position: absolute;
  1091. right: 20rpx;
  1092. top: 12rpx;
  1093. bottom: 0;
  1094. width: 72rpx;
  1095. display: flex;
  1096. align-items: center;
  1097. justify-content: center;
  1098. // background: linear-gradient(135deg, #afc3fc 0%, #82aaff 100%);
  1099. // clip-path: polygon(14rpx 0, 100% 0, 100% 100%, 0 100%);
  1100. }
  1101. .device-item-status {
  1102. font-size: 26rpx;
  1103. font-weight: 700;
  1104. font-style: italic;
  1105. color: #0065f8;
  1106. line-height: 1.2;
  1107. }
  1108. /* ===== 火灾监测预警 ===== */
  1109. .fire-section {
  1110. margin-bottom: 20rpx;
  1111. }
  1112. .fire-card {
  1113. background: #ffffff;
  1114. border-radius: 16rpx;
  1115. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1116. overflow: hidden;
  1117. }
  1118. .fire-card-header {
  1119. display: flex;
  1120. flex-direction: row;
  1121. align-items: center;
  1122. justify-content: space-between;
  1123. padding: 28rpx 24rpx 24rpx;
  1124. }
  1125. .fire-card-divider {
  1126. height: 1rpx;
  1127. background: #eef0f4;
  1128. margin: 0 24rpx;
  1129. }
  1130. .fire-card-content {
  1131. padding: 24rpx 24rpx 28rpx;
  1132. }
  1133. .fire-section .warn-action-text {
  1134. color: #0065f8;
  1135. }
  1136. .fire-block {
  1137. margin-bottom: 8rpx;
  1138. }
  1139. .fire-block-external {
  1140. margin-top: 24rpx;
  1141. margin-bottom: 0;
  1142. }
  1143. .fire-block-header {
  1144. display: flex;
  1145. flex-direction: row;
  1146. align-items: center;
  1147. height: 28px;
  1148. width: 100%;
  1149. margin-bottom: 20rpx;
  1150. padding-left: 30rpx;
  1151. background: url("../../static/warndata/1-1.png") no-repeat center;
  1152. background-size: 100% 100%;
  1153. }
  1154. .fire-block-deco {
  1155. display: flex;
  1156. flex-direction: row;
  1157. align-items: center;
  1158. margin-right: 12rpx;
  1159. flex-shrink: 0;
  1160. }
  1161. .fire-deco-line {
  1162. width: 6rpx;
  1163. height: 28rpx;
  1164. background: #0065f8;
  1165. transform: skewX(-18deg);
  1166. margin-right: 6rpx;
  1167. border-radius: 2rpx;
  1168. }
  1169. .fire-block-title {
  1170. font-size: 28rpx;
  1171. font-weight: 600;
  1172. color: #000;
  1173. margin-right: 16rpx;
  1174. flex-shrink: 0;
  1175. }
  1176. .fire-block-line {
  1177. flex: 1;
  1178. height: 28rpx;
  1179. background: linear-gradient(
  1180. 90deg,
  1181. #d0e7ff 0%,
  1182. #eef5ff 72%,
  1183. rgba(238, 245, 255, 0) 100%
  1184. );
  1185. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1186. }
  1187. .fire-grid {
  1188. display: flex;
  1189. flex-direction: row;
  1190. flex-wrap: wrap;
  1191. justify-content: space-between;
  1192. }
  1193. .fire-data-card {
  1194. width: calc(50% - 10rpx);
  1195. margin-bottom: 16rpx;
  1196. padding: 20rpx 16rpx;
  1197. border-radius: 12rpx;
  1198. background: linear-gradient(
  1199. to bottom,
  1200. rgba(175, 195, 252, 0.6) 0%,
  1201. rgba(175, 195, 252, 0.1) 100%
  1202. );
  1203. display: flex;
  1204. flex-direction: row;
  1205. align-items: center;
  1206. box-sizing: border-box;
  1207. }
  1208. .fire-icon-box {
  1209. width: 72rpx;
  1210. height: 72rpx;
  1211. border-radius: 12rpx;
  1212. background: linear-gradient(135deg, #80b4ff, #347df3);
  1213. display: flex;
  1214. align-items: center;
  1215. justify-content: center;
  1216. flex-shrink: 0;
  1217. margin-right: 16rpx;
  1218. box-shadow: 4rpx 6rpx 0 rgba(43, 124, 255, 0.12);
  1219. }
  1220. .fire-icon {
  1221. width: 44rpx;
  1222. height: 44rpx;
  1223. }
  1224. .fire-data-info {
  1225. flex: 1;
  1226. min-width: 0;
  1227. }
  1228. .fire-data-value {
  1229. display: block;
  1230. font-size: 32rpx;
  1231. font-weight: 700;
  1232. color: #0065f8;
  1233. line-height: 1.2;
  1234. word-break: break-all;
  1235. }
  1236. .fire-value-warn {
  1237. color: #ff0000;
  1238. }
  1239. .fire-data-label {
  1240. display: block;
  1241. margin-top: 8rpx;
  1242. font-size: 24rpx;
  1243. color: #000;
  1244. line-height: 1.35;
  1245. word-break: break-all;
  1246. }
  1247. /* ===== 粉尘监测预警 ===== */
  1248. .dust-section {
  1249. margin-bottom: 20rpx;
  1250. }
  1251. .dust-card {
  1252. background: #ffffff;
  1253. border-radius: 16rpx;
  1254. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1255. overflow: hidden;
  1256. }
  1257. .dust-card-header {
  1258. display: flex;
  1259. flex-direction: row;
  1260. align-items: center;
  1261. justify-content: space-between;
  1262. padding: 28rpx 24rpx 24rpx;
  1263. }
  1264. .dust-card-divider {
  1265. height: 1rpx;
  1266. background: #eef0f4;
  1267. margin: 0 24rpx;
  1268. }
  1269. .dust-card-content {
  1270. padding: 24rpx 24rpx 28rpx;
  1271. }
  1272. .dust-section .warn-action-text {
  1273. color: #0065f8;
  1274. }
  1275. .dust-alarm-bar {
  1276. display: flex;
  1277. flex-direction: row;
  1278. align-items: center;
  1279. padding: 24rpx 28rpx;
  1280. border-radius: 12rpx;
  1281. background: #fff1f0;
  1282. margin-bottom: 16rpx;
  1283. }
  1284. .dust-alarm-icon-wrap {
  1285. width: 56rpx;
  1286. height: 56rpx;
  1287. border-radius: 50%;
  1288. background: #f5222d;
  1289. display: flex;
  1290. align-items: center;
  1291. justify-content: center;
  1292. margin-right: 16rpx;
  1293. box-shadow: 0 0 0 6rpx rgba(245, 34, 45, 0.12);
  1294. flex-shrink: 0;
  1295. }
  1296. .dust-alarm-icon {
  1297. width: 32rpx;
  1298. height: 32rpx;
  1299. }
  1300. .dust-alarm-label {
  1301. flex: 1;
  1302. font-size: 28rpx;
  1303. color: #000;
  1304. font-weight: 600;
  1305. }
  1306. .dust-alarm-value {
  1307. font-size: 32rpx;
  1308. font-weight: 700;
  1309. color: #000;
  1310. }
  1311. .dust-risk-row {
  1312. display: flex;
  1313. flex-direction: row;
  1314. justify-content: space-between;
  1315. }
  1316. .dust-risk-card {
  1317. position: relative;
  1318. width: calc(25% - 9rpx);
  1319. padding: 20rpx 8rpx 16rpx;
  1320. border-radius: 12rpx;
  1321. display: flex;
  1322. flex-direction: column;
  1323. align-items: center;
  1324. box-sizing: border-box;
  1325. min-height: 140rpx;
  1326. }
  1327. .dust-risk-icon {
  1328. position: absolute;
  1329. top: 12rpx;
  1330. left: 12rpx;
  1331. width: 28rpx;
  1332. height: 28rpx;
  1333. border-radius: 6rpx;
  1334. display: flex;
  1335. align-items: center;
  1336. justify-content: center;
  1337. }
  1338. .dust-risk-icon-img {
  1339. width: 18rpx;
  1340. height: 18rpx;
  1341. }
  1342. .dust-risk-value {
  1343. margin-top: 24rpx;
  1344. font-size: 36rpx;
  1345. font-weight: 700;
  1346. color: #000;
  1347. line-height: 1.2;
  1348. }
  1349. .dust-risk-label {
  1350. margin-top: 8rpx;
  1351. font-size: 24rpx;
  1352. color: #000;
  1353. line-height: 1.3;
  1354. text-align: center;
  1355. }
  1356. /* ===== 瓦斯监测预警 ===== */
  1357. .gas-section {
  1358. margin-bottom: 20rpx;
  1359. }
  1360. .gas-card {
  1361. background: #ffffff;
  1362. border-radius: 16rpx;
  1363. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1364. overflow: hidden;
  1365. }
  1366. .gas-card-header {
  1367. display: flex;
  1368. flex-direction: row;
  1369. align-items: center;
  1370. justify-content: space-between;
  1371. padding: 28rpx 24rpx 24rpx;
  1372. }
  1373. .gas-card-divider {
  1374. height: 1rpx;
  1375. background: #eef0f4;
  1376. margin: 0 24rpx;
  1377. }
  1378. .gas-card-content {
  1379. padding: 24rpx 24rpx 28rpx;
  1380. }
  1381. .gas-section .warn-action-text {
  1382. color: #0065f8;
  1383. }
  1384. .gas-block {
  1385. margin-bottom: 8rpx;
  1386. }
  1387. .gas-block-second {
  1388. margin-top: 24rpx;
  1389. margin-bottom: 0;
  1390. }
  1391. .gas-block-header {
  1392. height: 28px;
  1393. display: flex;
  1394. flex-direction: row;
  1395. align-items: center;
  1396. margin-bottom: 20rpx;
  1397. padding-left: 30rpx;
  1398. background: url("../../static/warndata/1-1.png") no-repeat center;
  1399. background-size: 100% 100%;
  1400. }
  1401. .gas-block-deco {
  1402. display: flex;
  1403. flex-direction: row;
  1404. align-items: center;
  1405. margin-right: 12rpx;
  1406. flex-shrink: 0;
  1407. }
  1408. .gas-deco-line {
  1409. width: 6rpx;
  1410. height: 28rpx;
  1411. color: #0065f8;
  1412. transform: skewX(-18deg);
  1413. margin-right: 6rpx;
  1414. border-radius: 2rpx;
  1415. }
  1416. .gas-block-title {
  1417. font-size: 28rpx;
  1418. font-weight: 600;
  1419. color: #000;
  1420. margin-right: 10rpx;
  1421. flex-shrink: 0;
  1422. }
  1423. .gas-block-count {
  1424. font-size: 28rpx;
  1425. font-weight: 700;
  1426. color: #0065f8;
  1427. margin-right: 16rpx;
  1428. flex-shrink: 0;
  1429. }
  1430. .gas-block-line {
  1431. flex: 1;
  1432. height: 28rpx;
  1433. background: linear-gradient(
  1434. 90deg,
  1435. #d0e7ff 0%,
  1436. #eef5ff 72%,
  1437. rgba(238, 245, 255, 0) 100%
  1438. );
  1439. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1440. }
  1441. .gas-grid {
  1442. display: flex;
  1443. flex-direction: row;
  1444. flex-wrap: wrap;
  1445. justify-content: flex-start;
  1446. }
  1447. .gas-data-card {
  1448. width: calc(33.33% - 8rpx);
  1449. margin-bottom: 16rpx;
  1450. margin-right: 20rpx;
  1451. padding: 16rpx 10rpx;
  1452. border-radius: 12rpx;
  1453. background: linear-gradient(
  1454. to bottom,
  1455. rgba(175, 195, 252, 0.6) 0%,
  1456. rgba(175, 195, 252, 0.1) 100%
  1457. );
  1458. display: flex;
  1459. flex-direction: row;
  1460. align-items: center;
  1461. box-sizing: border-box;
  1462. }
  1463. .gas-icon-box {
  1464. width: 56rpx;
  1465. height: 56rpx;
  1466. border-radius: 10rpx;
  1467. background: linear-gradient(135deg, #80b4ff, #347df3);
  1468. display: flex;
  1469. align-items: center;
  1470. justify-content: center;
  1471. flex-shrink: 0;
  1472. margin-right: 10rpx;
  1473. box-shadow: 3rpx 4rpx 0 rgba(43, 124, 255, 0.12);
  1474. }
  1475. .gas-icon {
  1476. width: 34rpx;
  1477. height: 34rpx;
  1478. }
  1479. .gas-data-info {
  1480. flex: 1;
  1481. min-width: 0;
  1482. }
  1483. .gas-data-value {
  1484. display: block;
  1485. font-size: 30rpx;
  1486. font-weight: 700;
  1487. color: #0065f8;
  1488. line-height: 1.2;
  1489. word-break: break-all;
  1490. }
  1491. .gas-data-label {
  1492. display: block;
  1493. margin-top: 6rpx;
  1494. font-size: 24rpx;
  1495. color: #000;
  1496. line-height: 1.3;
  1497. overflow: hidden;
  1498. text-overflow: ellipsis;
  1499. white-space: nowrap;
  1500. }
  1501. .text-style {
  1502. font-weight: bold;
  1503. }
  1504. .flcard {
  1505. padding: 20rpx;
  1506. background-color: #ffffff;
  1507. margin-bottom: 5rpx;
  1508. }
  1509. .datacard {
  1510. width: 32.5%;
  1511. margin: 1px;
  1512. float: left;
  1513. height: 74px;
  1514. line-height: 27px;
  1515. border-radius: 5px;
  1516. background: url(/static/model/windM3.png),
  1517. linear-gradient(
  1518. to right,
  1519. rgba(55, 135, 254, 0.08),
  1520. rgba(4, 184, 255, 0.08),
  1521. rgba(60, 161, 237, 0.08)
  1522. );
  1523. background-repeat: no-repeat;
  1524. background-size: 100% 100%;
  1525. background-position: right;
  1526. }
  1527. .datacard1 {
  1528. width: 100%;
  1529. margin: 2px;
  1530. float: left;
  1531. height: 200rpx;
  1532. text-align: center;
  1533. border-radius: 10px;
  1534. background: linear-gradient(
  1535. to right,
  1536. rgba(55, 135, 254, 0.08),
  1537. rgba(4, 184, 255, 0.08),
  1538. rgba(60, 161, 237, 0.08)
  1539. );
  1540. }
  1541. .title {
  1542. position: relative;
  1543. width: 100%;
  1544. height: 50rpx;
  1545. background: url("../../static/warndata/1-1.png");
  1546. background-repeat: no-repeat;
  1547. background-size: 100% 100%;
  1548. display: flex;
  1549. /* 将父级元素设置为 Flex 容器 */
  1550. align-items: center;
  1551. /* 垂直居中子元素 */
  1552. }
  1553. .firecard {
  1554. width: 100%;
  1555. padding: 10px;
  1556. float: left;
  1557. text-align: center;
  1558. border-radius: 10px;
  1559. }
  1560. .firetext {
  1561. margin: 20px;
  1562. }
  1563. .text-style1 {
  1564. color: #0065f8;
  1565. font-weight: bold;
  1566. font-size: 17px;
  1567. margin-left: 5px;
  1568. }
  1569. .red-text-style {
  1570. color: #ff0000;
  1571. font-weight: bold;
  1572. font-size: 16px;
  1573. }
  1574. .firecontainer {
  1575. margin-top: 10px;
  1576. }
  1577. .fire-style {
  1578. display: flex;
  1579. flex-wrap: wrap;
  1580. }
  1581. .fire-item1 {
  1582. width: 45%;
  1583. margin: 16rpx;
  1584. background: linear-gradient(
  1585. to right,
  1586. rgba(55, 135, 254, 0.08),
  1587. rgba(4, 184, 255, 0.08)
  1588. );
  1589. }
  1590. .gascontainer {
  1591. display: flex;
  1592. }
  1593. .gascard {
  1594. width: 47%;
  1595. border-radius: 10px;
  1596. margin: 10px;
  1597. display: flex;
  1598. background: linear-gradient(
  1599. to right,
  1600. rgba(55, 135, 254, 0.08),
  1601. rgba(4, 184, 255, 0.08),
  1602. rgba(60, 161, 237, 0.08)
  1603. );
  1604. flex-direction: row;
  1605. justify-content: space-between;
  1606. }
  1607. .gas-right {
  1608. margin-right: 10px;
  1609. width: 60px;
  1610. height: 60px;
  1611. background: url(/static/warndata/gas.png);
  1612. background-repeat: no-repeat;
  1613. background-size: 100% 100%;
  1614. }
  1615. .safecard {
  1616. width: 47%;
  1617. border-radius: 10px;
  1618. margin: 10px;
  1619. display: flex;
  1620. background: linear-gradient(
  1621. to right,
  1622. rgba(55, 135, 254, 0.08),
  1623. rgba(4, 184, 255, 0.08),
  1624. rgba(60, 161, 237, 0.08)
  1625. );
  1626. flex-direction: row;
  1627. justify-content: space-between;
  1628. }
  1629. .safe-container {
  1630. display: flex;
  1631. width: 100%;
  1632. height: 70px;
  1633. align-items: center;
  1634. display: flex;
  1635. justify-content: space-between;
  1636. }
  1637. .right {
  1638. margin-right: 10px;
  1639. width: 60px;
  1640. height: 60px;
  1641. background: url(/static/warndata/safety.png);
  1642. background-repeat: no-repeat;
  1643. background-size: 100% 100%;
  1644. }
  1645. .icon-style {
  1646. margin-right: 8px;
  1647. width: 13px;
  1648. height: 13px;
  1649. border-radius: 4px;
  1650. }
  1651. .typeBar {
  1652. display: flex;
  1653. justify-content: space-between;
  1654. .icon-vent {
  1655. display: flex;
  1656. .u-icon--right {
  1657. margin: 0px 5px;
  1658. }
  1659. }
  1660. }
  1661. </style>