|
@@ -72,7 +72,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="check_info">
|
|
<div class="check_info">
|
|
<div class="info_list">
|
|
<div class="info_list">
|
|
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
|
|
|
+ <!-- <van-pull-refresh v-model="refreshing" @refresh="onRefresh"> -->
|
|
<van-list
|
|
<van-list
|
|
v-model:loading="loading"
|
|
v-model:loading="loading"
|
|
:finished="finished"
|
|
:finished="finished"
|
|
@@ -174,7 +174,7 @@
|
|
</van-row>
|
|
</van-row>
|
|
</template>
|
|
</template>
|
|
<template v-if="deviceType == 'Ammeter'">
|
|
<template v-if="deviceType == 'Ammeter'">
|
|
- <div
|
|
|
|
|
|
+ <!-- <div
|
|
v-if="item.attributeList"
|
|
v-if="item.attributeList"
|
|
class="reduce_type"
|
|
class="reduce_type"
|
|
:style="{
|
|
:style="{
|
|
@@ -186,7 +186,7 @@
|
|
<span>{{
|
|
<span>{{
|
|
`${deviceStatus_filter(item.status)["label"]}`
|
|
`${deviceStatus_filter(item.status)["label"]}`
|
|
}}</span>
|
|
}}</span>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<span class="header">{{ item.controlName }}</span>
|
|
<span class="header">{{ item.controlName }}</span>
|
|
<span>空间信息:{{ item.installSite }}</span>
|
|
<span>空间信息:{{ item.installSite }}</span>
|
|
<!-- <span>设备编号:{{ item.deviceId }}</span>
|
|
<!-- <span>设备编号:{{ item.deviceId }}</span>
|
|
@@ -203,7 +203,7 @@
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</van-list>
|
|
</van-list>
|
|
- </van-pull-refresh>
|
|
|
|
|
|
+ <!-- </van-pull-refresh> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<van-popup v-model:show="showRepairPositionPicker" round position="bottom">
|
|
<van-popup v-model:show="showRepairPositionPicker" round position="bottom">
|
|
@@ -273,6 +273,7 @@ export default {
|
|
const storeyId=ref('');
|
|
const storeyId=ref('');
|
|
const buildingId=ref('');
|
|
const buildingId=ref('');
|
|
const positionList = ref([]); //定位
|
|
const positionList = ref([]); //定位
|
|
|
|
+ const page=ref('1');
|
|
|
|
|
|
function ms(data) {
|
|
function ms(data) {
|
|
let text = "";
|
|
let text = "";
|
|
@@ -295,6 +296,7 @@ export default {
|
|
return text;
|
|
return text;
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
|
|
+ page,
|
|
module,
|
|
module,
|
|
deviceId,
|
|
deviceId,
|
|
controlList,
|
|
controlList,
|
|
@@ -334,7 +336,7 @@ export default {
|
|
{ text: "连接中", value: 1 },
|
|
{ text: "连接中", value: 1 },
|
|
{ text: "断连中", value: 0 },
|
|
{ text: "断连中", value: 0 },
|
|
],
|
|
],
|
|
- total: 3,
|
|
|
|
|
|
+ total:0,
|
|
list: [],
|
|
list: [],
|
|
loading: false,
|
|
loading: false,
|
|
refreshing: false,
|
|
refreshing: false,
|
|
@@ -359,19 +361,16 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.getBuildList();
|
|
this.getBuildList();
|
|
this.setwendu();
|
|
this.setwendu();
|
|
- this.getAircond();
|
|
|
|
|
|
+ //this.getAircond();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//定位完成
|
|
//定位完成
|
|
confirmPosition(val) {
|
|
confirmPosition(val) {
|
|
- console.log(val);
|
|
|
|
this.buildingId=val[0].orgId;
|
|
this.buildingId=val[0].orgId;
|
|
this.storeyId=val[1].orgId;
|
|
this.storeyId=val[1].orgId;
|
|
let storeyName=val[1].orgName=='全部'?'':val[1].orgName+'-';
|
|
let storeyName=val[1].orgName=='全部'?'':val[1].orgName+'-';
|
|
this.name="电商园四期-"+val[0].orgName+storeyName;
|
|
this.name="电商园四期-"+val[0].orgName+storeyName;
|
|
this.showRepairPositionPicker=false;
|
|
this.showRepairPositionPicker=false;
|
|
- console.log(this.buildingId);
|
|
|
|
- console.log(this.storeyId);
|
|
|
|
},
|
|
},
|
|
//继电器下发指令开关
|
|
//继电器下发指令开关
|
|
changeElecSwitch(val, deviceId) {
|
|
changeElecSwitch(val, deviceId) {
|
|
@@ -480,19 +479,28 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getElec() {
|
|
getElec() {
|
|
|
|
+ console.log(this.page)
|
|
api
|
|
api
|
|
.getElec({
|
|
.getElec({
|
|
buildingId:this.buildingId,
|
|
buildingId:this.buildingId,
|
|
storeyId:this.storeyId,
|
|
storeyId:this.storeyId,
|
|
- page: 1,
|
|
|
|
|
|
+ page:this.page,
|
|
limit: 10,
|
|
limit: 10,
|
|
status: this.deviceStatus,
|
|
status: this.deviceStatus,
|
|
controlCategory: "CommonLighting",
|
|
controlCategory: "CommonLighting",
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
|
+ console.log(res)
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
- this.list = res.data.list;
|
|
|
|
|
|
+ this.list=this.list.concat(res.data.list);
|
|
|
|
+ this.loading = false;
|
|
|
|
+ if( res.data.list.length<10){
|
|
|
|
+ this.finished=true;
|
|
|
|
+ }else{
|
|
|
|
+ this.page++;
|
|
|
|
+ }
|
|
|
|
+ console.log(this.list)
|
|
// for(let i=0;i<res.data.list.length;i++){
|
|
// for(let i=0;i<res.data.list.length;i++){
|
|
// if(res.data.list[i].attributeList&&res.data.list[i].attributeList.length!=0){
|
|
// if(res.data.list[i].attributeList&&res.data.list[i].attributeList.length!=0){
|
|
// this.list.push(res.data.list[i])
|
|
// this.list.push(res.data.list[i])
|
|
@@ -504,7 +512,7 @@ export default {
|
|
getAircond() {
|
|
getAircond() {
|
|
api
|
|
api
|
|
.airconditioner({
|
|
.airconditioner({
|
|
- page: 1,
|
|
|
|
|
|
+ page:this.page,
|
|
limit: 10,
|
|
limit: 10,
|
|
buildingId:this.buildingId,
|
|
buildingId:this.buildingId,
|
|
storeyId:this.storeyId,
|
|
storeyId:this.storeyId,
|
|
@@ -512,7 +520,6 @@ export default {
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
- this.list = [];
|
|
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
if (
|
|
if (
|
|
res.data.list[i].attributeList &&
|
|
res.data.list[i].attributeList &&
|
|
@@ -521,8 +528,13 @@ export default {
|
|
this.list.push(res.data.list[i]);
|
|
this.list.push(res.data.list[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if( res.data.list.length<10){
|
|
|
|
+ this.finished=true;
|
|
|
|
+ }else{
|
|
|
|
+ this.page++;
|
|
|
|
+ }
|
|
|
|
+ this.loading = false;
|
|
}
|
|
}
|
|
- console.log(this.list);
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
deviceStatus_filter(val) {
|
|
deviceStatus_filter(val) {
|
|
@@ -564,33 +576,28 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- setTimeout(() => {
|
|
|
|
- if (this.refreshing) {
|
|
|
|
- this.list = [];
|
|
|
|
- this.refreshing = false;
|
|
|
|
- }
|
|
|
|
- for (let i = 0; i < 10; i++) {
|
|
|
|
- this.list.push(this.list.length + 1);
|
|
|
|
- }
|
|
|
|
- this.loading = false;
|
|
|
|
-
|
|
|
|
- if (this.list.length >= 40) {
|
|
|
|
- this.finished = true;
|
|
|
|
- }
|
|
|
|
- }, 1000);
|
|
|
|
- },
|
|
|
|
- onRefresh() {
|
|
|
|
- // 清空列表数据
|
|
|
|
- this.finished = false;
|
|
|
|
-
|
|
|
|
- // 重新加载数据
|
|
|
|
- // 将 loading 设置为 true,表示处于加载状态
|
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- this.onLoad();
|
|
|
|
|
|
+ if(this.deviceType=='AirConditioner'){
|
|
|
|
+ this.getAircond()
|
|
|
|
+ }else{
|
|
|
|
+ this.getElec();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ // onRefresh() {
|
|
|
|
+ // // 清空列表数据
|
|
|
|
+ // finished.value = false;
|
|
|
|
+ // // 重新加载数据
|
|
|
|
+ // // 将 loading 设置为 true,表示处于加载状态
|
|
|
|
+ // loading.value = true;
|
|
|
|
+ // this.onLoad();
|
|
|
|
+ // },
|
|
// change事件可以拿到的是value
|
|
// change事件可以拿到的是value
|
|
handelChange(type, lackTypeTitle, lackTypeList, val) {
|
|
handelChange(type, lackTypeTitle, lackTypeList, val) {
|
|
this[type] = val;
|
|
this[type] = val;
|
|
|
|
+ console.log(this.deviceType)
|
|
|
|
+ this.list=[];
|
|
|
|
+ this.page=1;
|
|
|
|
+ this.finished=true;
|
|
if (this.deviceType == "Ammeter") this.getElec();
|
|
if (this.deviceType == "Ammeter") this.getElec();
|
|
if (this.deviceType == "AirConditioner") this.getAircond();
|
|
if (this.deviceType == "AirConditioner") this.getAircond();
|
|
// 显示中文名字
|
|
// 显示中文名字
|