|
@@ -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) {
|