warndata.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797
  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 detail-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. display: flex;
  851. flex-direction: column;
  852. flex: 1;
  853. width: 100%;
  854. padding: 10px 24rpx 40rpx;
  855. box-sizing: border-box;
  856. background: transparent;
  857. }
  858. // 详情页:根区域撑满高度且不滚动
  859. .main.detail-main {
  860. height: 100%;
  861. overflow: hidden;
  862. padding-bottom: 10px;
  863. }
  864. .warn-list {
  865. width: 100%;
  866. }
  867. .warn-section {
  868. margin-bottom: 20rpx;
  869. }
  870. .warn-card-header {
  871. display: flex;
  872. flex-direction: row;
  873. align-items: center;
  874. justify-content: space-between;
  875. background: #f9f9fb;
  876. border-radius: 16rpx;
  877. padding: 28rpx 24rpx;
  878. }
  879. .warn-card-title {
  880. font-size: 30rpx;
  881. font-weight: 600;
  882. color: #000000;
  883. }
  884. .warn-card-action {
  885. display: flex;
  886. flex-direction: row;
  887. align-items: center;
  888. }
  889. .warn-action-text {
  890. font-size: 14px;
  891. color: #0065f8;
  892. margin-right: 3px;
  893. font-weight: 500;
  894. }
  895. .warn-card-body {
  896. margin-top: 12rpx;
  897. padding: 20rpx;
  898. background: #ffffff;
  899. border-radius: 16rpx;
  900. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  901. overflow: hidden;
  902. }
  903. /* ===== 通风监测预警 ===== */
  904. .vent-section {
  905. margin-bottom: 20rpx;
  906. }
  907. .vent-card {
  908. background: #ffffff;
  909. border-radius: 16rpx;
  910. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  911. overflow: hidden;
  912. }
  913. .vent-card-header {
  914. display: flex;
  915. flex-direction: row;
  916. align-items: center;
  917. justify-content: space-between;
  918. padding: 28rpx 24rpx;
  919. }
  920. .vent-card-divider {
  921. height: 1rpx;
  922. background: #eef0f4;
  923. margin: 0 24rpx;
  924. }
  925. .vent-card-content {
  926. padding: 20rpx 24rpx 24rpx;
  927. }
  928. .vent-metrics-row {
  929. display: flex;
  930. flex-direction: row;
  931. justify-content: space-between;
  932. }
  933. .vent-metric-card {
  934. flex: 1;
  935. margin: 0 6rpx;
  936. padding: 24rpx 8rpx;
  937. border-radius: 12rpx;
  938. background: linear-gradient(
  939. to bottom,
  940. rgba(175, 195, 252, 0.6) 0%,
  941. rgba(175, 195, 252, 0.1) 100%
  942. );
  943. display: flex;
  944. flex-direction: column;
  945. align-items: center;
  946. justify-content: center;
  947. box-sizing: border-box;
  948. }
  949. .vent-metric-card:first-child {
  950. margin-left: 0;
  951. }
  952. .vent-metric-card:last-child {
  953. margin-right: 0;
  954. }
  955. .vent-metric-value {
  956. font-size: 28rpx;
  957. font-weight: 700;
  958. color: #0065f8;
  959. line-height: 1.3;
  960. text-align: center;
  961. word-break: break-all;
  962. }
  963. .vent-metric-label {
  964. margin-top: 10rpx;
  965. font-size: 24rpx;
  966. color: #000000;
  967. line-height: 1.3;
  968. text-align: center;
  969. }
  970. .vent-risk-panel {
  971. margin-top: 16rpx;
  972. padding: 24rpx 16rpx;
  973. border-radius: 12rpx;
  974. background: linear-gradient(
  975. to bottom,
  976. rgba(175, 195, 252, 0.6) 0%,
  977. rgba(175, 195, 252, 0.1) 100%
  978. );
  979. display: flex;
  980. flex-direction: row;
  981. flex-wrap: wrap;
  982. }
  983. .vent-risk-item {
  984. width: 33.33%;
  985. display: flex;
  986. flex-direction: row;
  987. align-items: center;
  988. margin-bottom: 20rpx;
  989. box-sizing: border-box;
  990. padding-right: 8rpx;
  991. }
  992. .vent-risk-item:nth-child(n + 4) {
  993. margin-bottom: 0;
  994. }
  995. .risk-icon {
  996. width: 32rpx;
  997. height: 32rpx;
  998. border-radius: 50%;
  999. display: flex;
  1000. align-items: center;
  1001. justify-content: center;
  1002. flex-shrink: 0;
  1003. margin-right: 8rpx;
  1004. }
  1005. .risk-text {
  1006. font-size: 24rpx;
  1007. color: #000000;
  1008. line-height: 1.3;
  1009. overflow: hidden;
  1010. text-overflow: ellipsis;
  1011. white-space: nowrap;
  1012. }
  1013. .vent-section .warn-action-text {
  1014. color: #0065f8;
  1015. }
  1016. /* ===== 设备监测预警 ===== */
  1017. .device-section {
  1018. margin-bottom: 20rpx;
  1019. }
  1020. .device-card {
  1021. background: #f9f9fb;
  1022. border-radius: 16rpx;
  1023. border: 1rpx solid #fff;
  1024. overflow: hidden;
  1025. }
  1026. .device-card-header {
  1027. display: flex;
  1028. flex-direction: row;
  1029. align-items: center;
  1030. justify-content: space-between;
  1031. padding: 28rpx 24rpx 24rpx;
  1032. }
  1033. .device-card-divider {
  1034. height: 1rpx;
  1035. background: #eef0f4;
  1036. margin: 0 24rpx;
  1037. }
  1038. .device-card-content {
  1039. padding: 24rpx 24rpx 28rpx;
  1040. }
  1041. .device-section .warn-action-text {
  1042. color: #0065f8;
  1043. }
  1044. .device-grid {
  1045. display: flex;
  1046. flex-direction: row;
  1047. flex-wrap: wrap;
  1048. justify-content: space-between;
  1049. }
  1050. .device-item-card {
  1051. position: relative;
  1052. width: calc(50% - 10rpx);
  1053. height: 80rpx;
  1054. margin-bottom: 30rpx;
  1055. box-sizing: border-box;
  1056. background: url("../../static/warndata/1-3.png") no-repeat center;
  1057. background-size: 100% 100%;
  1058. }
  1059. .device-item-icon {
  1060. position: absolute;
  1061. left: 8rpx;
  1062. top: -40rpx;
  1063. width: 104rpx;
  1064. height: 104rpx;
  1065. z-index: 2;
  1066. }
  1067. .device-item-bar {
  1068. position: absolute;
  1069. left: 44rpx;
  1070. right: 0;
  1071. top: 50%;
  1072. transform: translateY(-50%);
  1073. height: 88rpx;
  1074. display: flex;
  1075. flex-direction: row;
  1076. align-items: center;
  1077. padding-left: 90rpx;
  1078. padding-right: 74rpx;
  1079. padding-top: 12rpx;
  1080. box-sizing: border-box;
  1081. // background: linear-gradient(90deg, #d0e7ff 0%, #eef6ff 55%, #ffffff 100%);
  1082. // clip-path: polygon(0 0, calc(100% - 18rpx) 0, 100% 100%, 0 100%);
  1083. }
  1084. .device-item-name {
  1085. flex: 1;
  1086. min-width: 0;
  1087. font-size: 26rpx;
  1088. color: #000000;
  1089. line-height: 1.3;
  1090. overflow: hidden;
  1091. text-overflow: ellipsis;
  1092. white-space: nowrap;
  1093. }
  1094. .device-status-tag {
  1095. position: absolute;
  1096. right: 20rpx;
  1097. top: 12rpx;
  1098. bottom: 0;
  1099. width: 72rpx;
  1100. display: flex;
  1101. align-items: center;
  1102. justify-content: center;
  1103. // background: linear-gradient(135deg, #afc3fc 0%, #82aaff 100%);
  1104. // clip-path: polygon(14rpx 0, 100% 0, 100% 100%, 0 100%);
  1105. }
  1106. .device-item-status {
  1107. font-size: 26rpx;
  1108. font-weight: 700;
  1109. font-style: italic;
  1110. color: #0065f8;
  1111. line-height: 1.2;
  1112. }
  1113. /* ===== 火灾监测预警 ===== */
  1114. .fire-section {
  1115. margin-bottom: 20rpx;
  1116. }
  1117. .fire-card {
  1118. background: #ffffff;
  1119. border-radius: 16rpx;
  1120. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1121. overflow: hidden;
  1122. }
  1123. .fire-card-header {
  1124. display: flex;
  1125. flex-direction: row;
  1126. align-items: center;
  1127. justify-content: space-between;
  1128. padding: 28rpx 24rpx 24rpx;
  1129. }
  1130. .fire-card-divider {
  1131. height: 1rpx;
  1132. background: #eef0f4;
  1133. margin: 0 24rpx;
  1134. }
  1135. .fire-card-content {
  1136. padding: 24rpx 24rpx 28rpx;
  1137. }
  1138. .fire-section .warn-action-text {
  1139. color: #0065f8;
  1140. }
  1141. .fire-block {
  1142. margin-bottom: 8rpx;
  1143. }
  1144. .fire-block-external {
  1145. margin-top: 24rpx;
  1146. margin-bottom: 0;
  1147. }
  1148. .fire-block-header {
  1149. display: flex;
  1150. flex-direction: row;
  1151. align-items: center;
  1152. height: 28px;
  1153. width: 100%;
  1154. margin-bottom: 20rpx;
  1155. padding-left: 30rpx;
  1156. background: url("../../static/warndata/1-1.png") no-repeat center;
  1157. background-size: 100% 100%;
  1158. }
  1159. .fire-block-deco {
  1160. display: flex;
  1161. flex-direction: row;
  1162. align-items: center;
  1163. margin-right: 12rpx;
  1164. flex-shrink: 0;
  1165. }
  1166. .fire-deco-line {
  1167. width: 6rpx;
  1168. height: 28rpx;
  1169. background: #0065f8;
  1170. transform: skewX(-18deg);
  1171. margin-right: 6rpx;
  1172. border-radius: 2rpx;
  1173. }
  1174. .fire-block-title {
  1175. font-size: 28rpx;
  1176. font-weight: 600;
  1177. color: #000;
  1178. margin-right: 16rpx;
  1179. flex-shrink: 0;
  1180. }
  1181. .fire-block-line {
  1182. flex: 1;
  1183. height: 28rpx;
  1184. background: linear-gradient(
  1185. 90deg,
  1186. #d0e7ff 0%,
  1187. #eef5ff 72%,
  1188. rgba(238, 245, 255, 0) 100%
  1189. );
  1190. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1191. }
  1192. .fire-grid {
  1193. display: flex;
  1194. flex-direction: row;
  1195. flex-wrap: wrap;
  1196. justify-content: space-between;
  1197. }
  1198. .fire-data-card {
  1199. width: calc(50% - 10rpx);
  1200. margin-bottom: 16rpx;
  1201. padding: 20rpx 16rpx;
  1202. border-radius: 12rpx;
  1203. background: linear-gradient(
  1204. to bottom,
  1205. rgba(175, 195, 252, 0.6) 0%,
  1206. rgba(175, 195, 252, 0.1) 100%
  1207. );
  1208. display: flex;
  1209. flex-direction: row;
  1210. align-items: center;
  1211. box-sizing: border-box;
  1212. }
  1213. .fire-icon-box {
  1214. width: 72rpx;
  1215. height: 72rpx;
  1216. border-radius: 12rpx;
  1217. background: linear-gradient(135deg, #80b4ff, #347df3);
  1218. display: flex;
  1219. align-items: center;
  1220. justify-content: center;
  1221. flex-shrink: 0;
  1222. margin-right: 16rpx;
  1223. box-shadow: 4rpx 6rpx 0 rgba(43, 124, 255, 0.12);
  1224. }
  1225. .fire-icon {
  1226. width: 44rpx;
  1227. height: 44rpx;
  1228. }
  1229. .fire-data-info {
  1230. flex: 1;
  1231. min-width: 0;
  1232. }
  1233. .fire-data-value {
  1234. display: block;
  1235. font-size: 32rpx;
  1236. font-weight: 700;
  1237. color: #0065f8;
  1238. line-height: 1.2;
  1239. word-break: break-all;
  1240. }
  1241. .fire-value-warn {
  1242. color: #ff0000;
  1243. }
  1244. .fire-data-label {
  1245. display: block;
  1246. margin-top: 8rpx;
  1247. font-size: 24rpx;
  1248. color: #000;
  1249. line-height: 1.35;
  1250. word-break: break-all;
  1251. }
  1252. /* ===== 粉尘监测预警 ===== */
  1253. .dust-section {
  1254. margin-bottom: 20rpx;
  1255. }
  1256. .dust-card {
  1257. background: #ffffff;
  1258. border-radius: 16rpx;
  1259. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1260. overflow: hidden;
  1261. }
  1262. .dust-card-header {
  1263. display: flex;
  1264. flex-direction: row;
  1265. align-items: center;
  1266. justify-content: space-between;
  1267. padding: 28rpx 24rpx 24rpx;
  1268. }
  1269. .dust-card-divider {
  1270. height: 1rpx;
  1271. background: #eef0f4;
  1272. margin: 0 24rpx;
  1273. }
  1274. .dust-card-content {
  1275. padding: 24rpx 24rpx 28rpx;
  1276. }
  1277. .dust-section .warn-action-text {
  1278. color: #0065f8;
  1279. }
  1280. .dust-alarm-bar {
  1281. display: flex;
  1282. flex-direction: row;
  1283. align-items: center;
  1284. padding: 24rpx 28rpx;
  1285. border-radius: 12rpx;
  1286. background: #fff1f0;
  1287. margin-bottom: 16rpx;
  1288. }
  1289. .dust-alarm-icon-wrap {
  1290. width: 56rpx;
  1291. height: 56rpx;
  1292. border-radius: 50%;
  1293. background: #f5222d;
  1294. display: flex;
  1295. align-items: center;
  1296. justify-content: center;
  1297. margin-right: 16rpx;
  1298. box-shadow: 0 0 0 6rpx rgba(245, 34, 45, 0.12);
  1299. flex-shrink: 0;
  1300. }
  1301. .dust-alarm-icon {
  1302. width: 32rpx;
  1303. height: 32rpx;
  1304. }
  1305. .dust-alarm-label {
  1306. flex: 1;
  1307. font-size: 28rpx;
  1308. color: #000;
  1309. font-weight: 600;
  1310. }
  1311. .dust-alarm-value {
  1312. font-size: 32rpx;
  1313. font-weight: 700;
  1314. color: #000;
  1315. }
  1316. .dust-risk-row {
  1317. display: flex;
  1318. flex-direction: row;
  1319. justify-content: space-between;
  1320. }
  1321. .dust-risk-card {
  1322. position: relative;
  1323. width: calc(25% - 9rpx);
  1324. padding: 20rpx 8rpx 16rpx;
  1325. border-radius: 12rpx;
  1326. display: flex;
  1327. flex-direction: column;
  1328. align-items: center;
  1329. box-sizing: border-box;
  1330. min-height: 140rpx;
  1331. }
  1332. .dust-risk-icon {
  1333. position: absolute;
  1334. top: 12rpx;
  1335. left: 12rpx;
  1336. width: 28rpx;
  1337. height: 28rpx;
  1338. border-radius: 6rpx;
  1339. display: flex;
  1340. align-items: center;
  1341. justify-content: center;
  1342. }
  1343. .dust-risk-icon-img {
  1344. width: 18rpx;
  1345. height: 18rpx;
  1346. }
  1347. .dust-risk-value {
  1348. margin-top: 24rpx;
  1349. font-size: 36rpx;
  1350. font-weight: 700;
  1351. color: #000;
  1352. line-height: 1.2;
  1353. }
  1354. .dust-risk-label {
  1355. margin-top: 8rpx;
  1356. font-size: 24rpx;
  1357. color: #000;
  1358. line-height: 1.3;
  1359. text-align: center;
  1360. }
  1361. /* ===== 瓦斯监测预警 ===== */
  1362. .gas-section {
  1363. margin-bottom: 20rpx;
  1364. }
  1365. .gas-card {
  1366. background: #ffffff;
  1367. border-radius: 16rpx;
  1368. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  1369. overflow: hidden;
  1370. }
  1371. .gas-card-header {
  1372. display: flex;
  1373. flex-direction: row;
  1374. align-items: center;
  1375. justify-content: space-between;
  1376. padding: 28rpx 24rpx 24rpx;
  1377. }
  1378. .gas-card-divider {
  1379. height: 1rpx;
  1380. background: #eef0f4;
  1381. margin: 0 24rpx;
  1382. }
  1383. .gas-card-content {
  1384. padding: 24rpx 24rpx 28rpx;
  1385. }
  1386. .gas-section .warn-action-text {
  1387. color: #0065f8;
  1388. }
  1389. .gas-block {
  1390. margin-bottom: 8rpx;
  1391. }
  1392. .gas-block-second {
  1393. margin-top: 24rpx;
  1394. margin-bottom: 0;
  1395. }
  1396. .gas-block-header {
  1397. height: 28px;
  1398. display: flex;
  1399. flex-direction: row;
  1400. align-items: center;
  1401. margin-bottom: 20rpx;
  1402. padding-left: 30rpx;
  1403. background: url("../../static/warndata/1-1.png") no-repeat center;
  1404. background-size: 100% 100%;
  1405. }
  1406. .gas-block-deco {
  1407. display: flex;
  1408. flex-direction: row;
  1409. align-items: center;
  1410. margin-right: 12rpx;
  1411. flex-shrink: 0;
  1412. }
  1413. .gas-deco-line {
  1414. width: 6rpx;
  1415. height: 28rpx;
  1416. color: #0065f8;
  1417. transform: skewX(-18deg);
  1418. margin-right: 6rpx;
  1419. border-radius: 2rpx;
  1420. }
  1421. .gas-block-title {
  1422. font-size: 28rpx;
  1423. font-weight: 600;
  1424. color: #000;
  1425. margin-right: 10rpx;
  1426. flex-shrink: 0;
  1427. }
  1428. .gas-block-count {
  1429. font-size: 28rpx;
  1430. font-weight: 700;
  1431. color: #0065f8;
  1432. margin-right: 16rpx;
  1433. flex-shrink: 0;
  1434. }
  1435. .gas-block-line {
  1436. flex: 1;
  1437. height: 28rpx;
  1438. background: linear-gradient(
  1439. 90deg,
  1440. #d0e7ff 0%,
  1441. #eef5ff 72%,
  1442. rgba(238, 245, 255, 0) 100%
  1443. );
  1444. clip-path: polygon(0 0, calc(100% - 24rpx) 0, 100% 100%, 0 100%);
  1445. }
  1446. .gas-grid {
  1447. display: flex;
  1448. flex-direction: row;
  1449. flex-wrap: wrap;
  1450. justify-content: flex-start;
  1451. }
  1452. .gas-data-card {
  1453. width: calc(33.33% - 8rpx);
  1454. margin-bottom: 16rpx;
  1455. margin-right: 20rpx;
  1456. padding: 16rpx 10rpx;
  1457. border-radius: 12rpx;
  1458. background: linear-gradient(
  1459. to bottom,
  1460. rgba(175, 195, 252, 0.6) 0%,
  1461. rgba(175, 195, 252, 0.1) 100%
  1462. );
  1463. display: flex;
  1464. flex-direction: row;
  1465. align-items: center;
  1466. box-sizing: border-box;
  1467. }
  1468. .gas-icon-box {
  1469. width: 56rpx;
  1470. height: 56rpx;
  1471. border-radius: 10rpx;
  1472. background: linear-gradient(135deg, #80b4ff, #347df3);
  1473. display: flex;
  1474. align-items: center;
  1475. justify-content: center;
  1476. flex-shrink: 0;
  1477. margin-right: 10rpx;
  1478. box-shadow: 3rpx 4rpx 0 rgba(43, 124, 255, 0.12);
  1479. }
  1480. .gas-icon {
  1481. width: 34rpx;
  1482. height: 34rpx;
  1483. }
  1484. .gas-data-info {
  1485. flex: 1;
  1486. min-width: 0;
  1487. }
  1488. .gas-data-value {
  1489. display: block;
  1490. font-size: 30rpx;
  1491. font-weight: 700;
  1492. color: #0065f8;
  1493. line-height: 1.2;
  1494. word-break: break-all;
  1495. }
  1496. .gas-data-label {
  1497. display: block;
  1498. margin-top: 6rpx;
  1499. font-size: 24rpx;
  1500. color: #000;
  1501. line-height: 1.3;
  1502. overflow: hidden;
  1503. text-overflow: ellipsis;
  1504. white-space: nowrap;
  1505. }
  1506. .text-style {
  1507. font-weight: bold;
  1508. }
  1509. .flcard {
  1510. padding: 20rpx;
  1511. background-color: #ffffff;
  1512. margin-bottom: 5rpx;
  1513. }
  1514. .datacard {
  1515. width: 32.5%;
  1516. margin: 1px;
  1517. float: left;
  1518. height: 74px;
  1519. line-height: 27px;
  1520. border-radius: 5px;
  1521. background: url(/static/model/windM3.png),
  1522. linear-gradient(
  1523. to right,
  1524. rgba(55, 135, 254, 0.08),
  1525. rgba(4, 184, 255, 0.08),
  1526. rgba(60, 161, 237, 0.08)
  1527. );
  1528. background-repeat: no-repeat;
  1529. background-size: 100% 100%;
  1530. background-position: right;
  1531. }
  1532. .datacard1 {
  1533. width: 100%;
  1534. margin: 2px;
  1535. float: left;
  1536. height: 200rpx;
  1537. text-align: center;
  1538. border-radius: 10px;
  1539. background: linear-gradient(
  1540. to right,
  1541. rgba(55, 135, 254, 0.08),
  1542. rgba(4, 184, 255, 0.08),
  1543. rgba(60, 161, 237, 0.08)
  1544. );
  1545. }
  1546. .title {
  1547. position: relative;
  1548. width: 100%;
  1549. height: 50rpx;
  1550. background: url("../../static/warndata/1-1.png");
  1551. background-repeat: no-repeat;
  1552. background-size: 100% 100%;
  1553. display: flex;
  1554. /* 将父级元素设置为 Flex 容器 */
  1555. align-items: center;
  1556. /* 垂直居中子元素 */
  1557. }
  1558. .firecard {
  1559. width: 100%;
  1560. padding: 10px;
  1561. float: left;
  1562. text-align: center;
  1563. border-radius: 10px;
  1564. }
  1565. .firetext {
  1566. margin: 20px;
  1567. }
  1568. .text-style1 {
  1569. color: #0065f8;
  1570. font-weight: bold;
  1571. font-size: 17px;
  1572. margin-left: 5px;
  1573. }
  1574. .red-text-style {
  1575. color: #ff0000;
  1576. font-weight: bold;
  1577. font-size: 16px;
  1578. }
  1579. .firecontainer {
  1580. margin-top: 10px;
  1581. }
  1582. .fire-style {
  1583. display: flex;
  1584. flex-wrap: wrap;
  1585. }
  1586. .fire-item1 {
  1587. width: 45%;
  1588. margin: 16rpx;
  1589. background: linear-gradient(
  1590. to right,
  1591. rgba(55, 135, 254, 0.08),
  1592. rgba(4, 184, 255, 0.08)
  1593. );
  1594. }
  1595. .gascontainer {
  1596. display: flex;
  1597. }
  1598. .gascard {
  1599. width: 47%;
  1600. border-radius: 10px;
  1601. margin: 10px;
  1602. display: flex;
  1603. background: linear-gradient(
  1604. to right,
  1605. rgba(55, 135, 254, 0.08),
  1606. rgba(4, 184, 255, 0.08),
  1607. rgba(60, 161, 237, 0.08)
  1608. );
  1609. flex-direction: row;
  1610. justify-content: space-between;
  1611. }
  1612. .gas-right {
  1613. margin-right: 10px;
  1614. width: 60px;
  1615. height: 60px;
  1616. background: url(/static/warndata/gas.png);
  1617. background-repeat: no-repeat;
  1618. background-size: 100% 100%;
  1619. }
  1620. .safecard {
  1621. width: 47%;
  1622. border-radius: 10px;
  1623. margin: 10px;
  1624. display: flex;
  1625. background: linear-gradient(
  1626. to right,
  1627. rgba(55, 135, 254, 0.08),
  1628. rgba(4, 184, 255, 0.08),
  1629. rgba(60, 161, 237, 0.08)
  1630. );
  1631. flex-direction: row;
  1632. justify-content: space-between;
  1633. }
  1634. .safe-container {
  1635. display: flex;
  1636. width: 100%;
  1637. height: 70px;
  1638. align-items: center;
  1639. display: flex;
  1640. justify-content: space-between;
  1641. }
  1642. .right {
  1643. margin-right: 10px;
  1644. width: 60px;
  1645. height: 60px;
  1646. background: url(/static/warndata/safety.png);
  1647. background-repeat: no-repeat;
  1648. background-size: 100% 100%;
  1649. }
  1650. .icon-style {
  1651. margin-right: 8px;
  1652. width: 13px;
  1653. height: 13px;
  1654. border-radius: 4px;
  1655. }
  1656. .typeBar {
  1657. display: flex;
  1658. justify-content: space-between;
  1659. .icon-vent {
  1660. display: flex;
  1661. .u-icon--right {
  1662. margin: 0px 5px;
  1663. }
  1664. }
  1665. }
  1666. </style>