detail.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. <template>
  2. <div class="detail-content">
  3. <div class="title">环境参数</div>
  4. <van-tabs class="my-tab" @change="changeTab" v-model:active="active">
  5. <van-tab
  6. :title="item.name"
  7. :name="item.funcid"
  8. :key="item.id + '' + index"
  9. v-for="(item, index) in titleList"
  10. >
  11. <div class="container-text" v-if="item.options">
  12. <span>{{
  13. item.funcid == "Tdb,RH" ? "温湿度逐时分布" : "浓度逐时分布"
  14. }}</span>
  15. </div>
  16. <div class="chart-box">
  17. <com-chart
  18. :options="item.options"
  19. v-if="item.options"
  20. :id="item.funcid"
  21. height="100%"
  22. width="100%"
  23. />
  24. <div v-else class="no-data" height="100%" width="100%">
  25. <template v-if="item.showNowData === 1">
  26. <img :src="parseImgUrl('page-officehome', 'empty.png')" alt="" />
  27. <span>暂无数据</span>
  28. </template>
  29. <template v-if="item.showNowData === 2">
  30. <img :src="parseImgUrl('page-officehome', 'empty.png')" alt="" />
  31. <span>该空间数据未配置</span>
  32. </template>
  33. </div>
  34. </div>
  35. <div class="detail-desc clearfix">
  36. <!-- <div class="detail-title">
  37. {{ item.name }}
  38. </div> -->
  39. <div class="detail-text">
  40. <p v-for="(textItem, idx) in item.text" :key="idx">
  41. <!-- <van-icon class="icon" name="success" v-if="idx % 2 == 0" /> -->
  42. <span class="circle"></span>
  43. <span class="tem-span">
  44. {{ textItem }}
  45. </span>
  46. </p>
  47. </div>
  48. </div>
  49. <div class="detail-bottom">
  50. <p>{{ item.level }}</p>
  51. <div class="text-img">
  52. <img :src="item.img" alt="" />
  53. </div>
  54. </div>
  55. </van-tab>
  56. </van-tabs>
  57. </div>
  58. </template>
  59. <script lang="ts">
  60. import { defineComponent, onMounted, reactive, toRefs, watch } from "vue";
  61. import ComChart from "@/components/charts/ComChart.vue";
  62. import { useRoute } from "vue-router";
  63. import * as echarts from "echarts";
  64. import { EChartsOption } from "echarts";
  65. import { getChartListHTTP } from "@/apis/envmonitor";
  66. import { setQueryConfig } from "@/utils";
  67. import { parseImgUrl } from "@/utils";
  68. import { Toast } from "vant";
  69. export default defineComponent({
  70. props: {
  71. query: {
  72. // 空调基本信息
  73. type: Object,
  74. default: () => {},
  75. },
  76. },
  77. components: {
  78. ComChart,
  79. },
  80. setup(props) {
  81. const titleList: any = [
  82. {
  83. id: 0,
  84. name: "CO₂",
  85. funcid: "CO2",
  86. text: [
  87. "CO₂,一种无色无味气体",
  88. "CO₂的标准为1000ppm",
  89. "CO₂过高,影响人体呼吸系统",
  90. "大脑易疲劳,工作效率降低",
  91. "室内人员增多,新风量不足时",
  92. "室内CO₂的浓度就会上升",
  93. "宜开窗通风或增加送风量",
  94. "来降低CO₂浓度",
  95. ],
  96. level: "不同浓度下的人体感觉",
  97. img: parseImgUrl("page-officehome", "CO2.png"),
  98. showNowData: 0, // 0:loading 1:暂无数据 2:暂无服务定制时间
  99. options: null,
  100. },
  101. {
  102. id: 1,
  103. name: "PM2.5",
  104. funcid: "PM2d5",
  105. options: null,
  106. text: [
  107. "PM2.5,直径≤2.5微米的颗粒",
  108. "PM2.5的平均值在0-35μg/m3",
  109. "PM2.5浓度过高,影响人体",
  110. "呼吸系统和心血管系统健康",
  111. "应开启除尘净化设备",
  112. ],
  113. level: "不同PM2.5浓度对应等级",
  114. img: parseImgUrl("page-officehome", "pm25.png"),
  115. showNowData: 0, // 0:loading 1:暂无数据 2:暂无服务定制时间
  116. },
  117. {
  118. id: 2,
  119. name: "甲醛",
  120. options: null,
  121. funcid: "HCHO",
  122. text: [
  123. "甲醛(HCHO)是无色有刺激性有机气体。甲醛的主要危害表现为对皮肤和黏膜的刺激作用,室内甲醛浓度长期偏高会引发呼吸系统,消化系统或免疫系统疾病。",
  124. "甲醛多来自于室内装饰材料,如家具,墙纸,油漆以及胶水、芳香剂等物质。",
  125. "由于家具,胶水中的甲醛挥发是一个长期缓慢的过程,因此甲醛超标常表现为室内甲醛浓度长期处于较高的数值。",
  126. "最为有效避免甲醛超标的方法是持续高效的通风,通过引入室外新鲜空气将室内甲醛浓度长期控制在低于有害标准的范围内。",
  127. "由于甲醛传感器为电化学传感器,存在交叉干扰的特性,当室内出现无害的挥发性气体时也会导致测得的甲醛浓度短暂升高,如吸烟,使用香水,空气清新剂,喷洒酒精,甚至剥橘子皮溅出的汁液均可能在短时间内影响甲醛传感器的读数,在去除干扰源后,此种影响会在短时间内消除,可不必因此产生担忧。",
  128. ],
  129. level: "不同阈值浓度对应标准",
  130. img: parseImgUrl("page-officehome", "methanal.png"),
  131. showNowData: 0, // 0:loading 1:暂无数据 2:暂无服务定制时间
  132. },
  133. {
  134. id: 3,
  135. name: "温湿度",
  136. funcid: "Tdb,RH",
  137. options: null,
  138. text: [
  139. "温度表示空气的冷热程度",
  140. "夏季高温高湿会使人烦躁、疲倦",
  141. "冬季湿度过高时,人体感觉越冷",
  142. "冬季湿度低易引起呼吸道不适",
  143. "室外温度较高时,宜遮阳关窗",
  144. ],
  145. level: "",
  146. img: "",
  147. showNowData: 0, // 0:loading 1:暂无数据 2:暂无服务定制时间
  148. },
  149. ];
  150. const query: {
  151. funcid: string;
  152. spaceId: string;
  153. } = {
  154. funcid: "",
  155. spaceId: "",
  156. };
  157. const activeItem: any = [];
  158. const proxyData = reactive({
  159. active: "",
  160. activeItem: activeItem,
  161. titleList: titleList,
  162. query: props.query ? props.query : query,
  163. parseImgUrl: parseImgUrl,
  164. /**
  165. * 加载loading
  166. */
  167. loadingStart() {
  168. Toast.loading({
  169. duration: 0, // 持续展示 toast
  170. forbidClick: true,
  171. message: "加载中...",
  172. });
  173. },
  174. /**
  175. * 结束
  176. */
  177. loadinngEnd() {
  178. Toast.clear();
  179. },
  180. /**
  181. * 设置当前选中的tab
  182. */
  183. setActiveItem() {
  184. for (let i = 0; i < proxyData.titleList.length; i++) {
  185. if (proxyData.titleList[i].funcid == proxyData.query.funcid) {
  186. proxyData.active = proxyData.titleList[i].funcid;
  187. proxyData.activeItem = proxyData.titleList[i];
  188. break;
  189. }
  190. }
  191. },
  192. /**
  193. * 详情页面tab切换
  194. */
  195. changeTab() {
  196. if (proxyData.query.spaceId) {
  197. proxyData.query.funcid = proxyData.active;
  198. proxyData.setActiveItem();
  199. proxyData.queryAllData();
  200. }
  201. },
  202. // 查询echarts图表
  203. queryAllData() {
  204. if (proxyData.activeItem.funcid) {
  205. let funcid = proxyData.activeItem.funcid;
  206. proxyData.loadingStart();
  207. if (funcid === "Tdb,RH") {
  208. // 两条线的 时候
  209. proxyData.formatTowOptions(funcid);
  210. } else {
  211. proxyData.formatOptios(funcid);
  212. }
  213. }
  214. },
  215. /**
  216. *获取图表统计数据
  217. * @param funcid
  218. */
  219. getData(funcid: string = "") {
  220. // debugger
  221. let paramObj = {
  222. spaceId: proxyData.query.spaceId,
  223. funcid: funcid,
  224. };
  225. const paramStr: string = setQueryConfig(paramObj);
  226. return getChartListHTTP(paramStr)
  227. .then((res) => {
  228. const resData: any = res;
  229. let { propertyData, dayTarget } = resData;
  230. let chartData = proxyData.formatChartData(
  231. propertyData,
  232. dayTarget,
  233. funcid
  234. );
  235. // 设置警线的值
  236. let chartMax = proxyData.setMax(funcid, dayTarget);
  237. if (funcid === "Tdb" || funcid === "RH") {
  238. return chartData;
  239. } else {
  240. return {
  241. chartData,
  242. chartMax,
  243. };
  244. }
  245. })
  246. .catch((error: any) => {
  247. proxyData.loadinngEnd();
  248. });
  249. },
  250. /**
  251. * co pm 甲醛统计数据格式化成图表可使用的数据
  252. * @param propertyData
  253. * @param dayTarget
  254. * @param funcid
  255. */
  256. formatChartData(propertyData: any, dayTarget: any, funcid: any) {
  257. // 只是一个处理数据的函数
  258. if (!Array.isArray(propertyData) || !Array.isArray(dayTarget)) {
  259. return [];
  260. }
  261. let baseArr: any = (propertyData && propertyData.slice(1)) || [];
  262. let tragetChart: any = [];
  263. let handleNumber = (val: any) => {
  264. return Number(val);
  265. };
  266. let initNum = {
  267. PM2d5: handleNumber,
  268. CO2: handleNumber,
  269. HCHO: function (value: any) {
  270. return Number(Number(value).toFixed(2));
  271. },
  272. RH: handleNumber,
  273. Tdb: handleNumber,
  274. };
  275. // 类型
  276. if (baseArr && baseArr.length > 0) {
  277. for (let i = 0; i < baseArr.length; i++) {
  278. let item = baseArr[i];
  279. item[1] = item[1] == "-9999" ? null : initNum[funcid](item[1]);
  280. }
  281. }
  282. if (
  283. baseArr.length &&
  284. dayTarget.length &&
  285. baseArr.length === dayTarget.length
  286. ) {
  287. for (let i = 0; i < dayTarget.length; i++) {
  288. let item = dayTarget[i];
  289. let time = "";
  290. item.time &&
  291. (time = item.time.slice(0, 2) + ":" + item.time.slice(2, 4));
  292. let initObj = {
  293. time: time,
  294. sales: baseArr[i][1],
  295. };
  296. tragetChart.push(initObj);
  297. }
  298. }
  299. return tragetChart;
  300. },
  301. checkIsData(data: any) {
  302. let tempArr: any = data.filter((item: any) => {
  303. return item === null;
  304. });
  305. if (data.length === tempArr.length) {
  306. return false;
  307. } else {
  308. return true;
  309. }
  310. },
  311. async formatOptios(funcid: any) {
  312. proxyData.activeItem.options = null;
  313. let { chartData, chartMax } = await proxyData.getData(funcid);
  314. proxyData.loadinngEnd();
  315. let seriesData: any = chartData.map((item: any) => {
  316. return item.sales;
  317. });
  318. let xData: any = chartData.map((item: any) => {
  319. return item.time;
  320. });
  321. let max: any = Math.max(...seriesData);
  322. if (xData && xData.length) {
  323. if (proxyData.checkIsData(seriesData)) {
  324. let options = {
  325. tooltip: {
  326. trigger: "axis",
  327. },
  328. grid: {
  329. top: 20,
  330. left: 5,
  331. right: 20,
  332. bottom: 20,
  333. containLabel: true,
  334. },
  335. xAxis: [
  336. {
  337. type: "category",
  338. boundaryGap: false,
  339. axisLine: {
  340. lineStyle: {
  341. color: "#ECEFF4",
  342. },
  343. },
  344. axisLabel: {
  345. fontSize: 12,
  346. interval: 8,
  347. showMaxLabel: true,
  348. color: "#C4C4C4",
  349. },
  350. data: xData,
  351. },
  352. ],
  353. yAxis: [
  354. {
  355. type: "value",
  356. // max: chartMax,
  357. axisTick: {
  358. show: false,
  359. },
  360. axisLine: {
  361. lineStyle: {
  362. color: "#ECEFF4",
  363. },
  364. },
  365. axisLabel: {
  366. fontSize: 12,
  367. color: "#C4C4C4",
  368. },
  369. splitLine: {
  370. lineStyle: {
  371. type: "dashed",
  372. color: "#ECEFF4",
  373. },
  374. },
  375. },
  376. ],
  377. series: [
  378. {
  379. markLine:
  380. max && chartMax && max >= chartMax
  381. ? {
  382. symbol: "none",
  383. data: [
  384. {
  385. name: "均线",
  386. type: "max",
  387. yAxis: chartMax,
  388. lineStyle: {
  389. normal: {
  390. color: "red",
  391. width: 2,
  392. type: "solid",
  393. },
  394. },
  395. },
  396. ],
  397. label: {
  398. normal: {
  399. show: true,
  400. position: "middle",
  401. textStyle: {
  402. fontSize: 12,
  403. fontWeight: 600,
  404. },
  405. },
  406. },
  407. }
  408. : {},
  409. name: "CO₂",
  410. type: "line",
  411. smooth: true,
  412. symbol: "circle",
  413. symbolSize: 5,
  414. showSymbol: false,
  415. areaStyle: {
  416. color: new (echarts as any).graphic.LinearGradient(
  417. 0,
  418. 1,
  419. 0,
  420. 0,
  421. [
  422. {
  423. offset: 0,
  424. color: "rgba(79, 128, 255, 0.1)",
  425. },
  426. {
  427. offset: 1,
  428. color: "rgba(79, 128, 255, 0.6)",
  429. },
  430. ],
  431. false
  432. ),
  433. shadowColor: "rgba(79, 128, 255, 0.1)",
  434. shadowBlur: 10,
  435. },
  436. itemStyle: {
  437. color: "rgba(79, 128, 255, 1)",
  438. borderColor: "rgba(79, 128, 255, 1)",
  439. borderWidth: 12,
  440. },
  441. data: seriesData,
  442. },
  443. ],
  444. } as EChartsOption;
  445. proxyData.activeItem.options = options;
  446. proxyData.activeItem.showNowData = 0;
  447. } else {
  448. proxyData.activeItem.options = null;
  449. proxyData.activeItem.showNowData = 1;
  450. }
  451. } else {
  452. proxyData.activeItem.options = null;
  453. proxyData.activeItem.showNowData = 2;
  454. }
  455. },
  456. async formatTowOptions(funcid: any) {
  457. // debugger
  458. proxyData.activeItem.options = null;
  459. let funcidArr = funcid.split(",");
  460. // debugger
  461. let chartData1: any = await proxyData.getData(funcidArr[0]);
  462. let chartData2: any = await proxyData.getData(funcidArr[1]);
  463. proxyData.loadinngEnd();
  464. let xData: any = chartData1.map((item: any) => {
  465. return item.time;
  466. });
  467. let seriesData1: any = chartData1.map((item: any) => {
  468. return item.sales;
  469. });
  470. let seriesData2: any = chartData2.map((item: any) => {
  471. return item.sales;
  472. });
  473. let options = {
  474. tooltip: {
  475. trigger: "axis",
  476. },
  477. legend: {
  478. icon: "circle",
  479. itemWidth: 14,
  480. itemHeight: 5,
  481. itemGap: 20,
  482. data: ["温度", "湿度"],
  483. textStyle: {
  484. fontSize: 12,
  485. color: "#C4C4C4",
  486. },
  487. },
  488. grid: {
  489. top: 30,
  490. left: 5,
  491. right: 15,
  492. bottom: 20,
  493. containLabel: true,
  494. },
  495. xAxis: [
  496. {
  497. type: "category",
  498. boundaryGap: false,
  499. axisLine: {
  500. lineStyle: {
  501. color: "#ECEFF4",
  502. },
  503. },
  504. axisLabel: {
  505. fontSize: 12,
  506. interval: 8,
  507. showMaxLabel: true,
  508. color: "#C4C4C4",
  509. },
  510. data: xData,
  511. },
  512. ],
  513. yAxis: [
  514. {
  515. name: "℃",
  516. type: "value",
  517. nameGap: 12, // y轴name与横纵坐标轴线的间距
  518. // nameLocation: "left", // y轴name处于y轴的什么位置
  519. nameTextStyle: {
  520. color: "#9FA9BC",
  521. padding : [0, 25, 0, 0],
  522. // margin : [5, 0, 0, -20],
  523. },
  524. axisTick: {
  525. show: false,
  526. },
  527. axisLine: {
  528. lineStyle: {
  529. color: "#ECEFF4",
  530. },
  531. },
  532. axisLabel: {
  533. fontSize: 12,
  534. color: "#C4C4C4",
  535. },
  536. splitLine: {
  537. lineStyle: {
  538. type: "dashed",
  539. color: "#ECEFF4",
  540. },
  541. },
  542. },
  543. {
  544. name: "% ",
  545. nameGap: 12, // y轴name与横纵坐标轴线的间距
  546. nameTextStyle: {
  547. color: "#9FA9BC",
  548. padding : [0, 0, 0, 40],
  549. },
  550. type: "value",
  551. axisTick: {
  552. show: false,
  553. },
  554. axisLine: {
  555. show: false,
  556. lineStyle: {
  557. color: "#ECEFF4",
  558. },
  559. },
  560. axisLabel: {
  561. fontSize: 12,
  562. color: "#C4C4C4",
  563. },
  564. splitLine: {
  565. show: false,
  566. },
  567. },
  568. ],
  569. series: [
  570. {
  571. name: "温度",
  572. type: "line",
  573. smooth: true,
  574. symbol: "circle",
  575. symbolSize: 5,
  576. yAxisIndex: 0,
  577. showSymbol: false,
  578. lineStyle: {
  579. width: 1,
  580. },
  581. areaStyle: {
  582. color: new (echarts as any).graphic.LinearGradient(
  583. 0,
  584. 0,
  585. 0,
  586. 1,
  587. [
  588. {
  589. offset: 0,
  590. color: "rgba(79, 128, 255, 0.165)",
  591. },
  592. {
  593. offset: 0.8,
  594. color: "rgba(79, 128, 255, 0)",
  595. },
  596. ],
  597. false
  598. ),
  599. shadowColor: "rgba(79, 128, 255,0.1)",
  600. shadowBlur: 10,
  601. },
  602. itemStyle: {
  603. color: "rgba(79, 128, 255, 1)",
  604. borderColor: "rgba(79, 128, 255, 1)",
  605. borderWidth: 12,
  606. },
  607. data: seriesData1,
  608. },
  609. {
  610. name: "湿度",
  611. type: "line",
  612. smooth: true,
  613. symbol: "circle",
  614. symbolSize: 5,
  615. showSymbol: false,
  616. yAxisIndex: 1,
  617. lineStyle: {
  618. width: 1,
  619. },
  620. areaStyle: {
  621. color: new (echarts as any).graphic.LinearGradient(
  622. 0,
  623. 0,
  624. 0,
  625. 1,
  626. [
  627. {
  628. offset: 0,
  629. color: "rgba(137,189,27, 0.3)",
  630. },
  631. {
  632. offset: 0.8,
  633. color: "rgba(137,189,27, 0.165)",
  634. },
  635. ],
  636. false
  637. ),
  638. shadowColor: "rgba(79, 128, 255,0.1)",
  639. shadowBlur: 10,
  640. },
  641. itemStyle: {
  642. color: "rgb(137,189,27)",
  643. borderColor: "rgba(137,189,2,1)",
  644. borderWidth: 12,
  645. },
  646. data: seriesData2,
  647. },
  648. ],
  649. } as EChartsOption;
  650. if (xData && xData.length) {
  651. if (
  652. proxyData.checkIsData(seriesData1) ||
  653. proxyData.checkIsData(seriesData2)
  654. ) {
  655. proxyData.activeItem.options = options;
  656. proxyData.activeItem.showNowData = 0;
  657. } else {
  658. proxyData.activeItem.options = null;
  659. // 暂位配置服务时间
  660. proxyData.activeItem.showNowData = 1;
  661. }
  662. } else {
  663. proxyData.activeItem.options = null;
  664. // 暂位配置服务时间
  665. proxyData.activeItem.showNowData = 2;
  666. }
  667. },
  668. setMax(funcid: any = "", dayTarget: any) {
  669. let max = 0;
  670. switch (funcid) {
  671. case "CO2":
  672. for (let i = 0; i < dayTarget.length; i++) {
  673. if (dayTarget[i].co2Max) {
  674. max = dayTarget[i].co2Max;
  675. }
  676. }
  677. break;
  678. case "PM2d5":
  679. for (let i = 0; i < dayTarget.length; i++) {
  680. if (dayTarget[i].pm25Max) {
  681. max = dayTarget[i].pm25Max;
  682. }
  683. }
  684. break;
  685. case "HCHO":
  686. // max = dayTarget && dayTarget[0] && dayTarget[0].hchoMax;
  687. for (let i = 0; i < dayTarget.length; i++) {
  688. if (dayTarget[i].hchoMax) {
  689. max = dayTarget[i].hchoMax;
  690. }
  691. }
  692. break;
  693. case "RH":
  694. max = 0;
  695. break;
  696. case "Tdb":
  697. // max = dayTarget[0].temperatureMax;
  698. max = 0;
  699. break;
  700. default:
  701. break;
  702. }
  703. return max;
  704. },
  705. });
  706. watch(
  707. props,
  708. (newProps: any) => {
  709. proxyData.query = JSON.parse(JSON.stringify(newProps.query));
  710. proxyData.setActiveItem();
  711. proxyData.queryAllData();
  712. // 设置当前选中的tab
  713. },
  714. {
  715. deep: true,
  716. immediate: true,
  717. }
  718. );
  719. onMounted(() => {
  720. // proxyData.setActiveItem();
  721. // proxyData.queryAllData();
  722. // const route: any = useRoute();
  723. // if (route.query) {
  724. // proxyData.query = route.query;
  725. // // 设置当前选中的tab
  726. // proxyData.setActiveItem();
  727. // proxyData.queryAllData();
  728. // }
  729. });
  730. return {
  731. ...toRefs(proxyData),
  732. };
  733. },
  734. });
  735. </script>
  736. <style lang="scss" scoped>
  737. .detail-content {
  738. width: 100%;
  739. height: 100%;
  740. .title {
  741. padding-bottom: 14px;
  742. font-family: "PingFang SC";
  743. font-style: normal;
  744. font-weight: 500;
  745. font-size: 22px;
  746. line-height: 31px;
  747. color: #000000;
  748. }
  749. }
  750. .container-text {
  751. font-family: PingFang SC;
  752. padding-top: 17px;
  753. background: #fff;
  754. font-weight: 500;
  755. font-size: 16px;
  756. line-height: 22px;
  757. text-align: center;
  758. color: #000000;
  759. text-align: center;
  760. }
  761. .chart-box {
  762. width: 100%;
  763. height: 280px;
  764. padding-top: 10px;
  765. background: #fff;
  766. }
  767. .detail-desc {
  768. // padding: 0 15px;
  769. margin-top: 20px;
  770. padding-left: 15px;
  771. display: flex;
  772. .detail-title {
  773. display: inline-block;
  774. margin-right: 22px;
  775. vertical-align: middle;
  776. width: 64px;
  777. height: 85px;
  778. line-height: 85px;
  779. text-align: center;
  780. background: #fff;
  781. border-radius: 5px;
  782. font-size: 18px;
  783. align-items: center;
  784. text-align: center;
  785. color: #140050;
  786. }
  787. .detail-text {
  788. flex: 86px 1;
  789. display: inline-block;
  790. font-family: PingFang SC;
  791. color: #4d5262;
  792. vertical-align: middle;
  793. p {
  794. position: relative;
  795. margin-bottom: 10px;
  796. // padding-bottom: 10px;
  797. }
  798. .icon {
  799. position: absolute;
  800. top: 7px;
  801. left: 0;
  802. display: inline-block;
  803. vertical-align: middle;
  804. font-size: 12px;
  805. }
  806. .circle {
  807. display: inline-block;
  808. vertical-align: middle;
  809. position: absolute;
  810. left: 0;
  811. top: 50%;
  812. transform: translateY(-50%);
  813. width: 6px;
  814. height: 6px;
  815. border-radius: 50%;
  816. background: $elCircle;
  817. }
  818. .tem-span {
  819. display: inline-block;
  820. vertical-align: middle;
  821. padding-bottom: 5px;
  822. font-style: normal;
  823. font-weight: 400;
  824. font-size: 13px;
  825. line-height: 20px;
  826. color: #646c73;
  827. padding-left: 15px;
  828. }
  829. }
  830. }
  831. .detail-bottom {
  832. padding: 0 15px;
  833. padding-bottom: 30px;
  834. padding-top: 40px;
  835. width: 100%;
  836. font-weight: 500;
  837. font-size: 14px;
  838. line-height: 12px;
  839. color: #140050;
  840. .text-img {
  841. width: 100%;
  842. padding-top: 20px;
  843. img {
  844. width: 100%;
  845. margin: 0 auto;
  846. }
  847. }
  848. }
  849. </style>
  850. <style lang="scss">
  851. .detail-content {
  852. .van-tabs__content {
  853. width: 100%;
  854. //height: 280px;
  855. //padding-left: 22px;
  856. //padding-right: 22px;
  857. //padding-top: 10px;
  858. }
  859. .van-tab__panel {
  860. width: 100%;
  861. height: 100%;
  862. }
  863. .van-tabs__line {
  864. display: none;
  865. }
  866. .van-tab__text {
  867. display: inline-block;
  868. padding: 3px;
  869. // font-size: 16px;
  870. color: #c4c4c4;
  871. width: 100%;
  872. height: 100%;
  873. line-height: 44px;
  874. text-align: center;
  875. font-style: normal;
  876. font-weight: 700;
  877. font-size: 14px;
  878. }
  879. .van-tab--active {
  880. .van-tab__text {
  881. color: #fff;
  882. background: #ffffff;
  883. border-radius: 4px;
  884. color: $elActiveColor;
  885. // background: $elActiveColor;
  886. }
  887. }
  888. .van-tabs__wrap {
  889. // position: fixed;
  890. padding: 2px;
  891. width: 100%;
  892. height: 50px;
  893. border-radius: 4px;
  894. //top: 48px;
  895. top: 0;
  896. background: #f2f3f5;
  897. left: 0;
  898. z-index: 333;
  899. }
  900. .van-tabs__nav--line {
  901. background: #f2f3f5;
  902. border-radius: 4px;
  903. }
  904. .van-tabs__content {
  905. //padding-top: 42px;
  906. //padding-top: 10px;
  907. }
  908. }
  909. </style>