feat: 提交首页
This commit is contained in:
74
pages/tabbar/components/grid/index.vue
Normal file
74
pages/tabbar/components/grid/index.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<view class="grid" :style="{'grid-template-columns': `repeat(${col}, 1fr)`}">
|
||||
<view class="item" v-for="(item,index) in list" :key="index">
|
||||
<image v-if="item.showMark" src="/static/aidex/images/history-icon.png" mode="" class="rightMark"></image>
|
||||
<view>
|
||||
<image :src="item.image" mode="" :style="{height:imgHeight,width:imgWidth}"></image>
|
||||
</view>
|
||||
<view class="num">
|
||||
{{item.value}}
|
||||
</view>
|
||||
<view class="label">
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
col: {
|
||||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
imgHeight: {
|
||||
type: String,
|
||||
default: '40rpx'
|
||||
},
|
||||
imgWidth: {
|
||||
type: String,
|
||||
default: '40rpx'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 22rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
margin-top: 26rpx;
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #F4F8F7;
|
||||
padding: 24rpx 0;
|
||||
border-radius: 10rpx;
|
||||
position: relative;
|
||||
.num {
|
||||
font-size: 36rpx;
|
||||
color: #5A5A5A;
|
||||
}
|
||||
.label {
|
||||
font-size: 24rpx;
|
||||
color: #5A5A5A;
|
||||
}
|
||||
.rightMark {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
86
pages/tabbar/components/topology/ceshiT.vue
Normal file
86
pages/tabbar/components/topology/ceshiT.vue
Normal file
File diff suppressed because one or more lines are too long
@ -17,7 +17,7 @@
|
||||
<view class="icon device" />
|
||||
<view class="title"> {{ this.$t("homePage.home.device") }} </view>
|
||||
</view>
|
||||
<view class="box" @click="changeMenu('earnings')">
|
||||
<view class="box" @click="changeMenu('earningSelect')">
|
||||
<view class="icon earning" />
|
||||
<view class="title"> {{ this.$t("homePage.home.earning") }} </view>
|
||||
</view>
|
||||
@ -51,6 +51,10 @@
|
||||
<standard v-else ref="tuopu" />
|
||||
|
||||
</view>
|
||||
<view class="box">
|
||||
<Section title="测试" />
|
||||
<ceshi-t />
|
||||
</view>
|
||||
|
||||
<view v-if="topologyType === 9" class="box">
|
||||
<Section :title="$t('homePage.home.deviceMonitor')" />
|
||||
@ -87,12 +91,23 @@
|
||||
<zzhbStationData v-else-if="topologyType === 6" />
|
||||
<commonStationData v-else />
|
||||
</view>
|
||||
|
||||
<view class="box">
|
||||
<Section title="光伏KPI" />
|
||||
<view class="">
|
||||
<my-grid imgHeight="40rpx" imgWidth="40rpx" :list="lightArr" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="box" v-if="topologyType !== 9">
|
||||
<Section :title="$t('homePage.home.environmentalData')" />
|
||||
<environmentalControlPosition v-if="rightCenter === 'dispositionRightCenter'" />
|
||||
<environmentalControl v-else />
|
||||
</view>
|
||||
<view class="box">
|
||||
<Section title="社会贡献" />
|
||||
<view class="">
|
||||
<my-grid :col="3" imgHeight="72rpx" imgWidth="82rpx" :list="society" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -101,10 +116,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import myGrid from './components/grid/index.vue'
|
||||
import stationDropdow from '@/components/station-dropdow/index'
|
||||
import Section from "@/components/section/index";
|
||||
import charts from "@/components/charts/index";
|
||||
import cixi from './components/topology/cixi'
|
||||
import ceshiT from './components/topology/ceshiT.vue'
|
||||
import weishanhu from './components/topology/weishanhu.vue'
|
||||
import sanmenxia from './components/topology/sanmenxia.vue'
|
||||
import lingchao from './components/topology/lingchao.vue'
|
||||
@ -130,6 +147,8 @@
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ceshiT,
|
||||
myGrid,
|
||||
stationDropdow,
|
||||
Section,
|
||||
environmentalControlPosition,
|
||||
@ -168,7 +187,46 @@
|
||||
messageList: [],
|
||||
timer: null,
|
||||
tuopuTimer: null,
|
||||
rightCenter: null
|
||||
rightCenter: null,
|
||||
society: [{
|
||||
label: '充放电数据',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll01.png'),
|
||||
},
|
||||
{
|
||||
label: 'CO2减排(吨)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll02.png'),
|
||||
},
|
||||
{
|
||||
label: '等效植树(万棵)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll03.png'),
|
||||
},
|
||||
],
|
||||
lightArr: [{
|
||||
label: '装机总容量(kWh)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll05.png'),
|
||||
},
|
||||
{
|
||||
label: '当前功率(kW)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll06.png'),
|
||||
},
|
||||
{
|
||||
label: '日发电量(kWh)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll07.png'),
|
||||
showMark: true
|
||||
},
|
||||
{
|
||||
label: '总发电量(MWh)',
|
||||
value: '85.00',
|
||||
image: require('@/static/aidex/images/ll07.png'),
|
||||
showMark: true
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -274,8 +332,8 @@
|
||||
const {
|
||||
data
|
||||
} = await this.$u.api.homePageData.GetHomePageComponents(this.stationId)
|
||||
if(data && data.length > 0){
|
||||
this.rightCenter = data[0]?.rightCenter
|
||||
if (data && data.length > 0) {
|
||||
this.rightCenter = data[0]?.rightCenter
|
||||
}
|
||||
},
|
||||
openTimer() {
|
||||
|
||||
Reference in New Issue
Block a user