Browse Source

no message

linwenxin 7 months ago
parent
commit
6e0a2ebdce
1 changed files with 12 additions and 4 deletions
  1. 12 4
      src/packageWorkorder/pages/infoCollect/form.vue

+ 12 - 4
src/packageWorkorder/pages/infoCollect/form.vue

@@ -188,14 +188,18 @@ export default {
           for (let i = 0; i < this.collectImgList.length; i++) {
             for (let j = 0; j < collectImgList.length; j++) {
               if (this.collectImgList[i].fileName == collectImgList[j].fileName) {
-                this.collectImgList[i].fileUrl = collectImgList[j].fileUrl
+                let obj = this.collectImgList[j]
+                obj.fileUrl = collectImgList[j].fileUrl
+                this.$set(this.collectImgList, j, obj)
               }
             }
           }
           for (let i = 0; i < this.faultImgList.length; i++) {
             for (let j = 0; j < faultImgList.length; j++) {
               if (this.faultImgList[i].fileName == faultImgList[j].fileName) {
-                this.faultImgList[i].fileUrl = faultImgList[j].fileUrl
+                let obj = this.faultImgList[j]
+                obj.fileUrl = faultImgList[j].fileUrl
+                this.$set(this.faultImgList, j, obj)
               }
             }
           }
@@ -299,7 +303,9 @@ export default {
               productDetailId: this.detail.id
             })
             .then(res => {
-              this.collectImgList[index].fileUrl = res.data
+              let obj = this.collectImgList[index]
+              obj.fileUrl = res.data
+              this.$set(this.collectImgList, index, obj)
               uni.hideLoading()
             })
         },
@@ -345,7 +351,9 @@ export default {
               productDetailId: this.detail.id
             })
             .then(res => {
-              this.faultImgList[index].fileUrl = res.data
+              let obj = this.faultImgList[index]
+              obj.fileUrl = res.data
+              this.$set(this.faultImgList, index, obj)
               uni.hideLoading()
             })
         },