|
@@ -1,22 +1,24 @@
|
|
|
<template>
|
|
|
<div class="box">
|
|
|
- <div class="header">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col v-for="(item, i) in iconList" :key="i" :span="6">
|
|
|
- <el-card class="box-card">
|
|
|
- <div class="card-flex">
|
|
|
- <div class="flex-left">
|
|
|
- <i :class="[item.icon]" :style="{ fontSize: '72px', color: color }"></i>
|
|
|
+ <el-skeleton style="width: 100%;" :rows="6" animated :loading="loading">
|
|
|
+ <div class="header">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col v-for="(item, i) in iconList" :key="i" :span="6">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div class="card-flex">
|
|
|
+ <div class="flex-left">
|
|
|
+ <i :class="[item.icon]" :style="{ fontSize: '72px', color: color }"></i>
|
|
|
+ </div>
|
|
|
+ <div class="flex-right">
|
|
|
+ <p :style="{marginBottom: '8px', color: color}">{{item.name}}</p>
|
|
|
+ <p>{{item.num}}{{item.unit}}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="flex-right">
|
|
|
- <p :style="{marginBottom: '8px', color: color}">{{item.name}}</p>
|
|
|
- <p>{{item.num}}{{item.unit}}</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-skeleton>
|
|
|
<br/>
|
|
|
<div class="pending">
|
|
|
<div class="title" :style="{color: color}">待处理事务</div>
|
|
@@ -38,10 +40,12 @@
|
|
|
<el-button type="text" style="float: right; margin-right: 25px" @click="jump(1)">详情</el-button>
|
|
|
</div>
|
|
|
<x-form :formItems="formItems" :day="day" @setDay="setDay" @setChange="setChange" @onClickType="onClickType"></x-form>
|
|
|
- <div style="width: 100%; height: 400px">
|
|
|
- <chart-wsd v-if="TempAndHumList.humidities.length > 0" :data="TempAndHumList"></chart-wsd>
|
|
|
- <el-empty v-else description="暂无数据" style="width: 100%;"></el-empty>
|
|
|
- </div>
|
|
|
+ <el-skeleton style="width: 100%;" :rows="10" animated :loading="tempLoading">
|
|
|
+ <div style="width: 100%; height: 400px">
|
|
|
+ <chart-wsd v-if="TempAndHumList.humidities.length > 0" :data="TempAndHumList"></chart-wsd>
|
|
|
+ <el-empty v-else description="暂无数据" style="width: 100%;"></el-empty>
|
|
|
+ </div>
|
|
|
+ </el-skeleton>
|
|
|
</div>
|
|
|
<br/>
|
|
|
<div class="pending">
|
|
@@ -50,38 +54,39 @@
|
|
|
<el-button type="text" style="float: right; margin-right: 25px" @click="jump(2)">详情</el-button>
|
|
|
</div>
|
|
|
<x-form :formItems="formItems" :day="day" @setDay="setDay" @setChange="setChange" @onClickType="onClickType"></x-form>
|
|
|
- <div class="pen-flex" v-if="waterList.length > 0">
|
|
|
- <div class="pen-left">
|
|
|
- <div class="water">
|
|
|
- <p>上月用水量</p>
|
|
|
- <p>{{monthWater}}t</p>
|
|
|
- <p>
|
|
|
- <i v-if="Number(monthWeekPercent) > 0" class="el-icon-caret-top" style="color: red"></i>
|
|
|
- <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
|
|
|
- <span :style="{color: Number(monthWeekPercent) > 0 ? 'red' : '#1ABC9C'}">{{monthWeekPercent}}%</span>
|
|
|
-
|
|
|
- <span style="font-size: 16px; color: #CFDBED">环比上月</span>
|
|
|
- </p>
|
|
|
+
|
|
|
+ <div class="pen-flex" v-if="waterList.length > 0">
|
|
|
+ <div class="pen-left">
|
|
|
+ <div class="water">
|
|
|
+ <p>上月用水量</p>
|
|
|
+ <p>{{monthWater}}t</p>
|
|
|
+ <p>
|
|
|
+ <i v-if="Number(monthWeekPercent) > 0" class="el-icon-caret-top" style="color: red"></i>
|
|
|
+ <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
|
|
|
+ <span :style="{color: Number(monthWeekPercent) > 0 ? 'red' : '#1ABC9C'}">{{monthWeekPercent}}%</span>
|
|
|
+
|
|
|
+ <span style="font-size: 16px; color: #CFDBED">环比上月</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="water">
|
|
|
+ <p>上周用水量</p>
|
|
|
+ <p>{{weekWater}}t</p>
|
|
|
+ <p>
|
|
|
+ <i v-if="Number(weekWeekPercent) > 0" class="el-icon-caret-top" style="color: red"></i>
|
|
|
+ <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
|
|
|
+ <span :style="{color: Number(weekWeekPercent) > 0 ? 'red' : '#1ABC9C'}">{{weekWeekPercent}}%</span>
|
|
|
+
|
|
|
+ <span style="font-size: 16px; color: #CFDBED">环比上周</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="water">
|
|
|
- <p>上周用水量</p>
|
|
|
- <p>{{weekWater}}t</p>
|
|
|
- <p>
|
|
|
- <i v-if="Number(weekWeekPercent) > 0" class="el-icon-caret-top" style="color: red"></i>
|
|
|
- <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
|
|
|
- <span :style="{color: Number(weekWeekPercent) > 0 ? 'red' : '#1ABC9C'}">{{weekWeekPercent}}%</span>
|
|
|
-
|
|
|
- <span style="font-size: 16px; color: #CFDBED">环比上周</span>
|
|
|
- </p>
|
|
|
+ <div style="width: 85%; height: 400px">
|
|
|
+ <chart-water :dataValue="waterList" :room="waterRoom"></chart-water>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="width: 85%; height: 400px">
|
|
|
- <chart-water :dataValue="waterList" :room="waterRoom"></chart-water>
|
|
|
+ <div v-else>
|
|
|
+ <el-empty description="暂无数据" style="width: 100%;"></el-empty>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-empty description="暂无数据" style="width: 100%;"></el-empty>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<br/>
|
|
|
<div class="pending">
|
|
@@ -319,6 +324,9 @@ export default {
|
|
|
timeList: [],
|
|
|
moneyList: []
|
|
|
},
|
|
|
+ loading: true,
|
|
|
+ tempLoading: true,
|
|
|
+ waterLoading: true,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -326,7 +334,36 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
setDay(data) {
|
|
|
- this.day = data;
|
|
|
+ this.day = data.type;
|
|
|
+ let data1 = data.data;
|
|
|
+ if(data1.unitId) {
|
|
|
+ let end = timeDate(new Date().getTime())
|
|
|
+ let params = {
|
|
|
+ roomId: data1.unitId,
|
|
|
+ endDate: end,
|
|
|
+ type: this.day
|
|
|
+ }
|
|
|
+ getByRoom(params).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ this.tempList = {
|
|
|
+ name: res.data.roomName,
|
|
|
+ list: res.data.semperatures
|
|
|
+ }
|
|
|
+ this.humList = {
|
|
|
+ name: res.data.roomName,
|
|
|
+ list: res.data.humidities
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getListWater(params).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ this.waterList = res.data.data;
|
|
|
+ this.waterRoom = res.data.room;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择栋舍楼层单元查询');
|
|
|
+ }
|
|
|
},
|
|
|
getSchool() {
|
|
|
getSchool({}).then(res => {
|
|
@@ -416,6 +453,7 @@ export default {
|
|
|
getTheSales({type: 2})
|
|
|
]).then(axios.spread(function(res1, res2, res3, res4) {
|
|
|
if(res1.code === 10000) {
|
|
|
+ that.loading = false;
|
|
|
const { money, quantity, warning, weekQuantity } = res1.data || {};
|
|
|
that.iconList[0].num = warning;
|
|
|
that.iconList[1].num = quantity;
|
|
@@ -424,9 +462,11 @@ export default {
|
|
|
// that.incon
|
|
|
}
|
|
|
if(res2.code === 10000) {
|
|
|
+ that.tempLoading = false;
|
|
|
that.TempAndHumList = res2.data;
|
|
|
}
|
|
|
if(res3.code === 10000) {
|
|
|
+ that.waterLoading = false;
|
|
|
that.waterList = res3.data.data;
|
|
|
that.waterRoom = res3.data.room;
|
|
|
that.weekWater = res3.data.weekWater;
|