zhengkaixin 1 سال پیش
والد
کامیت
d00894676b

+ 26 - 26
pages.json

@@ -141,7 +141,7 @@
         	"path" : "pages/returnBalance/returnBalance",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -149,7 +149,7 @@
         	"path" : "pages/returnBalance/returnApplication",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -157,7 +157,7 @@
         	"path" : "pages/returnBalance/returnDetails",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -165,7 +165,7 @@
         	"path" : "pages/recharge/monthlyBill",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -173,7 +173,7 @@
         	"path" : "pages/invoiceManagement/invoiceManagement",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -181,7 +181,7 @@
         	"path" : "pages/invoiceManagement/issueInvoice",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -189,7 +189,7 @@
         	"path" : "pages/invoiceManagement/billingDescription",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -197,7 +197,7 @@
         	"path" : "pages/invoiceManagement/applyBilling",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -205,7 +205,7 @@
         	"path" : "pages/invoiceManagement/invoiceDetails",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -213,7 +213,7 @@
         	"path" : "pages/invoiceManagement/viewE-invoice",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -221,7 +221,7 @@
         	"path" : "pages/invoiceManagement/InvoiceTitleManagement",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -229,7 +229,7 @@
         	"path" : "pages/invoiceManagement/addInvoiceTitle",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -237,7 +237,7 @@
         // 	"path" : "pages/invoiceManagement/editInvoiceTitle",
         // 	"style" : 
         // 	{
-        // 		"navigationBarTitleText" : "",
+        // 		
         // 		"enablePullDownRefresh" : false
         // 	}
         // },
@@ -245,7 +245,7 @@
         // 	"path" : "pages/invoiceManagement/personalTitle",
         // 	"style" : 
         // 	{
-        // 		"navigationBarTitleText" : "",
+        // 		
         // 		"enablePullDownRefresh" : false
         // 	}
         // },
@@ -253,7 +253,7 @@
         	"path" : "pages/mine/setting",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -261,7 +261,7 @@
         	"path" : "pages/mine/contactService",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -269,7 +269,7 @@
         	"path" : "pages/mine/cancelAccount",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -277,7 +277,7 @@
         	"path" : "pages/mine/changePassword",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -285,7 +285,7 @@
         	"path" : "pages/mine/changePhone",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -293,7 +293,7 @@
         	"path" : "pages/mine/findBackPassword",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -301,7 +301,7 @@
         	"path" : "pages/invoiceManagement/selectTitleManagement",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -309,7 +309,7 @@
         	"path" : "pages/invoiceManagement/applyMessage",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -317,7 +317,7 @@
         	"path" : "pages/remoteControl/remoteControl",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -325,7 +325,7 @@
         	"path" : "pages/remoteControl/operationLog",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -333,7 +333,7 @@
         	"path" : "pages/deductionRecord/billPush",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         },
@@ -341,7 +341,7 @@
         	"path" : "pages/meterManagement/meterManagement",
         	"style" : 
         	{
-        		"navigationBarTitleText" : "",
+        		
         		"enablePullDownRefresh" : false
         	}
         }

+ 2 - 2
pages/deductionRecord/deductionDetails.vue

@@ -12,7 +12,7 @@
 							
 						<image class="img" v-else src="@/assets/img/Copy PEokWS2 Copy 1@1x.png" mode=""></image>
 						
-					</text>{{contractItem.paymentMethod=='1'?'':dayM(tenantBalanceRecord.createTime)}}{{tenantBalanceRecord.businessName}}
+					</text>{{tenantBalanceRecord.businessName}}
 				</view>
 				<view class="sum">
 					{{tenantBalanceRecord.amount}}
@@ -77,7 +77,7 @@
 					</view> -->
 					<view class="item">
 						<view class="item-title">
-							创建时间
+							扣费时间
 						</view>
 						<view class="item-value">
 							{{tenantBalanceRecord.createTime}}

+ 2 - 2
pages/index/index.vue

@@ -45,7 +45,7 @@
 			</view>
 			<view class="grid">
 				<u-grid :col="4" :border="false">
-					<u-grid-item @click="gotoUrl('/pages/meterManagement/meterManagement')" >
+					<u-grid-item  v-if="false" @click="gotoUrl('/pages/meterManagement/meterManagement')" >
 						<view class="icon icon10">
 							<image class="img" src="@/assets/img/fas fa-plus-circle.svg" mode=""></image>
 						</view>
@@ -86,7 +86,7 @@
 						<view class="grid-text">断电提醒
 						</view>
 					</u-grid-item>
-					<u-grid-item    v-if="false"
+					<u-grid-item   
 					@click="gotoUrl('/pages/message/messageList?type=5&typeName=停电通知')">
 						<view class="icon icon5">
 							<image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>

+ 41 - 8
pages/mine/electronicMonitoring.vue

@@ -6,7 +6,7 @@
 			
 			<u-picker-select title="日期选择" v-model="tabsFrom.show2"
 			 :defaultTime="tabsFrom.show2Index" :endYear="endYear" @cancel="selector2cancel"
-			 mode="time" :maskCloseAble="false" :params="params" :noselect="false"  @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
+			 mode="time"  :params="params" :noselect="false"  @confirm="selector2confirm" @reset="selector2reset" ></u-picker-select>
 			
 			<u-navbar :background="background"
 			@titleCk="titleCk" :title-icon="electricityMeterList.length>1?'arrow-down':''"
@@ -257,6 +257,8 @@
 				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
 				value: '1',
 				oldvalue: '1',
+				intervalId: null, // 用于存储间隔ID  
+				intervalReady: true, // 用于存储间隔ID  
 			};
 		},
 		onLoad() {
@@ -278,7 +280,26 @@
 			
 			// console.log( this.topDate)
 		},
+		 beforeDestroy() {  
+		    this.clearTimer(); // 组件销毁前清除定时器  
+			this.intervalReady=false;
+			 console.log( "组件销毁前清除定时器")
+		  }, 
 		methods: {
+			 clearTimer() {  
+			      if (this.intervalId) {  
+			        clearInterval(this.intervalId); // 清除定时器  
+			        this.intervalId = null; // 重置定时器ID  
+			      }  
+			    },
+			startInterval(){
+				 this.clearTimer(); // 组件销毁前清除定时器 
+				  this.intervalId = setInterval(() => {  
+				         // 每隔5秒运行的代码  
+				         console.log('这段代码每隔5秒运行一次'); 
+						  this.getElectricityStatistics(true)
+				 }, 5000);  
+			},
 			titleCk(){
 				if(this.electricityMeterList.length>1){
 					this.tabsFrom.show1=true
@@ -328,11 +349,17 @@
 				
 				
 			},
-			getElectricityStatistics(){
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
+			getElectricityStatistics(interval){
+				// if(!this.intervalReady){
+				// 	return
+				// }
+				if(!interval){
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+				}
+				
 				var obj={
 					...this.FormData
 				}		
@@ -341,7 +368,9 @@
 					// }
 							
 				API.electricityStatistics(obj).then((response) => {
-					uni.hideLoading();
+					if(!interval){
+						uni.hideLoading();
+					}
 					this.showTop = [0, 0, 0, 0, 0, 0, 0, 0]
 					var electricity = response.data.kwhMap.kwh+"";
 					
@@ -363,6 +392,10 @@
 						this.$forceUpdate()
 					}
 					//this.electricityMeterList=response.data.meterList
+					if(!interval){
+						this.startInterval(); // 组件挂载后开始间隔  
+					}
+					 
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -437,7 +470,7 @@
 					  },
 					  series: [
 					    {
-						  name: '合计',
+						  name: '电量',
 					      data: data2,
 					      type: 'bar'
 					    }

+ 1 - 1
uni_modules/uview-ui/components/u-picker-select/u-picker-select.vue

@@ -203,7 +203,7 @@
 			// 是否允许通过点击遮罩关闭Picker
 			maskCloseAble: {
 				type: Boolean,
-				default: true
+				default: false
 			},
 			// 通过双向绑定控制组件的弹出与收起
 			value: {