|
@@ -24,19 +24,13 @@
|
|
|
<div class="panel-item-left">
|
|
|
<div class="panel-item-li">
|
|
|
<span>{{ data.name }}</span>
|
|
|
- <span
|
|
|
- class="svg-icon svg-icon-sm"
|
|
|
- :class="'svg-icon-' + data.color"
|
|
|
- >
|
|
|
+ <span class="svg-icon svg-icon-sm" :class="'svg-icon-' + data.color">
|
|
|
<SvgIcon :svgid="data.nameIcon"></SvgIcon>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="panel-item-li">
|
|
|
<span>{{ data.num }}</span>
|
|
|
- <span
|
|
|
- class="svg-icon svg-icon-sm"
|
|
|
- :class="'svg-icon-' + data.color"
|
|
|
- >
|
|
|
+ <span class="svg-icon svg-icon-sm" :class="'svg-icon-' + data.color">
|
|
|
<SvgIcon :svgid="data.numIcon"></SvgIcon>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -61,60 +55,47 @@
|
|
|
<div class="panel-title-name">
|
|
|
<i class="fa fa-send"></i>
|
|
|
<span>某某某风电场</span>
|
|
|
- <div
|
|
|
- class="sub-title-item"
|
|
|
- v-for="(data, index) of table.subTitleDatas"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <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">
|
|
|
- <table>
|
|
|
- <tbody>
|
|
|
- <tr v-for="(row, i) of table.groupDatas" :key="i">
|
|
|
- <td v-for="(col, j) of row" :key="j">
|
|
|
- <div class="card" :class="col.color">
|
|
|
- <div class="card-panel">
|
|
|
- <div class="card-left">
|
|
|
- <div class="tag">{{ col.tag }}</div>
|
|
|
- <div class="icon">
|
|
|
- <span
|
|
|
- class="svg-icon svg-icon-sm"
|
|
|
- :class="
|
|
|
- col.color == 'write'
|
|
|
- ? 'svg-icon-black'
|
|
|
- : col.color == 'gray'
|
|
|
- ? 'svg-icon-gray'
|
|
|
- : 'svg-icon-write'
|
|
|
- "
|
|
|
- >
|
|
|
- <SvgIcon :svgid="col.icon"></SvgIcon>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="card-right">
|
|
|
- <div class="num">
|
|
|
- <i class="fa fa-user"></i>
|
|
|
- <span>{{ col.num1 }}</span>
|
|
|
- </div>
|
|
|
- <div class="num">
|
|
|
- <i class="fa fa-user"></i>
|
|
|
- <span>{{ col.num2 }}</span>
|
|
|
- </div>
|
|
|
- <div class="num">
|
|
|
- <i class="fa fa-user"></i>
|
|
|
- <span>{{ col.num3 }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <div class="card" v-for="(col, j) of table.datas" :key="j" :class="col.color">
|
|
|
+ <div class="card-panel">
|
|
|
+ <div class="card-left">
|
|
|
+ <div class="tag">{{ col.tag }}</div>
|
|
|
+ <div class="icon">
|
|
|
+ <span class="svg-icon svg-icon-sm" :class="col.color == 'black' ? 'svg-icon-black' : col.color == 'gray' ? 'svg-icon-gray' : 'svg-icon-write'">
|
|
|
+ <SvgIcon :svgid="col.icon"></SvgIcon>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="card-right">
|
|
|
+ <div class="num">
|
|
|
+ <i class="svg-icon svg-icon-sm" :class="'svg-icon-' + col.color">
|
|
|
+ <SvgIcon svgid="svg-A"></SvgIcon>
|
|
|
+ </i>
|
|
|
+ <span>{{ col.num1 }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="num">
|
|
|
+ <i class="svg-icon svg-icon-sm" :class="'svg-icon-' + col.color">
|
|
|
+ <SvgIcon svgid="svg-W"></SvgIcon>
|
|
|
+ </i>
|
|
|
+ <span>{{ col.num2 }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="num">
|
|
|
+ <i class="svg-icon svg-icon-sm" :class="'svg-icon-' + col.color">
|
|
|
+ <SvgIcon svgid="svg-V"></SvgIcon>
|
|
|
+ </i>
|
|
|
+ <span>{{ col.num3 }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 站位用 保证卡片布局最后一行不会有问题 -->
|
|
|
+ <i class="blank" v-for="i in table.datas.length" :key="i"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -314,31 +295,12 @@ export default {
|
|
|
color: "blue",
|
|
|
},
|
|
|
],
|
|
|
- groupDatas: [],
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
// 函数
|
|
|
- methods: {
|
|
|
- createGroupDatas: function (table) {
|
|
|
- table.groupDatas = [];
|
|
|
- let tempDatas = [];
|
|
|
- table.datas.forEach((data, index) => {
|
|
|
- if (index % table.col == 0) {
|
|
|
- if (tempDatas.length > 0) {
|
|
|
- table.groupDatas.push(util.copy(tempDatas));
|
|
|
- tempDatas = [];
|
|
|
- }
|
|
|
- }
|
|
|
- tempDatas.push(util.copy(data));
|
|
|
- });
|
|
|
- if (tempDatas.length > 0) {
|
|
|
- table.groupDatas.push(util.copy(tempDatas));
|
|
|
- tempDatas = [];
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
+ methods: {},
|
|
|
// 生命周期钩子
|
|
|
beforeCreate() {
|
|
|
// 创建前
|
|
@@ -361,14 +323,13 @@ export default {
|
|
|
tempData[i].color = "red";
|
|
|
}
|
|
|
if (i == 43) {
|
|
|
- tempData[i].color = "write";
|
|
|
+ tempData[i].color = "black";
|
|
|
}
|
|
|
if (i == 44) {
|
|
|
tempData[i].color = "gray";
|
|
|
}
|
|
|
}
|
|
|
this.tables[0].datas = util.copy(tempData);
|
|
|
- this.createGroupDatas(this.tables[0]);
|
|
|
for (let i = 0; i < 5; i++) {
|
|
|
this.tables.push(util.copy(this.tables[0]));
|
|
|
}
|
|
@@ -459,7 +420,7 @@ export default {
|
|
|
border-bottom: 0.093vh solid fade(@darkgray, 40%);
|
|
|
line-height: @panelHeight / 2;
|
|
|
padding-right: 1.111vh;
|
|
|
- font-size: @fontsize-s;
|
|
|
+ font-size: @fontsize;
|
|
|
}
|
|
|
|
|
|
.panel-item-gf-down {
|
|
@@ -467,7 +428,7 @@ export default {
|
|
|
line-height: @panelHeight / 2;
|
|
|
padding-right: 1.111vh;
|
|
|
font-weight: 600;
|
|
|
- font-size: @fontsize-s;
|
|
|
+ font-size: @fontsize;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -713,293 +674,308 @@ export default {
|
|
|
background-color: fade(@darkgray, 20%);
|
|
|
padding: 0.741vh;
|
|
|
margin-bottom: 1.481vh;
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- table {
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- .card {
|
|
|
- border: 0.093vh solid;
|
|
|
+ .blank {
|
|
|
+ margin-right: 4px;
|
|
|
+ flex: 1 0 125px;
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- display: flex;
|
|
|
- flex-grow: row;
|
|
|
+ .card {
|
|
|
+ margin-right: 4px;
|
|
|
+ margin-top: 4px;
|
|
|
+ flex: 1 0 125px;
|
|
|
+ }
|
|
|
|
|
|
- .card-left {
|
|
|
- width: 40%;
|
|
|
- border-right: 0.093vh dotted;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
+ .card {
|
|
|
+ border: 1px solid;
|
|
|
|
|
|
- .tag {
|
|
|
- color: @write;
|
|
|
- font-size: @fontsize-s;
|
|
|
- width: 100%;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ display: flex;
|
|
|
+ flex-grow: row;
|
|
|
|
|
|
- .icon {
|
|
|
- flex-grow: 1;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ .card-left {
|
|
|
+ width: 40%;
|
|
|
+ border-right: 0.093vh dotted;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
|
|
|
- i {
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ color: @write;
|
|
|
+ font-size: @fontsize-s;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- width: 60%;
|
|
|
+ .icon {
|
|
|
+ flex-grow: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
|
|
|
- .num {
|
|
|
- width: 100%;
|
|
|
+ i {
|
|
|
font-size: 14px;
|
|
|
- text-align: left;
|
|
|
- padding-right: 0.278vh;
|
|
|
-
|
|
|
- i {
|
|
|
- margin: 0 0.37vh;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- height: 0.926vh;
|
|
|
- padding: 0.093vh 0.185vh;
|
|
|
- position: relative;
|
|
|
- border-top: 0.093vh solid;
|
|
|
- background-color: transparent;
|
|
|
-
|
|
|
- .percent {
|
|
|
- height: 0.648vh;
|
|
|
- background-color: @green;
|
|
|
- position: absolute;
|
|
|
- left: 0.185vh;
|
|
|
- top: 0.093vh;
|
|
|
+ .card-right {
|
|
|
+ width: 60%;
|
|
|
+
|
|
|
+ .num {
|
|
|
+ width: 100%;
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: left;
|
|
|
+ padding-right: 0.278vh;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
+
|
|
|
+ i {
|
|
|
+ margin: 0 0.37vh;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- &.blue {
|
|
|
- border-color: @darkBlue;
|
|
|
- background-color: fade(@darkBlue, 30%);
|
|
|
+ .card-percent {
|
|
|
+ height: 0.926vh;
|
|
|
+ padding: 0.093vh 0.185vh;
|
|
|
+ position: relative;
|
|
|
+ border-top: 1px solid;
|
|
|
+ background-color: transparent;
|
|
|
+
|
|
|
+ .percent {
|
|
|
+ height: 0.648vh;
|
|
|
+ background-color: @green;
|
|
|
+ position: absolute;
|
|
|
+ left: 0.185vh;
|
|
|
+ top: 0.093vh;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- .card-left {
|
|
|
- border-color: @darkBlue;
|
|
|
+ &.blue {
|
|
|
+ border-color: @darkBlue;
|
|
|
+ background-color: fade(@darkBlue, 30%);
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @darkBlue;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ .card-left {
|
|
|
+ border-color: @darkBlue;
|
|
|
|
|
|
- .icon {
|
|
|
- svg {
|
|
|
- use {
|
|
|
- fill: @write;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @darkBlue;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @darkBlue;
|
|
|
+ .icon {
|
|
|
+ svg {
|
|
|
+ use {
|
|
|
+ fill: @write;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @darkBlue;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @darkBlue;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.pink {
|
|
|
- border-color: @pink;
|
|
|
- background-color: fade(@pink, 30%);
|
|
|
+ .card-percent {
|
|
|
+ border-color: @darkBlue;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- .card-left {
|
|
|
- border-color: @pink;
|
|
|
+ &.pink {
|
|
|
+ border-color: @pink;
|
|
|
+ background-color: fade(@pink, 30%);
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @pink;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ .card-left {
|
|
|
+ border-color: @pink;
|
|
|
|
|
|
- .icon {
|
|
|
- svg {
|
|
|
- use {
|
|
|
- fill: @write;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @pink;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @pink;
|
|
|
+ .icon {
|
|
|
+ svg {
|
|
|
+ use {
|
|
|
+ fill: @write;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @pink;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @pink;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.orange {
|
|
|
- border-color: @orange;
|
|
|
- background-color: fade(@orange, 30%);
|
|
|
+ .card-percent {
|
|
|
+ border-color: @pink;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- .card-left {
|
|
|
- border-color: @orange;
|
|
|
+ &.orange {
|
|
|
+ border-color: @orange;
|
|
|
+ background-color: fade(@orange, 30%);
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @orange;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ .card-left {
|
|
|
+ border-color: @orange;
|
|
|
|
|
|
- .icon {
|
|
|
- use {
|
|
|
- fill: @write;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @orange;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @orange;
|
|
|
+ .icon {
|
|
|
+ use {
|
|
|
+ fill: @write;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @orange;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @orange;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.green {
|
|
|
- border-color: @green;
|
|
|
- background-color: fade(@green, 30%);
|
|
|
+ .card-percent {
|
|
|
+ border-color: @orange;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- .card-left {
|
|
|
- border-color: @green;
|
|
|
+ &.green {
|
|
|
+ border-color: @green;
|
|
|
+ background-color: fade(@green, 30%);
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @green;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ .card-left {
|
|
|
+ border-color: @green;
|
|
|
|
|
|
- .icon {
|
|
|
- use {
|
|
|
- fill: @write;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @green;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @green;
|
|
|
+ .icon {
|
|
|
+ use {
|
|
|
+ fill: @write;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @green;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @green;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.gray {
|
|
|
- border-color: @darkgray;
|
|
|
- background-color: fade(@darkgray, 30%);
|
|
|
+ .card-percent {
|
|
|
+ border-color: @green;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- .card-left {
|
|
|
- border-color: @darkgray;
|
|
|
+ &.gray {
|
|
|
+ border-color: @darkgray;
|
|
|
+ background-color: fade(@darkgray, 30%);
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @darkgray;
|
|
|
- }
|
|
|
+ .card-panel {
|
|
|
+ .card-left {
|
|
|
+ border-color: @darkgray;
|
|
|
|
|
|
- .icon {
|
|
|
- use {
|
|
|
- fill: @black;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @darkgray;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @gray;
|
|
|
+ .icon {
|
|
|
+ use {
|
|
|
+ fill: @black;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @darkgray;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @gray;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.red {
|
|
|
- border-color: @red;
|
|
|
+ .card-percent {
|
|
|
+ border-color: @darkgray;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- background-color: @red;
|
|
|
+ &.red {
|
|
|
+ border-color: @red;
|
|
|
|
|
|
- .card-left {
|
|
|
- border-color: @darkRed;
|
|
|
+ .card-panel {
|
|
|
+ background-color: @red;
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @darkRed;
|
|
|
- }
|
|
|
+ .card-left {
|
|
|
+ border-color: @darkRed;
|
|
|
|
|
|
- .icon {
|
|
|
- use {
|
|
|
- fill: @write;
|
|
|
- }
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @darkRed;
|
|
|
}
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @write;
|
|
|
+ .icon {
|
|
|
+ use {
|
|
|
+ fill: @write;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .card-percent {
|
|
|
- border-color: @red;
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @write;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- &.write {
|
|
|
- border-color: @write;
|
|
|
+ .card-percent {
|
|
|
+ border-color: @red;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .card-panel {
|
|
|
- background-color: @write;
|
|
|
+ &.black {
|
|
|
+ border-color: @write;
|
|
|
|
|
|
- .card-left {
|
|
|
- border-color: @black;
|
|
|
+ .card-panel {
|
|
|
+ background-color: @write;
|
|
|
|
|
|
- .tag {
|
|
|
- background-color: @darkgray;
|
|
|
- }
|
|
|
+ .card-left {
|
|
|
+ border-color: @black;
|
|
|
|
|
|
- .icon {
|
|
|
- .svg-icon {
|
|
|
- svg {
|
|
|
- use {
|
|
|
- fill: @black;
|
|
|
- }
|
|
|
+ .tag {
|
|
|
+ background-color: @darkgray;
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ .svg-icon {
|
|
|
+ svg {
|
|
|
+ use {
|
|
|
+ fill: @black;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .card-right {
|
|
|
- .num {
|
|
|
- color: @black;
|
|
|
- }
|
|
|
+ .card-right {
|
|
|
+ .num {
|
|
|
+ color: @black;
|
|
|
}
|
|
|
}
|
|
|
}
|