Browse Source

模型质量报告

yangjunjing 4 năm trước cách đây
mục cha
commit
50d0da9732

+ 48 - 29
src/views/model/report/deleted.vue

@@ -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>

+ 5 - 7
src/views/model/report/index.vue

@@ -478,20 +478,18 @@ export default {
 .error-color {
   color: #f56c6c;
 }
-</style>
-<style lang="less">
-.el-table {
+/deep/ .el-table_1_column_4 {
+  border-right: 1px solid #e2e2e2 !important;
+}
+/deep/ .el-table {
   .el-table__fixed {
     height: auto !important;
     bottom: 17px;
   }
 }
-.el-table__row.warning-row {
+/deep/ .el-table__row.warning-row {
   td {
     background: #f3f3f3 !important;
   }
 }
-.el-table_1_column_4 {
-  border-right: 1px solid rgb(226, 226, 226) !important;
-}
 </style>

+ 38 - 47
src/views/model/report/supplement.vue

@@ -64,7 +64,11 @@ export default {
       canvasHeight: 280,
       scene: '',
       view: '',
-      i: 0
+      i: 0,
+      page: {
+        pageSize: 50,
+        pageNumber: 1,
+      }
     }
   },
   filters: {
@@ -86,22 +90,23 @@ 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;
     }
   },
   mounted() {
-    // document.addEventListener('scroll', this.onmousewheel, false);
     this.getToBeSuppement();
+    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);
@@ -110,14 +115,6 @@ export default {
     ...mapGetters('layout', ['projectId'])
   },
   methods: {
-    // onmousewheel() {
-    //   let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
-    //   let clientHeight = document.documentElement.clientHeight;
-    //   let contentTop = document.body.scrollHeight;
-    //   if (scrollTop + clientHeight + 100 >= contentTop) {
-    //     console.log(1);
-    //   }
-    // },
     copyContent(element) {
       // 双击复制
       let content = element.target.innerText;
@@ -156,10 +153,23 @@ export default {
             "Name": "familyName"
           }
         ],
-        Filters: `ModelId in ${this.equipComDelList}`
+        Filters: `ModelId in ${this.equipComDelList}`,
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
       }
       toBeSupplementEquip(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 = res.Content;
         this.pageData.forEach(item => {
           if (item.BIMLocation) {
             let local = {};
@@ -184,9 +194,6 @@ export default {
             })
           }
         });
-        this.$nextTick(() => {
-          this.getGraphy();
-        })
       })
     },
     getGraphy() {// 绘制空间位置图片
@@ -206,7 +213,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,32 +222,22 @@ export default {
         that.view.fitSceneToView();
         this.scene.isSpaceSelectable = false;
         this.i++;
+        if (this.i !== this.pageData.length) {
+          this.$nextTick(() => {
+            this.getGraphy();
+          })        }
       })
     },
     clearGraphy(i) {
-      // if (this.view && this.view.scene) {
-      //   this.view.scene = null;
-      //   return
-      // }
       this.view = new FloorView(`canvas${i}`)
     }
   },
-  watch: {
-    i() {
-      if (this.i >= this.pageData.length) {
-        return;
-      }
-      this.getGraphy();
-    }
-  }
+  watch: {}
 }
 </script>
 
 
 <style lang="less" scoped>
-html {
-  height: auto;
-}
 // 取消打印功能默认的左右边距
 @media print {
   @page {
@@ -365,9 +361,4 @@ html {
 canvas {
   position: static !important;
 }
-</style>
-<style>
-html {
-  height: auto;
-}
 </style>