|
@@ -96,7 +96,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 能源管理 -->
|
|
|
- <view v-show="companyId&&meterList.length" class="statistics statistics-manage">
|
|
|
+ <view v-show="companyId" class="statistics statistics-manage">
|
|
|
<view class="title">
|
|
|
<view class="icon">
|
|
|
<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
|
|
@@ -108,14 +108,58 @@
|
|
|
查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
+ <view class="content" v-if="!getHomePageManageReady">
|
|
|
+
|
|
|
+ <div class="uni-toast" style="display: flex;font-size: 60rpx; color: rgb(192, 196, 204);" >
|
|
|
+ <i class="uni-icon_toast uni-loading"
|
|
|
+ style="
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
+
|
|
|
+ "
|
|
|
+ ></i><p class="uni-toast__content"> </p>加载中...</div>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="content" v-else-if="getHomePageManageReady&&meterList.length == 0">
|
|
|
+ <u-divider :isnone="true" nonetext="无记录"
|
|
|
+ border-color="#fff"></u-divider>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 图表 -->
|
|
|
- <view class="chart">
|
|
|
+ <view class="chart" v-show="getHomePageManageReady">
|
|
|
<view class="u-subsection">
|
|
|
<u-subsection :list="list" :current="homePageManageType" @change="sectionChange"
|
|
|
font-size="24"></u-subsection>
|
|
|
+ </view>
|
|
|
+ <view class="incomeExpenditureClass" v-show="incomeExpenditureObj.id">
|
|
|
+ <view class="income1">
|
|
|
+ <view class="income11">
|
|
|
+ 电费支出
|
|
|
+ </view>
|
|
|
+ <view class="income12">
|
|
|
+ {{incomeExpenditureObj.expenditureFee}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="income1">
|
|
|
+ <view class="income11">
|
|
|
+ 电费收入
|
|
|
+ </view>
|
|
|
+ <view class="income12">
|
|
|
+ {{incomeExpenditureObj.incomeFee}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="income1">
|
|
|
+ <view class="income11">
|
|
|
+ 收支情况
|
|
|
+ </view>
|
|
|
+ <view class="income12" :style="incomeExpenditureObj.differenceFee>=0?'color:red':'color:#52b8aa'">
|
|
|
+ {{incomeExpenditureObj.differenceFee}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="chat-box" id="barEcharts">
|
|
|
+ <view class="chat-box" id="barEcharts" v-show="!companyType">
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -145,7 +189,7 @@
|
|
|
|
|
|
</view>
|
|
|
<!-- 用电量 -->
|
|
|
- <view class="statistics-e statistics" v-if="!companyId&&kWhList.length != 0">
|
|
|
+ <view class="statistics-e statistics" v-if="!companyId">
|
|
|
<view class="title">
|
|
|
<view class="icon">
|
|
|
<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
|
|
@@ -156,8 +200,25 @@
|
|
|
<view class="check-all" @click="toEquipmentElectricity">
|
|
|
查看全部<u-icon name="arrow-right" size="24" color="#838383"></u-icon>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="content">
|
|
|
+ </view>
|
|
|
+ <view class="content" 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"
|
|
|
+ style="
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
+
|
|
|
+ "
|
|
|
+ ></i><p class="uni-toast__content"> </p>加载中...</div>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="content" v-else-if="!getHomePageKwhshowLoading&&kWhList.length == 0">
|
|
|
+ <u-divider :isnone="true" nonetext="无记录"
|
|
|
+ border-color="#fff"></u-divider>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="content" v-else >
|
|
|
<view class="electricity">
|
|
|
|
|
|
<view class="item" v-for="(item, index) in kWhList" :key="index"
|
|
@@ -440,7 +501,11 @@
|
|
|
|
|
|
},
|
|
|
getHomePageManageReady:false,
|
|
|
- utabsone:true,
|
|
|
+ utabsone:true,
|
|
|
+ companyType:false,
|
|
|
+ incomeExpenditureObj:{},
|
|
|
+ getHomePageKwhshowLoading:false,
|
|
|
+ getHomePageManageshowLoading:false,
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -450,12 +515,14 @@
|
|
|
this.queryDateMonth = year + '-' + month;
|
|
|
this.endYear = new Date().getFullYear();
|
|
|
this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
|
|
|
-
|
|
|
+ var getPersonInfoPlus=this.carhelp.getPersonInfoPlus()
|
|
|
+ if(getPersonInfoPlus){
|
|
|
+ this.companyType=getPersonInfoPlus.wuye
|
|
|
+ }
|
|
|
|
|
|
this.getCompanyInfoList();
|
|
|
|
|
|
|
|
|
-
|
|
|
},
|
|
|
onReady() {
|
|
|
// this.current=1
|
|
@@ -502,6 +569,25 @@
|
|
|
})
|
|
|
console.log(node,key)
|
|
|
},
|
|
|
+ getIncomeExpenditure(){
|
|
|
+ this.incomeExpenditureObj={}
|
|
|
+ API.incomeExpenditure({
|
|
|
+ //parentMeterId:item.id,
|
|
|
+ queryDate:this.queryDate,
|
|
|
+ companyId: this.companyId,
|
|
|
+ type: this.list[this.homePageManageType].value
|
|
|
+ }).then((response) => {
|
|
|
+
|
|
|
+ this.incomeExpenditureObj=response.data
|
|
|
+ this.incomeExpenditureObj.id=1
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 设备数据监测
|
|
|
getHomePageManageChildMeter(item,bl) {
|
|
|
if(!bl){
|
|
@@ -723,10 +809,10 @@
|
|
|
|
|
|
|
|
|
this.getHomePageManageReady=false
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: "加载中",
|
|
|
+ // mask: true,
|
|
|
+ // })
|
|
|
API.homePageManage({
|
|
|
queryDate:this.queryDate,
|
|
|
companyId: this.companyId,
|
|
@@ -735,12 +821,20 @@
|
|
|
this.getHomePageManageReady=true
|
|
|
this.codes =this.carhelp.getPersonInfo().codes;
|
|
|
|
|
|
- uni.hideLoading();
|
|
|
+ //uni.hideLoading();
|
|
|
this.meterList = response.data.meterList;
|
|
|
|
|
|
|
|
|
- this.homePageManageObj = response.data;
|
|
|
- this.getBarCharts()
|
|
|
+ this.homePageManageObj = response.data;
|
|
|
+ if(!this.companyType){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.getBarCharts()
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ this.getIncomeExpenditure();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}).catch(error => {
|
|
|
uni.showToast({
|
|
@@ -778,10 +872,11 @@
|
|
|
}
|
|
|
|
|
|
if (!interval) {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: "加载中",
|
|
|
+ // mask: true,
|
|
|
+ // })
|
|
|
+ this.getHomePageKwhshowLoading=true;
|
|
|
}
|
|
|
API.homePageKwh({
|
|
|
pageIndex: this.pageIndexp,
|
|
@@ -789,7 +884,8 @@
|
|
|
companyId: this.companyId
|
|
|
}).then((response) => {
|
|
|
if (!interval) {
|
|
|
- uni.hideLoading();
|
|
|
+ //uni.hideLoading();
|
|
|
+ this.getHomePageKwhshowLoading=false;
|
|
|
}
|
|
|
this.kWhList = response.data.data;
|
|
|
this.totalPagep = response.data.totalPage;
|
|
@@ -942,7 +1038,43 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .incomeExpenditureClass{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-evenly;
|
|
|
+ width: 100%;
|
|
|
+ padding:32rpx 0;
|
|
|
+ .income1:last-child{
|
|
|
+ .income11,.income12{
|
|
|
+ border-right: 1px solid #c5c3c3;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .income1{
|
|
|
+ width: 33.33%;
|
|
|
+ text-align: center;
|
|
|
+ .income11{
|
|
|
+ padding:12rpx 0;
|
|
|
+ background-color: #1677FF ;
|
|
|
+ color:#fff;
|
|
|
+ font-size: 36rpx;
|
|
|
+ border-top: 1px solid #c5c3c3;
|
|
|
+ border-left: 1px solid #c5c3c3;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .income12{
|
|
|
+ padding:12rpx 0;
|
|
|
+ border-top: 1px solid #c5c3c3;
|
|
|
+ border-bottom: 1px solid #c5c3c3;
|
|
|
+ border-left: 1px solid #c5c3c3;
|
|
|
+ font-size: 40rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
page {
|
|
|
padding-bottom: 200rpx;
|
|
|
}
|