scorpio 2 jaren geleden
bovenliggende
commit
57ca1560b6
1 gewijzigde bestanden met toevoegingen van 14 en 13 verwijderingen
  1. 14 13
      src/views/home/component/dispatch.vue

+ 14 - 13
src/views/home/component/dispatch.vue

@@ -257,10 +257,13 @@ export default {
             }
             return sub
           })
-          const img = tmp.find(ele => ele.type === 4)
-          if (img) {
-            this.srcList = img.fileFolders.map(ele => ele.url)
+          const img = tmp.filter(ele => ele.type === 4)
+          if (img && img.length > 0) {
+            img.forEach(i => {
+              this.srcList.push(i.fileFolder.url)
+            })
           }
+          console.log(this.srcList)
         } else {
           this.$message.error(res.msg)
         }
@@ -322,16 +325,14 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.$api.project
-          .fileRemove({ ids: row.fileIds, type: 2 })
-          .then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.detail()
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
+        this.$api.project.fileRemove({ ids: row.fileId, type: 2 }).then(res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+            this.detail()
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
       })
     },
     openFile(row) {