|
@@ -53,7 +53,7 @@
|
|
|
<span>水量消耗</span>
|
|
|
<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>
|
|
|
+ <x-form :formItems="formItems" :day="day1" @setDay="setDay1" @setChange="setChange1" @onClickType="onClickType1"></x-form>
|
|
|
|
|
|
<div class="pen-flex" v-if="waterList.length > 0">
|
|
|
<div class="pen-left">
|
|
@@ -89,41 +89,41 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<br/>
|
|
|
- <div class="pending">
|
|
|
- <div class="title" :style="{color: color}">
|
|
|
- <span>电量消耗</span>
|
|
|
- <el-button type="text" style="float: right; margin-right: 25px">详情</el-button>
|
|
|
- </div>
|
|
|
- <x-form :formItems="formItems" :day="day" @setDay="setDay" @setChange="setChange" @onClickType="onClickType"></x-form>
|
|
|
- <div class="pen-flex">
|
|
|
- <div class="pen-left">
|
|
|
- <div class="water">
|
|
|
- <p>本月用电量</p>
|
|
|
- <p>10000KW·h</p>
|
|
|
- <p>
|
|
|
- <i class="el-icon-caret-top" style="color: red"></i>
|
|
|
- <span style="color: red">10%</span>
|
|
|
-
|
|
|
- <span style="font-size: 16px; color: #CFDBED">环比上月</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="water">
|
|
|
- <p>本周用电量</p>
|
|
|
- <p>10000KW·h</p>
|
|
|
- <p>
|
|
|
- <i class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
|
|
|
- <span style="color: #1ABC9C">10%</span>
|
|
|
-
|
|
|
- <span style="font-size: 16px; color: #CFDBED">同比上周</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="width: 85%; height: 400px">
|
|
|
- <chart-dl></chart-dl>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <br/>
|
|
|
+<!-- <div class="pending">-->
|
|
|
+<!-- <div class="title" :style="{color: color}">-->
|
|
|
+<!-- <span>电量消耗</span>-->
|
|
|
+<!-- <el-button type="text" style="float: right; margin-right: 25px">详情</el-button>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <x-form :formItems="formItems" :day="day2" @setDay="setDay2" @setChange="setChange2" @onClickType="onClickType2"></x-form>-->
|
|
|
+<!-- <div class="pen-flex">-->
|
|
|
+<!-- <div class="pen-left">-->
|
|
|
+<!-- <div class="water">-->
|
|
|
+<!-- <p>本月用电量</p>-->
|
|
|
+<!-- <p>10000KW·h</p>-->
|
|
|
+<!-- <p>-->
|
|
|
+<!-- <i class="el-icon-caret-top" style="color: red"></i>-->
|
|
|
+<!-- <span style="color: red">10%</span>-->
|
|
|
+<!-- -->
|
|
|
+<!-- <span style="font-size: 16px; color: #CFDBED">环比上月</span>-->
|
|
|
+<!-- </p>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="water">-->
|
|
|
+<!-- <p>本周用电量</p>-->
|
|
|
+<!-- <p>10000KW·h</p>-->
|
|
|
+<!-- <p>-->
|
|
|
+<!-- <i class="el-icon-caret-bottom" style="color: #1ABC9C"></i>-->
|
|
|
+<!-- <span style="color: #1ABC9C">10%</span>-->
|
|
|
+<!-- -->
|
|
|
+<!-- <span style="font-size: 16px; color: #CFDBED">同比上周</span>-->
|
|
|
+<!-- </p>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div style="width: 85%; height: 400px">-->
|
|
|
+<!-- <chart-dl></chart-dl>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <br/>-->
|
|
|
<div class="pending">
|
|
|
<div class="title" :style="{color: color}">
|
|
|
<span>卖猪统计</span>
|
|
@@ -306,6 +306,7 @@ export default {
|
|
|
// }
|
|
|
],
|
|
|
day: 2,
|
|
|
+ day1: 2,
|
|
|
TempAndHumList: {
|
|
|
humidities: [],
|
|
|
},
|
|
@@ -345,22 +346,43 @@ export default {
|
|
|
}
|
|
|
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
|
|
|
- }
|
|
|
+ // this.tempList = {
|
|
|
+ // name: res.data.roomName,
|
|
|
+ // list: res.data.semperatures
|
|
|
+ // }
|
|
|
+ // this.humList = {
|
|
|
+ // name: res.data.roomName,
|
|
|
+ // list: res.data.humidities
|
|
|
+ // }
|
|
|
+ this.TempAndHumList = res.data;
|
|
|
}
|
|
|
+ // getListWater(params).then(res => {
|
|
|
+ // if(res.code === 10000) {
|
|
|
+ // this.waterList = res.data.data;
|
|
|
+ // this.waterRoom = res.data.room;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择栋舍楼层单元查询');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ setDay1(data) {
|
|
|
+ this.day1 = data.type;
|
|
|
+ let data1 = data.data;
|
|
|
+ if(data1.unitId) {
|
|
|
+ let end = timeDate(new Date().getTime())
|
|
|
+ let params = {
|
|
|
+ roomId: data1.unitId,
|
|
|
+ endDate: end,
|
|
|
+ type: this.day1
|
|
|
+ }
|
|
|
getListWater(params).then(res => {
|
|
|
if(res.code === 10000) {
|
|
|
this.waterList = res.data.data;
|
|
|
this.waterRoom = res.data.room;
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
} else {
|
|
|
this.$message.error('请选择栋舍楼层单元查询');
|
|
|
}
|
|
@@ -401,6 +423,31 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ setChange1(item) {
|
|
|
+ if(item.type === 'floorId') {
|
|
|
+ let params = {
|
|
|
+ floorId: item.data
|
|
|
+ }
|
|
|
+ getByFloor(params).then(res => {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ item.value = item.uid;
|
|
|
+ item.label = item.alias
|
|
|
+ })
|
|
|
+ this.formItems[1].options = res.data;
|
|
|
+ })
|
|
|
+ } else if(item.type === 'uid') {
|
|
|
+ let params = {
|
|
|
+ uid: item.data
|
|
|
+ }
|
|
|
+ getUid(params).then(res => {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ item.value = item.id;
|
|
|
+ item.label = item.roomName
|
|
|
+ })
|
|
|
+ this.formItems[2].options = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
onClickType(data) {
|
|
|
if(data.type === 'search') {
|
|
|
let data1 = data.data;
|
|
@@ -414,30 +461,38 @@ export default {
|
|
|
type: 4,
|
|
|
}
|
|
|
} else {
|
|
|
- let end = timeDate(new Date().getTime())
|
|
|
+ this.$message.error('请选择时间区间查询')
|
|
|
+ }
|
|
|
+ getByRoom(params).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ this.TempAndHumList = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择栋舍楼层单元查询');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onClickType1(data) {
|
|
|
+ if(data.type === 'search') {
|
|
|
+ let data1 = data.data;
|
|
|
+ if(data1.unitId) {
|
|
|
+ let params;
|
|
|
+ if(data1.value1) {
|
|
|
params = {
|
|
|
roomId: data1.unitId,
|
|
|
- endDate: end,
|
|
|
- type: this.day
|
|
|
+ startDate: data1.value1[0],
|
|
|
+ endDate: data1.value1[1],
|
|
|
+ type: 4,
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择时间区间查询')
|
|
|
}
|
|
|
- getByRoom(params).then(res => {
|
|
|
+ getListWater(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
|
|
|
- }
|
|
|
+ this.waterList = res.data.data;
|
|
|
+ this.waterRoom = res.data.room;
|
|
|
}
|
|
|
- getListWater(params).then(res => {
|
|
|
- if(res.code === 10000) {
|
|
|
- this.waterList = res.data.data;
|
|
|
- this.waterRoom = res.data.room;
|
|
|
- }
|
|
|
- })
|
|
|
})
|
|
|
} else {
|
|
|
this.$message.error('请选择栋舍楼层单元查询');
|
|
@@ -486,36 +541,6 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
}))
|
|
|
- // getListClientHome({}).then(res => {
|
|
|
- // })
|
|
|
- // getByRoom({type: 2}).then(res => {
|
|
|
- // if(res.code === 10000) {
|
|
|
- // this.TempAndHumList = res.data;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // getListWater({type: 2}).then(res => {
|
|
|
- // if(res.code === 10000) {
|
|
|
- // this.waterList = res.data.data;
|
|
|
- // this.waterRoom = res.data.room;
|
|
|
- // this.weekWater = res.data.weekWater;
|
|
|
- // this.weekWeekPercent = res.data.weekWeekPercent;
|
|
|
- // this.monthWater = res.data.monthWater;
|
|
|
- // this.monthWeekPercent = res.data.monthWeekPercent;
|
|
|
- // }
|
|
|
- // })
|
|
|
- // getTheSales({type: 2}).then(res => {
|
|
|
- // if (res.code === 10000) {
|
|
|
- // this.weekSales = res.data.money;
|
|
|
- // this.weekSalesChange = res.data.moneyPercent;
|
|
|
- // this.weekSalesVolume = res.data.quantity;
|
|
|
- // this.weekSalesVolumeChange = res.data.quantityPercent;
|
|
|
- // this.salesChartData = {
|
|
|
- // moneyList: res.data.moneyList,
|
|
|
- // quantityList: res.data.quantityList,
|
|
|
- // timeList: res.data.timeList,
|
|
|
- // };
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
jump(num) {
|
|
|
if(num === 1) {
|