Alarm.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. <template>
  2. <div class="alarm">
  3. <div class="alarm-top">
  4. <div class="alarm-top-left">
  5. <div class="alarm-divide" v-loading="dayLoading"
  6. element-loading-text="拼命加载中"
  7. element-loading-spinner="el-icon-loading"
  8. element-loading-background="rgba(0, 0, 0, 0.8)">
  9. <div class="alarm-title">
  10. <div class="alarm-title-left"></div>
  11. <div class="alarm-title-center">今日报警</div>
  12. <div class="alarm-title-right"></div>
  13. </div>
  14. <div class="alarm-content" style="background: #0F152B">
  15. <chart-pie v-if="alarmPie.length > 0" :data="alarmPie"></chart-pie>
  16. <div v-else style="line-height: 200px; font-size: 22px; color: white">暂无数据</div>
  17. </div>
  18. </div>
  19. <div class="alarm-divide" v-loading="listLoading"
  20. element-loading-text="拼命加载中"
  21. element-loading-spinner="el-icon-loading"
  22. element-loading-background="rgba(0, 0, 0, 0.8)">
  23. <div class="alarm-title">
  24. <div class="alarm-title-left"></div>
  25. <div class="alarm-title-center">报警分布</div>
  26. <div class="alarm-title-right"></div>
  27. </div>
  28. <div class="alarm-content">
  29. <alarm-bar :barData="list"></alarm-bar>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="alarm-top-center">
  34. <div class="alarm-title">
  35. <div class="alarm-title-left"></div>
  36. <div class="alarm-title-center">场区概况</div>
  37. <div class="alarm-title-right"></div>
  38. </div>
  39. <div class="alarm-content">
  40. <!-- <img src="../../assets/Alarm/111.png" width="100%" alt="">-->
  41. <canvas id="canvas" width="910" height="504"></canvas>
  42. <div class="bubble yufeishe" v-show="num === 1 && button1%2!==0" >
  43. <p>育肥舍</p>
  44. <p>育肥猪2457头</p>
  45. <p>在舍人数:7人</p>
  46. <p>温度:27.4℃</p>
  47. </div>
  48. <div class="bubble baoyushe" v-show="num === 1 && button1%2!==0">
  49. <p>保育舍</p>
  50. <p>保育猪2457头</p>
  51. <p>在舍人数:7人</p>
  52. <p>温度:27.4℃</p>
  53. </div>
  54. <div class="bubble gelishe" v-show="num === 1 && button1%2!==0">
  55. <p>隔离舍</p>
  56. <p>隔离猪2457头</p>
  57. <p>在舍人数:7人</p>
  58. <p>温度:27.4℃</p>
  59. </div>
  60. <div class="bubble shenghuo" v-show="num === 2 && button2%2!==0">
  61. <p>生活区</p>
  62. <p>在舍人数:7人</p>
  63. <p>温度:27.4℃</p>
  64. </div>
  65. <div class="bubble huanbao" v-show="num === 3 && button3%2!==0">
  66. <p>环保区</p>
  67. <p>氨氮:2.35mg/L</p>
  68. <p>流量:154T</p>
  69. <p>人员:1人</p>
  70. </div>
  71. <div class="bubble shui" v-show="num === 4 && button4%2!==0">
  72. <p>水泵房</p>
  73. <p>水压:1.2kpa</p>
  74. <p>用水量:154吨</p>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="alarm-top-left">
  79. <div class="alarm-divide" v-loading="pieLoading"
  80. element-loading-text="拼命加载中"
  81. element-loading-spinner="el-icon-loading"
  82. element-loading-background="rgba(0, 0, 0, 0.8)">
  83. <div class="alarm-title">
  84. <div class="alarm-title-left"></div>
  85. <div class="alarm-title-center">事件提醒</div>
  86. <div class="alarm-title-right"></div>
  87. </div>
  88. <div class="alarm-content">
  89. <chart-pie v-if="pieData.length > 0" :text="'近7日事件总量'" :id="'1'" :data="pieData"></chart-pie>
  90. <div v-else style="line-height: 250px; text-align: center; width: 100%; font-size: 18px; color: white;">暂无数据</div>
  91. </div>
  92. </div>
  93. <div class="alarm-divide" v-loading="pieLoading"
  94. element-loading-text="拼命加载中"
  95. element-loading-spinner="el-icon-loading"
  96. element-loading-background="rgba(0, 0, 0, 0.8)">
  97. <div class="alarm-title">
  98. <div class="alarm-title-left"></div>
  99. <div class="alarm-title-center">事件分布</div>
  100. <div class="alarm-title-right"></div>
  101. </div>
  102. <div class="alarm-content">
  103. <alarm-bar v-if="barData.salvProValue.length > 0" :bar-data="barData"></alarm-bar>
  104. <div v-else style="line-height: 250px; text-align: center; width: 100%; font-size: 18px; color: white;">暂无数据</div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="alarm-bottom">
  110. <div class="alarm-top-left">
  111. <div class="alarm-title">
  112. <div class="alarm-title-left"></div>
  113. <div class="alarm-title-center">设备统计</div>
  114. <div class="alarm-title-right"></div>
  115. </div>
  116. <div class="alarm-content">
  117. <div class="alarm-box">
  118. <div class="box-item" v-for="(item, i) in devList" :key="i">
  119. <div class="box-bg">
  120. <div class="box-absolute">{{item.value}}</div>
  121. </div>
  122. <div class="box-title">{{item.name}}</div>
  123. </div>
  124. </div>
  125. <!-- <chart-bar :data="timeData"></chart-bar>-->
  126. </div>
  127. </div>
  128. <div class="alarm-top-center" v-loading="alarmLoading"
  129. element-loading-text="拼命加载中"
  130. element-loading-spinner="el-icon-loading"
  131. element-loading-background="rgba(0, 0, 0, 0.8)">
  132. <div class="alarm-title">
  133. <div class="alarm-title-left"></div>
  134. <div class="alarm-title-center">报警列表</div>
  135. <div class="alarm-title-right"></div>
  136. </div>
  137. <div class="alarm-content alarm-flex">
  138. <div class="flex-left">
  139. <div class="box" v-for="(item, i) in alarmList" :key="i">
  140. <el-row :gutter="20" style="width: 600px; height: 100%">
  141. <el-col :span="2" style="height: 100%">
  142. <div :class="['box-logo', i+1 === 1 ? 'logo1' : '', i+1 === 2 ? 'logo2' : '', i+1 === 3 ? 'logo3' : '' ]">{{i+1}}</div>
  143. </el-col>
  144. <el-col :span="14" style="height: 100%">
  145. <div style="text-align: left">{{item.msg}}</div>
  146. </el-col>
  147. <el-col :span="4" style="height: 100%">
  148. <div>{{item.levelName}}</div>
  149. </el-col>
  150. <el-col :span="4" style="height: 100%">
  151. <div>{{item.warningTime}}</div>
  152. </el-col>
  153. </el-row>
  154. </div>
  155. </div>
  156. <div class="flex-right">
  157. <div class="parent">
  158. <div class="parent-grid" @click="alarmClick(1)">核心区</div>
  159. <div class="parent-grid" @click="alarmClick(2)">生活区</div>
  160. <div class="parent-grid" @click="alarmClick(3)">环保区</div>
  161. <div class="parent-grid" @click="alarmClick(4)">其他</div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <div class="alarm-top-left" v-loading="personLoading"
  167. element-loading-text="拼命加载中"
  168. element-loading-spinner="el-icon-loading"
  169. element-loading-background="rgba(0, 0, 0, 0.8)">
  170. <div class="alarm-title">
  171. <div class="alarm-title-left"></div>
  172. <div class="alarm-title-center">异常人脸</div>
  173. <div class="alarm-title-right"></div>
  174. </div>
  175. <div class="alarm-content">
  176. <swiper v-if="personList.length > 0" style="height: 100%; margin-top: auto; margin-bottom: auto;" class="swiper" :options="swiperOption">
  177. <swiper-slide v-for="(item, i) in personList" :key="i">
  178. <div class="case" @click="open(item)">
  179. <div class="case-left">
  180. <img :src="item.recordImage" width="100%" alt="">
  181. </div>
  182. <div class="case-right" style="text-align: left">
  183. <div style="text-align: left; color: white">{{item.swingTime}}</div>
  184. <div style="color: white; line-height: 30px">陌生人</div>
  185. <div style="color: white; line-height: 30px">
  186. 进入区域:
  187. <span style="padding-left: 10px">{{item.deviceName}}</span>
  188. </div>
  189. </div>
  190. </div>
  191. </swiper-slide>
  192. </swiper>
  193. <div v-else style="line-height: 200px; color: white; font-size: 20px">今日暂无异常人脸数据</div>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="bio-dialog" v-show="dialog" @click="dialog = false">
  198. <div class="dialog-content2">
  199. <div class="base-banner1">
  200. <div class="base-left1">
  201. <img :src="selectImg" height="500px" alt="">
  202. </div>
  203. <div class="base-right">
  204. <p>抓拍时间:{{selectItems.swingTime}}</p>
  205. <p>抓拍区域:{{selectItems.deviceName}}</p>
  206. <p> 姓 名 :{{selectItems.personName ? selectItems.personName : '未识别'}}</p>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </template>
  213. <script>
  214. import ChartPie from "@/views/Alarm/chart/ChartPie";
  215. import AlarmBar from "@/views/Alarm/chart/AlarmBar";
  216. // import CostPie from "@/views/Alarm/chart/CostPie";
  217. // import ChartBar from "@/views/BioSafety/chart/ChartBar";
  218. import { swiper, swiperSlide } from 'vue-awesome-swiper'
  219. import 'swiper/css/swiper.css'
  220. import {getAlarmList, getWeekInfo, getPersonList, getAlarmRate, getCountByDay, getDevice} from "@/utils/api";
  221. import img from '@/assets/Alarm/111.png';
  222. import {timeDate} from "@/utils";
  223. import { mapState } from "vuex";
  224. export default {
  225. name: "Alarm",
  226. components: {
  227. ChartPie,
  228. AlarmBar,
  229. // CostPie,
  230. swiper,
  231. swiperSlide
  232. },
  233. data() {
  234. return {
  235. barData: {
  236. id: 1,
  237. salvProName: [],
  238. salvProValue: []
  239. },
  240. pieData: [],
  241. timeData: {
  242. id: 1,
  243. time: ['断电', '故障', '环境报警', '污水处理'],
  244. data: [15, 20, 18, 4],
  245. name: '默认',
  246. unit: '分钟'
  247. },
  248. swiperOption: {
  249. direction: 'vertical',
  250. slidesPerView: 2,
  251. slidesPerColumn: 1,
  252. slidesPerGroup: 2,
  253. // spaceBetween: 30,
  254. autoplay: {
  255. delay: 3000,
  256. disableOnInteraction: false
  257. },
  258. // pagination: {
  259. // el: '.swiper-pagination',
  260. // clickable: true
  261. // }
  262. },
  263. ctx: null,
  264. num: 0,
  265. button1: 0,
  266. button2: 0,
  267. button3: 0,
  268. button4: 0,
  269. alarmList: [],
  270. list: {
  271. id: 2,
  272. salvProName: ['一级', '二级', '三级'],
  273. salvProValue: [0, 0, 0]
  274. },
  275. personList: [],
  276. selectImg: '',
  277. selectItems: {},
  278. dialog: false,
  279. alarmPie: [],
  280. dayLoading: true,
  281. listLoading: true,
  282. pieLoading: true,
  283. alarmLoading: true,
  284. personLoading: true,
  285. devList: [
  286. {
  287. name: '设备总数',
  288. value: '0'
  289. },
  290. {
  291. name: '异常设备',
  292. value: '0'
  293. },
  294. {
  295. name: '设备异常率',
  296. value: '0'
  297. },
  298. ]
  299. }
  300. },
  301. computed: {
  302. ...mapState(['ip'])
  303. },
  304. methods: {
  305. alarmClick(num) {
  306. this.num = num;
  307. if(num === 1) {
  308. this.button1++;
  309. this.button2 = 0;
  310. this.button3 = 0;
  311. this.button4 = 0;
  312. if(this.button1 %2 === 0 ) {
  313. this.ctx.clearRect(0, 0, 910, 504);
  314. this.initCanvas()
  315. } else {
  316. this.ctx.lineWidth = 4;
  317. this.ctx.strokeStyle = '#F59A23';
  318. this.ctx.fillStyle = 'rgba(224, 218, 188, .6)';
  319. this.ctx.beginPath();
  320. this.ctx.moveTo(165, 85);
  321. this.ctx.lineTo(750, 85);
  322. this.ctx.lineTo(810, 265);
  323. this.ctx.lineTo(590, 265);
  324. this.ctx.lineTo(580, 195);
  325. this.ctx.lineTo(330, 195);
  326. this.ctx.lineTo(320, 270);
  327. this.ctx.lineTo(100, 270);
  328. this.ctx.closePath();
  329. this.ctx.moveTo(135,280);
  330. this.ctx.lineTo(310, 285);
  331. this.ctx.lineTo(300, 345);
  332. this.ctx.lineTo(120, 345);
  333. this.ctx.closePath();
  334. this.ctx.stroke();
  335. this.ctx.fill();
  336. }
  337. } else if(num === 2) {
  338. this.button2++;
  339. this.button1 = 0;
  340. this.button3 = 0;
  341. this.button4 = 0;
  342. if(this.button2 %2 === 0 ) {
  343. this.ctx.clearRect(0, 0, 910, 504);
  344. this.initCanvas()
  345. } else {
  346. this.ctx.lineWidth = 4;
  347. this.ctx.strokeStyle = '#1ADD4B';
  348. this.ctx.fillStyle = 'rgba(175, 179, 95, .6)';
  349. this.ctx.beginPath();
  350. this.ctx.moveTo(160, 360);
  351. this.ctx.lineTo(300, 360);
  352. this.ctx.lineTo(300, 375);
  353. this.ctx.lineTo(350, 375);
  354. this.ctx.lineTo(350, 360);
  355. this.ctx.lineTo(430, 360);
  356. this.ctx.lineTo(430, 345);
  357. this.ctx.lineTo(475, 345);
  358. this.ctx.lineTo(475, 360);
  359. this.ctx.lineTo(550, 360);
  360. this.ctx.lineTo(550, 410);
  361. this.ctx.lineTo(160, 410);
  362. // this.ctx.lineTo(590, 265);
  363. // this.ctx.lineTo(580, 195);
  364. // this.ctx.lineTo(330, 195);
  365. // this.ctx.lineTo(320, 270);
  366. // this.ctx.lineTo(100, 270);
  367. this.ctx.closePath();
  368. this.ctx.stroke();
  369. this.ctx.fill();
  370. }
  371. } else if(num === 3) {
  372. this.button3++;
  373. this.button2 = 0;
  374. this.button1 = 0;
  375. this.button4 = 0;
  376. if(this.button3 %2 === 0 ) {
  377. this.ctx.clearRect(0, 0, 910, 504);
  378. this.initCanvas()
  379. } else {
  380. this.ctx.lineWidth = 4;
  381. this.ctx.strokeStyle = '#F54F23';
  382. this.ctx.fillStyle = 'rgba(183, 109, 105, .6)';
  383. this.ctx.beginPath();
  384. this.ctx.moveTo(620, 360);
  385. this.ctx.lineTo(870, 360);
  386. this.ctx.lineTo(900, 450);
  387. this.ctx.lineTo(630, 450);
  388. this.ctx.closePath();
  389. this.ctx.stroke();
  390. this.ctx.fill();
  391. }
  392. } else if(num === 4) {
  393. this.button4++;
  394. this.button2 = 0;
  395. this.button1 = 0;
  396. this.button3 = 0;
  397. if(this.button4 %2 === 0 ) {
  398. this.ctx.clearRect(0, 0, 910, 504);
  399. this.initCanvas()
  400. } else {
  401. this.ctx.lineWidth = 4;
  402. this.ctx.strokeStyle = '#19AEE8';
  403. this.ctx.fillStyle = 'rgba(169, 213, 236, .6)';
  404. this.ctx.beginPath();
  405. this.ctx.moveTo(390,200);
  406. this.ctx.lineTo(440, 200);
  407. this.ctx.lineTo(440, 240);
  408. this.ctx.lineTo(390, 240);
  409. // this.ctx.lineTo(900, 450);
  410. // this.ctx.lineTo(630, 450);
  411. this.ctx.closePath();
  412. this.ctx.stroke();
  413. this.ctx.fill();
  414. }
  415. }
  416. },
  417. initCanvas() {
  418. var myCanvas = document.getElementById('canvas');
  419. this.ctx = myCanvas.getContext('2d');
  420. var imgs = new Image()
  421. var that = this;
  422. imgs.onload = function () {
  423. that.ctx.drawImage(imgs, 0, 0, 910, 540)
  424. }
  425. imgs.src = img;
  426. },
  427. init() {
  428. getAlarmList({quantity: 9}).then(res => {
  429. if(res.code === 10000) {
  430. this.alarmList = res.data;
  431. this.alarmLoading = false;
  432. } else {
  433. this.alarmLoading = false;
  434. this.alarmList = [{msg: '暂无报警数据'}]
  435. }
  436. })
  437. getWeekInfo({}).then(res => {
  438. if(res.code === 10000) {
  439. this.list.salvProValue = [res.data.one, res.data.two, res.data.three];
  440. this.listLoading = false;
  441. }
  442. })
  443. let params = {
  444. pageNum: 1,
  445. pageSize: 20,
  446. startSwingTime: timeDate(new Date().getTime()) + ' 00:00:00',
  447. endSwingTime: timeDate(new Date().getTime()) + ' 23:59:59',
  448. containDomain: 1,
  449. openResult: 0
  450. }
  451. getPersonList(params).then(async res => {
  452. if(res.code == 0) {
  453. let result = JSON.parse(res.result);
  454. this.personList = result.data.pageData;
  455. // const { token } = await getFaceToken();
  456. this.personList.forEach((item) => {
  457. item.channelName = item.channelName.split("人脸门禁")[0];
  458. item.recordImage = `${this.ip}/video/picture/get?alarmPicture=${item.recordImage}`;
  459. // item.recordImage = `https://36.26.62.70:447/evo-pic/${item.recordImage}?token=${token}&oss_addr=172.16.3.223:8925`;
  460. });
  461. }
  462. this.personLoading = false;
  463. })
  464. getAlarmRate({}).then(res => {
  465. if(res.code === 10000) {
  466. this.alarmPie = res.data;
  467. this.dayLoading = false;
  468. } else {
  469. this.dayLoading = false;
  470. }
  471. })
  472. getCountByDay({}).then(res => {
  473. if(res.code === 0) {
  474. if(res.data !== null) {
  475. this.barData.salvProName = [];
  476. this.barData.salvProValue = [];
  477. res.data.forEach(item => {
  478. this.barData.salvProName.push(item.name);
  479. this.barData.salvProValue.push(item.value);
  480. })
  481. this.pieData = res.data;
  482. console.log(this.pieData);
  483. }
  484. this.pieLoading = false;
  485. } else {
  486. this.pieLoading = false;
  487. }
  488. })
  489. getDevice({bit: 2}).then(res => {
  490. if(res.code === 10000) {
  491. this.devList[0].value = res.data.total;
  492. this.devList[1].value = res.data.num;
  493. this.devList[2].value = res.data.rate;
  494. } else {
  495. this.devList[0].value = "0";
  496. this.devList[1].value = "0";
  497. this.devList[2].value = "0";
  498. }
  499. })
  500. },
  501. // 打开img
  502. open(item) {
  503. this.dialog = true;
  504. this.selectImg = item.recordImage;
  505. this.selectItems = item;
  506. }
  507. },
  508. mounted() {
  509. this.initCanvas()
  510. this.init();
  511. }
  512. }
  513. </script>
  514. <style scoped>
  515. .alarm {
  516. width: 100%;
  517. height: 100%;
  518. box-sizing: border-box;
  519. padding: 20px 0 0 0;
  520. }
  521. .alarm-top {
  522. width: 100%;
  523. height: 550px;
  524. display: flex;
  525. justify-content: space-between;
  526. }
  527. .alarm-top-left {
  528. width: 405px;
  529. height: 100%;
  530. }
  531. .alarm-top-center {
  532. flex: 1;
  533. margin: 0 20px;
  534. }
  535. .alarm-divide {
  536. width: 100%;
  537. height: 50%;
  538. }
  539. .alarm-title {
  540. width: 100%;
  541. height: 26px;
  542. display: flex;
  543. }
  544. .alarm-title-left {
  545. flex: 1;
  546. height: 26px;
  547. background: url("../../assets/BioSafety/u1717.svg") no-repeat;
  548. background-size: 100% 100%;
  549. position: relative;
  550. }
  551. .alarm-title-left:before {
  552. content: '';
  553. height: 85%;
  554. border: 2px solid #66FFFF;
  555. position: absolute;
  556. top: 0;
  557. left: 0;
  558. }
  559. .alarm-title-center {
  560. width: 120px;
  561. height: 26px;
  562. background: url("../../assets/BioSafety/u1719.svg") no-repeat;
  563. background-size: 100% 100%;
  564. line-height: 26px;
  565. color: white;
  566. font-size: 16px;
  567. }
  568. .alarm-title-right {
  569. flex: 1;
  570. height: 26px;
  571. background: url("../../assets/BioSafety/u1718.svg") no-repeat;
  572. background-size: 100% 100%;
  573. position: relative;
  574. }
  575. .alarm-title-right:after {
  576. content: '';
  577. height: 85%;
  578. border: 2px solid #66FFFF;
  579. position: absolute;
  580. top: 0;
  581. right: 0;
  582. }
  583. .alarm-content {
  584. width: 100%;
  585. height: calc(100% - 26px);
  586. position: relative;
  587. }
  588. .alarm-bottom {
  589. width: 100%;
  590. height: calc(100% - 570px);
  591. margin-top: 20px;
  592. display: flex;
  593. justify-content: space-between;
  594. }
  595. .alarm-flex {
  596. display: flex;
  597. justify-content: space-between;
  598. }
  599. .flex-left {
  600. width: 600px;
  601. height: 100%;
  602. box-sizing: border-box;
  603. padding-top: 20px;
  604. overflow-y: auto;
  605. color: #fff;
  606. }
  607. .flex-left::-webkit-scrollbar {
  608. width: 0;
  609. }
  610. .flex-right {
  611. flex: 1;
  612. margin-left: 20px;
  613. box-sizing: border-box;
  614. padding: 20px 0;
  615. }
  616. .box {
  617. width: 100%;
  618. height: 20px;
  619. line-height: 20px;
  620. margin-bottom: 15px;
  621. }
  622. .box-logo {
  623. width: 20px;
  624. height: 20px;
  625. background-color: #666666;
  626. color: #fff;
  627. }
  628. .logo1 {
  629. background-color: #5F0CED;
  630. }
  631. .logo2 {
  632. background-color: #FE2277;
  633. }
  634. .logo3 {
  635. background-color: #F9A403;
  636. }
  637. .parent {
  638. width: 100%;
  639. height: 100%;
  640. display: grid;
  641. grid-template-columns: repeat(2, 1fr);
  642. grid-template-rows: repeat(2, 1fr);
  643. grid-column-gap: 20px;
  644. grid-row-gap: 20px;
  645. align-content: center;
  646. }
  647. .parent-grid {
  648. width: 100%;
  649. height: 100%;
  650. border: 1px solid #66FFFF;
  651. color: #66FFFF;
  652. background-color: #072A5B;
  653. display: grid;
  654. align-content: center;
  655. cursor: pointer;
  656. }
  657. .case {
  658. margin: 0 auto;
  659. width: 370px;
  660. height: 75px;
  661. background: url("../../assets/BioSafety/370x75(1).svg") no-repeat;
  662. background-size: 100% 100%;
  663. position: relative;
  664. display: flex;
  665. }
  666. .case-left {
  667. width: 75px;
  668. height: 75px;
  669. overflow: hidden;
  670. border-radius: 100%;
  671. display: flex;
  672. align-items: center;
  673. }
  674. .case-right {
  675. margin-left: 10px;
  676. flex: 1
  677. }
  678. #canvas {
  679. position: absolute;
  680. top: 0;
  681. left: 0;
  682. }
  683. .bubble {
  684. width: 150px;
  685. height: 100px;
  686. position: absolute;
  687. background-color: rgba(35, 57, 87, .8);
  688. border-radius: 10px;
  689. text-align: center;
  690. box-sizing: border-box;
  691. padding: 10px;
  692. }
  693. .bubble::after{
  694. content: '';
  695. width: 0;
  696. height: 0;
  697. border: 20px solid;
  698. position: absolute;
  699. bottom: -40px;
  700. left: 58px;
  701. border-color: rgba(35, 57, 87, .8) transparent transparent;
  702. }
  703. .bubble p {
  704. margin: 0;
  705. line-height: 20px;
  706. color: #66FFFF;
  707. }
  708. .yufeishe {
  709. top: 40px;
  710. left: 160px;
  711. }
  712. .baoyushe {
  713. top: 40px;
  714. right: 160px;
  715. }
  716. .gelishe {
  717. top: 180px;
  718. left: 160px;
  719. }
  720. .shenghuo {
  721. bottom: 180px;
  722. left: 375px;
  723. }
  724. .huanbao {
  725. bottom: 150px;
  726. right: 80px;
  727. }
  728. .shui {
  729. top: 100px;
  730. left: 340px;
  731. }
  732. .bio-dialog {
  733. width: 100vw;
  734. height: 100vh;
  735. position: absolute;
  736. top: 0;
  737. left: 0;
  738. background-color: rgba(0,0,0, .9);
  739. z-index: 999;
  740. }
  741. .dialog-content1 {
  742. width: 15%;
  743. position: absolute;
  744. top: 50%;
  745. left: 50%;
  746. transform: translate(-50%, -50%);
  747. /*background-color: #fff;*/
  748. }
  749. .alarm-box {
  750. width: 100%;
  751. height: 100%;
  752. display: flex;
  753. }
  754. .box-item {
  755. flex: 1;
  756. box-sizing: border-box;
  757. padding-top: 60px;
  758. }
  759. .box-bg {
  760. margin: 0 auto;
  761. width: 85%;
  762. height: 75%;
  763. background: url("../../assets/Alarm/banner.png") no-repeat;
  764. background-size: 100% 100%;
  765. position: relative;
  766. }
  767. .box-title {
  768. text-align: center;
  769. color: #fff;
  770. /*height: 25%;*/
  771. line-height: 400%;
  772. }
  773. .box-absolute {
  774. position: absolute;
  775. top: 50%;
  776. left: 50%;
  777. transform: translate(-50%, -195%);
  778. font-size: 18px;
  779. color: #fff;
  780. }
  781. .dialog-content2 {
  782. width: 800px;
  783. position: absolute;
  784. top: 50%;
  785. left: 50%;
  786. transform: translate(-50%, -50%);
  787. /*background-color: black;*/
  788. }
  789. .base-banner1 {
  790. width: 800px;
  791. height: 600px;
  792. background: url("../../assets/BioSafety/03.png") no-repeat;
  793. background-size: 100% 100%;
  794. display: flex;
  795. box-sizing: border-box;
  796. padding: 40px 20px 20px 50px;
  797. align-items: center;
  798. }
  799. .base-left {
  800. width: 750px;
  801. }
  802. .base-left1 {
  803. box-sizing: border-box;
  804. text-align: left;
  805. padding-left: 100px;
  806. height: 500px;
  807. }
  808. .base-right {
  809. flex: 1;
  810. }
  811. .base-right p {
  812. line-height: 80px;
  813. font-size: 16px;
  814. color: #fff;
  815. box-sizing: border-box;
  816. text-align: left;
  817. padding-left: 50px;
  818. }
  819. </style>