|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="total-page page-box task-bg">
|
|
<view class="total-page page-box task-bg">
|
|
|
- <Nav title="法案查询" :genre="1" :toBack="true" is_fixed></Nav>
|
|
|
|
|
- <view class="page-env-160">
|
|
|
|
|
|
|
+ <Nav title="资产评估" :genre="1" :toBack="true" is_fixed></Nav>
|
|
|
|
|
+ <view class="p-b40">
|
|
|
<!-- 身份认证start -->
|
|
<!-- 身份认证start -->
|
|
|
<view class="m-t20 m-lr30 text-color-12">
|
|
<view class="m-t20 m-lr30 text-color-12">
|
|
|
<view class="sys-background-fff r-20 p-lr30 p-t30">
|
|
<view class="sys-background-fff r-20 p-lr30 p-t30">
|
|
@@ -53,11 +53,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <EnButton :text="'评估'" @onSubmit="onSubmit"></EnButton>
|
|
|
|
|
- <uni-popup ref="consentObj">
|
|
|
|
|
- <view class="iPhone-padding agreement-data sys-background-fff">
|
|
|
|
|
- </view>
|
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
+ <EnButton class="m-b50" :is_fixed="false" :text="'评估'" @onSubmit="onSubmit"></EnButton>
|
|
|
|
|
+ <popupModuleVue ref="popupModuleRef"></popupModuleVue>
|
|
|
|
|
+ <Tab class="tabs_height" :tab-index="2"></Tab>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -70,8 +68,11 @@
|
|
|
getValuationOption,
|
|
getValuationOption,
|
|
|
predictProperty
|
|
predictProperty
|
|
|
} from "@/api/valuation.js"
|
|
} from "@/api/valuation.js"
|
|
|
|
|
+ import tools from "@/service/tools";
|
|
|
|
|
+ import popupModuleVue from "@/pages/index/module/popup-module.vue";
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ popupModuleVue,
|
|
|
EnInput,
|
|
EnInput,
|
|
|
EnSelect,
|
|
EnSelect,
|
|
|
EnRadio,
|
|
EnRadio,
|
|
@@ -162,6 +163,7 @@
|
|
|
},
|
|
},
|
|
|
propertyRes: {
|
|
propertyRes: {
|
|
|
unit_price: '',
|
|
unit_price: '',
|
|
|
|
|
+ total_price: '',
|
|
|
predict_msg: '',
|
|
predict_msg: '',
|
|
|
},
|
|
},
|
|
|
location: {
|
|
location: {
|
|
@@ -189,6 +191,8 @@
|
|
|
try {
|
|
try {
|
|
|
// 选择位置
|
|
// 选择位置
|
|
|
uni.chooseLocation({
|
|
uni.chooseLocation({
|
|
|
|
|
+ latitude:38.913943,
|
|
|
|
|
+ longitude:121.614794,
|
|
|
success: function(res) {
|
|
success: function(res) {
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
// 更新数据
|
|
// 更新数据
|
|
@@ -326,23 +330,69 @@
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
if (this.propertyData.modelType*1 === 1) {
|
|
if (this.propertyData.modelType*1 === 1) {
|
|
|
- this.houseTypeOption = res.data.houseTypeOption
|
|
|
|
|
|
|
+ // res.data.houseTypeOption.
|
|
|
|
|
+ this.houseTypeOption = res.data.houseTypeOption.map(({ id,name }) => ({
|
|
|
|
|
+ value: id,
|
|
|
|
|
+ text: name
|
|
|
|
|
+ }));
|
|
|
|
|
+ console.log(this.houseTypeOption)
|
|
|
} else if (this.propertyData.modelType*1 === 3) {
|
|
} else if (this.propertyData.modelType*1 === 3) {
|
|
|
- this.levelOption = res.data.levelOption
|
|
|
|
|
- this.transferMethodOption = res.data.transferMethodOption
|
|
|
|
|
- this.landUseOption = res.data.landUseOption
|
|
|
|
|
- this.landSourceOption = res.data.landSourceOption
|
|
|
|
|
- this.propertyData.land_source = this.landSourceOption[0].id
|
|
|
|
|
|
|
+ this.levelOption = res.data.levelOption.map(({ id,name }) => ({
|
|
|
|
|
+ value: id,
|
|
|
|
|
+ text: name
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.transferMethodOption = res.data.transferMethodOption.map(({ id,name }) => ({
|
|
|
|
|
+ value: id,
|
|
|
|
|
+ text: name
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.landUseOption = res.data.landUseOption.map(({ id,name }) => ({
|
|
|
|
|
+ value: id,
|
|
|
|
|
+ text: name
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.landSourceOption = res.data.landSourceOption.map(({ id,name }) => ({
|
|
|
|
|
+ value: id,
|
|
|
|
|
+ text: name
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.propertyData.land_source = this.landSourceOption[0].value
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onSubmit() {
|
|
onSubmit() {
|
|
|
console.log('提交评估数据', this.propertyData)
|
|
console.log('提交评估数据', this.propertyData)
|
|
|
- predictProperty(this.propertyData).then(res => {
|
|
|
|
|
|
|
+ predictProperty({
|
|
|
|
|
+ level_id: this.propertyData.level_id*1,
|
|
|
|
|
+ transfer_method: this.propertyData.transfer_method*1,
|
|
|
|
|
+ land_use: this.propertyData.land_use*1,
|
|
|
|
|
+ land_source: this.propertyData.land_source*1,
|
|
|
|
|
+ investment: this.propertyData.investment*1,
|
|
|
|
|
+ plot_mix: this.propertyData.plot_mix*1,
|
|
|
|
|
+ plot_max: this.propertyData.plot_max*1,
|
|
|
|
|
+ height_mix: this.propertyData.height_mix*1,
|
|
|
|
|
+ height_max: this.propertyData.height_max*1,
|
|
|
|
|
+ greening_mix: this.propertyData.greening_mix*1,
|
|
|
|
|
+ greening_max: this.propertyData.greening_max*1,
|
|
|
|
|
+ age_limit: this.propertyData.age_limit*1,
|
|
|
|
|
+ floor_area: this.propertyData.floor_area*1,
|
|
|
|
|
+ lat: this.propertyData.lat*1,
|
|
|
|
|
+ lng: this.propertyData.lng*1,
|
|
|
|
|
+ is_sold: this.propertyData.is_sold*1,
|
|
|
|
|
+ is_rent: this.propertyData.is_rent*1,
|
|
|
|
|
+ is_morgaged: this.propertyData.is_morgaged*1,
|
|
|
|
|
+ is_occupied: this.propertyData.is_occupied*1,
|
|
|
|
|
+ is_seizured: this.propertyData.is_seizured*1,
|
|
|
|
|
+ address: this.propertyData.address,
|
|
|
|
|
+ modelType: this.propertyData.modelType*1,
|
|
|
|
|
+ area: this.propertyData.area*1,
|
|
|
|
|
+ district: this.propertyData.district*1,
|
|
|
|
|
+ houseType: this.propertyData.houseType*1,
|
|
|
|
|
+ complexName:this.propertyData.complexName,
|
|
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
console.log(res, 'res');
|
|
console.log(res, 'res');
|
|
|
this.propertyRes = res.data
|
|
this.propertyRes = res.data
|
|
|
|
|
+ this.propertyRes.total_price = (res.data.unit_price*this.propertyData.area).toFixed(2)
|
|
|
|
|
+ this.$refs.popupModuleRef.openPop(5,this.propertyRes)
|
|
|
} else {
|
|
} else {
|
|
|
tools.error(res.msg)
|
|
tools.error(res.msg)
|
|
|
}
|
|
}
|