zhengkaixin 2 ay önce
ebeveyn
işleme
24cd6efe2e

+ 1 - 0
config/.env.dev.js

@@ -20,6 +20,7 @@ const UNI_APP = {
 	//openId:"oLowyuB1PliW0qAnJJ56axydeUOM",//zq
 	openId:"oLowyuMMjIkA_bLA4MXzRQ3KJB2E",//凡佳佳
 	unionid:"oxT166hagI4rlzPWaWTIwqprWUfM",
+	openId:"oLowyuDEWOeeqSW02OY2QSTPfBKM",
 	//appid
 	VUE_APP_WXAPPID:"wx0b3c41a903053808",
 	VUE_APP_ALIAPPID:"2021003131641247",

+ 205 - 205
pages/billingRules/billingRules.vue

@@ -1,49 +1,49 @@
-<template>
-	<view>
-		<u-navbar title="计费规则" title-color="#101010"></u-navbar>
-		<view class="background">
-			<!-- 单位 -->
-			<view class="unit">
-				<view class="title">
-					物业方:
-				</view>
-				<view class="value">
-					{{companyInfo.propertyManagement}}
-				</view>
-			</view>
+<template>
+	<view>
+		<u-navbar title="计费规则" title-color="#101010"></u-navbar>
+		<view class="background">
+			<!-- 单位 -->
+			<view class="unit">
+				<view class="title">
+					物业方:
+				</view>
+				<view class="value">
+					{{companyInfo.propertyManagement}}
+				</view>
+			</view>
 			
-				
-			<view class="rules" v-if="queryList.length">
-				<view class="tabs" v-if="false">
-					<u-tabs font-size="24" :gutter="30" :item-width="100" :list="list" :is-scroll="false" :current="current"
-						@change="change"></u-tabs>
-				</view>
-			
-				<view class="content" v-for="(item,i) in queryList" :key="i">
-					<view class="name-title">
-						承租方:
-					
-					</view>
-					<view class="name">
-						{{tenantInfo.name}}
-			
-					</view>
-					
-					<view class="address">
-						
-					</view>
-					<view class="contentRule1">
-						<view>收费标准</view>
-						<u-table>
-							<u-th style="padding:0">
-								<u-tr >
-									<u-td>名称</u-td>
-								<!-- 	 -->
-									<u-td>价格</u-td>
+				
+			<view class="rules" v-if="queryList.length">
+				<view class="tabs" v-if="false">
+					<u-tabs font-size="24" :gutter="30" :item-width="100" :list="list" :is-scroll="false" :current="current"
+						@change="change"></u-tabs>
+				</view>
+			
+				<view class="content" v-for="(item,i) in queryList" :key="i">
+					<view class="name-title">
+						承租方:
+					
+					</view>
+					<view class="name">
+						{{tenantInfo.name}}
+			
+					</view>
+					
+					<view class="address">
+						
+					</view>
+					<view class="contentRule1">
+						<view>收费标准</view>
+						<u-table>
+							<u-th style="padding:0">
+								<u-tr >
+									<u-td>名称</u-td>
+								<!-- 	 -->
+									<u-td>价格</u-td>
 									<u-td>单位</u-td>
 									
-									
-								</u-tr>
+									
+								</u-tr>
 							</u-th>
 							<template v-for="(it,j) in item.contractItemList" >
 								<u-tr  :key="j" v-if="!it.periodPriceList">
@@ -54,11 +54,11 @@
 									
 								</u-tr>
 							
-							</template>
-							
-						</u-table> 
-						
-						
+							</template>
+							
+						</u-table> 
+						
+						
 					</view>
 					
 					<view class="contentRule1" style="margin-top: 20rpx;"  v-for="(it,j) in item.contractItemList"  v-if="it.periodPriceList">
@@ -91,8 +91,8 @@
 						</u-table> 
 							</template>
 						
-					</view>
-			
+					</view>
+			
 			<!-- 备注 -->
 							<view class="remark" >
 								
@@ -111,10 +111,10 @@
 										租赁期:{{thisparseUnixTime(item.contractStartTime)}} 至 {{thisparseUnixTime(item.contractEndTime)}}
 									</view>
 								</view>
-							</view>
-				</view>
-				
-				
+							</view>
+				</view>
+				
+				
 			</view>
 			<view class="rules" v-else>
 				
@@ -134,179 +134,179 @@
 			</view>
 			<u-divider  nonetext="没有找到相关内容"
 				border-color="#CFD2D5">已经到底了</u-divider>
-			
-		</view>
-		<!-- 规则 -->
-	
-
-
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/deduction.js'
+			
+		</view>
+		<!-- 规则 -->
+	
+
+
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/deduction.js'
 import {
 		parseUnixTime,newDate
 	
-	} from '@/apis/utils'
-	export default {
-		data() {
-			return {
-				formData: {
-					pageIndex: 1,
-					pageSize: 9999,
-				},
-				list: [{
-					name: '电费'
-				}, {
-					name: '水费'
-				}, {
-					name: '租金',
-
-				}, {
-					name: '保洁费',
-
-				}, {
-					name: '物业服务费',
-
-				}],
-				current: 0,
+	} from '@/apis/utils'
+	export default {
+		data() {
+			return {
+				formData: {
+					pageIndex: 1,
+					pageSize: 9999,
+				},
+				list: [{
+					name: '电费'
+				}, {
+					name: '水费'
+				}, {
+					name: '租金',
+
+				}, {
+					name: '保洁费',
+
+				}, {
+					name: '物业服务费',
+
+				}],
+				current: 0,
 				queryList: [],
-				companyInfo:{},
+				companyInfo:{},
 				tenantInfo:{},
-				queryBl:false,
-			}
+				queryBl:false,
+			}
 		},
-		
+		
 		onReady() {
 			
 			if(this.carhelp.getPersonInfoPlus().companyInfo){
 				this.companyInfo=this.carhelp.getPersonInfoPlus().companyInfo
 			}
-			
-			this.tenantInfo=this.carhelp.getPersonInfoPlus().tenantInfo
-			
-			this.contractList();
-		},
-		methods: {
-			thisparseUnixTime(time){
-				return parseUnixTime(newDate(time),'{y}年{m}月{d}日')
-			},
-			contractList() {
+			
+			this.tenantInfo=this.carhelp.getPersonInfoPlus().tenantInfo
+			
+			this.contractList();
+		},
+		methods: {
+			thisparseUnixTime(time){
+				return parseUnixTime(newDate(time),'{y}年{m}月{d}日')
+			},
+			contractList() {
 				uni.showLoading({
 					mask:true,title:'加载中...'
-				})
-				API.contractList(this.formData).then((response) => {
-					uni.hideLoading();
+				})
+				API.contractList(this.formData).then((response) => {
+					uni.hideLoading();
 					this.queryList = response.data.data;
-					this.queryBl=true
-				}).catch(error => {
+					this.queryBl=true
+				}).catch(error => {
 					uni.hideLoading();
 					uni.showToast({
 						icon: "none",
 						title: error
-					})
-				})
-			},
-			change(index) {
-				this.current = index;
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.background {
-		background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(22,119,255,0) 100%);
-		padding: 32rpx 0;
-		height: 720rpx;
-
-		.unit {
-			background-color: #fff;
-			margin: 0 32rpx;
-			border-radius: 8px;
-			padding: 32rpx;
-
-			.title {
-				color: rgba(153, 153, 153, 1);
-			}
-
-			.value {
-				color: rgba(51, 51, 51, 1);
-				font-size: 40rpx;
-				margin-top: 16rpx;
-			}
-		}
-	}
-
-	// 规则
-	.rules {
-		margin: 24rpx 32rpx;
-		background-color: #fff;
-		padding-bottom: 24rpx;
-		border-radius: 8px;
-
-		/deep/.u-tabs {
-			border-radius: 8px;
-
-		}
-
-		.content {
-			padding: 24rpx;
-			.name-title {
-			    color: #999999;
-			}
-			.name {
+					})
+				})
+			},
+			change(index) {
+				this.current = index;
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.background {
+		background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(22,119,255,0) 100%);
+		padding: 32rpx 0;
+		height: 720rpx;
+
+		.unit {
+			background-color: #fff;
+			margin: 0 32rpx;
+			border-radius: 8px;
+			padding: 32rpx;
+
+			.title {
+				color: rgba(153, 153, 153, 1);
+			}
+
+			.value {
+				color: rgba(51, 51, 51, 1);
+				font-size: 40rpx;
+				margin-top: 16rpx;
+			}
+		}
+	}
+
+	// 规则
+	.rules {
+		margin: 24rpx 32rpx;
+		background-color: #fff;
+		padding-bottom: 24rpx;
+		border-radius: 8px;
+
+		::v-deep.u-tabs {
+			border-radius: 8px;
+
+		}
+
+		.content {
+			padding: 24rpx;
+			.name-title {
+			    color: #999999;
+			}
+			.name {
 				margin: 16rpx 0;
 				color: rgba(16, 16, 16, 1);
 				font-size: 38rpx;
-			}
-
+			}
+
 			.address {
 				margin: 8rpx 0;
-			}
-
-			.contentRule1 {
-				
-
-				.rule1 {
-					//width: 298rpx;
-						display: flex;
-					.title {
-						line-height: 96rpx;
-						color: rgba(51, 51, 51, 1);
-						font-size: 32rpx;
-					}
-
+			}
+
+			.contentRule1 {
+				
+
+				.rule1 {
+					//width: 298rpx;
+						display: flex;
+					.title {
+						line-height: 96rpx;
+						color: rgba(51, 51, 51, 1);
+						font-size: 32rpx;
+					}
+
 					.value {
-						
-						color: rgba(51, 51, 51, 1);
-						line-height: 96rpx;
-					}
-				}
-			}
-
-
-
-		}
-
-		// 备注
-		.remark {
-			padding: 40rpx 32rpx;
-			margin-top:  24rpx;
-			border-radius: 8px;
-			background-color: rgba(242, 244, 246, 1);
-			color: rgba(16, 16, 16, 1);
-			font-size: 24rpx;
-			line-height: 34rpx;
-
-			.value {
-				margin-top: 16rpx;
-			}
-
-			.item {
-				margin-bottom: 8rpx;
-			}
-		}
-	}
+						
+						color: rgba(51, 51, 51, 1);
+						line-height: 96rpx;
+					}
+				}
+			}
+
+
+
+		}
+
+		// 备注
+		.remark {
+			padding: 40rpx 32rpx;
+			margin-top:  24rpx;
+			border-radius: 8px;
+			background-color: rgba(242, 244, 246, 1);
+			color: rgba(16, 16, 16, 1);
+			font-size: 24rpx;
+			line-height: 34rpx;
+
+			.value {
+				margin-top: 16rpx;
+			}
+
+			.item {
+				margin-bottom: 8rpx;
+			}
+		}
+	}
 </style>

+ 3 - 3
pages/deductionRecord/billPush.vue

@@ -579,7 +579,7 @@
 </script>
 
 <style lang="scss" scoped>
-	/deep/.u-navbar{
+	::v-deep.u-navbar{
 		    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
 	}
 	.background{
@@ -771,7 +771,7 @@
  					 
  				}
  
- 				/deep/.uni-input-placeholder {
+ 				::v-deep.uni-input-placeholder {
  					color: rgba(204, 204, 204, 1);
  				}
  			}
@@ -825,7 +825,7 @@
  							}
  						}
  
- 						/deep/.uni-radio-input {
+ 						::v-deep.uni-radio-input {
  							width: 40rpx;
  							height: 40rpx;
  						}

+ 3 - 3
pages/invoiceManagement/addInvoiceTitle.vue

@@ -358,16 +358,16 @@ export default {
 		margin-bottom: 24rpx;
 	}
 	
-	/deep/.u-cell{
+	::v-deep.u-cell{
 		height: 96rpx;
 	}
-	/deep/.u-cell__value{
+	::v-deep.u-cell__value{
 		text-align: left;
 		margin-left: 8%;
 		font-size: 32rpx;
 		
 	}
-	/deep/.u-switch{
+	::v-deep.u-switch{
 		margin: auto 0;
 		float: left;;
 	}

+ 1 - 1
pages/invoiceManagement/invoiceManagement.vue

@@ -546,7 +546,7 @@
 		    position: fixed;
 		background-color: #fff;
 		    width: 100%;
-		/deep/.u-tabs{
+		::v-deep.u-tabs{
 			width: 400rpx;
 			margin: 0 auto;
 		}

+ 3 - 3
pages/invoiceManagement/issueInvoice.vue

@@ -283,12 +283,12 @@
 				align-items: center;
 				margin-left: 40rpx;
 
-				/deep/.uni-radio-input {
+				::v-deep.uni-radio-input {
 					width: 32rpx;
 					height: 32rpx;
 				}
 
-				/deep/.uni-input-placeholder {
+				::v-deep.uni-input-placeholder {
 					//color: rgba(16, 16, 16, 1);
 					font-size: 32rpx;
 				}
@@ -308,7 +308,7 @@
 
 			.value2 {
 
-				/deep/.uni-input-placeholder {
+				::v-deep.uni-input-placeholder {
 					//color: rgba(172, 172, 172, 1);
 					font-size: 32rpx;
 				}

+ 1 - 1
pages/mine/changePassword.vue

@@ -85,7 +85,7 @@
 			display: flex;
 			align-items: center;
 			border-bottom: 1px solid rgba(221,221,221,1);
-			/deep/.u-input__input{
+			::v-deep.u-input__input{
 				height: 96rpx;
 			}
 		}

+ 1 - 1
pages/mine/changePhone.vue

@@ -169,7 +169,7 @@
 			display: flex;
 			align-items: center;
 			border-bottom: 1px solid rgba(221,221,221,1);
-			/deep/.u-input__input{
+			::v-deep.u-input__input{
 				height: 96rpx;
 			}
 			

+ 3 - 3
pages/mine/electronicMonitoring.vue

@@ -205,7 +205,7 @@
 
 
 
-		/deep/.u-border-bottom:after {
+		::v-deep.u-border-bottom:after {
 			border: none;
 		}
 
@@ -434,7 +434,7 @@
 		.radio {
 			margin-top: 24rpx;
 		    padding-left: 8rpx;
-			/deep/.u-radio {
+			::v-deep.u-radio {
 				margin-bottom: 8px;
 				min-width: 25% !important;
 				
@@ -442,7 +442,7 @@
 				
 				
 			}
-			/deep/.u-radio__label{
+			::v-deep.u-radio__label{
 				margin-left: 24rpx;
 				font-size: 28rpx;			;
 			}

+ 5 - 5
pages/mine/electronicMonitoring/electricity.vue

@@ -382,7 +382,7 @@
 					}
 				],
 				sumQuantity:0,
-				sumFee:0,
+				sumFee:0,
 			 
 				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
 				value: '4',
@@ -609,7 +609,7 @@
 					this.hourMap=response.data.hourMap
 					this.sumQuantity=response.data.kwhMap.kwh
 					this.sumFee=response.data.kwhMap.fee
-					
+					
 					
 					this.getPle(this.hourMap,interval)
 				}).catch(error => {
@@ -891,7 +891,7 @@
 
 
 
-		/deep/.u-border-bottom:after {
+		::v-deep.u-border-bottom:after {
 			border: none;
 		}
 
@@ -1120,7 +1120,7 @@
 		.radio {
 			margin-top: 24rpx;
 		    padding-left: 8rpx;
-			/deep/.u-radio {
+			::v-deep.u-radio {
 				margin-bottom: 8px;
 				min-width: 25% !important;
 				
@@ -1128,7 +1128,7 @@
 				
 				
 			}
-			/deep/.u-radio__label{
+			::v-deep.u-radio__label{
 				margin-left: 24rpx;
 				font-size: 28rpx;			;
 			}

+ 5 - 5
pages/mine/electronicMonitoring/water.vue

@@ -452,7 +452,7 @@
 					}
 				],
 				sumQuantity:0,
-				sumFee:0,
+				sumFee:0,
 			 
 				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
 				value: '4',
@@ -708,7 +708,7 @@
 					
 					// this.sumQuantity=response.data.waterConsumption.consumption
 					// this.sumFee=response.data.waterConsumption.fee
-					
+					
 					
 					this.getPle(this.hourMap,interval)
 				}).catch(error => {
@@ -993,7 +993,7 @@
 
 
 
-		/deep/.u-border-bottom:after {
+		::v-deep.u-border-bottom:after {
 			border: none;
 		}
 
@@ -1222,7 +1222,7 @@
 		.radio {
 			margin-top: 24rpx;
 		    padding-left: 8rpx;
-			/deep/.u-radio {
+			::v-deep.u-radio {
 				margin-bottom: 8px;
 				min-width: 25% !important;
 				
@@ -1230,7 +1230,7 @@
 				
 				
 			}
-			/deep/.u-radio__label{
+			::v-deep.u-radio__label{
 				margin-left: 24rpx;
 				font-size: 28rpx;			;
 			}

+ 1 - 1
pages/mine/findBackPassword.vue

@@ -198,7 +198,7 @@
 			display: flex;
 			align-items: center;
 			border-bottom: 1px solid rgba(221,221,221,1);
-			/deep/.u-input__input{
+			::v-deep.u-input__input{
 				height: 96rpx;
 			}
 			

+ 2 - 2
pages/mine/setting.vue

@@ -82,10 +82,10 @@
 </script>
 
 <style lang="scss" scoped>
-	/deep/.u-cell_title{
+	::v-deep.u-cell_title{
 		color: rgba(51,51,51,1);
 	}
-	/deep/.u-cell__value{
+	::v-deep.u-cell__value{
 		color: #777777;
 	};
 	

+ 22 - 22
pages/recharge/accountRecharge.vue

@@ -150,8 +150,8 @@
 					<view class="symbol">
 					</view>
-					
-						<input class="input"  @input="ckInput" @focus="focus" type="text" v-model="otherNum" placeholder="点击输入充值金额"/>
+					
+						<input class="input"  @input="ckInput" @focus="focus" type="text" v-model="otherNum" placeholder="点击输入充值金额"/>
 					
 				</view>
 				<!-- 支付方式 -->
@@ -751,7 +751,7 @@
 					margin-bottom: 24rpx;
 
 					.item-title {
-						color: rgb(119, 119, 119);
+						color: rgb(119, 119, 119);
 						    white-space: pre;
 					}
 
@@ -813,11 +813,11 @@ border-bottom: 1px solid rgba(242,242,242,1);
 				.input {
 					height: 100rpx;
 					font-size: 40rpx;
-					 
+					 
 					 
 				}
 
-				/deep/.uni-input-placeholder {
+				::v-deep.uni-input-placeholder {
 					color: rgba(204, 204, 204, 1);
 				}
 			}
@@ -852,26 +852,26 @@ border-bottom: 1px solid rgba(242,242,242,1);
 								width: 48rpx;
 								height: 48rpx;
 								vertical-align: middle;
-								margin-right: 16rpx;
+								margin-right: 16rpx;
 								margin-left: -3rpx;
-							}
-							.img2{
-								width: 40rpx;
-								height: 40rpx;
-								vertical-align: middle;
-								margin-right: 20rpx;
-							}
-							.img3{
-								background-color: #1677FF;
-								 width: 40rpx;
-								 height: 40rpx;
-								 vertical-align: middle;
-								 margin-right: 20rpx;
-								 border-radius: 999px;
+							}
+							.img2{
+								width: 40rpx;
+								height: 40rpx;
+								vertical-align: middle;
+								margin-right: 20rpx;
+							}
+							.img3{
+								background-color: #1677FF;
+								 width: 40rpx;
+								 height: 40rpx;
+								 vertical-align: middle;
+								 margin-right: 20rpx;
+								 border-radius: 999px;
 							}
 						}
 
-						/deep/.uni-radio-input {
+						::v-deep.uni-radio-input {
 							width: 40rpx;
 							height: 40rpx;
 						}
@@ -926,7 +926,7 @@ border-bottom: 1px solid rgba(242,242,242,1);
 
 				.item-title {
 					color: rgba(119, 119, 119, 1);
-					font-size: 32rpx;
+					font-size: 32rpx;
 					 white-space: pre;
 				}
 

+ 7 - 7
pages/timing/autoOff.vue

@@ -357,10 +357,10 @@
 	import ujpPicker2 from '@/components/u-picker2.vue'
 	
 	import * as API from '@/apis/pagejs/meterTimer.js'
-import {
-		hourDistanceArr,
-		parseUnixTime,
-		newDate
+import {
+		hourDistanceArr,
+		parseUnixTime,
+		newDate
 	} from '@/apis/utils/index.js'
 	export default {
 		components: {
@@ -899,7 +899,7 @@ import {
 	}
 	
 	
-	/deep/.u-slot-right {
+	::v-deep.u-slot-right {
 		padding-right: 32rpx;
 		
 		img {
@@ -1072,10 +1072,10 @@ import {
 
 
 
-	/deep/.u-drawer-content-visible {
+	::v-deep.u-drawer-content-visible {
 		border-radius: 12px 12px 0 0;
 	}
-	/deep/uni-input{
+	::v-deepuni-input{
 		background-color: rgba(241,242,245,1);
 		color: rgba(119,119,119,1);
 		font-size: 36rpx;

+ 359 - 359
pages/timing/timeSlotTiming.vue

@@ -1,360 +1,360 @@
-<template>
-	<view>
-		<u-navbar title="时间段定时" title-color="#101010">
-
-			<view slot="right" @click="deleteShow=true">
-				<img src="@/assets/img/riLine-check-line 1.svg" alt="" />
-			</view>
-
-		</u-navbar>
-
-		<view class="time-group">
-			<view class="time-item" @click="typeShow=true" >
-				<view class="time">
-					<view class="time-slot">
-						重复
-					</view>
-					<view class="type">
-						执行一次
-					</view>
-				</view>
-
-				<view class="more">
-					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
-				</view>
-
-			</view>
-
-			<view class="time-item"  @click="pickerShow=true">
-				<view class="time">
-					<view class="time-slot">
-						定时供电
-					</view>
-					<view class="type">
-						未设置
-					</view>
-				</view>
-
-				<view class="more">
-					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
-				</view>
-
-			</view>
-
-			<view class="time-item"   @click="pickerShow=true">
-				<view class="time">
-					<view class="time-slot">
-						定时关闭
-					</view>
-					<view class="type">
-						未设置
-					</view>
-				</view>
-
-				<view class="more">
-					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
-				</view>
-
-			</view>
-		</view>
-		<!-- 重复类型 -->
-		<view class="repeatType" v-if="typeShow" >
-			
-					<u-popup v-model="typeShow" mode="bottom" >
-						<view>
-							<view class="headline">
-								重复类型
-							</view>
-							<view class="type-group">
-								<view class="item">
-									<view class="item-title item-title-checked">
-										执行一次
-									</view>
-									<view class="item-icon">
-										<img src="@/assets/img/riLine-check-line.svg" alt="" />
-									</view>
-								</view>
-								<view class="item">
-									<view class="item-title">
-										每天
-									</view>
-									<view class="item-icon">
-										<img src="" alt="" />
-									</view>
-								</view>
-								<view class="item" @click="customPopup=true" >
-									<view class="item-title">
-										自定义
-									</view>
-									<view class="item-icon">
-										<img src="" alt="" />
-									</view>
-								</view>
-							</view>
-						</view>
-					</u-popup>
-				
-		</view>
-
-  <!-- 关闭时间 -->
-         <ujpPicker  mode="time" v-model="pickerShow" :params="params"></ujpPicker>
-	<!-- 自定义重复 -->
-	
-		<u-popup  v-model="customPopup" mode="bottom" >
-			<view class="custom">
-				<view class="headline">
-					自定义重复
-				</view>
-				<view class="radio-group">
-					<view class="radio-item">
-						<view class="item-title">
-							周一
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周二
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周三
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周四
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周五
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周六
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-					<view class="radio-item">
-						<view class="item-title">
-							周日
-						</view>
-						<view class="item-value">
-							<label class="radio">
-								<radio value="" /><text></text>
-							</label>
-						</view>
-					</view>
-				</view>
-			
-			  <view class="btn-group">
-			  	<view class="btn cancel">
-			  		取消
-			  	</view>
-				<view class="btn confirm">
-					确认
-				</view>
-			  </view>
-			
-			
-			</view>
-		</u-popup>
-	
-	</view>
-</template>
-
-<script>
-	 
-	 import ujpPicker from '@/components/u-picker.vue'
-   
-	 export default {
-		 components: {
-		 	ujpPicker
-		 },
-		data() {
-			
-			return {
-				typeShow:true,
-				pickerShow :false,
-				typeShow:false,
-				customPopup:false,
-				
-				params: {
-					year: false,
-					month: false,
-					day: false,
-					hour: true,
-					minute: true,
-					second: false,
-				},
-								
-
-			}
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	/deep/.u-slot-right {
-		margin-right: 32rpx;
-
-		img {
-			width: 48rpx;
-			height: 48rpx;
-		}
-	}
-
-	.time-group {
-		background-color: #fff;
-
-		.time-item {
-
-			padding: 24rpx 0;
-			margin: 0 32rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			border-bottom: 1px solid rgba(221, 221, 221, 1);
-
-			.time {
-				.time-slot {
-					color: rgba(16, 16, 16, 1);
-					font-size: 32rpx;
-				}
-
-				.type {
-					color: rgba(119, 119, 119, 1);
-				}
-			}
-		}
-
-		.time-item:last-of-type {
-			border: none;
-		}
-	}
-
- 
- // 重复类型
- .repeatType{
-	 .headline{
-		 color: rgba(16,16,16,1);
-		 font-size: 36rpx;
-		 margin-top: 32rpx;
-		 font-weight: bold;
-		 text-align: center;
-	 }
-	 .type-group{
-		 padding: 32rpx;
-		 .item{
-			 display: flex;
-			 align-items: center;
-			 justify-content: space-between;
-			 height: 96rpx;
-			 line-height: 96rpx;
-		 }
-		 .item-title{
-			 color: rgb(16,16,16);
-			 font-size: 32rpx;
-		 }
-		 .item-title-checked{
-			 color: rgba(22,119,255,1);
-		 }
-	 }
- }
- 
- 
- 
- // 自定义重复
- .custom{
-	 padding: 32rpx;
-	 .headline{
-	 		 color: rgba(16,16,16,1);
-	 		 font-size: 36rpx;
-	 		 margin-bottom: 32rpx;
-	 		 font-weight: bold;
-	 		 text-align: center;
-			 }
-			 .radio-group{
-				 .radio-item{
-					 display: flex;
-					 align-items: center;
-					 justify-content: space-between;
-					 height: 96rpx;
-					 line-height: 96rpx;
-					 .item-title{
-						 color: rgba(16,16,16,1);
-						 font-size: 32rpx;
-					 }
-				 }
-				 
-			 
-	 }
-	 .btn-group{
-	 				 display: flex;
-	 				 align-items: center;
-	 				 justify-content: space-between;
-					 .btn{
-						 width: 328rpx;
-						 height: 80rpx;
-						 line-height: 80rpx;
-						 
-						 font-size: 32rpx;
-						 border-radius: 4px;
-						 text-align: center;
-						 margin-top: 24rpx;
-					 }
-					 .cancel{
-						 background-color: rgba(222,225,228,1);
-						 color: rgba(51,51,51,1);
-					 }
-					 .confirm{
-						 background-color: rgba(22,119,255,1);
-						 color: rgba(255,255,255,1);
-					 }
-	 			 }
- }
- 
- 
- 
- 
- /deep/.u-drawer-content-visible{
-	 border-radius: 12px 12px 0 0 ;
- }
-
-
-
+<template>
+	<view>
+		<u-navbar title="时间段定时" title-color="#101010">
+
+			<view slot="right" @click="deleteShow=true">
+				<img src="@/assets/img/riLine-check-line 1.svg" alt="" />
+			</view>
+
+		</u-navbar>
+
+		<view class="time-group">
+			<view class="time-item" @click="typeShow=true" >
+				<view class="time">
+					<view class="time-slot">
+						重复
+					</view>
+					<view class="type">
+						执行一次
+					</view>
+				</view>
+
+				<view class="more">
+					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
+				</view>
+
+			</view>
+
+			<view class="time-item"  @click="pickerShow=true">
+				<view class="time">
+					<view class="time-slot">
+						定时供电
+					</view>
+					<view class="type">
+						未设置
+					</view>
+				</view>
+
+				<view class="more">
+					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
+				</view>
+
+			</view>
+
+			<view class="time-item"   @click="pickerShow=true">
+				<view class="time">
+					<view class="time-slot">
+						定时关闭
+					</view>
+					<view class="type">
+						未设置
+					</view>
+				</view>
+
+				<view class="more">
+					<u-icon name="arrow-right" color="#b2b2b2"></u-icon>
+				</view>
+
+			</view>
+		</view>
+		<!-- 重复类型 -->
+		<view class="repeatType" v-if="typeShow" >
+			
+					<u-popup v-model="typeShow" mode="bottom" >
+						<view>
+							<view class="headline">
+								重复类型
+							</view>
+							<view class="type-group">
+								<view class="item">
+									<view class="item-title item-title-checked">
+										执行一次
+									</view>
+									<view class="item-icon">
+										<img src="@/assets/img/riLine-check-line.svg" alt="" />
+									</view>
+								</view>
+								<view class="item">
+									<view class="item-title">
+										每天
+									</view>
+									<view class="item-icon">
+										<img src="" alt="" />
+									</view>
+								</view>
+								<view class="item" @click="customPopup=true" >
+									<view class="item-title">
+										自定义
+									</view>
+									<view class="item-icon">
+										<img src="" alt="" />
+									</view>
+								</view>
+							</view>
+						</view>
+					</u-popup>
+				
+		</view>
+
+  <!-- 关闭时间 -->
+         <ujpPicker  mode="time" v-model="pickerShow" :params="params"></ujpPicker>
+	<!-- 自定义重复 -->
+	
+		<u-popup  v-model="customPopup" mode="bottom" >
+			<view class="custom">
+				<view class="headline">
+					自定义重复
+				</view>
+				<view class="radio-group">
+					<view class="radio-item">
+						<view class="item-title">
+							周一
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周二
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周三
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周四
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周五
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周六
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+					<view class="radio-item">
+						<view class="item-title">
+							周日
+						</view>
+						<view class="item-value">
+							<label class="radio">
+								<radio value="" /><text></text>
+							</label>
+						</view>
+					</view>
+				</view>
+			
+			  <view class="btn-group">
+			  	<view class="btn cancel">
+			  		取消
+			  	</view>
+				<view class="btn confirm">
+					确认
+				</view>
+			  </view>
+			
+			
+			</view>
+		</u-popup>
+	
+	</view>
+</template>
+
+<script>
+	 
+	 import ujpPicker from '@/components/u-picker.vue'
+   
+	 export default {
+		 components: {
+		 	ujpPicker
+		 },
+		data() {
+			
+			return {
+				typeShow:true,
+				pickerShow :false,
+				typeShow:false,
+				customPopup:false,
+				
+				params: {
+					year: false,
+					month: false,
+					day: false,
+					hour: true,
+					minute: true,
+					second: false,
+				},
+								
+
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	::v-deep.u-slot-right {
+		margin-right: 32rpx;
+
+		img {
+			width: 48rpx;
+			height: 48rpx;
+		}
+	}
+
+	.time-group {
+		background-color: #fff;
+
+		.time-item {
+
+			padding: 24rpx 0;
+			margin: 0 32rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-bottom: 1px solid rgba(221, 221, 221, 1);
+
+			.time {
+				.time-slot {
+					color: rgba(16, 16, 16, 1);
+					font-size: 32rpx;
+				}
+
+				.type {
+					color: rgba(119, 119, 119, 1);
+				}
+			}
+		}
+
+		.time-item:last-of-type {
+			border: none;
+		}
+	}
+
+ 
+ // 重复类型
+ .repeatType{
+	 .headline{
+		 color: rgba(16,16,16,1);
+		 font-size: 36rpx;
+		 margin-top: 32rpx;
+		 font-weight: bold;
+		 text-align: center;
+	 }
+	 .type-group{
+		 padding: 32rpx;
+		 .item{
+			 display: flex;
+			 align-items: center;
+			 justify-content: space-between;
+			 height: 96rpx;
+			 line-height: 96rpx;
+		 }
+		 .item-title{
+			 color: rgb(16,16,16);
+			 font-size: 32rpx;
+		 }
+		 .item-title-checked{
+			 color: rgba(22,119,255,1);
+		 }
+	 }
+ }
+ 
+ 
+ 
+ // 自定义重复
+ .custom{
+	 padding: 32rpx;
+	 .headline{
+	 		 color: rgba(16,16,16,1);
+	 		 font-size: 36rpx;
+	 		 margin-bottom: 32rpx;
+	 		 font-weight: bold;
+	 		 text-align: center;
+			 }
+			 .radio-group{
+				 .radio-item{
+					 display: flex;
+					 align-items: center;
+					 justify-content: space-between;
+					 height: 96rpx;
+					 line-height: 96rpx;
+					 .item-title{
+						 color: rgba(16,16,16,1);
+						 font-size: 32rpx;
+					 }
+				 }
+				 
+			 
+	 }
+	 .btn-group{
+	 				 display: flex;
+	 				 align-items: center;
+	 				 justify-content: space-between;
+					 .btn{
+						 width: 328rpx;
+						 height: 80rpx;
+						 line-height: 80rpx;
+						 
+						 font-size: 32rpx;
+						 border-radius: 4px;
+						 text-align: center;
+						 margin-top: 24rpx;
+					 }
+					 .cancel{
+						 background-color: rgba(222,225,228,1);
+						 color: rgba(51,51,51,1);
+					 }
+					 .confirm{
+						 background-color: rgba(22,119,255,1);
+						 color: rgba(255,255,255,1);
+					 }
+	 			 }
+ }
+ 
+ 
+ 
+ 
+ ::v-deep.u-drawer-content-visible{
+	 border-radius: 12px 12px 0 0 ;
+ }
+
+
+
 </style>

+ 435 - 435
pages/timing/timing.vue

@@ -1,445 +1,445 @@
-<template>
-	<view>
-		<u-navbar :title="title" title-color="#101010">
-
+<template>
+	<view>
+		<u-navbar :title="title" title-color="#101010">
+
 			<view slot="right" v-if="timerSwitchList.length"
 			 
-			 @click="deleteShow=!deleteShow">
-
+			 @click="deleteShow=!deleteShow">
+
 				<img v-if="deleteShow==true" src="@/assets/img/arcoDesign-select-all.svg" alt="" /> 
-				<span v-else style="color: red;" >删除</span>
-				<!-- <img  src="@/assets/img/riLine-list-settings-line.svg" alt="" /> -->
-			</view>
-
-		</u-navbar>
-		<view class="time-group">
-			<checkbox-group @change="checkboxChange">
-				<view class="time-item" v-for="(item,i) in timerSwitchList" :key="i" >
-					<view class="time" @click="clicksheetInfo(item)">
-						<view class="time-slot">
+				<span v-else style="color: red;" >删除</span>
+				<!-- <img  src="@/assets/img/riLine-list-settings-line.svg" alt="" /> -->
+			</view>
+
+		</u-navbar>
+		<view class="time-group">
+			<checkbox-group @change="checkboxChange">
+				<view class="time-item" v-for="(item,i) in timerSwitchList" :key="i" >
+					<view class="time" @click="clicksheetInfo(item)">
+						<view class="time-slot">
 							{{item.startTime}}
 							 
-							{{item.switchStatus==2||item.switchStatus==3?'-'+(showjp2time(item.startTime,item.endTime)?'次日':'')+item.endTime:''}}
-						</view>
-						<view class="type">
-							{{item.switchStatusN}} | {{item.type==1?'执行一次':''}}
-							<template v-if="item.type!=1">
-								<template v-if="item.weekdays=='1,2,3,4,5,6,7'">
-									每天
-								</template>
-								<template v-else>
-									<template v-for="(item,i) in item.weekdays.split(',')">
-
-										<span :key="i">
-											{{weeklist[item]}}
-										</span>
-										<span class="weeklistclassSpan" :key="i+'a'">
-											,
-										</span>
-
-
-									</template>
-								</template>
-							</template>
-							<template v-if="item.switchStatus==3">
-								<span style="margin-left: 8rpx;">| {{item.maxPower}}kW</span>
-							</template>
-							<template v-if="item.switchStatus==0&&item.status">
-								<span style="margin-left: 8rpx;">| {{gethtml(item.startTime)}}停电</span>
-							</template>
-							<template v-if="item.switchStatus==1&&item.status">
-								<span style="margin-left: 8rpx;">| {{gethtml(item.startTime)}}供电</span>
-							</template>
-						</view>
-						<view class="type" v-if="item.switchStatus==2&&item.status">
-							<view>{{gethtml(item.startTime)}}供电</view>
-							<view>{{gethtml(item.endTime)}}停电</view>
-						</view>
-						<view class="type" v-if="item.switchStatus==3&&item.status">
-							<view>{{gethtml(item.startTime)}}开启“智能停电”</view>
-							<view>{{gethtml(item.endTime)}}关闭“智能停电”</view>
-						</view>
-					</view>
-					<!-- 开关 -->
-					<view class="switch" v-if="!deleteShow">
-						<u-switch @change="switchBtn(item,$event)" v-model="item.status" size="40"></u-switch>
-					</view>
-					<!-- 单选框 -->
-					<view class="radio" v-if="deleteShow">
-
-						<checkbox :value="item.id"></checkbox>
-
-					</view>
-				</view>
-			</checkbox-group>
-		</view>
-		<u-divider :isnone="timerSwitchList.length==0" nonetext="无记录" border-color="#CFD2D5">已经到底了</u-divider>
-
-		<!-- 添加按钮 -->
-		<view class="add" @click="show=true" v-if="deleteShow==false">
-			<img src="@/assets/img/riLine-add-line 1.svg" alt="" />
-		</view>
-
-		<!-- 新增弹窗 -->
-		<view class="add-popup">
-			<u-action-sheet :list="list" @click="clicksheet" v-model="show" border-radius="16"></u-action-sheet>
-		</view>
-
-		<!-- 删除 -->
-		<view class="delete" v-if="deleteShow" @click="deletePopupQuery">
-			<view class="icon">
-				<img src="@/assets/img/riLine-delete-bin-7-line 1.svg" alt="" />
-			</view>
-			<view class="text">
-				删除
-			</view>
-		</view>
-
-		<!-- 删除确认弹框 -->
-		<u-popup v-model="deletePopup" mode="bottom" border-radius="12">
-			<view class="popup">
-				<view class="headline">
-					删除定时
-				</view>
-				<view class="hint">
-					要删除选中的定时吗?
-				</view>
-				<view class="btn-box">
-					<view class="cancel" @click="deletePopup=false">
-						取消
-					</view>
-					<view class="confirm" @click="deletePopupApi">
-						确认删除
-					</view>
-				</view>
-			</view>
-		</u-popup>
-
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/meterTimer.js'
-	import {
-		hourDistanceArr,
-		parseUnixTime,
-		newDate
-	} from '@/apis/utils/index.js'
-	export default {
-		data() {
-			return {
-				checked: false,
-				show: false,
-				popShow: false,
-				deleteShow: false,
-				deletePopup: false,
-				weeklist: [
-					'', '周一', '周二', '周三', '周四', '周五', '周六', '周日'
-				],
-				list: [{
-						text: '智能停电',
-						value: 3,
-					},
-					{
-						text: '供电时间',
-						value: 0,
-					}, {
-						text: '定时供电',
-						value: 1,
-					}, {
-						text: '定时停电',
-						value: 2,
-					}
-				],
-				timerSwitchList: [],
-				getMeterTimerListReady: false,
-				deleteIds: "",
-				title: "",
-
-			}
-		},
-		onLoad(op) {
-			if (op.id) {
-				this.title = op.title;
-				this.meterId = op.id;
-				this.getMeterTimerList()
-			}
-		},
-		onShow() {
-			if (this.meterId) {
-				this.getMeterTimerList()
-			}
-
-		},
-		methods: {
-			gethtml(item) {
-				var str = parseUnixTime(new Date().getTime(), '{y}-{m}-{d}');
-				var time1 = new Date();
-				var time2 = newDate(str + ' ' + item + ':00');
-				var sz = []
-				if (time1 > time2) {
-					time2.setDate(time2.getDate() + 1)
-					sz = hourDistanceArr(time1, time2)
-				} else {
-
-					sz = hourDistanceArr(time1, time2)
-				}
-				console.log(sz[0])
-				return (sz[0] ? sz[0] + '小时' : '') + (sz[1] ? sz[1] + '分钟后' : '0分钟后')
-
-			},
-			switchBtn(node, key) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API.changeStatus({
-					id: node.id,
-					//enabled:key
-				}).then((res) => {
-					uni.hideLoading();
-					node.status = res.data.status
-
-				}).catch(error => {
-					node.status=!key
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			showjp2time(time1, time2) {
-				if (time1 && time2) {
-					var num1 = parseInt(time1.replace(":", ''))
-					var num2 = parseInt(time2.replace(":", ''))
-					return num1 >= num2
-				} else {
-					return false
-				}
-
-			},
-			deletePopupQuery() {
-				if (this.deleteIds != '') {
-					this.deletePopup = true
-				} else {
-					uni.showToast({
-						title: "请至少勾选一项",
-						icon: "none"
-					})
-				}
-
-			},
-			deletePopupApi() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API.deleteSwitch({
-					ids: this.deleteIds
-				}).then((response) => {
-					uni.hideLoading();
-					this.deletePopup = false
-					this.deleteShow = false
-					this.deleteIds = ""
-					this.getMeterTimerList()
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			checkboxChange(e) {
-				var sz = e.detail.value;
-				this.deleteIds = sz.join()
-
-			},
-			clicksheetInfo(item) {
-				if (!this.deleteShow) {
-					var url = `/pages/timing/autoOff?id=${item.id}`
-					uni.navigateTo({
-						url: url
-					})
-				}
-
-			},
+							{{item.switchStatus==2||item.switchStatus==3?'-'+(showjp2time(item.startTime,item.endTime)?'次日':'')+item.endTime:''}}
+						</view>
+						<view class="type">
+							{{item.switchStatusN}} | {{item.type==1?'执行一次':''}}
+							<template v-if="item.type!=1">
+								<template v-if="item.weekdays=='1,2,3,4,5,6,7'">
+									每天
+								</template>
+								<template v-else>
+									<template v-for="(item,i) in item.weekdays.split(',')">
+
+										<span :key="i">
+											{{weeklist[item]}}
+										</span>
+										<span class="weeklistclassSpan" :key="i+'a'">
+											,
+										</span>
+
+
+									</template>
+								</template>
+							</template>
+							<template v-if="item.switchStatus==3">
+								<span style="margin-left: 8rpx;">| {{item.maxPower}}kW</span>
+							</template>
+							<template v-if="item.switchStatus==0&&item.status">
+								<span style="margin-left: 8rpx;">| {{gethtml(item.startTime)}}停电</span>
+							</template>
+							<template v-if="item.switchStatus==1&&item.status">
+								<span style="margin-left: 8rpx;">| {{gethtml(item.startTime)}}供电</span>
+							</template>
+						</view>
+						<view class="type" v-if="item.switchStatus==2&&item.status">
+							<view>{{gethtml(item.startTime)}}供电</view>
+							<view>{{gethtml(item.endTime)}}停电</view>
+						</view>
+						<view class="type" v-if="item.switchStatus==3&&item.status">
+							<view>{{gethtml(item.startTime)}}开启“智能停电”</view>
+							<view>{{gethtml(item.endTime)}}关闭“智能停电”</view>
+						</view>
+					</view>
+					<!-- 开关 -->
+					<view class="switch" v-if="!deleteShow">
+						<u-switch @change="switchBtn(item,$event)" v-model="item.status" size="40"></u-switch>
+					</view>
+					<!-- 单选框 -->
+					<view class="radio" v-if="deleteShow">
+
+						<checkbox :value="item.id"></checkbox>
+
+					</view>
+				</view>
+			</checkbox-group>
+		</view>
+		<u-divider :isnone="timerSwitchList.length==0" nonetext="无记录" border-color="#CFD2D5">已经到底了</u-divider>
+
+		<!-- 添加按钮 -->
+		<view class="add" @click="show=true" v-if="deleteShow==false">
+			<img src="@/assets/img/riLine-add-line 1.svg" alt="" />
+		</view>
+
+		<!-- 新增弹窗 -->
+		<view class="add-popup">
+			<u-action-sheet :list="list" @click="clicksheet" v-model="show" border-radius="16"></u-action-sheet>
+		</view>
+
+		<!-- 删除 -->
+		<view class="delete" v-if="deleteShow" @click="deletePopupQuery">
+			<view class="icon">
+				<img src="@/assets/img/riLine-delete-bin-7-line 1.svg" alt="" />
+			</view>
+			<view class="text">
+				删除
+			</view>
+		</view>
+
+		<!-- 删除确认弹框 -->
+		<u-popup v-model="deletePopup" mode="bottom" border-radius="12">
+			<view class="popup">
+				<view class="headline">
+					删除定时
+				</view>
+				<view class="hint">
+					要删除选中的定时吗?
+				</view>
+				<view class="btn-box">
+					<view class="cancel" @click="deletePopup=false">
+						取消
+					</view>
+					<view class="confirm" @click="deletePopupApi">
+						确认删除
+					</view>
+				</view>
+			</view>
+		</u-popup>
+
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/meterTimer.js'
+	import {
+		hourDistanceArr,
+		parseUnixTime,
+		newDate
+	} from '@/apis/utils/index.js'
+	export default {
+		data() {
+			return {
+				checked: false,
+				show: false,
+				popShow: false,
+				deleteShow: false,
+				deletePopup: false,
+				weeklist: [
+					'', '周一', '周二', '周三', '周四', '周五', '周六', '周日'
+				],
+				list: [{
+						text: '智能停电',
+						value: 3,
+					},
+					{
+						text: '供电时间',
+						value: 0,
+					}, {
+						text: '定时供电',
+						value: 1,
+					}, {
+						text: '定时停电',
+						value: 2,
+					}
+				],
+				timerSwitchList: [],
+				getMeterTimerListReady: false,
+				deleteIds: "",
+				title: "",
+
+			}
+		},
+		onLoad(op) {
+			if (op.id) {
+				this.title = op.title;
+				this.meterId = op.id;
+				this.getMeterTimerList()
+			}
+		},
+		onShow() {
+			if (this.meterId) {
+				this.getMeterTimerList()
+			}
+
+		},
+		methods: {
+			gethtml(item) {
+				var str = parseUnixTime(new Date().getTime(), '{y}-{m}-{d}');
+				var time1 = new Date();
+				var time2 = newDate(str + ' ' + item + ':00');
+				var sz = []
+				if (time1 > time2) {
+					time2.setDate(time2.getDate() + 1)
+					sz = hourDistanceArr(time1, time2)
+				} else {
+
+					sz = hourDistanceArr(time1, time2)
+				}
+				console.log(sz[0])
+				return (sz[0] ? sz[0] + '小时' : '') + (sz[1] ? sz[1] + '分钟后' : '0分钟后')
+
+			},
+			switchBtn(node, key) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.changeStatus({
+					id: node.id,
+					//enabled:key
+				}).then((res) => {
+					uni.hideLoading();
+					node.status = res.data.status
+
+				}).catch(error => {
+					node.status=!key
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			showjp2time(time1, time2) {
+				if (time1 && time2) {
+					var num1 = parseInt(time1.replace(":", ''))
+					var num2 = parseInt(time2.replace(":", ''))
+					return num1 >= num2
+				} else {
+					return false
+				}
+
+			},
+			deletePopupQuery() {
+				if (this.deleteIds != '') {
+					this.deletePopup = true
+				} else {
+					uni.showToast({
+						title: "请至少勾选一项",
+						icon: "none"
+					})
+				}
+
+			},
+			deletePopupApi() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.deleteSwitch({
+					ids: this.deleteIds
+				}).then((response) => {
+					uni.hideLoading();
+					this.deletePopup = false
+					this.deleteShow = false
+					this.deleteIds = ""
+					this.getMeterTimerList()
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			checkboxChange(e) {
+				var sz = e.detail.value;
+				this.deleteIds = sz.join()
+
+			},
+			clicksheetInfo(item) {
+				if (!this.deleteShow) {
+					var url = `/pages/timing/autoOff?id=${item.id}`
+					uni.navigateTo({
+						url: url
+					})
+				}
+
+			},
 			clicksheet(index) {
-				var k=this.list[index].value
-				var url = `/pages/timing/autoOff?meterId=${this.meterId}&type=${index}`
-				uni.navigateTo({
-					url: url
-				})
-			},
-			getMeterTimerList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API.meterTimerList({
-					meterId: this.meterId
-				}).then((response) => {
-					uni.hideLoading();
-					this.getMeterTimerListReady = true
-					this.timerSwitchList = response.data.timerSwitchList;
-
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.weeklistclassSpan:last-child {
-		display: none;
-	}
-	/deep/.u-back-wrap{
+				var k=this.list[index].value
+				var url = `/pages/timing/autoOff?meterId=${this.meterId}&type=${index}`
+				uni.navigateTo({
+					url: url
+				})
+			},
+			getMeterTimerList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.meterTimerList({
+					meterId: this.meterId
+				}).then((response) => {
+					uni.hideLoading();
+					this.getMeterTimerListReady = true
+					this.timerSwitchList = response.data.timerSwitchList;
+
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.weeklistclassSpan:last-child {
+		display: none;
+	}
+	::v-deep.u-back-wrap{
 		background-color: #fff;
-	}
-	/deep/.u-slot-right {
+	}
+	::v-deep.u-slot-right {
 		padding-right: 32rpx;
-		padding-left: 16rpx;
+		padding-left: 16rpx;
 		line-height: 30px;
-		background-color: #fff;
-		img {
-			width: 48rpx;
-			height: 48rpx;
-		}
-	}
-
-	.time-group {
-		background-color: #fff;
-
-		.time-item {
-
-			padding: 24rpx 0;
-			margin: 0 32rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			border-bottom: 1px solid rgba(221, 221, 221, 1);
-
-			.time {
-				width: 100%;
-
-				.time-slot {
-					color: rgba(16, 16, 16, 1);
-					font-size: 32rpx;
-				}
-
-				.type {
-					color: rgba(119, 119, 119, 1);
-				}
-			}
-		}
-
-		.time-item:last-of-type {
-			border: none;
-		}
-	}
-
-	// 添加按钮
-	.add {
-		z-index: 99;
-		width: 128rpx;
-		height: 128rpx;
-		background-color: rgba(22, 119, 255, 1);
-		border-radius: 999px;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		position: fixed;
-		bottom: 80rpx;
-		right: 40rpx;
-
-		img {
-			width: 80rpx;
-			height: 80rpx;
-		}
-	}
-
-	.add-popup {
-		/deep/.u-drawer {
-			left: 24rpx;
-			right: 24rpx;
-			bottom: 24rpx;
-			border-radius: 8px;
-		}
-
-		/deep/.u-action-sheet-item {
-			color: #101010;
-		}
-
-	}
-
-	// 删除
-	.delete {
-		position: fixed;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		background-color: #fff;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		// padding: 20rpx 0;
-		height: 120rpx;
-
-		img {
-			width: 48rpx;
-			height: 48rpx;
-		}
-
-		.text {
-			color: rgba(51, 51, 51, 1);
-			font-size: 20rpx;
-		}
-	}
-
-	// 删除确认弹框
-	.popup {
-		padding: 32rpx;
-		text-align: center;
-
-		.headline {
-			color: rgba(16, 16, 16, 1);
-			font-size: 36rpx;
-			font-weight: bold;
-		}
-
-		.hint {
-			color: rgba(16, 16, 16, 1);
-			font-size: 32rpx;
-			margin-top: 40rpx;
-		}
-
-		.btn-box {
-			margin-top: 82rpx;
-			display: flex;
-			justify-content: space-between;
-
-			.cancel {
-				width: 328rpx;
-				line-height: 80rpx;
-				border-radius: 4px;
-				background-color: rgba(222, 225, 228, 1);
-				color: rgba(51, 51, 51, 1);
-				font-size: 32rpx;
-			}
-
-			.confirm {
-				width: 328rpx;
-				line-height: 80rpx;
-				border-radius: 4px;
-				background-color: rgba(255, 68, 68, 1);
-				color: rgba(255, 255, 255, 1);
-				font-size: 32rpx;
-			}
-		}
-	}
+		background-color: #fff;
+		img {
+			width: 48rpx;
+			height: 48rpx;
+		}
+	}
+
+	.time-group {
+		background-color: #fff;
+
+		.time-item {
+
+			padding: 24rpx 0;
+			margin: 0 32rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-bottom: 1px solid rgba(221, 221, 221, 1);
+
+			.time {
+				width: 100%;
+
+				.time-slot {
+					color: rgba(16, 16, 16, 1);
+					font-size: 32rpx;
+				}
+
+				.type {
+					color: rgba(119, 119, 119, 1);
+				}
+			}
+		}
+
+		.time-item:last-of-type {
+			border: none;
+		}
+	}
+
+	// 添加按钮
+	.add {
+		z-index: 99;
+		width: 128rpx;
+		height: 128rpx;
+		background-color: rgba(22, 119, 255, 1);
+		border-radius: 999px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		position: fixed;
+		bottom: 80rpx;
+		right: 40rpx;
+
+		img {
+			width: 80rpx;
+			height: 80rpx;
+		}
+	}
+
+	.add-popup {
+		::v-deep.u-drawer {
+			left: 24rpx;
+			right: 24rpx;
+			bottom: 24rpx;
+			border-radius: 8px;
+		}
+
+		::v-deep.u-action-sheet-item {
+			color: #101010;
+		}
+
+	}
+
+	// 删除
+	.delete {
+		position: fixed;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		// padding: 20rpx 0;
+		height: 120rpx;
+
+		img {
+			width: 48rpx;
+			height: 48rpx;
+		}
+
+		.text {
+			color: rgba(51, 51, 51, 1);
+			font-size: 20rpx;
+		}
+	}
+
+	// 删除确认弹框
+	.popup {
+		padding: 32rpx;
+		text-align: center;
+
+		.headline {
+			color: rgba(16, 16, 16, 1);
+			font-size: 36rpx;
+			font-weight: bold;
+		}
+
+		.hint {
+			color: rgba(16, 16, 16, 1);
+			font-size: 32rpx;
+			margin-top: 40rpx;
+		}
+
+		.btn-box {
+			margin-top: 82rpx;
+			display: flex;
+			justify-content: space-between;
+
+			.cancel {
+				width: 328rpx;
+				line-height: 80rpx;
+				border-radius: 4px;
+				background-color: rgba(222, 225, 228, 1);
+				color: rgba(51, 51, 51, 1);
+				font-size: 32rpx;
+			}
+
+			.confirm {
+				width: 328rpx;
+				line-height: 80rpx;
+				border-radius: 4px;
+				background-color: rgba(255, 68, 68, 1);
+				color: rgba(255, 255, 255, 1);
+				font-size: 32rpx;
+			}
+		}
+	}
 </style>