Browse Source

附件展示

fenghaifu 2 years ago
parent
commit
94b13ecbb1
1 changed files with 10 additions and 9 deletions
  1. 10 9
      src/views/reportForms/fabric-loss-table.vue

+ 10 - 9
src/views/reportForms/fabric-loss-table.vue

@@ -890,15 +890,16 @@ export default {
      // 附件
     openEnclosure(){
       this.$refs.attachmentDisplay.AttachmentModVis = true
-      this.$refs.attachmentDisplay.attachmentData =  [
-        {
-          name:'xxx.png',
-          src:'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
-        },{
-          name:'dd',
-          src:require('@/assets/logo1.png')
-        }
-      ]
+      var attachList = [];
+      if (this.fabricLoss != null && this.fabricLoss.accessorItemList != null){
+        this.fabricLoss.accessorItemList.forEach(e=>{
+          var attach = {};
+          attach.name = e.filename;
+          attach.src=e.fileurl;
+          attachList.push(attach);
+        });
+      }
+      this.$refs.attachmentDisplay.attachmentData =  attachList;
     },
 
     // father