liujq 3 years ago
parent
commit
8735b43fd4
1 changed files with 16 additions and 1 deletions
  1. 16 1
      src/views/house/components/popup/IndexEdit.vue

+ 16 - 1
src/views/house/components/popup/IndexEdit.vue

@@ -400,12 +400,20 @@ export default {
             if (newForm.park_type) newForm.park_type = newForm.park_type.join(',')
             if (newForm.metro_line) newForm.metro_line = newForm.metro_line.join(',')
             if (newForm.metro_type) newForm.metro_type = newForm.metro_type.join(',')
-            newForm.custom_tag = newForm.custom_tag.replace(/,|、|\/|\\/g, ',')
+            let customTag = newForm.custom_tag.replace(/,|、|\/|\\/g, ',')
             if (!newForm.standard) newForm.standard = ''
             // newForm.stairs_rate = newForm.stairs_rate.replace(',', ',')
             let productData = this.productData || []
             let pFlag = false
+            let vrFlag = false
             productData.forEach(pOne => {
+              let oneArr = pOne.house_type_list || []
+              oneArr.forEach(pTwo => {
+                let twoArr = pTwo.area_list || []
+                twoArr.forEach(pThree => {
+                  if (pThree.vr_key) vrFlag = true
+                })
+              })
               if (!pOne.average_price || !pOne.house_type_list_val) {
                 pFlag = true
               }
@@ -415,6 +423,13 @@ export default {
               this.$msg('请输入完整的产品均价、户型图!')
               return
             }
+            if (vrFlag && newForm.custom_tag.indexOf('户型VR') === -1) {
+              customTag = `户型VR,${newForm.custom_tag}`
+            }
+            if (this.curObj.vr_key && newForm.custom_tag.indexOf('航拍') === -1) {
+              customTag = `航拍,${newForm.custom_tag}`
+            } 
+            newForm.custom_tag = customTag
             if (productData.length === 0) {
               newForm.area_data = ''
             } else {