Browse Source

temp save

liujq 4 years ago
parent
commit
13b2c1510a

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-3c31cf1b.8f08dc21.css


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3c31cf1b.ea4a0485.js


+ 34 - 17
src/views/house/components/popup/IndexEdit.vue

@@ -153,7 +153,6 @@ export default {
       let tempList = []
       let houseTypeList = productData[one].house_type_list || []
       const curVal = productData[one].house_type_list_val ||[]
-      console.log(curVal)
       curVal.forEach(v =>{
         let cObj = {
           house_type_name: arrToObj(this.$dictData.house_type)[v],
@@ -208,26 +207,44 @@ export default {
       this.getDef('change', 'metro_line')
     },
     productTypeChange (val, op, item) {
-      let itemArr = item || []
-      let productData = [...this.productData]
+      const valArr = [...val]
+      const productData = [...this.productData]
       let newArr = []
-      productData.forEach((one, o) => {
-        itemArr.forEach((two, t) => {
-          if (String(one.product_type_val) === String(two.val)) {
-            itemArr[t].edIndex = String(o)
+      valArr.forEach(v => {
+        let vObj = {
+          product_type_name: arrToObj(this.$dictData.product_type)[v],
+          product_type_val: v,
+        }
+        productData.forEach(old =>{
+          if (v === String(old.product_type_val)) {
+            vObj = {...old}
           }
         })
+        newArr.push(vObj)
       })
-      itemArr.forEach(cItem => {
-        if (cItem.edIndex) {
-          newArr.push(productData[Number(cItem.edIndex)])
-        } else {
-          newArr.push({
-            product_type_name: cItem.key,
-            product_type_val: cItem.val,
-          })
-        }
-      })
+
+
+      // let itemArr = [...val]
+      // let productData = [...this.productData]
+      // let newArr = []
+      // productData.forEach((one, o) => {
+      //   itemArr.forEach((two, t) => {
+      //     if (String(one.product_type_val) === String(two.val)) {
+      //       itemArr[t].edIndex = String(o)
+      //     }
+      //   })
+      // })
+      // itemArr.forEach(cItem => {
+      //   if (cItem.edIndex) {
+      //     newArr.push(productData[Number(cItem.edIndex)])
+      //   } else {
+      //     newArr.push({
+      //       product_type_name: cItem.key,
+      //       product_type_val: cItem.val,
+      //     })
+      //   }
+      // })
+      console.log(newArr)
       this.productData = [...newArr]
     },
     getDef (str, strKey, strParams) {

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