|
@@ -1,17 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
-
|
|
|
<view class="background">
|
|
|
- <!-- 设备选择器 -->
|
|
|
- <!-- <u-picker title="设备选择" v-model="equipmentShow"
|
|
|
- mode="multiSelector" :default-selector='[0, 1]' :range="multiSelector">
|
|
|
- </u-picker> -->
|
|
|
- <!-- <u-picker v-model="tabsFrom.show1" mode="selector" :range="tabsFrom.selector1" range-key="label"
|
|
|
- @confirm="selector1confirm"></u-picker> -->
|
|
|
- <u-select v-model="tabsFrom.show1" mode="mutil-column-auto" :list="tabsFrom.selector1" @confirm="selector1confirm">
|
|
|
-
|
|
|
- </u-select>
|
|
|
-
|
|
|
<!-- 日期选择器 -->
|
|
|
<u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
|
|
|
mode="time" :params="params" :noselect="false" @confirm="selector2confirm" @reset="selector2reset">
|
|
@@ -23,11 +12,15 @@
|
|
|
</view>
|
|
|
<view class="title" @click="titleCk">
|
|
|
{{tabsFrom.title}}
|
|
|
- <!-- <u-icon name="arrow-down" color="#fff" size="24" @click="equipmentShow=true"></u-icon> -->
|
|
|
<u-icon name="arrow-down" color="#fff" size="24"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 设备选择器 -->
|
|
|
+ <u-select title="设备选择" v-model="tabsFrom.show1" mode="mutil-column-auto" :list="tabsFrom.selector1"
|
|
|
+ @confirm="selector1confirm" cancel-text="重置" @cancel="selector1cancel">
|
|
|
+ </u-select>
|
|
|
|
|
|
<!-- 用电量 -->
|
|
|
<view class="electricity-consumption">
|
|
@@ -394,6 +387,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ meterId: '',
|
|
|
+ titleName: '',
|
|
|
clickType: 0,
|
|
|
sumQuantity: 0,
|
|
|
equipmentInfosShow: false,
|
|
@@ -479,6 +474,8 @@
|
|
|
this.FormData.meterId = op.id;
|
|
|
this.FormData2.meterId = op.id;
|
|
|
this.tabsFrom.title = op.name;
|
|
|
+ this.meterId = op.id;
|
|
|
+ this.titleName = op.name;
|
|
|
}
|
|
|
this.endYear = new Date().getFullYear();
|
|
|
this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
|
|
@@ -518,6 +515,21 @@
|
|
|
this.getElectricityStatistics();
|
|
|
}
|
|
|
},
|
|
|
+ selector1cancel() {
|
|
|
+ this.tabsFrom.show1Text = this.titleName;
|
|
|
+ this.tabsFrom.title = this.titleName;
|
|
|
+
|
|
|
+ this.FormData.meterId = this.meterId;
|
|
|
+ this.FormData.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
|
|
|
+ this.FormData2.meterId = this.meterId;
|
|
|
+ this.FormData2.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
|
|
|
+
|
|
|
+ this.FormData.type = 2;
|
|
|
+ this.value = '2';
|
|
|
+
|
|
|
+ this.getTimeSlotStatistics();
|
|
|
+ this.getElectricityStatistics();
|
|
|
+ },
|
|
|
queryDate(queryTime, day) {
|
|
|
|
|
|
if (day) {
|
|
@@ -845,6 +857,11 @@
|
|
|
padding-bottom: 184rpx;
|
|
|
}
|
|
|
|
|
|
+ /deep/.u-select__header__title {
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
.navbar-c {
|
|
|
background-color: rgba(22, 119, 255, 1);
|
|
|
position: fixed;
|