index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  1. <template>
  2. <div class="table_item">
  3. <a-page-header sub-title="趋势图" @back="goBack" style="padding: 0 0 20px">
  4. <template #title>
  5. <span style="font-size: 18px; cursor: pointer" @click="goBack">返回</span>
  6. </template>
  7. </a-page-header>
  8. <div class="table_head">
  9. <div class="head_name">{{ data.regionName }}</div>
  10. <div class="head_row">
  11. <div class="label">
  12. <img src="/src/assets/images/monitor/01.png" v-if="data.sensorData && data.sensorData.temperature" />
  13. <img src="/src/assets/images/monitor/01-1.png" v-else />
  14. </div>
  15. <div class="value">
  16. <div>温度</div>
  17. <div class="num" v-if="data.temperature">{{ data.temperature + '℃' }}</div>
  18. </div>
  19. </div>
  20. <div class="head_row">
  21. <div class="label">
  22. <img src="/src/assets/images/monitor/02.png" v-if="data.sensorData && data.sensorData.humidity" />
  23. <img src="/src/assets/images/monitor/02-2.png" v-else />
  24. </div>
  25. <div class="value">
  26. <div>温度</div>
  27. <div class="num" v-if="data.humidity">{{ data.humidity + '%' }}</div>
  28. </div>
  29. </div>
  30. <div class="head_row">
  31. <div class="label">
  32. <img src="/src/assets/images/monitor/03.png" v-if="data.sensorData && data.sensorData.co2" />
  33. <img src="/src/assets/images/monitor/03-3.png" v-else />
  34. </div>
  35. <div class="value">
  36. <div>二氧化碳</div>
  37. <div class="num" v-if="data.CO2">{{ data.CO2 + '%' }}</div>
  38. </div>
  39. </div>
  40. <div class="head_time">
  41. {{ '更新时间 :' + data.updateTime }}
  42. </div>
  43. </div>
  44. <div class="table_search">
  45. <div class="search_left">
  46. <span>查询范围:</span>
  47. <a-range-picker
  48. v-model:value="timeValue"
  49. style="width: 250px"
  50. format="YYYY-MM-DD"
  51. value-format="YYYY-MM-DD"
  52. :disabled-date="disabledDate"
  53. :allowClear="false"
  54. @change="getEchartData"
  55. />
  56. <a-radio-group v-model:value="periodValue" button-style="solid">
  57. <a-radio-button value="week">最近一周</a-radio-button>
  58. <a-radio-button value="halfaMonth">最近半月</a-radio-button>
  59. <a-radio-button value="oneMonth">最近一月</a-radio-button>
  60. <a-radio-button value="threeMonths">最近三月</a-radio-button>
  61. </a-radio-group>
  62. </div>
  63. <div class="search_right">
  64. <span>数据维度:</span>
  65. <a-radio-group v-model:value="radioValue" button-style="solid">
  66. <a-radio-button value="null">系统默认</a-radio-button>
  67. <a-radio-button value="1m">分钟</a-radio-button>
  68. <a-radio-button value="1h">小时</a-radio-button>
  69. <a-radio-button value="12h">半天</a-radio-button>
  70. <a-radio-button value="1d">天</a-radio-button>
  71. <a-radio-button value="1w">自然周</a-radio-button>
  72. <a-radio-button value="1mo">月度</a-radio-button>
  73. <a-radio-button value="3mo">季度</a-radio-button>
  74. </a-radio-group>
  75. <a-button class="xn-mg08">
  76. <template #icon><download-outlined /></template>导出
  77. </a-button>
  78. </div>
  79. </div>
  80. <!-- 折线图 -->
  81. <div class="chart">
  82. <div class="echart" id="temperature"></div>
  83. <div class="echart" id="humidity"></div>
  84. <div class="echart" id="CO2"></div>
  85. </div>
  86. </div>
  87. </template>
  88. <script setup>
  89. import * as echarts from 'echarts'
  90. import alarmTrendApi from '@/api/coldchain/alarmTrendApi.js'
  91. import { useRoute } from 'vue-router'
  92. import router from '@/router'
  93. import dayjs from 'dayjs' // 用于处理日期和时间
  94. const Route = useRoute()
  95. const queryValue = ref({}) //监控对象的参数
  96. const radioValue = ref('null') //时间段
  97. const data = ref({})
  98. const periodValue = ref('week')
  99. const timeValue = ref([])
  100. onBeforeMount(() => {
  101. calculateDateRange()
  102. if (Route.query.id) {
  103. queryValue.value = { ...Route.query }
  104. }
  105. })
  106. onMounted(() => {
  107. if (queryValue.value.id) {
  108. getData()
  109. getEchartData()
  110. }
  111. })
  112. // 监听 查询范围 变化,重新计算日期范围
  113. watch(periodValue, () => {
  114. calculateDateRange()
  115. getEchartData()
  116. })
  117. // 监听 数据维度 变化,重新计算日期范围
  118. watch(radioValue, () => {
  119. getEchartData()
  120. })
  121. // 计算时间范围
  122. const calculateDateRange = () => {
  123. const now = new Date()
  124. let startDate
  125. const endDate = new Date(now)
  126. endDate.setHours(23, 59, 59, 999) // 设置结束时间为当天的23:59:59
  127. // 根据不同的选择设置开始时间
  128. switch (periodValue.value) {
  129. case 'week':
  130. startDate = new Date(now)
  131. startDate.setDate(now.getDate() - 6) // 最近一周
  132. break
  133. case 'halfaMonth':
  134. startDate = new Date(now)
  135. startDate.setDate(now.getDate() - 14) // 最近半个月
  136. break
  137. case 'oneMonth':
  138. startDate = new Date(now)
  139. startDate.setMonth(now.getMonth() - 1) // 最近一个月
  140. break
  141. case 'threeMonths':
  142. startDate = new Date(now)
  143. startDate.setMonth(now.getMonth() - 3) // 最近三个月
  144. break
  145. default:
  146. startDate = new Date(now) // 默认值是今天
  147. }
  148. startDate.setHours(0, 0, 0, 0) // 设置开始时间为当天的00:00:00
  149. timeValue.value = [formatDate(startDate), formatDate(endDate)]
  150. }
  151. const today = dayjs() // 获取当前时间和90天前的时间
  152. const ninetyDaysAgo = today.subtract(90, 'day') // 90天前的日期
  153. // 禁用超过90天之前的日期和今天之后的日期
  154. const disabledDate = (current) => {
  155. if (!current) return false
  156. // 禁用当前日期早于90天之前的日期或今天之后的日期
  157. return current.isBefore(ninetyDaysAgo, 'day') || current.isAfter(today, 'day')
  158. }
  159. // 格式化日期为 "YYYY-MM-DD"
  160. const formatDate = (date) => {
  161. const year = date.getFullYear()
  162. const month = String(date.getMonth() + 1).padStart(2, '0')
  163. const day = String(date.getDate()).padStart(2, '0')
  164. return `${year}-${month}-${day}`
  165. }
  166. // 获取基础信息
  167. const getData = () => {
  168. const parameter = {
  169. deviceId: queryValue.value.id,
  170. roads: queryValue.value.roads
  171. }
  172. alarmTrendApi.realTimeData(parameter).then((res) => {
  173. data.value = res
  174. })
  175. }
  176. // 获取折线图数据
  177. const getEchartData = () => {
  178. const parameter = {
  179. deviceId: queryValue.value.id,
  180. roads: queryValue.value.roads,
  181. startTime: timeValue.value[0],
  182. endTime: timeValue.value[1],
  183. aggregationWindow: radioValue.value === 'null' ? null : radioValue.value
  184. }
  185. alarmTrendApi
  186. .pointDataTrend(parameter)
  187. .then((res) => {
  188. if (res) {
  189. // 温度
  190. if (
  191. res.sensorEchartDataResult.temperature &&
  192. res.sensorEchartDataResult.temperature.x &&
  193. res.sensorEchartDataResult.temperature.x.length
  194. ) {
  195. getEcharts1({
  196. up: res.temperatureUp,
  197. down: res.temperatureDown,
  198. data: res.sensorEchartDataResult.temperature
  199. })
  200. }
  201. // 湿度
  202. if (
  203. res.sensorEchartDataResult.humidity &&
  204. res.sensorEchartDataResult.humidity.x &&
  205. res.sensorEchartDataResult.humidity.x.length
  206. ) {
  207. getEcharts2({
  208. up: res.humidityUp,
  209. down: res.humidityDown,
  210. data: res.sensorEchartDataResult.humidity
  211. })
  212. }
  213. // co2
  214. if (
  215. res.sensorEchartDataResult.co2 &&
  216. res.sensorEchartDataResult.co2.x &&
  217. res.sensorEchartDataResult.co2.x.length
  218. ) {
  219. getEcharts3({
  220. up: res.co2Up,
  221. down: res.co2Down,
  222. data: res.sensorEchartDataResult.co2
  223. })
  224. }
  225. }
  226. })
  227. .finally(() => {})
  228. }
  229. // 温度
  230. const getEcharts1 = (val) => {
  231. let Echarts = echarts.init(document.getElementById('temperature'))
  232. const option = {
  233. tooltip: {
  234. trigger: 'axis',
  235. axisPointer: {
  236. type: 'cross',
  237. crossStyle: {
  238. color: '#999'
  239. },
  240. label: {
  241. show: false
  242. }
  243. },
  244. formatter: function (params) {
  245. let date = params[0].axisValueLabel
  246. let value = params[0].value
  247. return `${date}<br/>温度 :${value} °C`
  248. }
  249. },
  250. grid: {
  251. top: '15%',
  252. left: '5%',
  253. right: '7%',
  254. bottom: '25%'
  255. },
  256. xAxis: {
  257. type: 'category',
  258. data: val.data.x,
  259. axisLine: {
  260. show: true,
  261. lineStyle: {
  262. color: '#7e848e'
  263. }
  264. },
  265. axisLabel: {
  266. color: '#A1A7B3',
  267. interval: 0,
  268. rotate: '10'
  269. },
  270. axisTick: {
  271. show: false
  272. },
  273. splitLine: {
  274. show: true
  275. },
  276. name: '日期',
  277. nameTextStyle: {
  278. color: '#484848',
  279. fontSize: 14,
  280. fontWeight: 'bold'
  281. }
  282. },
  283. yAxis: {
  284. type: 'value',
  285. scale: true,
  286. minInterval: 1,
  287. axisLabel: {
  288. formatter: '{value} °C'
  289. },
  290. splitLine: {
  291. show: true
  292. },
  293. name: '温度',
  294. nameTextStyle: {
  295. color: '#484848',
  296. fontSize: 14,
  297. fontWeight: 'bold',
  298. align: 'left',
  299. padding: [0, 0, 0, -50]
  300. }
  301. },
  302. dataZoom: [
  303. {
  304. show: true,
  305. height: 10,
  306. xAxisIndex: [0],
  307. left: '10%',
  308. right: '10%',
  309. bottom: '6%',
  310. start: 70,
  311. end: 100,
  312. handleIcon:
  313. 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
  314. handleSize: '110%',
  315. handleStyle: {
  316. color: '#d3dee5'
  317. },
  318. textStyle: {
  319. color: '#000'
  320. },
  321. borderColor: '#90979c'
  322. },
  323. {
  324. type: 'inside',
  325. show: true,
  326. height: 15,
  327. start: 1,
  328. end: 35
  329. }
  330. ],
  331. series: [
  332. {
  333. name: '温度',
  334. data: val.data.y,
  335. type: 'line',
  336. symbol: 'circle',
  337. lineStyle: {
  338. color: '#4362f0',
  339. cap: 'round'
  340. },
  341. itemStyle: {
  342. normal: {
  343. color: 'transparent',
  344. borderColor: '#4362f0',
  345. borderWidth: 3
  346. }
  347. },
  348. areaStyle: {
  349. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  350. {
  351. offset: 0,
  352. color: '#4362f0'
  353. },
  354. {
  355. offset: 1,
  356. color: '#fff'
  357. }
  358. ])
  359. },
  360. symbolSize: 6,
  361. label: {
  362. show: false
  363. },
  364. markLine: {
  365. data: [
  366. {
  367. name: '温度上限',
  368. yAxis: val.up,
  369. lineStyle: {
  370. color: '#f3956e',
  371. width: 2,
  372. type: 'solid',
  373. shadowColor: 'rgba(243, 149, 110, 1)',
  374. shadowBlur: 5
  375. },
  376. label: {
  377. formatter: '温度上限: {c}°C',
  378. color: '#f3956e'
  379. }
  380. },
  381. {
  382. name: '温度下限',
  383. yAxis: val.down,
  384. lineStyle: {
  385. color: '#41b982',
  386. width: 2,
  387. type: 'solid',
  388. shadowColor: 'rgba(4, 188, 111, 1)',
  389. shadowBlur: 5
  390. },
  391. label: {
  392. formatter: '温度下限: {c}°C',
  393. color: '#41b982'
  394. }
  395. }
  396. ]
  397. }
  398. }
  399. ]
  400. }
  401. // 绘制图表
  402. Echarts.setOption(option)
  403. // 自适应大小
  404. window.onresize = () => {
  405. Echarts.resize()
  406. }
  407. }
  408. // 湿度
  409. const getEcharts2 = (val) => {
  410. let Echarts = echarts.init(document.getElementById('humidity'))
  411. const option = {
  412. tooltip: {
  413. trigger: 'axis',
  414. axisPointer: {
  415. type: 'cross',
  416. crossStyle: {
  417. color: '#999'
  418. },
  419. label: {
  420. show: false
  421. }
  422. },
  423. formatter: function (params) {
  424. let date = params[0].axisValueLabel
  425. let value = params[0].value
  426. return `${date}<br/>湿度 :${value} %`
  427. }
  428. },
  429. grid: {
  430. top: '15%',
  431. left: '5%',
  432. right: '7%',
  433. bottom: '25%'
  434. },
  435. xAxis: {
  436. type: 'category',
  437. data: val.data.x,
  438. axisLine: {
  439. show: true,
  440. lineStyle: {
  441. color: '#7e848e'
  442. }
  443. },
  444. axisTick: {
  445. show: false
  446. },
  447. splitLine: {
  448. show: true
  449. },
  450. axisLabel: {
  451. color: '#A1A7B3',
  452. interval: 0,
  453. rotate: '10'
  454. },
  455. name: '日期',
  456. nameTextStyle: {
  457. color: '#484848',
  458. fontSize: 14,
  459. fontWeight: 'bold'
  460. }
  461. },
  462. yAxis: {
  463. type: 'value',
  464. scale: true,
  465. minInterval: 1,
  466. axisLabel: {
  467. formatter: '{value} %'
  468. },
  469. splitLine: {
  470. show: true
  471. },
  472. name: '湿度',
  473. nameLocation: 'end',
  474. nameGap: 15,
  475. nameTextStyle: {
  476. color: '#484848',
  477. fontSize: 14,
  478. fontWeight: 'bold',
  479. align: 'left',
  480. padding: [0, 0, 0, -50]
  481. }
  482. },
  483. dataZoom: [
  484. {
  485. show: true,
  486. height: 10,
  487. xAxisIndex: [0],
  488. left: '10%',
  489. right: '10%',
  490. bottom: '6%',
  491. start: 70,
  492. end: 100,
  493. handleIcon:
  494. 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
  495. handleSize: '110%',
  496. handleStyle: {
  497. color: '#d3dee5'
  498. },
  499. textStyle: {
  500. color: '#000'
  501. },
  502. borderColor: '#90979c'
  503. },
  504. {
  505. type: 'inside',
  506. show: true,
  507. height: 15,
  508. start: 1,
  509. end: 35
  510. }
  511. ],
  512. series: [
  513. {
  514. name: '湿度',
  515. data: val.data.y,
  516. type: 'line',
  517. symbol: 'circle',
  518. lineStyle: {
  519. color: '#11def7',
  520. cap: 'round'
  521. },
  522. itemStyle: {
  523. normal: {
  524. color: 'transparent',
  525. borderColor: '#11def7',
  526. borderWidth: 3
  527. }
  528. },
  529. areaStyle: {
  530. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  531. {
  532. offset: 0,
  533. color: '#11def7'
  534. },
  535. {
  536. offset: 1,
  537. color: '#fff'
  538. }
  539. ])
  540. },
  541. symbolSize: 6,
  542. label: {
  543. show: false
  544. },
  545. markLine: {
  546. data: [
  547. {
  548. name: '湿度上限',
  549. yAxis: val.up,
  550. lineStyle: {
  551. color: '#f3956e',
  552. width: 2,
  553. type: 'solid',
  554. shadowColor: 'rgba(243, 149, 110, 1)',
  555. shadowBlur: 5
  556. },
  557. label: {
  558. formatter: '湿度上限: {c}%',
  559. color: '#f3956e'
  560. }
  561. },
  562. {
  563. name: '湿度下限',
  564. yAxis: val.down,
  565. lineStyle: {
  566. color: '#41b982',
  567. width: 2,
  568. type: 'solid',
  569. shadowColor: 'rgba(4, 188, 111, 1)',
  570. shadowBlur: 5
  571. },
  572. label: {
  573. formatter: '湿度下限: {c}%',
  574. color: '#41b982'
  575. }
  576. }
  577. ]
  578. }
  579. }
  580. ]
  581. }
  582. // 绘制图表
  583. Echarts.setOption(option)
  584. // 自适应大小
  585. window.onresize = () => {
  586. Echarts.resize()
  587. }
  588. }
  589. // CO2
  590. const getEcharts3 = (val) => {
  591. let Echarts = echarts.init(document.getElementById('CO2'))
  592. const option = {
  593. tooltip: {
  594. trigger: 'axis',
  595. axisPointer: {
  596. type: 'cross',
  597. crossStyle: {
  598. color: '#999'
  599. },
  600. label: {
  601. show: false
  602. }
  603. },
  604. formatter: function (params) {
  605. let date = params[0].axisValueLabel
  606. let value = params[0].value
  607. return `${date}<br/>二氧化碳 :${value} %`
  608. }
  609. },
  610. grid: {
  611. top: '15%',
  612. left: '5%',
  613. right: '7%',
  614. bottom: '25%'
  615. },
  616. xAxis: {
  617. type: 'category',
  618. data: val.data.x,
  619. axisLine: {
  620. show: true,
  621. lineStyle: {
  622. color: '#7e848e'
  623. }
  624. },
  625. axisLabel: {
  626. color: '#A1A7B3',
  627. interval: 0,
  628. rotate: '10'
  629. },
  630. axisTick: {
  631. show: false
  632. },
  633. splitLine: {
  634. show: true
  635. },
  636. name: '日期',
  637. nameTextStyle: {
  638. color: '#484848',
  639. fontSize: 14,
  640. fontWeight: 'bold'
  641. }
  642. },
  643. yAxis: {
  644. type: 'value',
  645. scale: true,
  646. minInterval: 1,
  647. axisLabel: {
  648. formatter: '{value} %'
  649. },
  650. splitLine: {
  651. show: true
  652. },
  653. name: '二氧化碳',
  654. nameLocation: 'end',
  655. nameGap: 15,
  656. nameTextStyle: {
  657. color: '#484848',
  658. fontSize: 14,
  659. fontWeight: 'bold',
  660. align: 'left',
  661. padding: [0, 0, 0, -50]
  662. }
  663. },
  664. dataZoom: [
  665. {
  666. show: true,
  667. height: 10,
  668. xAxisIndex: [0],
  669. left: '10%',
  670. right: '10%',
  671. bottom: '6%',
  672. start: 70,
  673. end: 100,
  674. handleIcon:
  675. 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
  676. handleSize: '110%',
  677. handleStyle: {
  678. color: '#d3dee5'
  679. },
  680. textStyle: {
  681. color: '#000'
  682. },
  683. borderColor: '#90979c'
  684. },
  685. {
  686. type: 'inside',
  687. show: true,
  688. height: 15,
  689. start: 1,
  690. end: 35
  691. }
  692. ],
  693. series: [
  694. {
  695. name: '二氧化碳',
  696. data: val.data.y,
  697. type: 'line',
  698. symbol: 'circle',
  699. lineStyle: {
  700. color: '#7f3fd5',
  701. cap: 'round'
  702. },
  703. itemStyle: {
  704. normal: {
  705. color: 'transparent',
  706. borderColor: '#7f3fd5',
  707. borderWidth: 3
  708. }
  709. },
  710. areaStyle: {
  711. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  712. {
  713. offset: 0,
  714. color: '#7f3fd5'
  715. },
  716. {
  717. offset: 1,
  718. color: '#fff'
  719. }
  720. ])
  721. },
  722. symbolSize: 6,
  723. label: {
  724. show: false
  725. },
  726. markLine: {
  727. data: [
  728. {
  729. name: '二氧化碳上限',
  730. yAxis: val.up,
  731. lineStyle: {
  732. color: '#f3956e',
  733. width: 2,
  734. type: 'solid',
  735. shadowColor: 'rgba(243, 149, 110, 1)',
  736. shadowBlur: 5
  737. },
  738. label: {
  739. formatter: '二氧化碳上限: {c}%',
  740. color: '#f3956e'
  741. }
  742. },
  743. {
  744. name: '二氧化碳下限',
  745. yAxis: val.down,
  746. lineStyle: {
  747. color: '#41b982',
  748. width: 2,
  749. type: 'solid',
  750. shadowColor: 'rgba(4, 188, 111, 1)',
  751. shadowBlur: 5
  752. },
  753. label: {
  754. formatter: '二氧化碳下限: {c}%',
  755. color: '#41b982'
  756. }
  757. }
  758. ]
  759. }
  760. }
  761. ]
  762. }
  763. // 绘制图表
  764. Echarts.setOption(option)
  765. // 自适应大小
  766. window.onresize = () => {
  767. Echarts.resize()
  768. }
  769. }
  770. // 返回上一页
  771. const goBack = () => {
  772. router.go(-1)
  773. }
  774. </script>
  775. <style lang="less" scoped>
  776. .table_item {
  777. padding: 15px 20px;
  778. background-color: #ffffff;
  779. .table_head {
  780. width: 100%;
  781. height: 100px;
  782. padding: 0 10px;
  783. background-image: url('/src/assets/images/monitor/bg.png');
  784. background-size: cover;
  785. background-position: center;
  786. border-radius: 10px;
  787. display: flex;
  788. align-items: center;
  789. .head_name,
  790. .head_time {
  791. flex: 2;
  792. text-align: center;
  793. }
  794. .head_name {
  795. font-size: 20px;
  796. font-weight: bold;
  797. color: #4362f0;
  798. }
  799. .head_row {
  800. flex: 3;
  801. display: flex;
  802. align-items: center;
  803. justify-content: center;
  804. .label {
  805. img {
  806. width: 50px;
  807. height: 50px;
  808. }
  809. }
  810. .value {
  811. padding: 0 20px;
  812. display: flex;
  813. align-items: center;
  814. .num {
  815. font-weight: bold;
  816. font-size: 26px;
  817. padding: 0 20px;
  818. width: 150px;
  819. white-space: nowrap;
  820. overflow: hidden;
  821. text-overflow: ellipsis;
  822. }
  823. }
  824. }
  825. }
  826. .table_search {
  827. width: 100%;
  828. margin: 20px 0;
  829. display: flex;
  830. align-items: center;
  831. justify-content: space-between;
  832. .search_left {
  833. :deep(.ant-radio-button-wrapper) {
  834. margin: 0 10px;
  835. }
  836. }
  837. }
  838. // 图表
  839. .chart {
  840. width: 100%;
  841. height: 950px;
  842. .echart {
  843. width: 100%;
  844. height: 30%;
  845. margin-bottom: 50px;
  846. }
  847. }
  848. }
  849. </style>