feat: 提交首页
This commit is contained in:
@ -112,7 +112,8 @@
|
||||
</u-popup>
|
||||
</view>
|
||||
<view class="subsection-alarm">
|
||||
<u-subsection :list="alarmTypeList" :current="currentType" :animation="true" @change="sectionChange" :active-color="'#009458'">
|
||||
<u-subsection :list="alarmTypeList" :current="currentType" :animation="true" @change="sectionChange"
|
||||
:active-color="'#009458'">
|
||||
</u-subsection>
|
||||
</view>
|
||||
|
||||
@ -227,7 +228,7 @@
|
||||
},
|
||||
language: {
|
||||
immediate: true,
|
||||
deep:true,
|
||||
deep: true,
|
||||
handler(val) {
|
||||
if (this.language === 'zh_CN') {
|
||||
this.alarmTypeList = [{
|
||||
@ -262,8 +263,8 @@
|
||||
},
|
||||
mounted() {},
|
||||
computed: {
|
||||
language(){
|
||||
return this.vuex_language
|
||||
language() {
|
||||
return this.vuex_language
|
||||
},
|
||||
currentStation() {
|
||||
return this.vuex_currentStation;
|
||||
|
||||
@ -23,7 +23,6 @@
|
||||
<view v-else style="height: 100%;">
|
||||
<u-empty :text="$t('homePage.device.noData')" mode="list"></u-empty>
|
||||
</view>
|
||||
|
||||
</template >
|
||||
|
||||
</view>
|
||||
|
||||
@ -66,25 +66,26 @@
|
||||
},
|
||||
toDetail(item) {
|
||||
let type = ""
|
||||
if (item.deviceType.includes("pcs")) {
|
||||
if (item.deviceType?.includes("pcs")) {
|
||||
type = "pcs";
|
||||
} else if (item.deviceType.includes("stack") ) {
|
||||
} else if (item.deviceType?.includes("stack") ) {
|
||||
type = "cluster";
|
||||
} else if (item.deviceType.includes("bms") && this.stationId === 349 ) {
|
||||
} else if (item.deviceType?.includes("bms") && this.stationId === 349 ) {
|
||||
type = "stack";
|
||||
} else if (item.deviceType.includes("pack")) {
|
||||
} else if (item.deviceType?.includes("pack")) {
|
||||
type = "pack";
|
||||
} else if (item.deviceType.includes("air_condition")) {
|
||||
} else if (item.deviceType?.includes("air_condition")) {
|
||||
type = "air";
|
||||
} else if (item.deviceType.includes("ele_meter") ) {
|
||||
} else if (item.deviceType?.includes("ele_meter") ) {
|
||||
type = "ammeter";
|
||||
} else if (item.deviceType.includes("emu" )) {
|
||||
} else if (item.deviceType?.includes("emu" )) {
|
||||
type = "emu";
|
||||
} else if (item.deviceType.includes("storage_fire") ) {
|
||||
} else if (item.deviceType?.includes("storage_fire") ) {
|
||||
type = "storage";
|
||||
} else if (item.deviceType.includes("basic") ) {
|
||||
} else if (item.deviceType?.includes("basic") ) {
|
||||
type = "anything"
|
||||
}
|
||||
console.log(type)
|
||||
if (type) {
|
||||
uni.setStorage({
|
||||
key: 'deviceName', //本地缓存中的指定的 key
|
||||
|
||||
107
pages/home-page/earningSelect/index.vue
Normal file
107
pages/home-page/earningSelect/index.vue
Normal file
@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<view class="p_container">
|
||||
<u-navbar :is-back="true" :background="background" :border-bottom="false" :custom-back="toback">
|
||||
<view class="slot-wrap">
|
||||
<stationDropdow disabled style="width: 100%" ref="dropdow" />
|
||||
</view>
|
||||
</u-navbar>
|
||||
<zero-loading v-if="loading"></zero-loading>
|
||||
|
||||
<view v-else style="height: calc(100% - 100rpx);">
|
||||
<view class="search">
|
||||
<luyj-tree-search>
|
||||
</luyj-tree-search>
|
||||
</view>
|
||||
<view class="p_content">
|
||||
<view class="selectContent">
|
||||
<view class="p_box selectItem" v-for="(item,index) in labeArr" :key="index" @click="toUrl(item)">
|
||||
<view >
|
||||
<image :src="item.icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
{{ item.label}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import stationDropdow from "@/components/station-dropdow/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
stationDropdow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
background: {
|
||||
backgroundColor: "#0ea17e",
|
||||
},
|
||||
labeArr: [
|
||||
{
|
||||
label: '储能收益报表',
|
||||
icon: require('@/static/aidex/images/earningSelect.png'),
|
||||
url: '/pages/home-page/earnings/index'
|
||||
},
|
||||
{
|
||||
label: '光伏收益报表',
|
||||
icon: require('@/static/aidex/images/earningSelect.png'),
|
||||
url: '/pages/home-page/lights/index'
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.vuex_currentStation;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toUrl(val) {
|
||||
uni.navigateTo({
|
||||
url:val.url
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.slot-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* 如果您想让slot内容占满整个导航栏的宽度 */
|
||||
flex: 1;
|
||||
|
||||
/* 如果您想让slot内容与导航栏左右有空隙 */
|
||||
/* padding: 0 30rpx; */
|
||||
/deep/ .u-input__input {
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
.selectContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25rpx;
|
||||
margin-top: 40rpx;
|
||||
.selectItem {
|
||||
padding: 30rpx 33rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
color: #666666;
|
||||
border-radius: 10rpx;
|
||||
.selectIcon {
|
||||
height: 48rpx;
|
||||
width: 48rpx;
|
||||
margin-top: 10rpx;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
82
pages/home-page/lights/components/runChart/index.vue
Normal file
82
pages/home-page/lights/components/runChart/index.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chartData: {},
|
||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||
opts: {
|
||||
color: ["#0DA17D"],
|
||||
padding: [30, 15, 100, 25],
|
||||
enableScroll: false,
|
||||
fonSize: 12,
|
||||
fontColor: '#8C8C8C',
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
xAxis: {
|
||||
disableGrid: true,
|
||||
rotateLabel: true,
|
||||
rotateAngle: 30,
|
||||
|
||||
titleOffsetY: 20,
|
||||
titleOffsetX: 5,
|
||||
marginTop: 5
|
||||
},
|
||||
yAxis: {
|
||||
data: [{
|
||||
min: 0
|
||||
}],
|
||||
|
||||
showTitle: false
|
||||
},
|
||||
extra: {
|
||||
column: {
|
||||
width: '10',
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log("runChart onReady");
|
||||
this.getServerData();
|
||||
},
|
||||
methods: {
|
||||
getServerData() {
|
||||
//模拟从服务器获取数据时的延时
|
||||
setTimeout(() => {
|
||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
||||
let res = {
|
||||
categories: ["2018-10-17", "2018-10-17", "2018-10-17", "2018-10-17", "2018-10-17",
|
||||
"2018-10-17"
|
||||
],
|
||||
series: [
|
||||
|
||||
{
|
||||
|
||||
textColor: "#FFFFFF",
|
||||
data: [18, 27, 21, 24, 6, 28]
|
||||
}
|
||||
]
|
||||
};
|
||||
this.chartData = JSON.parse(JSON.stringify(res));
|
||||
|
||||
}, 500);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
747
pages/home-page/lights/index.vue
Normal file
747
pages/home-page/lights/index.vue
Normal file
@ -0,0 +1,747 @@
|
||||
<template>
|
||||
<view>
|
||||
<zero-loading v-if="loading"></zero-loading>
|
||||
<view v-else class="earnings-warp">
|
||||
<view class="head-bg">
|
||||
<view class="back" @click="toback">
|
||||
<u-icon name="nav-back" color="#009C7F" size="44"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="report-title">
|
||||
<view class="value">
|
||||
{{ totalData.stationName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-select" @click="changeMonth">
|
||||
<image
|
||||
src="/static/aidex/images/time.png"
|
||||
style="width: 120rpx; height: 108rpx"
|
||||
>
|
||||
</image>
|
||||
<view class="month">
|
||||
{{ month }}
|
||||
</view>
|
||||
<view class="year">
|
||||
{{ year }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="power-generation">
|
||||
<Section :title="$t('homePage.earning.changeDischargePro')" />
|
||||
<view class="power-generation-detail">
|
||||
<view class="value-box">
|
||||
<view class="icon zjry"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.capacity") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.capacity | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon byzc"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalCharge") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalChargeElec | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon byzf"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalDischarge") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalDischargeElec | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon yxtzhl"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthEff") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.monConvRate | isNull }}
|
||||
</view>
|
||||
<view class="unit"> % </view>
|
||||
</view>
|
||||
<view class="value-box">
|
||||
<view class="icon ljcd"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.chargeVol") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalCharge | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
<view class="value-box">
|
||||
<view class="icon ljcf"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.dischargeVol") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalDischarge | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
<view class="value-box">
|
||||
<view class="icon zxtzhl"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.totalEff") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalConvRate | isNull }}
|
||||
</view>
|
||||
<view class="unit"> % </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-power">
|
||||
<Section title="项目月发电量" />
|
||||
<view class="power-generation-detail">
|
||||
<run-chart />
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-power">
|
||||
<Section
|
||||
:title="$t('homePage.earning.projectRevenue')"
|
||||
style="margin-bottom: 25rpx"
|
||||
/>
|
||||
<view class="value-box">
|
||||
<view class="left">
|
||||
<view class="power-detail">
|
||||
<view class="left-value">
|
||||
<view class="value">
|
||||
{{ totalData.totalChargePrice | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalChargePrice") }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-value t-fdzl"> </view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="power-detail"
|
||||
style="margin: 0 !important; padding-bottom: 0 !important"
|
||||
>
|
||||
<view class="left-value">
|
||||
<view class="value">
|
||||
{{ totalData.totalDisChargePrice | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalDisChargePrice") }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-value t-swdl"> </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="value-box">
|
||||
<view class="value">
|
||||
{{ totalData.income | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.earnings") }}
|
||||
</view>
|
||||
<view class="bg"> </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-detail">
|
||||
<Section
|
||||
:title="$t('homePage.earning.earningsDetail')"
|
||||
style="margin-bottom: 30rpx"
|
||||
/>
|
||||
|
||||
<view class="power-report" v-if="chargeArr.length">
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.charge") }}
|
||||
</view>
|
||||
<view v-for="(item, index) in chargeArr" :key="index">
|
||||
<view class="value-box">
|
||||
<view class="checked">
|
||||
<view class="name">
|
||||
{{ item.rateType | isNull }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="value">
|
||||
<text class="name">{{ $t("homePage.earning.ele") }}</text>
|
||||
<text class="num">{{ item.elec | isNull }}</text>
|
||||
</view>
|
||||
|
||||
<view class="value">
|
||||
<text class="name">{{ $t("homePage.earning.expend") }}:</text>
|
||||
<text class="num">{{ item.digital | isNull }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="power-report" v-else>
|
||||
<view style="font-size: 24rpx; width: 100%; text-align: center">
|
||||
{{ $t("homePage.earning.noChargeData") }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="power-report" v-if="dischargeArr.length">
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.disCharge") }}
|
||||
</view>
|
||||
<view v-for="(item, index) in dischargeArr" :key="index">
|
||||
<view class="value-box">
|
||||
<view class="checked">
|
||||
<view class="name">
|
||||
{{ item.rateType | isNull }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="value">
|
||||
<text class="name">{{ $t("homePage.earning.ele") }}:</text>
|
||||
<text class="num">{{ item.elec | isNull }}</text>
|
||||
</view>
|
||||
<view class="value">
|
||||
<text class="name">{{ $t("homePage.earning.earnings") }}:</text>
|
||||
<text class="num">{{ item.digital | isNull }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="power-report" v-else>
|
||||
<view style="font-size: 24rpx; width: 100%; text-align: center">
|
||||
{{ $t("homePage.earning.noDisChargeData") }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker
|
||||
v-model="TimeShow"
|
||||
mode="time"
|
||||
:params="Timeparams"
|
||||
@confirm="confirmMonth"
|
||||
></u-picker>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Section from "@/components/section/index.vue";
|
||||
import runChart from "./components/runChart/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
Section,
|
||||
runChart,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active1: 0,
|
||||
active2: 1,
|
||||
TimeShow: false,
|
||||
Timeparams: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: false,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false,
|
||||
},
|
||||
year: null,
|
||||
month: null,
|
||||
stationId: null,
|
||||
time: null,
|
||||
totalData: {},
|
||||
chargeArr: [],
|
||||
dischargeArr: [],
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.vuex_currentStation;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentStation: {
|
||||
handler(val) {
|
||||
this.stationId = val.id;
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
var myDate = new Date();
|
||||
var tYear = myDate.getFullYear();
|
||||
|
||||
var tMonth = myDate.getMonth() + 1;
|
||||
if (tMonth.toString().length == 1) {
|
||||
tMonth = "0" + tMonth;
|
||||
}
|
||||
this.year = tYear;
|
||||
this.month = tMonth;
|
||||
this.time = this.year + "-" + this.month + "";
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
toback() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
},
|
||||
async getData() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await this.$u.api.enrnings.GetTotal({
|
||||
stationId: this.stationId,
|
||||
time: this.time,
|
||||
});
|
||||
this.totalData = res.data;
|
||||
|
||||
this.chargeArr = [];
|
||||
this.dischargeArr = [];
|
||||
if (res.data.list.length) {
|
||||
res.data.list.forEach((el) => {
|
||||
if (+el.type === 0) {
|
||||
this.chargeArr.push(el);
|
||||
}
|
||||
if (+el.type === 1) {
|
||||
this.dischargeArr.push(el);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.chargeArr = [];
|
||||
this.dischargeArr = [];
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
changeActive1(val) {
|
||||
this.active1 = val;
|
||||
},
|
||||
changeActive2(val) {
|
||||
this.active2 = val;
|
||||
},
|
||||
changeMonth() {
|
||||
this.TimeShow = true;
|
||||
},
|
||||
confirmMonth(val) {
|
||||
this.time = val.year + "-" + val.month + "";
|
||||
this.year = val.year;
|
||||
this.month = val.month;
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.earnings-warp {
|
||||
// height: calc(120% + 210rpx)!important;
|
||||
height: 100% !important;
|
||||
background-color: #f5f5f5;
|
||||
overflow: auto;
|
||||
|
||||
.cell-box {
|
||||
width: 100%;
|
||||
height: 35rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.title {
|
||||
color: rgba(102, 102, 102, 1) !important;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: rgba(44, 50, 49, 1) !important;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.head-bg {
|
||||
height: 360rpx;
|
||||
background: linear-gradient(45deg, #ffe3c8, #07976e);
|
||||
display: flex;
|
||||
|
||||
.back {
|
||||
padding-top: 100rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.report-title {
|
||||
padding-top: 100rpx;
|
||||
padding-left: 20rpx;
|
||||
width: 464rpx;
|
||||
font-weight: 700;
|
||||
color: rgba(0, 156, 119, 1);
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.time-select {
|
||||
margin-right: 30rpx;
|
||||
margin-left: auto;
|
||||
margin-top: 140rpx;
|
||||
position: relative;
|
||||
width: 120rpx;
|
||||
height: 108rpx;
|
||||
|
||||
image {
|
||||
width: 120rpx;
|
||||
height: 108rpx;
|
||||
}
|
||||
|
||||
.month {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 38rpx;
|
||||
right: 38rpx;
|
||||
padding-top: 10rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.year {
|
||||
position: absolute;
|
||||
bottom: 10rpx;
|
||||
left: 38rpx;
|
||||
right: 38rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.power-generation {
|
||||
height: 760rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: -40rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
.power-generation-detail {
|
||||
width: 100%;
|
||||
|
||||
.value-box {
|
||||
padding: 20rpx;
|
||||
margin-top: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
background: linear-gradient(
|
||||
45deg,
|
||||
rgba(178, 223, 138, 0.2),
|
||||
rgba(0, 156, 119, 0.3)
|
||||
);
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0px 0rpx 10rpx rgba(0, 0, 10, 0.1);
|
||||
}
|
||||
|
||||
.zjry {
|
||||
background-image: url("/static/aidex/images/sy-zjrl.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.byzc {
|
||||
background-image: url("/static/aidex/images/sy-byzc.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.byzf {
|
||||
background-image: url("/static/aidex/images/sy-byzf.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.yxtzhl {
|
||||
background-image: url("/static/aidex/images/sy-yxtzhl.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.ljcd {
|
||||
background-image: url("/static/aidex/images/sy-ljc.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.ljcf {
|
||||
background-image: url("/static/aidex/images/sy-ljf.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.zxtzhl {
|
||||
background-image: url("/static/aidex/images/sy-zxtzhl.png");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: rgba(44, 50, 49, 1);
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-left: auto;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
padding-right: 10rpx;
|
||||
color: rgba(0, 156, 119, 1);
|
||||
}
|
||||
|
||||
.unit {
|
||||
min-width: 36rpx;
|
||||
font-size: 18rpx;
|
||||
color: rgba(102, 102, 102, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.report-detail {
|
||||
padding: 20rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
background-color: #ffffff;
|
||||
margin-top: 30rpx;
|
||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8rpx;
|
||||
|
||||
.value-box {
|
||||
width: 100%;
|
||||
height: 35rpx;
|
||||
display: flex;
|
||||
|
||||
.checked {
|
||||
background-image: url("/static/aidex/images/checked.png");
|
||||
background-size: cover;
|
||||
width: 100rpx;
|
||||
height: 35rpx;
|
||||
margin-bottom: 2rpx;
|
||||
|
||||
.name {
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin-bottom: 5rpx;
|
||||
|
||||
.value {
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
color: #000;
|
||||
|
||||
.name {
|
||||
font-size: 24rpx;
|
||||
color: rgba(102, 102, 102, 1);
|
||||
}
|
||||
|
||||
.num {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 24rpx;
|
||||
color: rgba(44, 50, 49, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.power-report {
|
||||
width: 100%;
|
||||
|
||||
border-top: 1px solid #93d5c5;
|
||||
margin-top: 30rpx;
|
||||
background: linear-gradient(
|
||||
rgba(0, 156, 119, 0.05),
|
||||
rgba(0, 156, 119, 0)
|
||||
);
|
||||
margin-bottom: 34rpx;
|
||||
padding-top: 12rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
|
||||
.title {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.botton {
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.check {
|
||||
background-image: url("/static/aidex/images/check.png");
|
||||
background-size: cover;
|
||||
width: 100rpx;
|
||||
height: 35rpx;
|
||||
|
||||
.name {
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.month-power {
|
||||
height: 500rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 30rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
.value-box {
|
||||
width: 100%;
|
||||
height: 380rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx;
|
||||
padding-top: 0rpx;
|
||||
padding-bottom: 0rpx;
|
||||
padding-right: 10rpx;
|
||||
|
||||
.power-detail {
|
||||
background-color: rgba(254, 131, 15, 0.05);
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
padding: 20rpx;
|
||||
|
||||
.left-value {
|
||||
.value {
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
white-space: nowrap;
|
||||
color: rgba(0, 156, 119, 1);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 24rpx;
|
||||
// white-space: nowrap;
|
||||
color: rgba(44, 50, 49, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.right-value {
|
||||
min-width: 121rpx;
|
||||
height: 119rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.t-fdzl {
|
||||
width: 121rpx;
|
||||
height: 119rpx;
|
||||
background-image: url("/static/aidex/images/total-zfdl.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.t-swdl {
|
||||
width: 97rpx;
|
||||
height: 140rpx;
|
||||
background-image: url("/static/aidex/images/total-swdl.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
padding: 0 20rpx 0 10rpx;
|
||||
|
||||
.value-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(254, 131, 15, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-top: 49rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
color: rgba(0, 156, 119, 1);
|
||||
font-size: 48rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 24rpx;
|
||||
color: rgba(44, 50, 49, 1);
|
||||
}
|
||||
|
||||
.bg {
|
||||
width: 194rpx;
|
||||
height: 188rpx;
|
||||
background-image: url("/static/aidex/images/total-sy.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -189,11 +189,13 @@ export default {
|
||||
// this.$u.vuex("vuex_stationValue", val);
|
||||
if (val === '海外站' || val === 'Overseas Station') {
|
||||
this.$u.http.setConfig({
|
||||
baseUrl: 'https://zetatech.zzkj-cloud.com/api'
|
||||
baseUrl: 'http://1.95.170.86:8002/api',
|
||||
// baseUrl: 'https://zetatech.zzkj-cloud.com/api'
|
||||
});
|
||||
} else if (val === '中国站' || val === 'China Station') {
|
||||
this.$u.http.setConfig({
|
||||
baseUrl: 'https://zzkj-cloud.com/api'
|
||||
baseUrl: 'http://1.95.170.86:8002/api'
|
||||
// baseUrl: 'https://zzkj-cloud.com/api'
|
||||
});
|
||||
}
|
||||
const res = await this.$u.api.GetLanguageConfig('zh')
|
||||
|
||||
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