LightMatrix.vue 27 KB

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