Browse Source

显示大图相关问题

shaun-sheep 5 years ago
parent
commit
6bab319291

+ 1 - 1
src/components/ledger/details/detail/exhibitionEnergy.vue

@@ -13,7 +13,7 @@
             </div>
           </div>
         </div>
-        <!-- <div v-else style="text-align: center;margin-top: 200px">暂无数据</div> -->
+         <div v-else style="text-align: center;margin-top: 200px">暂无数据</div>
       </section>
     </div>
   </div>

+ 3 - 3
src/components/ledger/details/detail/lookFile.vue

@@ -17,8 +17,8 @@
                   </div>
                 </div>
                 <div class="file-box-center">
-                  <p style="margin-top: 20px"> {{delFile(item.Name)}}</p>
-                  <p> {{delFile(item.CreateTime)}}</p>
+                  <p style="margin-top: 20px" :title="item.Name"> {{delFile(item.Name)}}</p>
+                  <p> {{item.CreateTime}}</p>
                 </div>
                 <div class="file-box-right ">
                   <a
@@ -53,7 +53,7 @@
     methods: {
       //处理地址
       delFile(name) {
-        return name && name.length > 20 ? name.substring(0, 20) + "..." : name
+        return name && name.length > 14 ? name.substring(0, 14) + "..." : name
       },
       //删除图片
       deleteFile(i, key) {

+ 11 - 18
src/components/ledger/details/detail/lookImage.vue

@@ -22,7 +22,7 @@
       </div>
       <div style="text-align: center" v-else>暂无数据</div>
     </div>
-    <details-dialog :title="'图片'" :iframeSrc="iframeSrc" :dialog="dialog" :setData="imagesArr"></details-dialog>
+    <details-dialog :title="'图片'" :iframeSrc="iframeSrc" :dialog="dialog" :setData="exhibitionImage.arr"></details-dialog>
   </div>
 </template>
 <script>
@@ -57,13 +57,6 @@
 
       //上传
       uploadAndSubmit(item, key) {
-        // var form = document.forms["demoForm"];
-
-        // if (form["file"].files.length > 0) {
-        // 寻找表单域中的 <input type="file" ... /> 标签
-        // var file = form["file"].files[0];
-
-        console.log("lalala", item)
         let file = item.file;
         // try sending
         let reader = new FileReader();
@@ -118,7 +111,7 @@
                     });
                   }
                   if (type == 'mp4') {
-                    vm.imagesArr.push({
+                    vm.videoPicArr.push({
                       Name: uploadKey + '',
                       Key: uploadKey + "." + type,
                       SystemId: "dataPlatform",
@@ -127,15 +120,15 @@
                     });
                     vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
                   }
-                  if (vm.type == "video" && type == "png") {
-                    vm.videoPicArr.push({
-                      Name: uploadKey + '',
-                      Key: uploadKey + "." + type,
-                      SystemId: "dataPlatform",
-                      Type: "image_video",
-                      CreateTime
-                    })
-                  }
+                  // if (vm.type == "video" && type == "png") {
+                  //   vm.videoPicArr.push({
+                  //     Name: uploadKey + '',
+                  //     Key: uploadKey + "." + type,
+                  //     SystemId: "dataPlatform",
+                  //     Type: "image_video",
+                  //     CreateTime
+                  //   })
+                  // }
                   vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
                 }
               }

+ 7 - 3
src/views/ledger/facility/details/index.vue

@@ -156,7 +156,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -324,6 +325,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -354,7 +356,10 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
+
         let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
+        console.log(video,'video')
         this.exhibitionVideo.list = video
           //判断是否显示图片组件
           this.isShowImage = isArray.length ? true : false
@@ -367,13 +372,12 @@
         //处理数据格式
         arr.map(i => {
           if (i.InputMode == 'F2') {
-            console.log(i.Path, 'ppp')
+
             switch (i.Path) {
               case 'LedgerParam.InsuranceDoc.InsuranceFile':
               case 'LedgerParam.PhotoDoc.Archive':
               case 'LedgerParam.Siteinstall.CheckReport':
                 if (this.instance.hasOwnProperty(i.Path)) {
-                  debugger
                   i.fileList = this.instance[i.Path]
                 }
                 if (picObject[i.InfoPointName]) {

+ 4 - 1
src/views/ledger/facility/details/index_old.vue

@@ -148,7 +148,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -310,6 +311,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -340,6 +342,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
         this.exhibitionVideo.list = video
           //判断是否显示图片组件

+ 4 - 1
src/views/ledger/property/details/index.vue

@@ -138,7 +138,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -255,6 +256,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -285,6 +287,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type =='video' && i.type == 'video' )
         this.exhibitionVideo.list = video
         //判断是否显示图片组件

+ 4 - 1
src/views/ledger/property/details/index_old.vue

@@ -127,7 +127,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -244,6 +245,7 @@
               case 'LedgerParam.Siteinstall.InstallPic':
               case 'LedgerParam.Siteinstall.InstallDrawing':
               case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Pic':
                 if (this.instance.hasOwnProperty(i.Path)) {
                   i.PicList = this.instance[i.Path]
                 }
@@ -274,6 +276,7 @@
             })
           }
         }
+        this.exhibitionImage.arr = isArray
         let video = isArray.filter(i => i.Type =='video' && i.type == 'video' )
         this.exhibitionVideo.list = video
         //判断是否显示图片组件

+ 3 - 1
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -133,7 +133,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -354,6 +355,7 @@
           })
         }
       }
+      this.exhibitionImage.arr = isArray
       let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
       this.exhibitionVideo.list = video
       //判断是否显示图片组件

+ 4 - 1
src/views/ledger/system/systemDetail/index.vue

@@ -133,7 +133,8 @@
         },
         exhibitionImage: {
           title: '图片',
-          list: {}
+          list: {},
+          arr:[]
         },
         exhibitionVideo: {
           title: '视频',
@@ -295,6 +296,7 @@
             case 'LedgerParam.Siteinstall.InstallPic':
             case 'LedgerParam.Siteinstall.InstallDrawing':
             case 'LedgerParam.PhotoDoc.Nameplate':
+            case 'LedgerParam.PhotoDoc.Pic':
               if (this.instance.hasOwnProperty(i.Path)) {
                 i.PicList = this.instance[i.Path]
               }
@@ -325,6 +327,7 @@
           })
         }
       }
+      this.exhibitionImage.arr = isArray
       let video = isArray.filter(i => i.Type != 'image' &&i.type != 'image' )
       this.exhibitionVideo.list = video
       //判断是否显示图片组件