index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. <template>
  2. <div class="data-overview">
  3. <el-row :gutter="15" class="home-card-one mb15">
  4. <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-for="(v, k) in dataOne" :key="k" :class="{ 'home-media home-media-lg': k > 1, 'home-media-sm': k === 1 }">
  5. <div class="home-card-item">
  6. <div class="item-header">
  7. <img :src="isIsDark ? v.iconDark : v.icon" alt="" />
  8. <span>{{ v.title }}</span>
  9. </div>
  10. <div class="item-content w100" :class="` home-one-animation${k}`">
  11. <p>
  12. <span>{{ v.contentTitle1 }}</span>
  13. <span>{{ v.val1 }} {{ unitMap[v.contentTitle1] }}</span>
  14. </p>
  15. <p>
  16. <span>{{ v.contentTitle2 }}</span>
  17. <span>{{ v.val2 }}
  18. {{ unitMap[v.title + ':' + v.contentTitle2] ? unitMap[v.title + ':' + v.contentTitle2] : unitMap[v.contentTitle2] }}</span>
  19. </p>
  20. <p style="height:30px">
  21. <template v-if="v.contentTitle3">
  22. <span>{{ v.contentTitle3 || ' '}}</span>
  23. <span>{{ v.val3 || ' ' }}
  24. {{ unitMap[v.title + ':' + v.contentTitle3] ? unitMap[v.title + ':' + v.contentTitle3] : unitMap[v.contentTitle3] }}</span>
  25. </template>
  26. </p>
  27. </div>
  28. </div>
  29. </el-col>
  30. </el-row>
  31. <el-row :gutter="15" class="home-card-two mb15">
  32. <el-col :xs="24" :sm="10" :md="12" :lg="16" :xl="16">
  33. <div class="home-card-item">
  34. <div class="home-card-item-title" style="display: flex; justify-content: space-between">
  35. <span>热网总能耗</span>
  36. </div>
  37. <el-tabs v-model="tabName" @tab-click="tabChange">
  38. <el-tab-pane label="日热耗" name="homeLineRef1">
  39. <div style="height: 200px" ref="homeLineRef1"></div>
  40. </el-tab-pane>
  41. <el-tab-pane label="日电耗" name="homeLineRef2">
  42. <div style="height: 200px" ref="homeLineRef2"></div>
  43. </el-tab-pane>
  44. <el-tab-pane label="日失水量" name="homeLineRef3">
  45. <div style="height: 200px" ref="homeLineRef3"></div>
  46. </el-tab-pane>
  47. <el-tab-pane label="供热负荷" name="homeLineRef4">
  48. <div style="height: 200px" ref="homeLineRef4"></div>
  49. </el-tab-pane>
  50. </el-tabs>
  51. </div>
  52. </el-col>
  53. <el-col :xs="24" :sm="10" :md="12" :lg="8" :xl="8" class="home-media">
  54. <div class="home-card-item">
  55. <div class="bar-header">
  56. <p class="home-card-item-title">环路回温/热用户室温占比</p>
  57. <!-- <div class="lable-group1">
  58. <div @click="changePieType('1')" :class="pieType == '1' ? 'active' : ''">环路</div>
  59. <div @click="changePieType('2')" :class="pieType == '2' ? 'active' : ''">热用户</div>
  60. </div> -->
  61. </div>
  62. <div style="height: 256px" ref="homePieRef"></div>
  63. </div>
  64. </el-col>
  65. </el-row>
  66. <el-row :gutter="15" class="home-card-three mb15">
  67. <el-col>
  68. <div class="home-card-item">
  69. <div style="height: 100%" ref="homeBarRef"></div>
  70. </div>
  71. </el-col>
  72. </el-row>
  73. <el-row :gutter="15" class="home-card-four">
  74. <el-col>
  75. <div class="home-card-item">
  76. <div style="height: 100%" ref="homeFourBarRef"></div>
  77. </div>
  78. </el-col>
  79. </el-row>
  80. </div>
  81. </template>
  82. <script lang="ts">
  83. import { toRefs, reactive, defineComponent, onMounted, ref, watch, nextTick, onActivated } from 'vue';
  84. import * as echarts from 'echarts';
  85. import { useStore } from '/@/store/index';
  86. import apiDatahub from '/@/api/datahub';
  87. import ele from '/@/assets/img/ele.svg';
  88. import ele1 from '/@/assets/img/ele1.svg';
  89. import fire from '/@/assets/img/fire.svg';
  90. import fire1 from '/@/assets/img/fire1.svg';
  91. import map from '/@/assets/img/map.svg';
  92. import map1 from '/@/assets/img/map1.svg';
  93. import water from '/@/assets/img/water.svg';
  94. import water1 from '/@/assets/img/water1.svg';
  95. import api from '/@/api/datahub';
  96. let global: any = {
  97. homeChartOne: null,
  98. homeChartTwo: null,
  99. homeCharThree: null,
  100. homeCharFour: null,
  101. dispose: [null, '', undefined],
  102. };
  103. export default defineComponent({
  104. name: 'heating-home',
  105. setup() {
  106. const tabName = ref('homeLineRef1');
  107. const homeLineRef1 = ref();
  108. const homeLineRef2 = ref();
  109. const homeLineRef3 = ref();
  110. const homeLineRef4 = ref();
  111. const homePieRef = ref();
  112. const homeBarRef = ref();
  113. const homeFourBarRef = ref();
  114. const unitMap = ref<any>({});
  115. const store = useStore();
  116. // 统计信息的单位的字典
  117. apiDatahub.template.getDictData({ DictType: 'overview_unit' }).then((res: any) => {
  118. res.values.forEach((v: any) => {
  119. unitMap.value[v.value] = v.key;
  120. });
  121. });
  122. const state = reactive({
  123. checkList: ['一网供水温度'],
  124. rangeValue: 10,
  125. isIsDark: false,
  126. dataOne: [
  127. {
  128. icon: map,
  129. iconDark: map1,
  130. title: '供热面积',
  131. contentTitle1: '联网面积',
  132. val1: '',
  133. unit1: '万㎡',
  134. contentTitle2: '实供面积',
  135. val2: '',
  136. unit2: '万㎡',
  137. contentTitle3: '供热率',
  138. val3: '',
  139. unit3: '',
  140. },
  141. {
  142. icon: fire,
  143. iconDark: fire1,
  144. title: '热量',
  145. contentTitle1: '总耗热',
  146. val1: '',
  147. unit1: '万GJ',
  148. contentTitle2: '总单耗',
  149. val2: '',
  150. unit2: 'GJ/㎡',
  151. contentTitle3: '供热负荷',
  152. val3: '',
  153. unit3: 'W',
  154. },
  155. {
  156. icon: ele,
  157. iconDark: ele1,
  158. title: '电量',
  159. contentTitle1: '总耗电',
  160. val1: '',
  161. unit1: '万KW.h',
  162. contentTitle2: '总单耗',
  163. val2: '',
  164. unit2: 'KW.h/㎡',
  165. },
  166. {
  167. icon: water,
  168. iconDark: water1,
  169. title: '水量',
  170. contentTitle1: '总耗水',
  171. val1: '',
  172. unit1: 'T',
  173. contentTitle2: '总单耗',
  174. val2: '',
  175. unit2: 'kg/㎡',
  176. },
  177. ],
  178. myCharts: [],
  179. charts: {
  180. theme: '',
  181. bgColor: '',
  182. color: '#303133',
  183. },
  184. statisticsChartXAxisData: [],
  185. inTemperature: [],
  186. outTemperature: [],
  187. diffTemperature: [],
  188. chartXAxisData: [],
  189. flowLossData: [],
  190. elctricConsumptionData: [],
  191. unitConsumptionData: [],
  192. heatDemandData: [],
  193. pieData: [],
  194. pieType: '1',
  195. pressureXAxisData: [],
  196. inPressureData: [],
  197. outPressureData: [],
  198. diffPressureData: [],
  199. });
  200. // 获取顶部总数据
  201. const getStatisticsTotalData = () => {
  202. api.statistics.getStatisticsOverview({ queryType: 'num' }).then((res: any) => {
  203. const {
  204. elctricConsumption,
  205. elctricConsumptionTotal,
  206. flowLoss,
  207. flowLossTotal,
  208. forRealArea,
  209. heatingArea,
  210. unitConsumption,
  211. unitConsumptionTotal,
  212. heatRate,
  213. heatDemand,
  214. } = res.data;
  215. state.dataOne[0].val1 = forRealArea;
  216. state.dataOne[0].val2 = heatingArea;
  217. state.dataOne[0].val3 = heatRate;
  218. state.dataOne[1].val1 = unitConsumptionTotal;
  219. state.dataOne[1].val2 = unitConsumption;
  220. state.dataOne[1].val3 = heatDemand;
  221. state.dataOne[2].val1 = elctricConsumptionTotal;
  222. state.dataOne[2].val2 = elctricConsumption;
  223. state.dataOne[3].val1 = flowLossTotal;
  224. state.dataOne[3].val2 = flowLoss;
  225. });
  226. };
  227. // 获取温度监测数据
  228. const getStatisticsChartData = () => {
  229. api.statistics.getStatisticsOverview({ queryType: 'temperature' }).then((res: any) => {
  230. const data = res.data;
  231. state.statisticsChartXAxisData = [];
  232. state.inTemperature = [];
  233. state.outTemperature = [];
  234. state.diffTemperature = [];
  235. Object.values(data).forEach((i: object) => {
  236. state.statisticsChartXAxisData.push(i.name);
  237. state.inTemperature.push(i.inTemperature);
  238. state.outTemperature.push(i.outTemperature);
  239. state.diffTemperature.push(i.diff);
  240. });
  241. nextTick(() => {
  242. initBarChart();
  243. });
  244. });
  245. };
  246. // 获取压力监测数据
  247. const getStatisticsPressureChartData = () => {
  248. api.statistics.getStatisticsOverview({ queryType: 'pressure' }).then((res: any) => {
  249. const data = res.data;
  250. state.pressureXAxisData = [];
  251. state.inPressureData = [];
  252. state.outPressureData = [];
  253. state.diffPressureData = [];
  254. Object.values(data).forEach((i: object) => {
  255. state.pressureXAxisData.push(i.name);
  256. state.inPressureData.push(i.inPressure);
  257. state.outPressureData.push(i.outPressure);
  258. state.diffPressureData.push(i.diff);
  259. });
  260. nextTick(() => {
  261. initBarFourChart();
  262. });
  263. });
  264. };
  265. // 温度检测
  266. const initBarChart = () => {
  267. if (!global.dispose.some((b: any) => b === global.homeChartOne)) global.homeChartOne.dispose();
  268. global.homeChartOne = <any>echarts.init(homeBarRef.value, state.charts.theme);
  269. const option = {
  270. tooltip: {
  271. trigger: 'axis',
  272. },
  273. title: {
  274. text: '温度监测',
  275. x: 'left',
  276. textStyle: { fontSize: '15', color: state.charts.color },
  277. },
  278. legend: {
  279. data: ['二网供水温度', '二网回水温度', '二网供回水温差'],
  280. top: 35,
  281. textStyle: {
  282. color: state.charts.color,
  283. },
  284. },
  285. grid: { top: 60, bottom: 20, left: 30, right: 30, containLabel: true },
  286. // calculable: true,
  287. xAxis: [{ data: state.statisticsChartXAxisData }],
  288. yAxis: [
  289. {
  290. name: '℃',
  291. type: 'value',
  292. },
  293. ],
  294. series: [
  295. {
  296. name: '二网供水温度',
  297. type: 'bar',
  298. data: state.inTemperature,
  299. },
  300. {
  301. name: '二网回水温度',
  302. type: 'bar',
  303. data: state.outTemperature,
  304. },
  305. {
  306. name: '二网供回水温差',
  307. type: 'bar',
  308. data: state.diffTemperature,
  309. },
  310. ],
  311. };
  312. (<any>global.homeChartOne).setOption(option);
  313. (<any>state.myCharts).push(global.homeChartOne);
  314. };
  315. // 柱状图
  316. const initBarFourChart = () => {
  317. if (!global.dispose.some((b: any) => b === global.homeCharFour)) global.homeCharFour.dispose();
  318. global.homeCharFour = <any>echarts.init(homeFourBarRef.value, state.charts.theme);
  319. const option = {
  320. tooltip: {
  321. trigger: 'axis',
  322. },
  323. title: {
  324. text: '压力监测',
  325. x: 'left',
  326. textStyle: { fontSize: '15', color: state.charts.color },
  327. },
  328. legend: {
  329. data: ['二网供水压力', '二网回水压力', '二网供回水压差'],
  330. top: 35,
  331. textStyle: {
  332. color: state.charts.color,
  333. },
  334. },
  335. grid: { top: 60, bottom: 20, left: 30, right: 30, containLabel: true },
  336. xAxis: [{ data: state.pressureXAxisData }],
  337. yAxis: [
  338. {
  339. type: 'value',
  340. },
  341. ],
  342. series: [
  343. {
  344. name: '二网供水压力',
  345. type: 'bar',
  346. data: state.inPressureData,
  347. },
  348. {
  349. name: '二网回水压力',
  350. type: 'bar',
  351. data: state.outPressureData,
  352. },
  353. {
  354. name: '二网供回水压差',
  355. type: 'bar',
  356. data: state.diffPressureData,
  357. },
  358. ],
  359. };
  360. (<any>global.homeCharFour).setOption(option);
  361. (<any>state.myCharts).push(global.homeCharFour);
  362. };
  363. // 获取环路回温占比数据数据
  364. const getStatisticsPieData = () => {
  365. api.statistics.getStatisticsOverview({ queryType: 'ratio' }).then((res: any) => {
  366. const data = res.data;
  367. const arr = Object.values(data);
  368. let sum = 0;
  369. arr.forEach((item) => {
  370. sum += item;
  371. });
  372. Object.keys(data).forEach((key: string) => {
  373. state.pieData.push({ name: key, value: (data[key] / sum).toFixed(2) * 1, num: data[key] });
  374. });
  375. nextTick(() => {
  376. initPieChart();
  377. });
  378. });
  379. };
  380. // 饼图
  381. const initPieChart = () => {
  382. if (!global.dispose.some((b: any) => b === global.homeChartTwo)) global.homeChartTwo.dispose();
  383. global.homeChartTwo = <any>echarts.init(homePieRef.value, state.charts.theme);
  384. // var getname = ['提示', '建议', '警告', '严重警告', '故障'];
  385. // var getvalue = [34.2, 38.87, 17.88, 9.05, 2.05];
  386. // var data = [];
  387. // for (var i = 0; i < getname.length; i++) {
  388. // data.push({ name: getname[i], value: getvalue[i] });
  389. // }
  390. // const colorList = ['#51A3FC', '#36C78B', '#FEC279', '#968AF5', '#FF0000'];
  391. const option = {
  392. backgroundColor: state.charts.bgColor,
  393. grid: { top: 10, bottom: 10 },
  394. tooltip: { trigger: 'item', formatter: '{b} <br/> {d}% <br/>' },
  395. legend: {
  396. top: 0,
  397. color: state.charts.color,
  398. orient: 'horizontal',
  399. left: 'center',
  400. itemWidth: 8,
  401. itemHeight: 8,
  402. itemGap: 3,
  403. textStyle: {
  404. color: state.charts.color,
  405. fontSize: 12,
  406. },
  407. },
  408. series: [
  409. {
  410. type: 'pie',
  411. radius: [50, 90],
  412. center: ['50%', '57%'],
  413. itemStyle: {
  414. borderRadius: 8,
  415. },
  416. label: {
  417. show: true,
  418. color: state.charts.color,
  419. formatter: '{b} {d}%',
  420. },
  421. data: state.pieData,
  422. },
  423. ],
  424. };
  425. (<any>global.homeChartTwo).setOption(option);
  426. (<any>state.myCharts).push(global.homeChartTwo);
  427. };
  428. // 获取热网总能耗数据
  429. const getStatisticsLineChartData = () => {
  430. if (!state.rangeValue) return;
  431. api.statistics.getStatisticsOverview({ queryType: 'energy' }).then((res: any) => {
  432. const { flowLoss, elctricConsumption, unitConsumption, heatDemand } = res.data;
  433. // calorie:总热耗 electric:总电耗 water:总失水量 heatDemand: 供热负荷
  434. state.chartXAxisData = flowLoss.map((item: any) => item.date);
  435. state.flowLossData = flowLoss.map((item: any) => item.total);
  436. state.elctricConsumptionData = elctricConsumption.map((item: any) => item.total);
  437. state.unitConsumptionData = unitConsumption.map((item: any) => item.total);
  438. state.heatDemandData = heatDemand.map((item: any) => item.total);
  439. if (state.rangeValue == 10) return;
  440. nextTick(() => {
  441. initLineChart();
  442. });
  443. });
  444. };
  445. // 折线图
  446. const initLineChart = () => {
  447. if (!global.dispose.some((b: any) => b === global.homeCharThree)) global.homeCharThree.dispose();
  448. let dom: any;
  449. let data: any;
  450. let unit: any;
  451. // 日热耗:GJ
  452. // 日电耗:KW.h
  453. // 日失水量:T
  454. // 供热功率:W
  455. if (tabName.value === 'homeLineRef1') {
  456. dom = homeLineRef1.value;
  457. data = state.flowLossData;
  458. unit = 'GJ'
  459. } else if (tabName.value === 'homeLineRef2') {
  460. dom = homeLineRef2.value;
  461. data = state.elctricConsumptionData;
  462. unit = 'KW.h'
  463. } else if (tabName.value === 'homeLineRef3') {
  464. dom = homeLineRef3.value;
  465. data = state.unitConsumptionData;
  466. unit = 'T'
  467. } else {
  468. dom = homeLineRef4.value;
  469. data = state.heatDemandData;
  470. unit = 'W'
  471. }
  472. console.log(dom)
  473. global.homeCharThree = <any>echarts.init(dom, state.charts.theme);
  474. const common = {
  475. type: 'line',
  476. smooth: true,
  477. showSymbol: true,
  478. symbolSize: 12,
  479. yAxisIndex: 0,
  480. // areaStyle: {
  481. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  482. // { offset: 0, color: 'rgba(22,132,252,0.3)' },
  483. // { offset: 1, color: 'rgba(22,132,252,0)' },
  484. // ]),
  485. // shadowColor: 'rgba(22,132,252,0.2)',
  486. // shadowBlur: 20,
  487. // },
  488. // itemStyle: { color: 'rgba(22, 132, 252, 1)' },
  489. };
  490. const option = {
  491. backgroundColor: state.charts.bgColor,
  492. tooltip: { trigger: 'axis' },
  493. // legend: {
  494. // data: ['总热耗', '总电耗', '总失水量'],
  495. // top: 30, textStyle: { color: state.charts.color }
  496. // },
  497. grid: { top: 30, right: 20, bottom: 20, left: 20, containLabel: true },
  498. xAxis: [
  499. {
  500. type: 'category',
  501. data: state.chartXAxisData,
  502. boundaryGap: true,
  503. axisTick: { show: false },
  504. },
  505. ],
  506. yAxis: [
  507. {
  508. type: 'value',
  509. name: unit,
  510. },
  511. ],
  512. dataZoom: [
  513. {
  514. type: 'inside',
  515. start: 0,
  516. end: 30
  517. },
  518. {
  519. start: 0,
  520. end: 30
  521. }
  522. ],
  523. series: [
  524. {
  525. ...common,
  526. data,
  527. },
  528. // {
  529. // name: '总电耗',
  530. // ...common,
  531. // data: state.elctricConsumptionData,
  532. // },
  533. // {
  534. // name: '总失水量',
  535. // ...common,
  536. // data: state.unitConsumptionData,
  537. // }
  538. ],
  539. };
  540. (<any>global.homeCharThree).setOption(option);
  541. (<any>state.myCharts).push(global.homeCharThree);
  542. };
  543. // 切换图形
  544. const tabChange = (data: any) => {
  545. setTimeout(() => {
  546. initLineChart();
  547. }, 100);
  548. };
  549. // 切换饼图类型
  550. const changePieType = (type: string, name: string) => {
  551. state.pieType = type;
  552. nextTick(() => {
  553. initPieChart();
  554. });
  555. };
  556. // 批量设置 echarts resize
  557. const initEchartsResizeFun = () => {
  558. nextTick(() => {
  559. for (let i = 0; i < state.myCharts.length; i++) {
  560. setTimeout(() => {
  561. (<any>state.myCharts[i]).resize();
  562. }, i * 1000);
  563. }
  564. });
  565. };
  566. // 批量设置 echarts resize
  567. const initEchartsResize = () => {
  568. window.addEventListener('resize', initEchartsResizeFun);
  569. };
  570. // 页面加载时
  571. onMounted(() => {
  572. initEchartsResize();
  573. getStatisticsTotalData();
  574. getStatisticsChartData();
  575. getStatisticsPressureChartData();
  576. getStatisticsLineChartData();
  577. getStatisticsPieData();
  578. // 获取布局配置信息
  579. state.isIsDark = store.state.themeConfig.themeConfig.isIsDark;
  580. });
  581. // 由于页面缓存原因,keep-alive
  582. onActivated(() => {
  583. initEchartsResizeFun();
  584. });
  585. // 监听 vuex 中的 tagsview 开启全屏变化,重新 resize 图表,防止不出现/大小不变等
  586. watch(
  587. () => store.state.tagsViewRoutes.isTagsViewCurrenFull,
  588. () => {
  589. initEchartsResizeFun();
  590. }
  591. );
  592. // 监听 vuex 中是否开启深色主题
  593. watch(
  594. () => store.state.themeConfig.themeConfig.isIsDark,
  595. () => {
  596. state.isIsDark = store.state.themeConfig.themeConfig.isIsDark;
  597. },
  598. {
  599. deep: true,
  600. immediate: true,
  601. }
  602. );
  603. // 监听 vuex 中是否开启深色主题
  604. watch(
  605. () => store.state.themeConfig.themeConfig.isIsDark,
  606. (isIsDark) => {
  607. nextTick(() => {
  608. // if(!isIsDark) return
  609. state.charts.theme = isIsDark ? 'transparent' : '';
  610. state.charts.bgColor = isIsDark ? 'transparent' : '';
  611. state.charts.color = isIsDark ? '#dadada' : '#303133';
  612. setTimeout(() => {
  613. initLineChart();
  614. initPieChart();
  615. initBarChart();
  616. initBarFourChart();
  617. }, 1000);
  618. });
  619. },
  620. {
  621. deep: true,
  622. immediate: true,
  623. }
  624. );
  625. return {
  626. unitMap,
  627. tabName,
  628. homeLineRef1,
  629. homeLineRef2,
  630. homeLineRef3,
  631. homeLineRef4,
  632. tabChange,
  633. homePieRef,
  634. homeBarRef,
  635. homeFourBarRef,
  636. changePieType,
  637. getStatisticsLineChartData,
  638. ...toRefs(state),
  639. };
  640. },
  641. });
  642. </script>
  643. <style scoped lang="scss">
  644. $homeNavLengh: 8;
  645. .data-overview {
  646. overflow: hidden;
  647. // .home-card-one,
  648. .home-card-two,
  649. .home-card-three,
  650. .home-card-four {
  651. .home-card-item,
  652. .home-card-top {
  653. width: 100%;
  654. height: 100px;
  655. border-radius: 4px;
  656. transition: all ease 0.3s;
  657. padding: 10px;
  658. overflow: hidden;
  659. background: var(--el-color-white);
  660. color: var(--el-text-color-primary);
  661. border: 1px solid var(--next-border-color-light);
  662. &:hover {
  663. box-shadow: 0 2px 12px var(--next-color-dark-hover);
  664. transition: all ease 0.3s;
  665. }
  666. &-icon {
  667. width: 70px;
  668. height: 70px;
  669. border-radius: 100%;
  670. flex-shrink: 1;
  671. i {
  672. color: var(--el-text-color-placeholder);
  673. }
  674. }
  675. &-title {
  676. font-size: 15px;
  677. font-weight: bold;
  678. height: 30px;
  679. }
  680. }
  681. }
  682. .home-card-one {
  683. @for $i from 0 through 3 {
  684. .home-one-animation#{$i} {
  685. opacity: 0;
  686. animation-name: error-num;
  687. animation-duration: 0.5s;
  688. animation-fill-mode: forwards;
  689. animation-delay: calc($i/10) + s;
  690. }
  691. }
  692. }
  693. .home-card-one .home-card-item {
  694. width: 100%;
  695. border-radius: 4px;
  696. transition: all ease 0.3s;
  697. overflow: hidden;
  698. background: var(--el-color-white);
  699. color: var(--el-text-color-primary);
  700. border: 1px solid var(--next-border-color-light);
  701. &:hover {
  702. box-shadow: 0 2px 12px var(--next-color-dark-hover);
  703. transition: all ease 0.3s;
  704. }
  705. .item-header {
  706. display: flex;
  707. justify-content: center;
  708. align-content: center;
  709. color: #101010;
  710. padding: 10px 0;
  711. border-bottom: 1px solid var(--next-border-color-light);
  712. font-size: 20px;
  713. font-weight: bold;
  714. img {
  715. margin-right: 32px;
  716. width: 24px;
  717. height: 24px;
  718. margin-top: 3px;
  719. }
  720. }
  721. .item-content {
  722. padding: 16px;
  723. p {
  724. display: flex;
  725. justify-content: space-between;
  726. align-content: center;
  727. span:nth-child(1) {
  728. line-height: 30px;
  729. font-size: 14px;
  730. flex: 0 0 60px;
  731. }
  732. span:nth-child(2) {
  733. color: #101010;
  734. font-weight: bold;
  735. font-size: 22px;
  736. word-wrap: break-word;
  737. word-break: break-all;
  738. }
  739. }
  740. p:nth-child(2),
  741. p:nth-child(3) {
  742. margin-top: 5px;
  743. }
  744. }
  745. }
  746. .home-card-two,
  747. .home-card-three,
  748. .home-card-four {
  749. .home-card-item {
  750. height: 300px;
  751. }
  752. .home-card-top {
  753. height: 200px;
  754. .box-card {
  755. padding: 15px 20px 20px 10px;
  756. p {
  757. margin-bottom: 10px;
  758. }
  759. &-item {
  760. margin-bottom: 10px;
  761. }
  762. }
  763. }
  764. .home-card-item,
  765. .home-card-top {
  766. width: 100%;
  767. overflow: hidden;
  768. .home-monitor {
  769. height: 100%;
  770. .flex-warp-item {
  771. width: 25%;
  772. height: 111px;
  773. display: flex;
  774. .flex-warp-item-box {
  775. margin: auto;
  776. text-align: center;
  777. color: var(--el-text-color-primary);
  778. display: flex;
  779. border-radius: 5px;
  780. background: var(--next-bg-color);
  781. cursor: pointer;
  782. transition: all 0.3s ease;
  783. &:hover {
  784. background: var(--el-color-primary-light-9);
  785. transition: all 0.3s ease;
  786. }
  787. }
  788. @for $i from 0 through $homeNavLengh {
  789. .home-animation#{$i} {
  790. opacity: 0;
  791. animation-name: error-num;
  792. animation-duration: 0.5s;
  793. animation-fill-mode: forwards;
  794. animation-delay: calc($i/10) + s;
  795. }
  796. }
  797. }
  798. }
  799. }
  800. }
  801. .text-info {
  802. color: #23c6c8;
  803. }
  804. .text-danger {
  805. color: #ed5565;
  806. }
  807. .git-res {
  808. margin-top: 20px;
  809. }
  810. .git-res .el-link {
  811. margin-right: 30px;
  812. }
  813. ul,
  814. li {
  815. padding: 0;
  816. margin: 0;
  817. list-style: none;
  818. }
  819. .product {
  820. margin-top: 50px;
  821. h3 {
  822. margin-bottom: 15px;
  823. }
  824. }
  825. .product li {
  826. margin-bottom: 20px;
  827. float: left;
  828. width: 150px;
  829. }
  830. .box-card.xx {
  831. margin-top: 20px;
  832. }
  833. }
  834. .lable-group,
  835. .lable-group1 {
  836. // background-color: pink;
  837. display: flex;
  838. width: 100%;
  839. margin-top: 20px;
  840. border: 1px solid rgba(22, 132, 252, 1);
  841. > div {
  842. cursor: pointer;
  843. width: 33%;
  844. text-align: center;
  845. padding: 6px 0;
  846. color: rgba(22, 132, 252, 1);
  847. }
  848. div:nth-child(2) {
  849. border-left: 1px solid rgba(22, 132, 252, 1);
  850. border-right: 1px solid rgba(22, 132, 252, 1);
  851. }
  852. .active {
  853. background-color: rgba(22, 132, 252, 1);
  854. color: #fff;
  855. }
  856. }
  857. .lable-group1 > div {
  858. width: 50%;
  859. }
  860. </style>