|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<!-- 待删除页面 -->
|
|
<!-- 待删除页面 -->
|
|
- <div class="box">
|
|
|
|
|
|
+ <div class="box" ref="boxBody">
|
|
<div class="content-box" v-for="(item,index) in pageData" :key="index">
|
|
<div class="content-box" v-for="(item,index) in pageData" :key="index">
|
|
<div class="content-top">
|
|
<div class="content-top">
|
|
<div class="details">
|
|
<div class="details">
|
|
@@ -74,24 +74,28 @@ export default {
|
|
scene: '',
|
|
scene: '',
|
|
view: '',
|
|
view: '',
|
|
page: {
|
|
page: {
|
|
- pageSize: 50,
|
|
|
|
|
|
+ pageSize: 20,
|
|
pageNumber: 1,
|
|
pageNumber: 1,
|
|
|
|
+ total: 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.queryToBelDelEquip();
|
|
this.queryToBelDelEquip();
|
|
- window.addEventListener('scroll', () => {
|
|
|
|
- let clientHeight = document.documentElement.clientHeight;
|
|
|
|
- let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
|
|
|
- let scrollHeight = document.body.scrollHeight || document.documentElement.scrollHeight;
|
|
|
|
- if (clientHeight + scrollTop + 100 >= scrollHeight) {
|
|
|
|
- if (this.pageData.length < 50) {
|
|
|
|
- this.page.pageNumber = 1
|
|
|
|
- } else {
|
|
|
|
|
|
+ this.boxBody = this.$refs.boxBody;
|
|
|
|
+ this.boxBody.addEventListener('scroll', () => {
|
|
|
|
+ let clientHeight = this.boxBody.clientHeight;
|
|
|
|
+ let scrollTop = this.boxBody.scrollTop;
|
|
|
|
+ let scrollHeight = this.boxBody.scrollHeight;
|
|
|
|
+ if (clientHeight + scrollTop === scrollHeight) {
|
|
|
|
+ console.log(this.page.pageNumber * this.page.pageSize)
|
|
|
|
+ if (this.page.pageNumber * this.page.pageSize < this.page.total) {
|
|
this.page.pageNumber++;
|
|
this.page.pageNumber++;
|
|
|
|
+ if (this.pageData.length < 20) {
|
|
|
|
+ this.page.pageNumber = 1
|
|
|
|
+ }
|
|
|
|
+ this.queryToBelDelEquip();
|
|
}
|
|
}
|
|
- this.queryToBelDelEquip();
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -181,6 +185,21 @@ export default {
|
|
PageSize: this.page.pageSize
|
|
PageSize: this.page.pageSize
|
|
}
|
|
}
|
|
toBeDelEquipPage(params, res => {
|
|
toBeDelEquipPage(params, res => {
|
|
|
|
+ this.page.total = res.PageSize < 20 ? res.PageSize : res.Total;
|
|
|
|
+ res.Content.forEach(item => {
|
|
|
|
+ if (item.BIMLocation) {
|
|
|
|
+ let local = {};
|
|
|
|
+ let ary = item.BIMLocation.split(',');
|
|
|
|
+ let localAry = ['X', 'Y', 'Z'];
|
|
|
|
+ ary.forEach((item, index) => {
|
|
|
|
+ local[localAry[index]] = ary[index];
|
|
|
|
+ })
|
|
|
|
+ item.local = local;
|
|
|
|
+ }
|
|
|
|
+ if (item.ScanTaskBase && item.ScanTaskBase.length > 1) {
|
|
|
|
+ item.ScanTaskBase = item.ScanTaskBase.shift();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
if (this.page.pageNumber == 1) {
|
|
if (this.page.pageNumber == 1) {
|
|
this.pageData = res.Content;
|
|
this.pageData = res.Content;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -188,6 +207,7 @@ export default {
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
this.pageData = this.pageData.concat(res.Content);
|
|
this.pageData = this.pageData.concat(res.Content);
|
|
|
|
+ console.log(this.pageData.length, 19)
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.getGraphy();
|
|
this.getGraphy();
|
|
})
|
|
})
|
|
@@ -209,6 +229,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getGraphy() {// 绘制空间位置图片
|
|
getGraphy() {// 绘制空间位置图片
|
|
|
|
+ console.log(this.i);
|
|
let can = this.$refs.canvas;
|
|
let can = this.$refs.canvas;
|
|
let that = this;
|
|
let that = this;
|
|
that.clearGraphy(this.i)
|
|
that.clearGraphy(this.i)
|
|
@@ -378,9 +399,4 @@ export default {
|
|
canvas {
|
|
canvas {
|
|
position: static !important;
|
|
position: static !important;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
-<style>
|
|
|
|
-html {
|
|
|
|
- height: auto;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|