|
@@ -151,32 +151,35 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
<a-row>
|
|
|
- <a-col :sm="24" :md="12" :xl="24" :style="{ padding: '12px 0px 0px 0px' }">
|
|
|
+ <a-col :sm="24" :md="12" :xl="24" :style="{ padding: '12px 0px 0px 0px' }">
|
|
|
<div class="tri-colorLight" ref="flexDivGroup">
|
|
|
- <div class="item-title">逆变器信息</div>
|
|
|
- <a-divider style="margin: 8px 0" />
|
|
|
+ <div class="item-title item-title1" style="padding: 16px 0px 0px 0px; font-size: 16px; margin-left: 26px">
|
|
|
+ 逆变器信息
|
|
|
+ </div>
|
|
|
+ <a-divider style="margin: 16px 0" />
|
|
|
<div class="item-content" ref="itemFlexDiv" v-for="(item, index) in invInfo" :key="index" cl>
|
|
|
<div class="item-title">{{ item.fInvertername }}</div>
|
|
|
- <div class="item-title"></div>
|
|
|
- <div>厂家:{{ item.fManufacturername }}</div>
|
|
|
- <div>设备型号:{{ item.fProductmodel }}</div>
|
|
|
- <div>状态:{{ item.state }}</div>
|
|
|
- <div>额定交流功率:{{ item.fRatedoutputpower }} kW</div>
|
|
|
- <div>实时发电功率:{{ item.realGeneratingPower }} kW</div>
|
|
|
- <div>当日发电量:{{ item.powerByDay }} kW·h</div>
|
|
|
- <div>组件峰值功率:{{ item.fComponentpeakpower }} kWp</div>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <div class="item-inv"></div>
|
|
|
+ <div class="item-cc">
|
|
|
+ <div class="item-title"></div>
|
|
|
+ <div>厂家:{{ item.fManufacturername }}</div>
|
|
|
+ <div>设备型号:{{ item.fProductmodel }}</div>
|
|
|
+ <div>状态:{{ item.state }}</div>
|
|
|
+ <div>额定交流功率:{{ item.fRatedoutputpower }} kW</div>
|
|
|
+ <div>实时发电功率:{{ item.realGeneratingPower }} kW</div>
|
|
|
+ <div>当日发电量:{{ item.powerByDay }} kW·h</div>
|
|
|
+ <div>组件峰值功率:{{ item.fComponentpeakpower }} kWp</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<router-link :to="'/equipment/info/detail/' + item.fInverterid">
|
|
|
<!-- <router-link :to="'/system/dict-data/index/' + item.equipmentid"> -->
|
|
|
- <a-button type="success" plain style="margin-top: 10px"
|
|
|
- >查看详情
|
|
|
- </a-button>
|
|
|
+ <a-button type="success" plain style="margin-top: 10px">查看详情 </a-button>
|
|
|
</router-link>
|
|
|
</div>
|
|
|
<!-- 优化布局 -->
|
|
|
- <!-- <div ref="completion" v-for="item in completionNumber" :key="'com' + item" class="completion"></div> -->
|
|
|
+ <div ref="completion" v-for="item in completionNumber" :key="'com' + item" class="completion"></div>
|
|
|
</div>
|
|
|
- <!-- <a-card :loading="loading" :body-style="{ padding: '10px 8px 8px' }" :bordered="false" title="逆变器信息">
|
|
|
- </a-card> -->
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</div>
|
|
@@ -188,12 +191,14 @@ import { httpAction, getAction } from '@/api/manage'
|
|
|
import { pvdata } from '../pvdata'
|
|
|
|
|
|
export default {
|
|
|
- name: 'IndexChart',
|
|
|
+ name: 'stationMonitor',
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
+ description: '电站运行监控',
|
|
|
loading: true,
|
|
|
center: null,
|
|
|
+ completionNumber: 0, // 布局使用参数
|
|
|
elecdetail: {}, // 发电量信息
|
|
|
envirInfo: {}, // 气象信息
|
|
|
invInfo: [], // 逆变器信息
|
|
@@ -210,6 +215,10 @@ export default {
|
|
|
}, 1000)
|
|
|
},
|
|
|
mounted() {
|
|
|
+ // 监听窗口改变设置最后一行布局
|
|
|
+ window.addEventListener('resize', () => {
|
|
|
+ this.WindowOnresize()
|
|
|
+ })
|
|
|
this.$nextTick(() => {
|
|
|
setTimeout(() => {
|
|
|
this.getTest()
|
|
@@ -234,6 +243,10 @@ export default {
|
|
|
|
|
|
this.initRealPowerChart()
|
|
|
this.initPowerChart()
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.WindowOnresize()
|
|
|
+ })
|
|
|
},
|
|
|
initRealPowerChart() {
|
|
|
var _this = this
|
|
@@ -357,6 +370,24 @@ export default {
|
|
|
myChart.resize()
|
|
|
})
|
|
|
},
|
|
|
+ // 设置最后一行布局
|
|
|
+ WindowOnresize() {
|
|
|
+ const equipmentGroupWidth = this.$refs.flexDivGroup.offsetWidth - 10
|
|
|
+ // console.log("整个页面宽度:--->"+equipmentGroupWidth);
|
|
|
+ const itemEquipmentList = this.$refs.itemFlexDiv
|
|
|
+ const itemEquipmentCount = itemEquipmentList.length // 现有item数量
|
|
|
+ // console.log("现有的item的数量:--->"+itemEquipmentCount);
|
|
|
+ const itemEquipmentWidth = itemEquipmentList[0].offsetWidth
|
|
|
+ // console.log("宽度:--->"+itemEquipmentWidth);
|
|
|
+ // const itemEquipmentWidth = itemEquipmentList[0].getBoundingClientRect().width + 6;
|
|
|
+ const rowEquipmentCount = parseInt(equipmentGroupWidth / itemEquipmentWidth) // 每一行有几个item
|
|
|
+ // console.log("每一行有几个item:--->"+rowEquipmentCount);
|
|
|
+ const lastItemLenth = itemEquipmentCount % rowEquipmentCount // 最后一行有几个
|
|
|
+ // console.log(equipmentGroupWidth,itemEquipmentWidth, itemEquipmentCount, rowEquipmentCount, lastItemLenth)
|
|
|
+ // console.log("最后一行有几个item:--->"+lastItemLenth);
|
|
|
+ this.completionNumber = lastItemLenth === 0 ? 0 : rowEquipmentCount - lastItemLenth
|
|
|
+ // console.log("需要补上的空白格子的个数:"+this.completionNumber)
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -495,66 +526,59 @@ export default {
|
|
|
.middlecard {
|
|
|
height: 280px;
|
|
|
}
|
|
|
- // 三色灯
|
|
|
- .tri-colorLight {
|
|
|
+// 三色灯
|
|
|
+.tri-colorLight {
|
|
|
+ display: flex;
|
|
|
+ background: #fff;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ // width: 20%;
|
|
|
+ .item-container {
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .item-content {
|
|
|
+ width: 424px;
|
|
|
+ // border: 2px solid #c3c3c3;
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
+ // padding: 16px 50px 20px;
|
|
|
+ // padding-top: 16px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+ margin: 10px 6px;
|
|
|
+ // box-shadow: 0 2px 10px 2px rgba(59, 78, 128, 0.5) inset;
|
|
|
+ text-align: center;
|
|
|
+ box-sizing: border-box;
|
|
|
display: flex;
|
|
|
- background: #fff;
|
|
|
- justify-content: space-around;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
- // width: 20%;
|
|
|
- .item-container {
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
+ .item-inv {
|
|
|
+ background-image: url(../../../../assets/inv.png);
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 75%;
|
|
|
+ height: 181px;
|
|
|
+ width: 132px;
|
|
|
+ margin: 20px 0px 0px 0px;
|
|
|
+ background-position: 50% 0;
|
|
|
+ float: left;
|
|
|
}
|
|
|
- .item-content {
|
|
|
- width: 254px;
|
|
|
- border: 2px solid #314977;
|
|
|
- color: #63b4ca;
|
|
|
- // padding: 16px 50px 20px;
|
|
|
- padding-top: 16px;
|
|
|
- padding-bottom: 20px;
|
|
|
- margin: 10px 6px;
|
|
|
- box-shadow: 0 2px 10px 2px rgba(59, 78, 128, 0.5) inset;
|
|
|
- text-align: center;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- .item-title {
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- .light-con {
|
|
|
- margin-top: 20px;
|
|
|
- display: flex;
|
|
|
- }
|
|
|
- .item-light {
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- border-radius: 100%;
|
|
|
- margin: 0 15px;
|
|
|
- background: #7c7ea6;
|
|
|
- }
|
|
|
- .green {
|
|
|
- background-color: #0df708;
|
|
|
- box-shadow: 0 0 18px 6px rgba(13, 247, 8, 0.5);
|
|
|
- }
|
|
|
- .yellow {
|
|
|
- background-color: #f8fa12;
|
|
|
- box-shadow: 0 0 18px 6px rgba(248, 250, 18, 0.5);
|
|
|
- }
|
|
|
- .red {
|
|
|
- background-color: #fb0301;
|
|
|
- box-shadow: 0 0 18px 6px rgba(251, 3, 1, 0.5);
|
|
|
- }
|
|
|
+ .item-title {
|
|
|
+ font-size: 18px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
- .item_content_rad {
|
|
|
- border-radius: 18px;
|
|
|
- }
|
|
|
- .completion {
|
|
|
- width: 254px;
|
|
|
- margin: 10px 6px;
|
|
|
+ .item-cc {
|
|
|
+ float: right;
|
|
|
+ text-align: left;
|
|
|
}
|
|
|
}
|
|
|
+ .item_content_rad {
|
|
|
+ border-radius: 18px;
|
|
|
+ }
|
|
|
+ .completion {
|
|
|
+ width: 424px;
|
|
|
+ margin: 10px 6px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|