zhengkaixin před 11 měsíci
rodič
revize
fb60a148c2
2 změnil soubory, kde provedl 74 přidání a 8 odebrání
  1. 1 1
      config/.env.dev.js
  2. 73 7
      pages/tenantList/remoteControl.vue

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

@@ -16,7 +16,7 @@ const UNI_APP = {
 	 //openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
 	openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
 	
-	//openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4", //老板
+	openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4", //老板
 	//openId:"oLowyuFTU3SzpvU4pGNzWk7NC9y0", //wky
 	
 	//openId:"oLowyuHCGgMomNBQEXZSbb5SJxfQ",//杨所

+ 73 - 7
pages/tenantList/remoteControl.vue

@@ -22,7 +22,7 @@
 				</view>
 			</view>
 			<u-search style="padding:24rpx 24rpx 0 24rpx ;" placeholder="请输入关键字" :show-action="false"		 v-model="keyword"></u-search>
-			
+			<u-checkbox v-model="showSet" style="padding:24rpx 0 0 24rpx ;"></u-checkbox>筛选设置“供电管理”的电表
 		</view>
 		<view class="head-head-placeholder " :class="{
 			'head-head-placeholder2':companyList.length>1
@@ -52,7 +52,7 @@
 			<view class="switch" 
 			v-for="(item,i) in meterList" 
 			
-			v-show="(keyword==''||(item.name&&item.name.indexOf(keyword)!=-1))"
+			v-show="(keyword==''||(item.name&&item.name.indexOf(keyword)!=-1))&&(showSet==false||showSet&&item.meterTimerSwitchList.length>0)"
 			v-if="!(item.type==6||item.type==7)"
 			@click="item.allowSwitch?gotoUrl('/pages/tenantList/switchDetail?id='+item.id):''"
 			:key="i"  >
@@ -70,6 +70,35 @@
 					<view class="place">
 						{{item.installationAddressSimple}}
 					</view>
+					<view class="state">
+						<view class="state-item" v-for="(it,j) in item.meterTimerSwitchList" :key="j">
+							{{it.startTime?(it.startTime):''}}
+							{{it.endTime?'- ':''}}
+							{{showjp2time(it.startTime,it.endTime)?'次日':''}}
+							{{it.endTime?(it.endTime):''}}
+							{{it.switchStatusN}} | {{it.type==1?'执行一次':''}}
+							<template v-if="it.type!=1">
+								<template v-if="it.weekdays=='1,2,3,4,5,6,7'">
+									每天
+								</template>
+								<template v-else>
+									<template v-for="(io,k) in it.weekdays.split(',')">
+										<span class="weeklistclassSpan" v-if="k!=0" :key="k+'a'">
+											,
+										</span>
+										<span :key="k">
+											{{weeklist[io]}}
+										</span>
+										
+
+
+									</template>
+								</template>
+							</template>
+							<span style="color: red;padding-left: 8rpx;"> {{it.status?'':'关闭'}}</span>
+						</view>
+					</view>
+					
 				</view>
 				<view class="switch-icon">
 					<view class="icon icon2" v-if="role&&item.allowSwitch" >
@@ -116,7 +145,7 @@
 				tenantList:[],
 				tenantList1:[],
 				remoteReadingMeterList:[],
-				
+				showSet:false,
 				list1: [{
 					name: '格莱慧'
 				}, {
@@ -145,6 +174,9 @@
 					name: '九楼',
 					
 				}],
+				weeklist: [
+					'', '周一', '周二', '周三', '周四', '周五', '周六', '周日'
+				],
 				merchantList1: [], // 商户
 				merchantList2: [],
 				companyList: [],
@@ -170,9 +202,30 @@
 			this.getCompanyInfoList();
 		},
 		methods: {
-			
+			startTimeStr(str){
+				if(str){
+					return str.replace(":","时")+"分"
+				}else{
+					return ''
+				}
+				
+			},
+			showjp2time(time1,time2){
+				
+				if(time1&&time2){
+					var num1=parseInt(time1.replace(":",''))
+					var num2=parseInt(time2.replace(":",''))
+					return num1>num2
+				}else{
+					return false
+				}
+				
+			},
 			getHaveMeterList(){
-				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
 				
 				var data = {
 					companyId:this.companyId,
@@ -180,7 +233,7 @@
 					
 				};
 				API_meterTimer.haveMeterList(data).then((response) => {
-					
+					uni.hideLoading();
 					//var MeterList=response.data.switchRecordList.data
 					var meterList = response.data.remoteReadingMeterList;
 					meterList=meterList.sort((item1,item2)=>{
@@ -507,7 +560,7 @@
   	
   }
   .head-head-placeholder2{
-  	height: 212rpx;
+  	height: 265rpx;
   	
   }
   
@@ -561,4 +614,17 @@
   	width: 20% !important;
   	flex: none !important;
   }
+  .state{
+	  display: flex;
+	  flex-wrap: wrap;
+	  .state-item{
+		  border: 1px solid rgba(204,204,204,1);
+		  border-radius: 4px;
+		  font-size: 24rpx;
+			color: rgba(119,119,119,1);
+			padding:2rpx 8rpx;
+			margin: 2rpx ;
+
+	  }
+  }
 </style>