wh 1 år sedan
förälder
incheckning
042ddb2690
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      pages/Workorder/Remotecontrol/Remotecontrol.vue

+ 6 - 3
pages/Workorder/Remotecontrol/Remotecontrol.vue

@@ -39,7 +39,6 @@
 		</view>
 		<!-- 列表 -->
 		<view class="list">
-
 			<template v-if="deviceType == 'AirConditioner'">
 				<view class="each c" v-for="(item,index) in dataList"  :class="'bg'+(item.attributeList.length==0?'':item.attributeList[2].value)">
 					<div class="top1">
@@ -446,12 +445,10 @@
 								json.concat(res.data.data[0].childrenList),
 								res.data.data[0].childrenList[0].childrenList
 							]
-							console.log(this.columns)
 							let allfloor = [];
 							for (let i = 0; i < res.data.data[0].childrenList.length; i++) {
 								allfloor.push(json.concat(res.data.data[0].childrenList[i].childrenList));
 							}
-							console.log(allfloor)
 							this.columnData = allfloor;
 							this.dataList = []; // 清空数组
 							this.dataForm.page = 1;
@@ -585,10 +582,16 @@
 								this.dataList = []; // 清空数组
 								this.finished = true; // 停止加载
 							}
+							console.log(this.dataList)
 							// 若数据条数不等于0
+							if (this.dataForm.page == 1) {
+								this.dataList = res.data.data.list;
+							} else {
 							this.dataList.push(...res.data.data.list); // 将数据放入list中
+							}
 							this.loading = false; // 加载状态结束
 							this.total = res.data.data.total;
+							
 							// 如果list长度大于等于总数据条数,数据全部加载完成
 							if (this.dataList.length >= res.data.data.total) {
 								this.finished = true; // 结束加载状态