|
|
@@ -223,7 +223,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
flag: 1, |
|
|
flag: 1, |
|
|
provice: [], |
|
|
provice: [], |
|
|
area:'', |
|
|
|
|
|
|
|
|
area: "", |
|
|
provinceId: "", //省id |
|
|
provinceId: "", //省id |
|
|
cityId: "", //市id |
|
|
cityId: "", //市id |
|
|
currentPage: 1, |
|
|
currentPage: 1, |
|
|
@@ -242,7 +242,7 @@ export default { |
|
|
this.flag = this.$route.query.flag; |
|
|
this.flag = this.$route.query.flag; |
|
|
// 获取用户信息 |
|
|
// 获取用户信息 |
|
|
this.info = getStore({ name: "userInfo" }); |
|
|
this.info = getStore({ name: "userInfo" }); |
|
|
|
|
|
|
|
|
|
|
|
// this.info.selectHouseType=1 |
|
|
// 获取数据 |
|
|
// 获取数据 |
|
|
if (this.flag == 1) { |
|
|
if (this.flag == 1) { |
|
|
// 获取代理商 |
|
|
// 获取代理商 |
|
|
@@ -252,10 +252,7 @@ export default { |
|
|
// 获取公司 |
|
|
// 获取公司 |
|
|
this.getCompanyList(); |
|
|
this.getCompanyList(); |
|
|
} else { |
|
|
} else { |
|
|
// 获取楼盘 |
|
|
|
|
|
this.zkhousePage(); |
|
|
|
|
|
// 获取区域列表 |
|
|
|
|
|
this.findArea() |
|
|
|
|
|
|
|
|
this.findByUserName(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: {}, |
|
|
computed: {}, |
|
|
@@ -274,6 +271,20 @@ export default { |
|
|
this.total = res.data.total; |
|
|
this.total = res.data.total; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
findByUserName() { |
|
|
|
|
|
this.$api.api |
|
|
|
|
|
.findByUserName({ |
|
|
|
|
|
managerPhone: this.info.username, |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
// console.log(res); |
|
|
|
|
|
this.info.selectHouseType=res.selectHouseType |
|
|
|
|
|
// 获取楼盘 |
|
|
|
|
|
this.zkhousePage(); |
|
|
|
|
|
// 获取区域列表 |
|
|
|
|
|
this.findArea(); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
getCompanyList() { |
|
|
getCompanyList() { |
|
|
this.$api.api |
|
|
this.$api.api |
|
|
.zkorg({ |
|
|
.zkorg({ |
|
|
@@ -288,12 +299,11 @@ export default { |
|
|
this.total = res.data.total; |
|
|
this.total = res.data.total; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
findArea(){ |
|
|
|
|
|
this.$api.api.findArea() |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
this.options=res.data.records |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
findArea() { |
|
|
|
|
|
this.$api.api.findArea().then((res) => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
this.options = res.data.records; |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
zkhousePage() { |
|
|
zkhousePage() { |
|
|
let obj = { |
|
|
let obj = { |
|
|
@@ -301,23 +311,24 @@ export default { |
|
|
size: this.size, |
|
|
size: this.size, |
|
|
propertyName: this.propertyName, |
|
|
propertyName: this.propertyName, |
|
|
}; |
|
|
}; |
|
|
if(this.info.selectHouseType == 1){ |
|
|
|
|
|
|
|
|
if (this.info.selectHouseType == 1) { |
|
|
this.$api.api.zkhousePage(obj).then((res) => { |
|
|
this.$api.api.zkhousePage(obj).then((res) => { |
|
|
// console.log(res) |
|
|
|
|
|
this.list = res.data.records; |
|
|
|
|
|
this.total = res.data.total; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
this.list = res.data.records; |
|
|
|
|
|
this.total = res.data.total; |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
if(this.info.selectHouseType == 2){ |
|
|
|
|
|
this.$api.api.findHouseByArea({ |
|
|
|
|
|
id:this.area |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
this.list = res.data.records; |
|
|
|
|
|
this.total = res.data.total; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (this.info.selectHouseType == 2) { |
|
|
|
|
|
this.$api.api |
|
|
|
|
|
.findHouseByArea({ |
|
|
|
|
|
id: this.area, |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
this.list = res.data.records; |
|
|
|
|
|
this.total = res.data.total; |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
chose(item) { |
|
|
chose(item) { |
|
|
console.log(item); |
|
|
console.log(item); |
|
|
|