健康同学微信公众号h5项目
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
1 ano atrás
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. <!-- -->
  2. <template>
  3. <div class="pageContent insight">
  4. <div class="periodNav">
  5. <div class="periodItem week" :class="{ active: active == 0 }" @click="active = 0">周</div>
  6. <div class="periodItem month" :class="{ active: active == 1 }" @click="active = 1">月</div>
  7. </div>
  8. <div class="periodSwitch">
  9. <div class="arrow arrowLeft">
  10. <van-icon name="arrow-left"></van-icon>
  11. </div>
  12. <div class="timearea">2023-11-15~2023-11-22</div>
  13. <div class="arrow arrowRight">
  14. <van-icon name="arrow"></van-icon>
  15. </div>
  16. </div>
  17. <div class="label">
  18. <div class="left">情绪感知</div>
  19. <div class="right">
  20. <span @click="onRouterTo('emo')">详情 ></span>
  21. </div>
  22. </div>
  23. <div class="periodNav">
  24. <div
  25. class="periodItem minPeriodItem"
  26. :class="{ active: emotionActive == index }"
  27. v-for="(item, index) in emotionList"
  28. :key="index"
  29. @click="onEmotionClick(index)"
  30. >
  31. <span>{{ item.name }}</span>
  32. </div>
  33. </div>
  34. <div class="ChatBox">
  35. <div class="legendBox">
  36. <div class="legend">
  37. <div class="legendItem" :class="item.type" v-for="(item, index) in degreeList" :key="index">
  38. <span>{{ item.name }}{{ emotionList[emotionActive].name }}</span>
  39. <span class="number">{{ 120 }}次({{ 120 }}%)</span>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="Chat emotionChat" id="emotionChart"></div>
  44. </div>
  45. <div class="grid">
  46. <div class="gridItem" :style="`background:${item.color};`" v-for="(item, index) in degreeList" :key="index">
  47. <div class="time">
  48. <span class="number">5</span>
  49. <span>天</span>
  50. </div>
  51. <div class="title">{{ item.name }}{{ emotionList[emotionActive].name }}倾向</div>
  52. </div>
  53. </div>
  54. <div class="label">
  55. <div class="left">体征感知</div>
  56. <div class="right">
  57. <span @click="onRouterTo('signs')">详情 ></span>
  58. </div>
  59. </div>
  60. <div class="periodNav">
  61. <div
  62. class="periodItem minPeriodItem"
  63. :class="{ active: signActive == index }"
  64. v-for="(item, index) in signList"
  65. :key="index"
  66. @click="onSignClick(index)"
  67. >
  68. <span>{{ item.name }}</span>
  69. </div>
  70. </div>
  71. <!-- bmi显示/输入 -->
  72. <div class="bmi" v-show="signActive == 2">
  73. <p>身高:<span>170</span>cm</p>
  74. <p>体重:<span>60</span>kg</p>
  75. <p>BMI:<span>24.5</span></p>
  76. <p>{{ bmi.result }}</p>
  77. <van-button size="mini">更新</van-button>
  78. </div>
  79. <div class="ChatBox" :class="{ hiddenChart: signActive == 2 }">
  80. <div class="legendBox minLegendBox">
  81. <div class="legend">
  82. <div class="legendItem" :class="item.type" v-for="(item, index) in signGrid" :key="index">
  83. <span>{{ item.name }}</span>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="Chat signChart" id="signChart"></div>
  88. </div>
  89. <div class="grid" v-if="signList[signActive].grid">
  90. <div
  91. class="gridItem"
  92. :class="{ minItem: signGrid.length % 3 == 0 }"
  93. :style="`background:${item.color};`"
  94. v-for="(item, index) in signGrid"
  95. :key="index"
  96. >
  97. <div class="time">
  98. <span class="number">5</span>
  99. <span>天</span>
  100. </div>
  101. <div class="title">{{ item.name }}</div>
  102. </div>
  103. </div>
  104. <div class="ChatBox minChartBox" :class="{ hiddenChart: signActive != 2 }">
  105. <h4>运动步数</h4>
  106. <div class="Chat stepChart" id="stepChart"></div>
  107. <div class="result">
  108. <div class="wrapBox">
  109. <div class="text">
  110. <div class="left"><p>总步数:285</p></div>
  111. <div class="right">
  112. <img :src="upImg" alt="" />
  113. <span>923</span>
  114. </div>
  115. </div>
  116. <div class="text">
  117. <div class="left"><p>平均步数:285</p></div>
  118. <div class="right">
  119. <img :src="downImg" alt="" />
  120. <span>923</span>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="ChatBox minChartBox" :class="{ hiddenChart: signActive != 2 }">
  127. <h4>热量消耗</h4>
  128. <div class="Chat calorieChart" id="calorieChart"></div>
  129. <div class="result">
  130. <div class="wrapBox">
  131. <div class="text">
  132. <div class="left"><p>总消耗:285</p></div>
  133. <div class="right">
  134. <img :src="upImg" alt="" />
  135. <span>923</span>
  136. </div>
  137. </div>
  138. <div class="text">
  139. <div class="left"><p>平均消耗:285</p></div>
  140. <div class="right">
  141. <img :src="downImg" alt="" />
  142. <span>923</span>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </template>
  150. <script>
  151. export default {
  152. data() {
  153. return {
  154. active: 0,
  155. emotionActive: 0,
  156. signActive: 0,
  157. emotionChart: null,
  158. signChart: null,
  159. stepChart: null,
  160. calorieChart: null,
  161. emotionList: [
  162. {
  163. name: '疲劳'
  164. },
  165. {
  166. name: '压力'
  167. },
  168. {
  169. name: '焦虑'
  170. }
  171. ],
  172. degreeList: [
  173. {
  174. name: '无',
  175. type: 'not',
  176. color: '#179B3B'
  177. },
  178. {
  179. name: '轻度',
  180. type: 'mild',
  181. color: '#2EA7E0'
  182. },
  183. {
  184. name: '中度',
  185. type: 'moderate',
  186. color: '#8DC21F'
  187. },
  188. {
  189. name: '重度',
  190. type: 'severe',
  191. color: '#FF5F8B'
  192. }
  193. ],
  194. signList: [
  195. {
  196. grid: 'heartRateList',
  197. name: '心率'
  198. },
  199. {
  200. grid: 'temperatureList',
  201. name: '体温'
  202. },
  203. {
  204. grid: null,
  205. name: '运动'
  206. }
  207. ],
  208. heartRateList: [
  209. {
  210. name: '正常',
  211. type: 'moderate',
  212. color: '#179B3B'
  213. },
  214. {
  215. name: '偏高',
  216. type: 'severe',
  217. color: '#FF5F8B'
  218. },
  219. {
  220. name: '偏低',
  221. type: 'mild',
  222. color: '#2EA7E0'
  223. }
  224. ],
  225. temperatureList: [
  226. {
  227. name: '正常',
  228. type: 'moderate',
  229. color: '#179B3B'
  230. },
  231. {
  232. name: '发烧',
  233. type: 'severe',
  234. color: '#FF5F8B'
  235. }
  236. ],
  237. bmi: {
  238. height: '170',
  239. weight: '57',
  240. value: '24.5',
  241. result: '肥胖'
  242. },
  243. upImg: require('@/assets/today/icons/up.png'),
  244. downImg: require('@/assets/today/icons/down.png')
  245. };
  246. },
  247. created() {},
  248. mounted() {
  249. this.initData();
  250. },
  251. watch: {
  252. active(val) {
  253. console.log(val);
  254. this.emotionActive = 0;
  255. this.signActive = 0;
  256. this.$nextTick(() => {
  257. this.initData();
  258. });
  259. },
  260. emotionActive(val) {
  261. console.log(val);
  262. this.$nextTick(() => {
  263. this.initEmotionChart();
  264. });
  265. },
  266. signActive(val) {
  267. console.log(val);
  268. this.$nextTick(() => {
  269. this.initSignChart();
  270. });
  271. }
  272. },
  273. computed: {
  274. degreeMap() {
  275. let map = new Map();
  276. this.degreeList.forEach(item => {
  277. map.set(item.name, item.color);
  278. });
  279. return map;
  280. },
  281. heartRateMap() {
  282. let map = new Map();
  283. this.heartRateList.forEach(item => {
  284. map.set(item.name, item.color);
  285. });
  286. return map;
  287. },
  288. temperatureMap() {
  289. let map = new Map();
  290. this.temperatureList.forEach(item => {
  291. map.set(item.name, item.color);
  292. });
  293. return map;
  294. },
  295. signGrid() {
  296. let list = [];
  297. if (this.signList[this.signActive].grid) {
  298. let temp = this[`${this.signList[this.signActive].grid}`];
  299. if (temp) {
  300. list = temp;
  301. }
  302. }
  303. return list;
  304. }
  305. },
  306. methods: {
  307. initData() {
  308. //初始化图表
  309. if (!this.emotionChart) {
  310. this.emotionChart = this.$echarts.init(document.getElementById('emotionChart'));
  311. }
  312. if (!this.signChart) {
  313. this.signChart = this.$echarts.init(document.getElementById('signChart'));
  314. }
  315. if (!this.stepChart) {
  316. this.stepChart = this.$echarts.init(document.getElementById('stepChart'));
  317. }
  318. if (!this.calorieChart) {
  319. this.calorieChart = this.$echarts.init(document.getElementById('calorieChart'));
  320. }
  321. //渲染图表
  322. this.initEmotionChart();
  323. this.initSignChart();
  324. },
  325. initEmotionChart() {
  326. let option = this.getOption();
  327. //测试
  328. let data = [
  329. {
  330. time: '5.11',
  331. value: 10
  332. },
  333. {
  334. time: '5.12',
  335. value: 20
  336. },
  337. {
  338. time: '5.13',
  339. value: 40
  340. },
  341. {
  342. time: '5.14',
  343. value: 50
  344. },
  345. {
  346. time: '5.15',
  347. value: 60
  348. },
  349. {
  350. time: '5.16',
  351. value: 70
  352. },
  353. {
  354. time: '5.17',
  355. value: 90
  356. }
  357. ];
  358. this.formateEmotionData(option, data);
  359. this.emotionChart.setOption(option);
  360. },
  361. initSignChart() {
  362. let option = this.getOption();
  363. if (this.signActive == 0) {
  364. //测试
  365. let data = [
  366. {
  367. time: '5.11',
  368. value: 50
  369. },
  370. {
  371. time: '5.12',
  372. value: 60
  373. },
  374. {
  375. time: '5.13',
  376. value: 70
  377. },
  378. {
  379. time: '5.14',
  380. value: 80
  381. },
  382. {
  383. time: '5.15',
  384. value: 120
  385. },
  386. {
  387. time: '5.16',
  388. value: 130
  389. },
  390. {
  391. time: '5.17',
  392. value: 150
  393. }
  394. ];
  395. this.formateHeartRateData(option, data);
  396. this.signChart.setOption(option);
  397. } else if (this.signActive == 1) {
  398. //测试
  399. let data = [
  400. {
  401. time: '5.11',
  402. value: 36
  403. },
  404. {
  405. time: '5.12',
  406. value: 38
  407. },
  408. {
  409. time: '5.13',
  410. value: 37
  411. },
  412. {
  413. time: '5.14',
  414. value: 36
  415. },
  416. {
  417. time: '5.15',
  418. value: 38
  419. },
  420. {
  421. time: '5.16',
  422. value: 37
  423. },
  424. {
  425. time: '5.17',
  426. value: 39
  427. }
  428. ];
  429. this.formateTemperatureData(option, data);
  430. this.signChart.setOption(option);
  431. } else if (this.signActive == 2) {
  432. option = this.getOption(false);
  433. let option2 = this.getOption(false);
  434. //测试
  435. let data = [
  436. {
  437. time: '5.11',
  438. value: 36
  439. },
  440. {
  441. time: '5.12',
  442. value: 38
  443. },
  444. {
  445. time: '5.13',
  446. value: 37
  447. },
  448. {
  449. time: '5.14',
  450. value: 36
  451. },
  452. {
  453. time: '5.15',
  454. value: 38
  455. },
  456. {
  457. time: '5.16',
  458. value: 37
  459. },
  460. {
  461. time: '5.17',
  462. value: 39
  463. }
  464. ];
  465. //测试
  466. let data2 = [
  467. {
  468. time: '5.11',
  469. value: 36
  470. },
  471. {
  472. time: '5.12',
  473. value: 38
  474. },
  475. {
  476. time: '5.13',
  477. value: 37
  478. },
  479. {
  480. time: '5.14',
  481. value: 36
  482. },
  483. {
  484. time: '5.15',
  485. value: 38
  486. },
  487. {
  488. time: '5.16',
  489. value: 37
  490. },
  491. {
  492. time: '5.17',
  493. value: 39
  494. }
  495. ];
  496. this.formateStepData(option, data);
  497. this.formateCalorieData(option2, data2);
  498. this.stepChart.setOption(option);
  499. this.calorieChart.setOption(option2);
  500. }
  501. },
  502. formateEmotionData(option, data) {
  503. let xdata = [];
  504. let ydata = [];
  505. let fill = [];
  506. let max = 0;
  507. data.forEach(item => {
  508. if (item.value > max) {
  509. max = item.value;
  510. }
  511. });
  512. data.forEach(item => {
  513. xdata.push(item.time);
  514. fill.push({
  515. value: max - item.value,
  516. label: {
  517. show: false
  518. },
  519. itemStyle: {
  520. color: this.formateEmotionColor(item.value)
  521. }
  522. });
  523. ydata.push({
  524. value: item.value,
  525. label: {
  526. show: true
  527. },
  528. itemStyle: {
  529. color: this.formateEmotionColor(item.value)
  530. }
  531. });
  532. });
  533. option.xAxis.data = xdata;
  534. option.series[0].data = ydata;
  535. option.series[1].data = fill;
  536. },
  537. formateEmotionColor(value) {
  538. if (value > 75) {
  539. return this.degreeMap.get('重度');
  540. } else if (value > 50) {
  541. return this.degreeMap.get('中度');
  542. } else if (value > 25) {
  543. return this.degreeMap.get('轻度');
  544. } else {
  545. return this.degreeMap.get('无');
  546. }
  547. },
  548. formateHeartRateData(option, data) {
  549. let xdata = [];
  550. let ydata = [];
  551. let fill = [];
  552. let max = 0;
  553. data.forEach(item => {
  554. if (item.value > max) {
  555. max = item.value;
  556. }
  557. });
  558. data.forEach(item => {
  559. xdata.push(item.time);
  560. fill.push({
  561. value: max - item.value,
  562. label: {
  563. show: false
  564. },
  565. itemStyle: {
  566. color: this.formateHeartRateColor(item.value)
  567. }
  568. });
  569. ydata.push({
  570. value: item.value,
  571. label: {
  572. show: true
  573. },
  574. itemStyle: {
  575. color: this.formateHeartRateColor(item.value)
  576. }
  577. });
  578. });
  579. option.xAxis.data = xdata;
  580. option.series[0].data = ydata;
  581. option.series[1].data = fill;
  582. // 规定最小值
  583. option.yAxis.min = 40;
  584. // 规定最大值
  585. option.yAxis.max = 150;
  586. //设置高压标线
  587. option.series[1].markLine = {
  588. data: [
  589. {
  590. symbol: 'pin',
  591. silent: true,
  592. yAxis: 120,
  593. lineStyle: {
  594. color: '#C1272D'
  595. },
  596. label: {
  597. color: '#C1272D'
  598. }
  599. }
  600. ]
  601. };
  602. },
  603. formateHeartRateColor(value) {
  604. if (value > 120) {
  605. return this.heartRateMap.get('偏高');
  606. } else if (value >= 60) {
  607. return this.heartRateMap.get('正常');
  608. } else {
  609. return this.heartRateMap.get('偏低');
  610. }
  611. },
  612. formateTemperatureData(option, data) {
  613. let xdata = [];
  614. let ydata = [];
  615. let fill = [];
  616. let max = 0;
  617. data.forEach(item => {
  618. if (item.value > max) {
  619. max = item.value;
  620. }
  621. });
  622. data.forEach(item => {
  623. xdata.push(item.time);
  624. fill.push({
  625. value: max - item.value,
  626. label: {
  627. show: false
  628. },
  629. itemStyle: {
  630. color: this.formateTemperatureColor(item.value)
  631. }
  632. });
  633. ydata.push({
  634. value: item.value,
  635. label: {
  636. show: true
  637. },
  638. itemStyle: {
  639. color: this.formateTemperatureColor(item.value)
  640. }
  641. });
  642. });
  643. option.xAxis.data = xdata;
  644. option.series[0].data = ydata;
  645. option.series[1].data = fill;
  646. // 规定最小值
  647. option.yAxis.min = 35;
  648. // 规定最大值
  649. option.yAxis.max = max;
  650. },
  651. formateTemperatureColor(value) {
  652. if (value > 38) {
  653. return this.temperatureMap.get('发烧');
  654. } else {
  655. return this.temperatureMap.get('正常');
  656. }
  657. },
  658. formateStepData(option, data) {
  659. let xdata = [];
  660. let ydata = [];
  661. data.forEach(item => {
  662. xdata.push(item.time);
  663. ydata.push({
  664. value: item.value,
  665. label: {
  666. show: true
  667. },
  668. itemStyle: {
  669. color: this.formateTemperatureColor(item.value)
  670. }
  671. });
  672. });
  673. option.xAxis.data = xdata;
  674. option.series[0].data = ydata;
  675. // 隐藏y轴
  676. option.yAxis.show = false;
  677. },
  678. formateCalorieData(option, data) {
  679. let xdata = [];
  680. let ydata = [];
  681. data.forEach(item => {
  682. xdata.push(item.time);
  683. ydata.push({
  684. value: item.value,
  685. label: {
  686. show: true
  687. },
  688. itemStyle: {
  689. color: this.formateTemperatureColor(item.value)
  690. }
  691. });
  692. });
  693. option.xAxis.data = xdata;
  694. option.series[0].data = ydata;
  695. // 隐藏y轴
  696. option.yAxis.show = false;
  697. },
  698. getOption(point = true) {
  699. let option = {
  700. grid: {
  701. top: '10%',
  702. left: '10%',
  703. right: '10%',
  704. bottom: '20%'
  705. },
  706. xAxis: {
  707. type: 'category',
  708. axisLine: {
  709. show: false
  710. },
  711. axisTick: {
  712. show: false
  713. }
  714. },
  715. yAxis: {
  716. type: 'value'
  717. },
  718. series: [
  719. {
  720. type: 'bar',
  721. barMaxWidth: 15,
  722. stack: 'value',
  723. stackStrategy: 'all',
  724. animation: false,
  725. label: {
  726. show: true,
  727. width: 15,
  728. height: 15,
  729. backgroundColor: '#fff',
  730. borderRadius: 50,
  731. borderWidth: 3,
  732. borderColor: 'inherit',
  733. verticalAlign: 'middle',
  734. position: 'insideTop',
  735. formatter: function () {
  736. return '';
  737. }
  738. },
  739. itemStyle: {
  740. borderRadius: [0, 0, 12, 12]
  741. }
  742. },
  743. {
  744. type: 'bar',
  745. barMaxWidth: 15,
  746. stack: 'value',
  747. stackStrategy: 'all',
  748. animation: false,
  749. itemStyle: {
  750. borderRadius: [12, 12, 0, 0]
  751. }
  752. }
  753. ]
  754. };
  755. if (!point) {
  756. option.series = [
  757. {
  758. type: 'bar',
  759. barMaxWidth: 15,
  760. label: {
  761. show: true,
  762. color: '#000',
  763. position: 'outside'
  764. },
  765. itemStyle: {
  766. borderRadius: 12
  767. }
  768. }
  769. ];
  770. }
  771. return option;
  772. },
  773. onEmotionClick(index) {
  774. this.emotionActive = index;
  775. // 情绪选项变化重新渲染图表
  776. },
  777. onSignClick(index) {
  778. this.signActive = index;
  779. // 体征选项变化重新渲染图表
  780. },
  781. onRouterTo(name) {
  782. this.$router.push({
  783. name: name === 'emo' ? 'report' : 'monthReport',
  784. query: {
  785. name: name
  786. }
  787. });
  788. }
  789. }
  790. };
  791. </script>
  792. <style scoped lang="scss">
  793. @import './include.scss';
  794. .insight {
  795. padding-top: 20px;
  796. .periodNav {
  797. display: flex;
  798. justify-content: space-around;
  799. align-items: center;
  800. .periodItem {
  801. width: 48%;
  802. font-size: 28px;
  803. color: black;
  804. text-align: center;
  805. padding: 12px;
  806. border-radius: 30px;
  807. background: #e6e6e6;
  808. &.active {
  809. color: white;
  810. background: #179b3b;
  811. }
  812. }
  813. .minPeriodItem {
  814. width: 32%;
  815. padding: 8px;
  816. }
  817. }
  818. .periodSwitch {
  819. display: flex;
  820. width: 100%;
  821. justify-content: space-between;
  822. align-items: center;
  823. padding: 40px 10px;
  824. padding-bottom: 10px;
  825. .timearea {
  826. font-size: 28px;
  827. justify-self: center;
  828. color: gray;
  829. }
  830. .arrow {
  831. font-size: 45px;
  832. }
  833. }
  834. .bmi {
  835. display: flex;
  836. justify-content: flex-start;
  837. align-items: center;
  838. white-space: nowrap;
  839. padding: 40px 8px 0 8px;
  840. font-weight: bold;
  841. p {
  842. padding: 0 5px;
  843. font-size: 28px;
  844. }
  845. .van-button {
  846. padding: 5px 10px;
  847. margin-left: 50px;
  848. font-size: 12px;
  849. color: #fff;
  850. border-radius: 30px;
  851. background-color: $green;
  852. }
  853. }
  854. .label {
  855. font-size: 36px;
  856. font-weight: bold;
  857. padding: 30px 10px 30px 0;
  858. display: flex;
  859. justify-content: space-between;
  860. align-items: center;
  861. .right {
  862. font-size: 30px;
  863. }
  864. }
  865. .ChatBox {
  866. overflow: hidden;
  867. width: calc(100vw - 60px);
  868. height: 600px;
  869. border: 2px solid #cdf348;
  870. border-radius: 70px;
  871. margin-top: 30px;
  872. h4 {
  873. padding: 40px 0 10px 60px;
  874. }
  875. .legendBox {
  876. width: 100%;
  877. height: 150px;
  878. display: flex;
  879. justify-content: flex-end;
  880. align-items: center;
  881. padding: 0 30px;
  882. .legend {
  883. display: flex;
  884. flex-wrap: wrap;
  885. justify-content: flex-end;
  886. align-items: center;
  887. font-size: 20px;
  888. .legendItem {
  889. position: relative;
  890. width: 205px;
  891. margin-top: 10px;
  892. margin-right: 20px;
  893. &:nth-child(2n) {
  894. margin-right: 0;
  895. }
  896. }
  897. .not {
  898. .number {
  899. color: #179b3b;
  900. }
  901. &::before {
  902. content: '';
  903. position: absolute;
  904. top: 0;
  905. bottom: 0;
  906. left: -20px;
  907. width: 15px;
  908. height: 15px;
  909. background: #179b3b;
  910. border-radius: 50%;
  911. margin: auto;
  912. }
  913. }
  914. .mild {
  915. .number {
  916. color: #2ea7e0;
  917. }
  918. &::before {
  919. content: '';
  920. position: absolute;
  921. top: 0;
  922. bottom: 0;
  923. left: -20px;
  924. width: 15px;
  925. height: 15px;
  926. background: #2ea7e0;
  927. border-radius: 50%;
  928. margin: auto;
  929. }
  930. }
  931. .moderate {
  932. .number {
  933. color: #8dc21f;
  934. }
  935. &::before {
  936. content: '';
  937. position: absolute;
  938. top: 0;
  939. bottom: 0;
  940. left: -20px;
  941. width: 15px;
  942. height: 15px;
  943. background: #8dc21f;
  944. border-radius: 50%;
  945. margin: auto;
  946. }
  947. }
  948. .severe {
  949. .number {
  950. color: #ff5f8b;
  951. }
  952. &::before {
  953. content: '';
  954. position: absolute;
  955. top: 0;
  956. bottom: 0;
  957. left: -20px;
  958. width: 15px;
  959. height: 15px;
  960. background: #ff5f8b;
  961. border-radius: 50%;
  962. margin: auto;
  963. }
  964. }
  965. }
  966. }
  967. .minLegendBox {
  968. .legend {
  969. .legendItem {
  970. width: auto;
  971. margin-right: 50px;
  972. &:nth-child(2n) {
  973. margin-right: 50px;
  974. }
  975. &:last-child {
  976. margin-right: 0;
  977. }
  978. }
  979. }
  980. }
  981. .Chat {
  982. width: calc(100vw - 60px);
  983. height: 500px;
  984. }
  985. .result {
  986. height: 140px;
  987. padding: 0 30px;
  988. border-radius: 70px;
  989. display: flex;
  990. justify-content: center;
  991. align-items: flex-start;
  992. flex-direction: column;
  993. .wrapBox {
  994. padding: 10px 180px 10px 60px;
  995. width: 100%;
  996. background-color: #e6e6e6;
  997. border-radius: 70px;
  998. }
  999. .text {
  1000. display: flex;
  1001. justify-content: space-between;
  1002. align-items: center;
  1003. .right {
  1004. @include center();
  1005. img {
  1006. height: 30px;
  1007. width: 30px;
  1008. object-fit: contain;
  1009. margin: 0 5px;
  1010. }
  1011. }
  1012. }
  1013. }
  1014. }
  1015. .minChartBox {
  1016. height: 760px;
  1017. }
  1018. .hiddenChart {
  1019. width: 0;
  1020. height: 0;
  1021. }
  1022. .grid {
  1023. display: flex;
  1024. flex-wrap: wrap;
  1025. justify-content: space-between;
  1026. color: white;
  1027. font-size: 30px;
  1028. .gridItem {
  1029. width: calc((100vw - 60px) * 0.48);
  1030. height: calc((100vw - 60px) * 0.48);
  1031. border-radius: 60px;
  1032. display: flex;
  1033. flex-direction: column;
  1034. justify-content: center;
  1035. align-items: center;
  1036. margin-top: 30px;
  1037. .time {
  1038. .number {
  1039. font-size: 90px;
  1040. font-weight: bold;
  1041. }
  1042. }
  1043. }
  1044. .minItem {
  1045. width: calc((100vw - 60px) * 0.32);
  1046. height: calc((100vw - 60px) * 0.32);
  1047. font-size: 28px;
  1048. .time {
  1049. .number {
  1050. font-size: 70px;
  1051. font-weight: bold;
  1052. }
  1053. }
  1054. }
  1055. }
  1056. }
  1057. </style>