230320a303 1 anno fa
parent
commit
3655b839c5

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-a72b51de.cb481a63.css


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


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-4514dbbc.4e2db653.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a72b51de.e3831ffa.js


+ 3 - 0
src/api/house.js

@@ -13,6 +13,9 @@ export default {
   admestateedit: params => { // 楼盘编辑
     return getRequestNoSort('/adm/estate/edit', params, 'loading')
   },
+  admestatehousevrscoring: params => { // 楼盘户型VR计分
+    return getRequestNoSort('/adm/estate/housevr/scoring', params, 'loading')
+  },
   admestatedetail: params => { // 楼盘详情
     return getRequestNoSort('/adm/estate/detail', params, 'loading')
   },

+ 15 - 0
src/views/house/components/popup/IndexEdit.vue

@@ -145,6 +145,8 @@ export default {
       areaList: [],
       areaChildList: [],
       areaValIdObj: {},
+      oldVrKeys: [],
+      newVrKeys: [],
     }
   },
   watch: {
@@ -163,15 +165,20 @@ export default {
             if (curData.metro_type) curData.metro_type = curData.metro_type.split(',')
             this.cObj = curData || {}
             let productData = curData.area_data || []
+            let vrkeys = []
             productData.map((one, oneIndex) =>{
               one.product_type_name = arrToObj(this.$dictData.product_type)[one.product_type_val]
               let houseTypeList = one.house_type_list || []
               one.house_type_list_val = []
               houseTypeList.map(two => {
+                two.area_list.forEach(three => {
+                  if (three.vr_key) vrkeys.push(three.vr_key)
+                })
                 two.house_type_name = arrToObj(this.$dictData.house_type)[two.house_type_val]
                 one.house_type_list_val.push(String(two.house_type_val))
               })
             })
+            this.oldVrKeys = [...vrkeys]
             this.productData = [...productData]
             if (curData.area_data) {
               this.getAreaChild('bc', () => {
@@ -473,12 +480,14 @@ export default {
             let productData = this.productData || []
             let pFlag = false
             let vrFlag = false
+            let vrkeys = []
             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 (pThree.vr_key) vrkeys.push(pThree.vr_key)
                 })
               })
               // if (!pOne.average_price || !pOne.house_type_list_val) {
@@ -488,6 +497,7 @@ export default {
               if (!pOne.average_price) pOne.average_price = 0
               if (!pOne.house_type_list_val) pOne.house_type_list_val = ''
             })
+            this.newVrKeys = [...vrkeys]
             // if (pFlag) {
             //   this.$msg('请输入完整的产品均价、户型图!')
             //   return
@@ -509,6 +519,11 @@ export default {
             newForm.pri_image = this.IMdel(newForm.pri_image)
             this.$api.house[apiStr](newForm).then(data => {
               this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$api.house.admestatehousevrscoring({
+                estate_id: this.curObj.id,
+                old_list: JSON.stringify(this.oldVrKeys),
+                new_list: JSON.stringify(this.newVrKeys),
+              })
               this.productData = []
               this.$emit('close', newForm)
             })

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