LightMatrix.vue 23 KB

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