|
@@ -9,12 +9,21 @@
|
|
|
<view class="navbar">
|
|
|
<view class="title">
|
|
|
能源管理
|
|
|
- <span style="padding-left: 4px;" v-if="companyList.length==1">
|
|
|
- -
|
|
|
- </span>
|
|
|
- <span style="padding-left: 4px;" v-if="companyList.length==1">
|
|
|
- {{companyList[0].name}}
|
|
|
- </span>
|
|
|
+ <template v-if="companyList.length==1">
|
|
|
+ <span style="padding-left: 4px;">-</span>
|
|
|
+ <span style="padding-left: 4px;">{{companyList[0].name}}</span>
|
|
|
+ </template>
|
|
|
+ <template v-else >
|
|
|
+
|
|
|
+ <span style="padding-left: 4px;" v-if="companyList.length>=1&¤t!=0">
|
|
|
+ -
|
|
|
+ </span>
|
|
|
+ <span style="padding-left: 4px;" v-if="companyList.length>=1&¤t!=0">
|
|
|
+
|
|
|
+ {{merchantList1[current].name}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
|
|
@@ -109,7 +118,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="content" v-if="!getHomePageManageReady">
|
|
|
+ <view class="content"
|
|
|
+ style="display: flex;justify-content: center;margin: 40px 0;"
|
|
|
+ v-if="!getHomePageManageshowLoading">
|
|
|
|
|
|
<div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
|
|
|
<i class="uni-icon_toast uni-loading"
|
|
@@ -121,18 +132,18 @@
|
|
|
></i><p class="uni-toast__content"> </p>加载中...</div>
|
|
|
|
|
|
</view>
|
|
|
- <view class="content" v-else-if="getHomePageManageReady&&meterList.length == 0">
|
|
|
+ <view class="content" v-else-if="getHomePageManageshowLoading&&meterList.length == 0">
|
|
|
<u-divider :isnone="true" nonetext="无记录"
|
|
|
border-color="#fff"></u-divider>
|
|
|
</view>
|
|
|
|
|
|
<!-- 图表 -->
|
|
|
- <view class="chart" v-show="getHomePageManageReady">
|
|
|
+ <view class="chart" v-show="getHomePageManageshowLoading">
|
|
|
<view class="u-subsection">
|
|
|
<u-subsection :list="list" :current="homePageManageType" @change="sectionChange"
|
|
|
font-size="24"></u-subsection>
|
|
|
</view>
|
|
|
- <view class="incomeExpenditureClass" >
|
|
|
+ <view class="incomeExpenditureClass" v-show="!companyType" >
|
|
|
<view class="income1">
|
|
|
<view class="income11">
|
|
|
电费支出
|
|
@@ -204,7 +215,8 @@
|
|
|
查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="content" v-if="getHomePageKwhshowLoading">
|
|
|
+ <view class="content" style="display: flex;justify-content: center;margin: 40px 0;"
|
|
|
+ v-if="getHomePageKwhshowLoading">
|
|
|
|
|
|
<div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
|
|
|
<i class="uni-icon_toast uni-loading"
|
|
@@ -504,6 +516,7 @@
|
|
|
|
|
|
},
|
|
|
getHomePageManageReady:false,
|
|
|
+
|
|
|
utabsone:true,
|
|
|
companyType:false,
|
|
|
incomeExpenditureObj:{},
|
|
@@ -809,9 +822,10 @@
|
|
|
},
|
|
|
// 设备数据监测
|
|
|
getHomePageManage(bl) {
|
|
|
-
|
|
|
+ this.getHomePageManageReady=false
|
|
|
if(bl){
|
|
|
- this.getHomePageManageReady=false
|
|
|
+ this.getHomePageManageshowLoading=false
|
|
|
+
|
|
|
}else{
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -825,9 +839,10 @@
|
|
|
companyId: this.companyId,
|
|
|
type: this.list[this.homePageManageType].value
|
|
|
}).then((response) => {
|
|
|
-
|
|
|
+ this.getHomePageManageReady=true
|
|
|
if(bl){
|
|
|
- this.getHomePageManageReady=true
|
|
|
+
|
|
|
+ this.getHomePageManageshowLoading=true
|
|
|
}else{
|
|
|
uni.hideLoading();
|
|
|
}
|
|
@@ -952,8 +967,12 @@
|
|
|
radius:[20, '70%']
|
|
|
},
|
|
|
angleAxis: {
|
|
|
- max: parseInt(thismax+thismax/10)+3 ,
|
|
|
- startAngle: 75
|
|
|
+
|
|
|
+ startAngle: 75,
|
|
|
+ label: {
|
|
|
+ rotate: 45, // 旋转标签,使得重叠的概率降低
|
|
|
+ // margin: 5 // 设置标签与轴线之间的距离,增加空间
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
legend: {
|
|
@@ -970,12 +989,14 @@
|
|
|
},
|
|
|
tooltip: {},
|
|
|
series: [
|
|
|
+
|
|
|
+
|
|
|
{
|
|
|
- name:'园区电量',
|
|
|
+ name:'电损量',
|
|
|
type: 'bar',
|
|
|
data: [
|
|
|
- this.homePageManageObj.parkKwh,
|
|
|
-
|
|
|
+
|
|
|
+ this.homePageManageObj.differenceKwh
|
|
|
],
|
|
|
coordinateSystem: 'polar',
|
|
|
label: {
|
|
@@ -1000,11 +1021,11 @@
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- name:'电损量',
|
|
|
+ name:'园区电量',
|
|
|
type: 'bar',
|
|
|
data: [
|
|
|
-
|
|
|
- this.homePageManageObj.differenceKwh
|
|
|
+ this.homePageManageObj.parkKwh,
|
|
|
+
|
|
|
],
|
|
|
coordinateSystem: 'polar',
|
|
|
label: {
|
|
@@ -1012,7 +1033,7 @@
|
|
|
position: 'middle',
|
|
|
formatter: '{c}度'
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
]
|
|
|
};
|
|
|
console.log(option)
|