Parcourir la source

Merge branch 'report' into dev

yangjunjing il y a 5 ans
Parent
commit
dd264aed4f

+ 38 - 17
src/views/model/report/deleted.vue

@@ -38,10 +38,11 @@
           </el-scrollbar>
         </div>
         <div class="photo" v-for="(it,ind) in item.ScanTaskBase[0].TaskPicList" :key='ind'>
-          <p>{{it.Name}}<span>拍摄时间:{{it.CreateTime | timeTransformation}}</span></p>
           <div class="img-box">
-            <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="现场拍摄照片">
-            <!-- <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${'1542788378693.png'}`" alt="现场拍摄照片"> -->
+            <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="现场拍摄照片">
+            </div>
           </div>
         </div>
       </div>
@@ -105,17 +106,19 @@ export default {
       return str;
     },
     timeTransformation(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;
-      })
+      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: {
@@ -251,6 +254,8 @@ export default {
 .box {
   background: #f2f2f2;
   margin: 0 auto;
+  height: 100%;
+  overflow-y: auto;
   ul {
     .infinite-list-item {
       margin-bottom: 20px;
@@ -340,11 +345,27 @@ export default {
 }
 .img-box {
   width: 100%;
-  // text-align: center;
-  img {
-    vertical-align: middle;
-    width: 400px;
+  .img-content {
+    overflow: hidden;
+    position: relative;
+    width: calc(100%-20px);
     height: 300px;
+    vertical-align: middle;
+    text-align: center;
+    background: #ebeef5;
+    margin-right: 20px;
+    img {
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+      width: 400px;
+      height: 100%;
+      vertical-align: middle;
+    }
   }
 }
+canvas {
+  position: static !important;
+}
 </style>

+ 6 - 4
src/views/model/report/index.vue

@@ -47,7 +47,7 @@
                 </el-badge>
               </template>
             </el-table-column>
-            <el-table-column prop="questionItem" label="有问题的检查项" fixed width="150">
+            <el-table-column prop="questionItem" label="有问题的检查项" fixed width="150" style="border-right:1px solid red">
               <template slot-scope="scope">
                 <el-badge :value="scope.row.questionItem" class="item" :type='scope.row.questionItem?"warning":"success"'>
                 </el-badge>
@@ -410,11 +410,10 @@ export default {
         }
       })
     },
-    tableRowClassName({ row, rowIndex }) {// 设置缺失楼层所在行的背景色
+    tableRowClassName({ row, rowIndex, column }) {// 设置缺失楼层所在行的背景色
       if (row.flag && row.flag === 'lost') {
         return 'warning-row';
       }
-      console.log(rowIndex,9381)
     },
     handleSizeChange(val) {// 切换每页显示数量
       this.page.pageSize = val;
@@ -423,7 +422,7 @@ export default {
     handleCurrentChange(val) {// 切换页码
       this.page.pageNumber = val;
       this.getModelFloor();
-    },
+    }
   },
   watch: {
     projectId() {
@@ -491,4 +490,7 @@ export default {
     background: #f3f3f3 !important;
   }
 }
+.el-table_1_column_4 {
+  border-right: 1px solid rgb(226, 226, 226) !important;
+}
 </style>

+ 44 - 21
src/views/model/report/supplement.vue

@@ -30,16 +30,19 @@
             <div class="photo" v-for="(it,ind) in item.LedgerParam.PhotoDoc.Nameplate" :key="ind">
               <p>{{it.name}}<span>拍摄时间:{{it.createTime | timeTransformation}}</span></p>
               <div class="img-box">
-                <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="铭牌图片">
+                <div class="img-content">
+                  <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="铭牌图片">
+                </div>
               </div>
             </div>
             <div class="photo" v-for="(photo,num) in item.LedgerParam.PhotoDoc.Pic" :key="num+photo">
-              <p v-if="item.LedgerParam.PhotoDoc.Pic">{{photo.name}}<span>拍摄时间:{{photo.createTime | timeTransformation}}</span></p>
               <div class="img-box" v-if="item.LedgerParam.PhotoDoc.Pic">
-                <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${photo.key}`" alt="设备图片" v-if="photo.type !=='video'">
-                <!-- <video v-if="photo.type === 'video'" width="400" height="300" controls>
-                  <source :src="`/image-service/common/image_get?systemId=dataPlatform&key=${photo.key}`" type="video/mp4">
-                </video> -->
+                <p v-if="item.LedgerParam.PhotoDoc.Pic && photo.type !== 'video'">
+                  {{photo.name}}<span>拍摄时间:{{photo.createTime | timeTransformation}}</span>
+                </p>
+                <div class="img-content" v-if="photo.type !=='video'">
+                  <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${photo.key}`" alt="现场图片">
+                </div>
               </div>
             </div>
           </div>
@@ -93,21 +96,22 @@ export default {
       return str;
     },
     timeTransformation(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;
-      })
+      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() {
-    // this.getGraphy();
     this.getToBeSuppement();
   },
   created() {
@@ -161,6 +165,7 @@ export default {
       }
       toBeSupplementEquip(params, res => {
         this.pageData = res.Content;
+        console.log(this.pageData, 123)
         this.pageData.forEach(item => {
           if (item.BIMLocation) {
             let local = {};
@@ -250,6 +255,8 @@ export default {
 .box {
   background: #f2f2f2;
   margin: 0 auto;
+  height: 100%;
+  overflow-y: auto;
   ul {
     .infinite-list-item {
       margin-bottom: 20px;
@@ -339,11 +346,27 @@ export default {
 }
 .img-box {
   width: 100%;
-  // text-align: center;
-  img {
-    vertical-align: middle;
-    width: 400px;
+  .img-content {
+    overflow: hidden;
+    position: relative;
+    width: calc(100%-20px);
     height: 300px;
+    vertical-align: middle;
+    text-align: center;
+    background: #ebeef5;
+    margin-right: 20px;
+    img {
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+      width: 400px;
+      height: 100%;
+      vertical-align: middle;
+    }
   }
 }
+canvas {
+  position: static !important;
+}
 </style>