LightMatrix3.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. <template>
  2. <div class="light-matrix">
  3. <div class="panel">
  4. <div class="dot left top"></div>
  5. <div class="dot left bottom"></div>
  6. <div class="dot right top"></div>
  7. <div class="dot right bottom"></div>
  8. <div class="page-header">
  9. <div class="panel-item-gf">
  10. <div class="panel-item-gf-left">
  11. <div class="loop"></div>
  12. <span class="svg-icon svg-icon-gray svg-icon-md">
  13. <SvgIcon svgid="svg-wind-site"></SvgIcon>
  14. </span>
  15. </div>
  16. <div class="panel-item-gf-right">
  17. <div class="panel-item-gf-up">{{ panelData.first.text }}</div>
  18. <div class="panel-item-gf-down">
  19. {{ sourceMap[panelData.first.key] || "---" }}
  20. </div>
  21. </div>
  22. </div>
  23. <div class="header-info">
  24. <div
  25. class="panel-item"
  26. v-for="(data, index) of panelData.datas"
  27. :key="index"
  28. :class="data.color"
  29. >
  30. <div class="panel-item-left">
  31. <div class="panel-item-li">
  32. <span>{{ data.name }}</span>
  33. </div>
  34. <div class="panel-item-li">
  35. <span v-if="data.calcStr && sourceMap">{{
  36. calcGfStr(data.calcStr) || "---"
  37. }}</span>
  38. <span v-else>{{ sourceMap[data.key] || "---" }}</span>
  39. </div>
  40. </div>
  41. <div class="panel-item-right">
  42. <div class="panel-item-ri">
  43. <span>
  44. <i
  45. class="svg-icon svg-icon-sm"
  46. :class="'svg-icon-' + data.color"
  47. >
  48. <SvgIcon :svgid="data.nameIcon"></SvgIcon>
  49. </i>
  50. {{ data.text1 }}</span
  51. >
  52. <span>{{ sourceMap[data.key1] || "---" }}</span>
  53. </div>
  54. <div class="panel-item-ri">
  55. <span>
  56. <i
  57. class="svg-icon svg-icon-sm"
  58. :class="'svg-icon-' + data.color"
  59. >
  60. <SvgIcon :svgid="data.numIcon"></SvgIcon>
  61. </i>
  62. {{ data.text2 }}
  63. </span>
  64. <span>{{ sourceMap[data.key2] || "---" }}</span>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <el-scrollbar>
  72. <div class="panel-box">
  73. <div v-for="(pItem, pIndex) in sourceMap.fjmap" :key="pIndex">
  74. <div class="panel-title">
  75. <div class="panel-title-name">
  76. <i class="svg-icon svg-icon-sm svg-icon-green">
  77. <SvgIcon :svgid="'svg-wind-site'"></SvgIcon>
  78. </i>
  79. <span>{{ sourceMap.fczbmap[pItem[pIndex].wpId].name }}</span>
  80. <div
  81. class="sub-title-item"
  82. v-for="(data, index) of tables[0].subTitleDatas"
  83. :key="index"
  84. >
  85. <span class="sub-title">{{ data.text }}</span>
  86. <span class="sub-count" :class="data.color">{{
  87. sourceMap.fczbmap[pItem[pIndex].wpId][data.key]
  88. }}</span>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="panel-body">
  93. <div
  94. class="card"
  95. v-for="(cItem, cIndex) in pItem"
  96. :key="cIndex"
  97. :class="cItem.color"
  98. @click="goDetails(cItem)"
  99. >
  100. <div class="card-panel">
  101. <div class="card-left">
  102. <div class="tag">{{ cItem.wtnum }}</div>
  103. <div class="icon">
  104. <span
  105. class="svg-icon svg-icon-sm"
  106. :class="
  107. cItem.color == 'black'
  108. ? 'svg-icon-black'
  109. : cItem.color == 'gray'
  110. ? 'svg-icon-gray'
  111. : 'svg-icon-write'
  112. "
  113. >
  114. <SvgIcon :svgid="mapping[cItem.color]"></SvgIcon>
  115. </span>
  116. </div>
  117. </div>
  118. <div class="card-right">
  119. <div class="num">
  120. <i
  121. class="svg-icon svg-icon-sm"
  122. :class="
  123. cItem.color != 'red'
  124. ? 'svg-icon-' + cItem.color
  125. : 'svg-icon-white'
  126. "
  127. >
  128. <SvgIcon svgid="svg-P"></SvgIcon>
  129. </i>
  130. <span>{{ cItem.fs }}</span>
  131. </div>
  132. <div class="num">
  133. <i
  134. class="svg-icon svg-icon-sm"
  135. :class="
  136. cItem.color != 'red'
  137. ? 'svg-icon-' + cItem.color
  138. : 'svg-icon-white'
  139. "
  140. >
  141. <SvgIcon svgid="svg-W"></SvgIcon>
  142. </i>
  143. <span>{{ cItem.gl }}</span>
  144. </div>
  145. <div class="num">
  146. <i
  147. class="svg-icon svg-icon-sm"
  148. :class="
  149. cItem.color != 'red'
  150. ? 'svg-icon-' + cItem.color
  151. : 'svg-icon-white'
  152. "
  153. >
  154. <SvgIcon svgid="svg-R"></SvgIcon>
  155. </i>
  156. <span>{{ cItem.fdjzs.toFixed(2) }}</span>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <!-- 站位用 保证卡片布局最后一行不会有问题 -->
  162. <i class="blank" v-for="i in pItem.length" :key="i"></i>
  163. </div>
  164. </div>
  165. </div>
  166. </el-scrollbar>
  167. </div>
  168. </template>
  169. <script>
  170. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  171. import util from "@/helper/util.js";
  172. import store from "@store/index.js";
  173. export default {
  174. // 名称
  175. name: "LightMatrix3",
  176. // 使用组件
  177. components: {
  178. SvgIcon,
  179. },
  180. // 数据
  181. data() {
  182. return {
  183. timmer: null, // 遮罩开关
  184. sourceMap: {}, // 核心数据
  185. mapping: {
  186. green: "svg-standby",
  187. blue: "svg-normal-power",
  188. pink: "svg-limit-power",
  189. red: "svg-gz-downtime",
  190. orange: "svg-jx-downtime",
  191. gray: "svg-offline",
  192. black: "svg-intranet-involvement",
  193. },
  194. panelData: {
  195. first: {
  196. icon: "svg-photovoltaic",
  197. text: "接入风场",
  198. key: "fcjrnum",
  199. },
  200. datas: [
  201. {
  202. color: "green",
  203. name: "待机",
  204. nameIcon: "svg-standby",
  205. calcStr: ["fcdjnum", "fcsdtjnum"],
  206. numIcon: "svg-manual",
  207. text1: "待风",
  208. key1: "fcdjnum",
  209. text2: "手动停机",
  210. key2: "fcsdtjnum",
  211. },
  212. {
  213. color: "blue",
  214. name: "运行",
  215. nameIcon: "svg-normal-power",
  216. calcStr: ["fczcfdnum", "fcqxjclnum"],
  217. numIcon: "svg-drop-output",
  218. text1: "正常发电",
  219. key1: "fczcfdnum",
  220. text2: "降出力运行",
  221. key2: "fcqxjclnum",
  222. },
  223. {
  224. color: "pink",
  225. name: "限电",
  226. nameIcon: "svg-limit-power",
  227. calcStr: ["fcxdjclnum", "fcxdtjnum"],
  228. numIcon: "svg-downtime",
  229. text1: "限电降出力",
  230. key1: "fcxdjclnum",
  231. text2: "停机",
  232. key2: "fcxdtjnum",
  233. },
  234. {
  235. color: "red",
  236. name: "故障",
  237. nameIcon: "svg-gz-downtime",
  238. calcStr: ["fcgztjnum", "fccnsltjnum"],
  239. numIcon: "svg-field-involved",
  240. text1: "故障停机",
  241. key1: "fcgztjnum",
  242. text2: "场内受累",
  243. key2: "fccnsltjnum",
  244. },
  245. {
  246. color: "orange",
  247. name: "检修",
  248. nameIcon: "svg-jx-downtime",
  249. calcStr: ["fcjxtjnum", "fccnsljxnum"],
  250. numIcon: "svg-field-involved",
  251. text1: "检修停机",
  252. key1: "fcjxtjnum",
  253. text2: "产内受累",
  254. key2: "fccnsljxnum",
  255. },
  256. {
  257. color: "write",
  258. name: "受累",
  259. calcStr: ["fcdwslnum", "fchjslnum"],
  260. nameIcon: "svg-intranet-involvement",
  261. numIcon: "svg-environment",
  262. text1: "电网",
  263. key1: "fcdwslnum",
  264. text2: "环境",
  265. key2: "fchjslnum",
  266. },
  267. {
  268. color: "gray",
  269. name: "离线",
  270. nameIcon: "svg-offline",
  271. key: "fclxnum",
  272. numIcon: "svg-unknown",
  273. text1: "离线",
  274. key1: "fclxnum",
  275. text2: "未知",
  276. key2: "fcwznum",
  277. },
  278. ],
  279. },
  280. tables: [
  281. {
  282. col: 15,
  283. subTitleDatas: [
  284. {
  285. text: "接入台数",
  286. color: "write",
  287. key: "jrts",
  288. },
  289. {
  290. text: "待机台数",
  291. color: "green",
  292. key: "djts",
  293. },
  294. {
  295. text: "并网台数",
  296. color: "blue",
  297. key: "yxts",
  298. },
  299. {
  300. text: "限电台数",
  301. color: "pink",
  302. key: "xdts",
  303. },
  304. {
  305. text: "故障台数",
  306. color: "red",
  307. key: "gzts",
  308. },
  309. {
  310. text: "检修台数",
  311. color: "orange",
  312. key: "whts",
  313. },
  314. {
  315. text: "受累台数",
  316. color: "write",
  317. key: "slts",
  318. },
  319. {
  320. text: "离线台数",
  321. color: "gray",
  322. key: "lxts",
  323. },
  324. {
  325. text: "风速",
  326. color: "gray",
  327. key: "ssfs",
  328. },
  329. {
  330. text: "预测功率",
  331. color: "gray",
  332. key: "ycgl",
  333. },
  334. {
  335. text: "保证功率",
  336. color: "gray",
  337. key: "bzgl",
  338. },
  339. {
  340. text: "应发功率",
  341. color: "gray",
  342. key: "yfgl",
  343. },
  344. {
  345. text: "实际功率",
  346. color: "gray",
  347. key: "sjgl",
  348. },
  349. {
  350. text: "AGC指令",
  351. color: "gray",
  352. key: "agcygsd",
  353. },
  354. {
  355. text: "出线功率",
  356. color: "gray",
  357. key: "agccxyg",
  358. },
  359. ],
  360. datas: [
  361. {
  362. tag: "A-11",
  363. num1: 1234.56,
  364. num2: 1234.56,
  365. num3: 1234.56,
  366. color: "blue",
  367. },
  368. ],
  369. },
  370. ],
  371. };
  372. },
  373. // 函数
  374. methods: {
  375. // 根据风机状态码返回对应 class
  376. getColor(fjzt) {
  377. switch (fjzt) {
  378. case 0: // 待机
  379. return "green";
  380. case 1: // 手动停机
  381. return "green";
  382. case 2: // 正常发电
  383. return "blue";
  384. case 3: // 缺陷降出力
  385. return "blue";
  386. case 4: // 限电降出力
  387. return "purple";
  388. case 5: // 限电停机
  389. return "purple";
  390. case 6: // 故障停机
  391. return "red";
  392. case 7: // 场内受累停机
  393. return "red";
  394. case 8: // 检修停机
  395. return "orange";
  396. case 9: // 离线
  397. return "orange";
  398. case 10: // 电网受累
  399. return "gray";
  400. case 11: // 环境受累
  401. return "gray";
  402. case 12: // 离线
  403. return "black";
  404. }
  405. },
  406. calcGfStr(calcStr) {
  407. return (
  408. parseInt(this.sourceMap[calcStr[0]]) +
  409. parseInt(this.sourceMap[calcStr[1]]) +
  410. ""
  411. );
  412. },
  413. // 请求服务
  414. requestData(showLoading) {
  415. let that = this;
  416. that.API.requestData({
  417. showLoading,
  418. method: "POST",
  419. subUrl: "matrix/matrixDetialPush",
  420. success(res) {
  421. if (res.data) {
  422. let sourceMap = res.data;
  423. for (let key in sourceMap) {
  424. if (key !== "fczbmap" && key !== "fjmap") {
  425. sourceMap[key] += "";
  426. } else if (key === "fjmap") {
  427. sourceMap[key].forEach((pItem) => {
  428. pItem.forEach((cItem) => {
  429. cItem.color = that.getColor(cItem.fjzt);
  430. cItem.isShow = true;
  431. });
  432. });
  433. }
  434. }
  435. that.sourceMap = sourceMap;
  436. } else {
  437. that.sourceMap = {};
  438. }
  439. },
  440. });
  441. },
  442. },
  443. created() {
  444. let that = this;
  445. that.$nextTick(() => {
  446. that.requestData(false);
  447. that.timmer = setInterval(() => {
  448. that.requestData(false);
  449. }, that.$store.state.websocketTimeSec);
  450. });
  451. },
  452. mounted() {},
  453. unmounted() {
  454. clearInterval(this.timmer);
  455. this.timmer = null;
  456. },
  457. };
  458. </script>
  459. <style lang="less" scoped>
  460. @panelHeight: 60px;
  461. @titleHeight: 26px;
  462. .light-matrix {
  463. // width: calc(100% - 1.111vh);
  464. height: calc(100vh - 7.222vh);
  465. display: flex;
  466. flex-direction: column;
  467. .panel {
  468. width: 100%;
  469. height: 80px;
  470. border: 1px solid @darkgray;
  471. position: relative;
  472. padding: 10px 20px;
  473. background-color: fade(@darkgray, 20%);
  474. .dot {
  475. width: 0.185vh;
  476. height: 0.185vh;
  477. border-radius: 50%;
  478. background-color: @write;
  479. position: absolute;
  480. &.left {
  481. left: 0.37vh;
  482. }
  483. &.right {
  484. right: 0.37vh;
  485. }
  486. &.top {
  487. top: 0.37vh;
  488. }
  489. &.bottom {
  490. bottom: 0.37vh;
  491. }
  492. }
  493. .page-header {
  494. display: flex;
  495. .header-info {
  496. display: flex;
  497. flex: 1 0 auto;
  498. }
  499. }
  500. .panel-item-gf {
  501. flex: 0 0 auto;
  502. margin-right: 16px;
  503. display: flex;
  504. height: @panelHeight;
  505. .panel-item-gf-left {
  506. width: @panelHeight;
  507. height: @panelHeight;
  508. display: flex;
  509. align-items: center;
  510. justify-content: center;
  511. position: relative;
  512. .loop {
  513. position: absolute;
  514. width: 4.444vh;
  515. height: 4.444vh;
  516. border-radius: 50%;
  517. border: 0.093vh solid @darkgray;
  518. background-color: fade(@darkgray, 20);
  519. left: calc(50% - 2.222vh);
  520. top: calc(50% - 2.222vh);
  521. }
  522. }
  523. .panel-item-gf-right {
  524. color: @write;
  525. text-align: right;
  526. margin-left: 24px;
  527. .panel-item-gf-up {
  528. color: @gray;
  529. height: @panelHeight / 2;
  530. line-height: @panelHeight / 2;
  531. font-size: 14px;
  532. }
  533. .panel-item-gf-down {
  534. height: @panelHeight / 2;
  535. line-height: @panelHeight / 2;
  536. font-weight: 600;
  537. font-size: 16px;
  538. }
  539. }
  540. }
  541. .panel-item {
  542. width: 100%;
  543. height: @panelHeight;
  544. font-size: 12px;
  545. margin-left: 8px;
  546. .panel-item-left {
  547. display: flex;
  548. .panel-item-li {
  549. height: @panelHeight / 2;
  550. line-height: @panelHeight / 2;
  551. flex: 1 0 auto;
  552. padding: 0 1.111vh;
  553. align-items: center;
  554. font-size: 14px;
  555. .svg-icon {
  556. margin-left: auto;
  557. }
  558. &.value {
  559. text-align: right;
  560. flex: 0;
  561. font-size: 16px;
  562. color: #fff;
  563. }
  564. }
  565. }
  566. .panel-item-right {
  567. display: flex;
  568. flex-grow: 1;
  569. height: @panelHeight;
  570. .panel-item-ri {
  571. height: @panelHeight / 2;
  572. line-height: @panelHeight / 2;
  573. padding: 0 8px;
  574. flex: 1;
  575. &:first-child {
  576. border-right: 1px solid;
  577. }
  578. & > span {
  579. &:first-child {
  580. float: left;
  581. display: flex;
  582. align-items: center;
  583. i {
  584. margin-right: 4px;
  585. }
  586. }
  587. &:last-child {
  588. float: right;
  589. color: @write;
  590. }
  591. }
  592. }
  593. }
  594. &.green {
  595. background-color: fade(@green, 15%);
  596. color: @green;
  597. .panel-item-left {
  598. background-color: fade(@green, 15%);
  599. }
  600. .panel-item-right {
  601. .panel-item-ri {
  602. &:first-child {
  603. border-color: @green;
  604. }
  605. }
  606. }
  607. }
  608. &.blue {
  609. background-color: fade(@darkBlue, 15%);
  610. color: @darkBlue;
  611. .panel-item-left {
  612. background-color: fade(@darkBlue, 15%);
  613. }
  614. .panel-item-right {
  615. .panel-item-ri {
  616. &:first-child {
  617. border-color: @darkBlue;
  618. }
  619. }
  620. }
  621. }
  622. &.pink {
  623. background-color: fade(@pink, 15%);
  624. color: @pink;
  625. .panel-item-left {
  626. background-color: fade(@pink, 15%);
  627. }
  628. .panel-item-right {
  629. .panel-item-ri {
  630. &:first-child {
  631. border-color: @pink;
  632. }
  633. }
  634. }
  635. }
  636. &.red {
  637. background-color: fade(@red, 15%);
  638. color: @red;
  639. .panel-item-left {
  640. background-color: fade(@red, 15%);
  641. }
  642. .panel-item-right {
  643. .panel-item-ri {
  644. &:first-child {
  645. border-color: @red;
  646. }
  647. }
  648. }
  649. }
  650. &.orange {
  651. background-color: fade(@orange, 15%);
  652. color: @orange;
  653. .panel-item-left {
  654. background-color: fade(@orange, 15%);
  655. }
  656. .panel-item-right {
  657. .panel-item-ri {
  658. &:first-child {
  659. border-color: @orange;
  660. }
  661. }
  662. }
  663. }
  664. &.gray {
  665. background-color: fade(@darkgray, 15%);
  666. color: @gray;
  667. .panel-item-left {
  668. background-color: fade(@darkgray, 15%);
  669. }
  670. .panel-item-right {
  671. .panel-item-ri {
  672. &:first-child {
  673. border-color: @darkgray;
  674. }
  675. }
  676. }
  677. }
  678. &.write {
  679. background-color: fade(@write, 15%);
  680. color: @write;
  681. .panel-item-left {
  682. background-color: fade(@write, 15%);
  683. }
  684. .panel-item-right {
  685. .panel-item-ri {
  686. &:first-child {
  687. border-color: @write;
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694. .panel-box {
  695. margin-top: 1.481vh;
  696. flex-grow: 1;
  697. .panel-title {
  698. width: 100%;
  699. line-height: @titleHeight;
  700. background-color: fade(@darkgray, 40%);
  701. .panel-title-name {
  702. font-size: 12px;
  703. color: @green;
  704. display: flex;
  705. flex-wrap: wrap;
  706. align-items: center;
  707. padding-left: 16px;
  708. i {
  709. margin-right: 0.7407vh;
  710. }
  711. .sub-title-item {
  712. display: flex;
  713. flex: 0 0 110px;
  714. .sub-title {
  715. flex: 0 0 auto;
  716. color: @gray;
  717. font-size: 12px;
  718. margin: 0 0.556vh 0 1.481vh;
  719. padding-top: 1px;
  720. width: 50px;
  721. }
  722. .sub-count {
  723. flex: 1 0 auto;
  724. font-size: 14px;
  725. font-family: "Bicubik";
  726. font-weight: 500;
  727. &.write {
  728. color: @write;
  729. }
  730. &.green {
  731. color: @green;
  732. }
  733. &.blue {
  734. color: @darkBlue;
  735. }
  736. &.pink {
  737. color: @pink;
  738. }
  739. &.red {
  740. color: @red;
  741. }
  742. &.orange {
  743. color: @orange;
  744. }
  745. &.gray {
  746. color: @gray;
  747. }
  748. }
  749. }
  750. }
  751. }
  752. .panel-body {
  753. background-color: fade(@darkgray, 20%);
  754. padding: 0.741vh;
  755. margin-bottom: 1.481vh;
  756. width: 100%;
  757. display: flex;
  758. flex-direction: row;
  759. flex-wrap: wrap;
  760. justify-content: space-between;
  761. .blank {
  762. margin-right: 4px;
  763. flex: 1 0 118px;
  764. }
  765. .card {
  766. margin-right: 4px;
  767. margin-top: 4px;
  768. flex: 1 0 118px;
  769. }
  770. .card {
  771. border: 1px solid;
  772. .card-panel {
  773. display: flex;
  774. flex-grow: row;
  775. .card-left {
  776. width: 40px;
  777. border-right: 0.093vh dotted;
  778. display: flex;
  779. flex-direction: column;
  780. .tag {
  781. color: @write;
  782. font-size: 12px;
  783. width: 100%;
  784. text-align: center;
  785. line-height: 1.5;
  786. }
  787. .icon {
  788. flex-grow: 1;
  789. display: flex;
  790. align-items: center;
  791. justify-content: center;
  792. i {
  793. font-size: 14px;
  794. }
  795. }
  796. }
  797. .card-right {
  798. margin-top: 2px;
  799. .num {
  800. width: 72px;
  801. font-size: 12px;
  802. text-align: left;
  803. padding-right: 0.278vh;
  804. display: flex;
  805. align-items: center;
  806. justify-content: space-around;
  807. i {
  808. margin: 0 2px 0 4px;
  809. }
  810. span {
  811. flex: 1;
  812. }
  813. }
  814. }
  815. }
  816. .card-percent {
  817. height: 0.926vh;
  818. padding: 0.093vh 0.185vh;
  819. position: relative;
  820. border-top: 1px solid;
  821. background-color: transparent;
  822. .percent {
  823. height: 0.648vh;
  824. background-color: @green;
  825. position: absolute;
  826. left: 0.185vh;
  827. top: 0.093vh;
  828. }
  829. }
  830. &.blue {
  831. border-color: @darkBlue;
  832. background-color: fade(@darkBlue, 15%);
  833. .card-panel {
  834. .card-left {
  835. border-color: @darkBlue;
  836. .tag {
  837. background-color: fade(@darkBlue, 30);
  838. }
  839. .icon {
  840. svg {
  841. use {
  842. fill: @write;
  843. }
  844. }
  845. }
  846. }
  847. .card-right {
  848. .num {
  849. color: @darkBlue;
  850. }
  851. }
  852. }
  853. .card-percent {
  854. border-color: @darkBlue;
  855. }
  856. }
  857. &.pink {
  858. border-color: @pink;
  859. background-color: fade(@pink, 15%);
  860. .card-panel {
  861. .card-left {
  862. border-color: @pink;
  863. .tag {
  864. background-color: fade(@pink, 30);
  865. }
  866. .icon {
  867. svg {
  868. use {
  869. fill: @write;
  870. }
  871. }
  872. }
  873. }
  874. .card-right {
  875. .num {
  876. color: @pink;
  877. }
  878. }
  879. }
  880. .card-percent {
  881. border-color: @pink;
  882. }
  883. }
  884. &.orange {
  885. border-color: @orange;
  886. background-color: fade(@orange, 15%);
  887. .card-panel {
  888. .card-left {
  889. border-color: @orange;
  890. .tag {
  891. background-color: fade(@orange, 30);
  892. }
  893. .icon {
  894. use {
  895. fill: @write;
  896. }
  897. }
  898. }
  899. .card-right {
  900. .num {
  901. color: @orange;
  902. }
  903. }
  904. }
  905. .card-percent {
  906. border-color: @orange;
  907. }
  908. }
  909. &.green {
  910. border-color: @green;
  911. background-color: fade(@green, 15%);
  912. .card-panel {
  913. .card-left {
  914. border-color: @green;
  915. .tag {
  916. background-color: fade(@green, 30);
  917. }
  918. .icon {
  919. use {
  920. fill: @write;
  921. }
  922. }
  923. }
  924. .card-right {
  925. .num {
  926. color: @green;
  927. }
  928. }
  929. }
  930. .card-percent {
  931. border-color: @green;
  932. }
  933. }
  934. &.gray {
  935. border-color: @darkgray;
  936. background-color: fade(@darkgray, 15%);
  937. .card-panel {
  938. .card-left {
  939. border-color: @darkgray;
  940. .tag {
  941. background-color: fade(@darkgray, 30%);
  942. }
  943. .icon {
  944. use {
  945. fill: @black;
  946. }
  947. }
  948. }
  949. .card-right {
  950. .num {
  951. color: @gray;
  952. }
  953. }
  954. }
  955. .card-percent {
  956. border-color: @darkgray;
  957. }
  958. }
  959. &.red {
  960. border-color: @red;
  961. .card-panel {
  962. background-color: @red;
  963. .card-left {
  964. border-color: @darkRed;
  965. .tag {
  966. background-color: fade(@darkRed, 50%);
  967. }
  968. .icon {
  969. use {
  970. fill: @write;
  971. }
  972. }
  973. }
  974. .card-right {
  975. .num {
  976. color: @write;
  977. }
  978. }
  979. }
  980. .card-percent {
  981. border-color: @red;
  982. }
  983. }
  984. &.black {
  985. border-color: @write;
  986. .card-panel {
  987. background-color: @write;
  988. .card-left {
  989. border-color: @black;
  990. .tag {
  991. background-color: fade(@darkgray, 80%);
  992. }
  993. .icon {
  994. .svg-icon {
  995. svg {
  996. use {
  997. fill: @black;
  998. }
  999. }
  1000. }
  1001. }
  1002. }
  1003. .card-right {
  1004. .num {
  1005. color: @black;
  1006. }
  1007. }
  1008. }
  1009. }
  1010. }
  1011. }
  1012. }
  1013. }
  1014. </style>