LightMatrix3.vue 27 KB

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