Browse Source

temp save

liujq 4 years ago
parent
commit
7f5ae145f3

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-48eab293.fe71af2f.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.d9b2812d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-046b4af0.a0bcad37.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-48eab293.3aaa1dd5.js


+ 5 - 7
src/views/house/components/popup/PhotoEdit.vue

@@ -51,7 +51,6 @@ export default {
   data() {
     let domainUrl = process.env.VUE_APP_BASE_API
     const token = window.sessionStorage.getItem('fp_token')
-    const imagesArr = this.$dictData.estate_photo
     return {
       domainUrl,
       token,
@@ -59,25 +58,26 @@ export default {
       formData: [],
       cObj: {},
       isShowMap: false,
-      imagesArr,
+      imagesArr: [],
       curIndex: 0,
     }
   },
   watch: {
     isShow: function(val) {
       if (val) {
+        let imagesArr = JSON.parse(JSON.stringify(this.$dictData.estate_photo))
         if (this.curObj.id) {
           this.loading = true
           this.$api.house.admestatephotolist({estate_id: this.curObj.id}).then(res => {
-            let curArr = res ? JSON.parse(res) : []
+            let curArr = res.data ? JSON.parse(res.data) : []
             curArr.forEach(item => {
-              this.imagesArr.map(one => {
+              imagesArr.map(one => {
                 if (item.val === one.val) {
                   one.urls = item.urls
                 }
               })
             })
-            this.imagesArr = [...this.imagesArr]
+            this.imagesArr = [...imagesArr]
             this.loading = false
           }).catch(err => {
             this.loading = false
@@ -133,12 +133,10 @@ export default {
         this.$api.house[apiStr](newForm).then(data => {
           this.$msgs(newForm.id ? '编辑成功' : '新增成功')
           this.$emit('close', newForm)
-          this.imagesArr = this.$dictData.estate_photo
           this.curIndex = 0
         })
       } else {
         this.$emit('close')
-        this.imagesArr = this.$dictData.estate_photo
         this.curIndex = 0
       }
     },

Some files were not shown because too many files changed in this diff