123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- <template>
- <div class="matrix-detail">
- <Row class="panel-2" type="">
- <Col :span="12" class="left-50-16">
- <div class="panel">
- <div class="dot left top"></div>
- <div class="dot left bottom"></div>
- <div class="dot right top"></div>
- <div class="dot right bottom"></div>
- <div class="item">
- <div class="loop"></div>
- <span class="svg-icon svg-icon-gray svg-icon-md">
- <SvgIcon svgid="svg-wind-site"></SvgIcon>
- </span>
- </div>
- <div class="item" :class="data.color" v-for="(data, index) of panel1Data.datas" :key="index">
- <div>{{ data.test }}</div>
- <div>{{ data.num }}</div>
- </div>
- </div>
- </Col>
- <Col :span="12" class="left-50-16">
- <div class="panel">
- <div class="dot left top"></div>
- <div class="dot left bottom"></div>
- <div class="dot right top"></div>
- <div class="dot right bottom"></div>
- <div class="item">
- <div class="loop"></div>
- <span class="svg-icon svg-icon-gray svg-icon-md">
- <SvgIcon :svgid="'svg-photovoltaic'" style="margin: 3px 0px -3px 1px;"></SvgIcon>
- </span>
- </div>
- <div class="item" :class="data.color" v-for="(data, index) of panel2Data.datas" :key="index">
- <div>{{ data.test }}</div>
- <div>{{ data.num }}</div>
- </div>
- </div>
- </Col>
- </Row>
- <div class="panel-box">
- <div v-for="(table, k) of newTables" :key="k">
- <div class="panel-title">
- <div class="panel-title-name">
- <i class="svg-icon svg-icon-sm svg-icon-green">
- <SvgIcon :svgid="'svg-wind-site'"></SvgIcon>
- </i>
- <span>某某某风电场</span>
- <div class="sub-title-item" v-for="(data, index) of table.subTitleDatas" :key="index">
- <span class="sub-title">{{ data.text }}</span>
- <span class="sub-count" :class="data.color">{{ data.num }}</span>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <div class="card" v-for="j of table.count" :key="j" :class="'green'">
- {{ "A" + j }}
- </div>
- <!-- 站位用 保证卡片布局最后一行不会有问题 -->
- <i class="blank" v-for="i in table.count" :key="i"></i>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import Row from "@/components/coms/grid/row.vue";
- import Col from "@/components/coms/grid/col.vue";
- import SvgIcon from "@com/coms/icon/svg-icon.vue";
- import util from "@/helper/util.js";
- export default {
- // 名称
- name: "LightMatrix1",
- // 使用组件
- components: {
- Row,
- Col,
- SvgIcon,
- },
- // 数据
- data() {
- return {
- panel1Data: {
- first: {
- icon: "svg-wind-site",
- },
- datas: [
- {
- color: "write",
- test: "接入风机",
- num: 256,
- },
- {
- color: "blue",
- test: "· 运行",
- num: 256,
- },
- {
- color: "green",
- test: "· 待机",
- num: 256,
- },
- {
- color: "pink",
- test: "· 限电",
- num: 256,
- },
- {
- color: "red",
- test: "· 故障",
- num: 256,
- },
- {
- color: "orange",
- test: "· 检修",
- num: 256,
- },
- {
- color: "write",
- test: "· 受累",
- num: 256,
- },
- {
- color: "gray",
- test: "· 离线",
- num: 256,
- },
- ],
- },
- panel2Data: {
- first: {
- icon: "svg-photovoltaic",
- },
- datas: [
- {
- color: "write",
- test: "接入风机",
- num: 256,
- },
- {
- color: "blue",
- test: "· 运行",
- num: 256,
- },
- {
- color: "green",
- test: "· 待机",
- num: 256,
- },
- {
- color: "pink",
- test: "· 限电",
- num: 256,
- },
- {
- color: "red",
- test: "· 故障",
- num: 256,
- },
- {
- color: "orange",
- test: "· 检修",
- num: 256,
- },
- {
- color: "write",
- test: "· 受累",
- num: 256,
- },
- {
- color: "gray",
- test: "· 离线",
- num: 256,
- },
- ],
- },
- tables: [
- {
- col: 42,
- subTitleDatas: [
- {
- text: "接入台数",
- num: 256,
- color: "write",
- },
- {
- text: "待机台数",
- num: 256,
- color: "green",
- },
- {
- text: "并网台数",
- num: 256,
- color: "blue",
- },
- {
- text: "限电台数",
- num: 256,
- color: "pink",
- },
- {
- text: "故障台数",
- num: 256,
- color: "red",
- },
- {
- text: "检修台数",
- num: 256,
- color: "orange",
- },
- {
- text: "受累台数",
- num: 256,
- color: "write",
- },
- {
- text: "离线台数",
- num: 256,
- color: "gray",
- },
- {
- text: "风速",
- num: 256,
- color: "gray",
- },
- {
- text: "预测功率",
- num: 256,
- color: "gray",
- },
- {
- text: "保证功率",
- num: 256,
- color: "gray",
- },
- {
- text: "应发功率",
- num: 256,
- color: "gray",
- },
- {
- text: "实际功率",
- num: 256,
- color: "gray",
- },
- {
- text: "AGC指令",
- num: 256,
- color: "gray",
- },
- {
- text: "出线功率",
- num: 256,
- color: "gray",
- },
- ],
- datas: [
- {
- tag: "A01",
- color: "blue",
- },
- ],
- },
- ],
- newTables: [
- {
- count: 43,
- },
- {
- count: 43 * 3,
- },
- {
- count: 43 * 3,
- },
- {
- count: 43 * 3,
- },
- {
- count: 43 * 2,
- },
- {
- count: 43,
- },
- {
- count: 43 * 3,
- },
- {
- count: 43,
- },
- {
- count: 43,
- },
- {
- count: 43 * 6,
- },
- ],
- };
- },
- // 函数
- methods: {},
- // 生命周期钩子
- beforeCreate() {
- // 创建前
- },
- created() {
- // 创建后
- let tempData = [];
- for (let i = 0; i < 200; i++) {
- tempData.push(util.copy(this.tables[0].datas[0]));
- if (i % 13 == 0) {
- tempData[i].color = "green";
- }
- if (i % 17 == 0) {
- tempData[i].color = "pink";
- }
- if (i % 23 == 0) {
- tempData[i].color = "orange";
- }
- if (i % 29 == 0) {
- tempData[i].color = "red";
- }
- if (i % 31 == 0) {
- tempData[i].color = "write";
- }
- if (i % 37 == 0) {
- tempData[i].color = "gray";
- }
- }
- this.tables[0].datas = util.copy(tempData);
- for (let i = 0; i < 5; i++) {
- this.tables.push(util.copy(this.tables[0]));
- }
- this.newTables.forEach((value) => {
- value.subTitleDatas = util.copy(this.tables[0].subTitleDatas);
- });
- },
- beforeMount() {
- // 渲染前
- },
- mounted() {
- // 渲染后
- },
- beforeUpdate() {
- // 数据更新前
- },
- updated() {
- // 数据更新后
- },
- };
- </script>
- <style lang="less" scoped>
- @panelHeight: 6.481vh;
- @titleHeight: 25px;
- .matrix-detail {
- .panel-2 {
- .left-50-16 {
- width: calc(50% - 8px);
- }
- }
- .panel {
- width: 100%;
- border: 1px solid @darkgray;
- position: relative;
- padding: 8px 16px;
- background-color: fade(@darkgray, 20%);
- display: flex;
- .dot {
- width: 3px;
- height: 3px;
- border-radius: 50%;
- background-color: @write;
- position: absolute;
- &.left {
- left: 4px;
- }
- &.right {
- right: 4px;
- }
- &.top {
- top: 4px;
- }
- &.bottom {
- bottom: 4px;
- }
- }
- .item {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- color: @write;
- position: relative;
- .loop {
- position: absolute;
- width: 42px;
- height: 42px;
- border-radius: 50%;
- border: 1px solid @darkgray;
- background-color: fade(@darkgray, 20);
- left: calc(50% - 21px);
- top: calc(50% - 21px);
- }
- &.write {
- color: @write;
- }
- &.green {
- color: @green;
- }
- &.blue {
- color: @darkBlue;
- }
- &.pink {
- color: @pink;
- }
- &.red {
- color: @red;
- }
- &.orange {
- color: @orange;
- }
- &.gray {
- color: @gray;
- }
- div {
- &:first-child {
- font-size: 12px;
- }
- &:last-child {
- font-size: 16px;
- font-family: "Bicubik";
- }
- }
- }
- .item2 {
- flex: 1;
- display: flex;
- width: 20%;
- flex-wrap: wrap;
- .name {
- color: @gray;
- width: 50%;
- text-align: center;
- }
- .num2 {
- width: 50%;
- color: @yellow;
- text-align: left;
- }
- .num1 {
- width: 50%;
- color: @yellow;
- text-align: center;
- position: relative;
- &::after {
- content: "";
- position: absolute;
- width: 1.481vh;
- height: 0.556vh;
- background-color: @yellow;
- left: 1.204vh;
- top: 0.741vh;
- }
- }
- .num3 {
- width: 50%;
- color: @yellow;
- text-align: left;
- }
- }
- }
- .panel-box {
- margin-top: 8px;
- flex-grow: 1;
- & > div {
- margin: 4px 0;
- }
- .panel-title {
- width: 100%;
- height: @titleHeight;
- line-height: @titleHeight;
- background-color: fade(@darkgray, 40%);
- .panel-title-name {
- font-size: 12px;
- color: @green;
- display: flex;
- align-items: center;
- padding: 0 16px;
- i {
- margin-right: 8px;
- }
- .sub-title-item {
- display: flex;
- flex: 1;
- .sub-title {
- flex: 0 0 auto;
- color: @gray;
- font-size: 12px;
- margin: 0 8px 0 12px;
- }
- .sub-count {
- flex: 1 0 auto;
- font-size: 14px;
- font-family: "Bicubik";
- font-weight: 500;
- &.write {
- color: @write;
- }
- &.green {
- color: @green;
- }
- &.blue {
- color: @darkBlue;
- }
- &.pink {
- color: @pink;
- }
- &.red {
- color: @red;
- }
- &.orange {
- color: @orange;
- }
- &.gray {
- color: @gray;
- }
- }
- }
- }
- }
- .panel-body {
- height: calc(100% - 7.407vh);
- padding: 0;
- // margin: 4px 0;
- width: 100%;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: space-between;
- justify-content: flex-start;
- .blank {
- margin-right: 3px;
- flex: 1 0 40px;
- }
- .card {
- margin-right: 3px;
- margin-top: 2px;
- flex: 1 0 40px;
- }
- .card {
- border-radius: 4px;
- text-align: center;
- border: 1px solid;
- font-size: 12px;
- height: 20px;
- line-height: 20px;
- &.write {
- color: @black;
- border-color: @write;
- background-color: @write;
- }
- &.green {
- color: @green;
- border-color: @green;
- }
- &.blue {
- color: @darkBlue;
- border-color: @darkBlue;
- }
- &.pink {
- color: @pink;
- border-color: @pink;
- }
- &.red {
- color: @write;
- border-color: @red;
- background-color: @red;
- }
- &.orange {
- color: @orange;
- border-color: @orange;
- }
- &.gray {
- color: @write;
- border-color: @darkgray;
- background-color: @darkgray;
- }
- }
- }
- }
- }
- </style>
|