|
@@ -42,7 +42,7 @@
|
|
|
<div class="img-box">
|
|
|
<p>{{it.Name}}<span>拍摄时间:{{it.CreateTime | timeTransformation}}</span></p>
|
|
|
<div class="img-content">
|
|
|
- <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="现场拍摄照片">
|
|
|
+ <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.Key}`" alt="现场拍摄照片">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -70,13 +70,30 @@ export default {
|
|
|
i: 0,
|
|
|
scene: '',
|
|
|
view: '',
|
|
|
+ page: {
|
|
|
+ pageSize: 50,
|
|
|
+ pageNumber: 1,
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ 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.page.pageNumber++;
|
|
|
+ }
|
|
|
+ this.queryToBelDelEquip();
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
created() {
|
|
|
this.equipComDelList = decodeURIComponent(this.$route.query.equipComDelList);
|
|
|
- this.queryToBelDelEquip();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters('layout', ['projectId'])
|
|
@@ -104,17 +121,6 @@ export default {
|
|
|
timeTransformation(time) {
|
|
|
time = time.substring(0, 16)
|
|
|
return time;
|
|
|
- // time = time.replace(/(\d+)\-(\d+)\-(\d+)\ (\d+)\:(\d+)\:(\d+)/, function () {
|
|
|
- // let str = '';
|
|
|
- // let ary = ['年', '月', '日', '时', '分'];
|
|
|
- // let time = Array.prototype.concat.apply([], arguments);
|
|
|
- // time = time.splice(1, 5);
|
|
|
- // time.forEach((item, index) => {
|
|
|
- // str += item + ary[index];
|
|
|
- // })
|
|
|
- // return str;
|
|
|
- // })
|
|
|
- // return time;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -151,8 +157,8 @@ export default {
|
|
|
Cascade: [
|
|
|
{
|
|
|
Name: "scanTaskBase",// 级联-任务
|
|
|
- Filters: 'TaskState=0',
|
|
|
- Orders: "CreateTime desc",
|
|
|
+ Filters: 'TaskState = 0',
|
|
|
+ Orders: "CreateTime desc ",
|
|
|
},
|
|
|
{
|
|
|
Name: "property",// 级联-资产
|
|
@@ -166,10 +172,23 @@ export default {
|
|
|
Name: "equipCategory"// 级联-设备类型
|
|
|
}
|
|
|
],
|
|
|
- Filters: `ModelId in ${this.equipComDelList}`
|
|
|
+ Orders: "CreateTime desc ",
|
|
|
+ Filters: `ModelId in ${this.equipComDelList}`,
|
|
|
+ PageNumber: this.page.pageNumber,
|
|
|
+ PageSize: this.page.pageSize
|
|
|
}
|
|
|
toBeDelEquipPage(params, res => {
|
|
|
- this.pageData = res.Content;
|
|
|
+ if (this.page.pageNumber == 1) {
|
|
|
+ this.pageData = res.Content;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getGraphy();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.pageData = this.pageData.concat(res.Content);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getGraphy();
|
|
|
+ })
|
|
|
+ }
|
|
|
this.pageData.forEach(item => {
|
|
|
if (item.BIMLocation) {
|
|
|
let local = {};
|
|
@@ -184,9 +203,6 @@ export default {
|
|
|
item.ScanTaskBase = item.ScanTaskBase.shift();
|
|
|
}
|
|
|
});
|
|
|
- this.$nextTick(() => {
|
|
|
- this.getGraphy();
|
|
|
- })
|
|
|
})
|
|
|
},
|
|
|
getGraphy() {// 绘制空间位置图片
|
|
@@ -206,7 +222,6 @@ export default {
|
|
|
let EquipID = can[this.i].dataset.equipid;
|
|
|
let X = Number(can[this.i].dataset.x);
|
|
|
let Y = can[this.i].dataset.y * -1;
|
|
|
- // console.log(X, Y)
|
|
|
that.view.scene = that.scene;
|
|
|
this.scene.addMarker({
|
|
|
Id: EquipID,
|
|
@@ -216,6 +231,11 @@ export default {
|
|
|
that.view.fitSceneToView();
|
|
|
this.scene.isSpaceSelectable = false;
|
|
|
this.i++;
|
|
|
+ if (this.i !== this.pageData.length) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getGraphy();
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
clearGraphy(i) {
|
|
@@ -224,16 +244,10 @@ export default {
|
|
|
// return
|
|
|
// }
|
|
|
this.view = new FloorView(`canvas${i}`)
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- i() {
|
|
|
- if (this.i >= this.pageData.length) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.getGraphy();
|
|
|
- }
|
|
|
- }
|
|
|
+ watch: {}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -361,4 +375,9 @@ export default {
|
|
|
canvas {
|
|
|
position: static !important;
|
|
|
}
|
|
|
+</style>
|
|
|
+<style>
|
|
|
+html {
|
|
|
+ height: auto;
|
|
|
+}
|
|
|
</style>
|