Commit f5dd8b1c by kyle

小数点

parent 5c2e967c
{ {
"name": "sfp-program",
"lockfileVersion": 2,
"requires": true, "requires": true,
"lockfileVersion": 1, "packages": {
"": {
"dependencies": {
"echarts": "^5.3.3",
"jweixin-module": "^1.6.0",
"nanoid": "^4.0.0"
}
},
"node_modules/echarts": {
"version": "5.3.3",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz",
"integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==",
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.3.2"
}
},
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"node_modules/nanoid": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
"integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==",
"bin": {
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^14 || ^16 || >=18"
}
},
"node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/zrender": {
"version": "5.3.2",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.3.2.tgz",
"integrity": "sha512-8IiYdfwHj2rx0UeIGZGGU4WEVSDEdeVCaIg/fomejg1Xu6OifAL1GVzIPHg2D+MyUkbNgPWji90t0a8IDk+39w==",
"dependencies": {
"tslib": "2.3.0"
}
}
},
"dependencies": { "dependencies": {
"echarts": { "echarts": {
"version": "5.3.3", "version": "5.3.3",
...@@ -18,7 +66,7 @@ ...@@ -18,7 +66,7 @@
}, },
"nanoid": { "nanoid": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-4.0.0.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
"integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==" "integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
}, },
"tslib": { "tslib": {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<text>预购面积:</text> <text>预购面积:</text>
<view class="inputContent"> <view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" <input class="uni-input" type="number" placeholder="请输入"
v-model="housePurchaseInfo.preOrderSize" v-model="housePurchaseInfo.preOrderSize" @blur="queryCommercialHousingPrice()"
/><label for=""></label> /><label for=""></label>
</view> </view>
</view> </view>
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
</view> </view>
<view class="line" v-for="houseItem in housePurchasePrices"> <view class="line" v-for="houseItem in housePurchasePrices">
<view class="line_title">{{getResultTitle(houseItem.priceType)}} <view class="line_title">{{getResultTitle(houseItem.priceType)}}
<img src="../../static/images/can.png" alt="" v-show="houseItem.fvDifference >= 0"> <img src="../../static/images/can.png" alt="" v-show="houseItem.fvDifference <= 0">
<img src="../../static/images/cannot.png" alt="" v-show="houseItem.fvDifference < 0"> <img src="../../static/images/cannot.png" alt="" v-show="houseItem.fvDifference > 0">
</view> </view>
<view class="content"> <view class="content">
<view class="left"> <view class="left">
...@@ -317,7 +317,8 @@ ...@@ -317,7 +317,8 @@
console.log(this.houseLoanOldList) console.log(this.houseLoanOldList)
}, },
onchange(e) { onchange(e) {
const value = e.detail.value const value = e.detail.value;
this.queryCommercialHousingPrice();
}, },
onnodeclick(node) { onnodeclick(node) {
this.cityInfo = { this.cityInfo = {
...@@ -429,13 +430,13 @@ ...@@ -429,13 +430,13 @@
} }
// 规划参数默认值 // 规划参数默认值
const palnningParamsDefault = { const palnningParamsDefault = {
acceptableLossRate: 10, acceptableLossRate: 0.1,
downPaymentMin: 30, downPaymentMin: 30,
houseDepreciationRate: 2, houseDepreciationRate: 0.02,
housePriceGrowthRate: 6.25, housePriceGrowthRate: 0.0625,
incomeRate: "3", incomeRate: 0.03,
interestRate: 4.9, interestRate: 0.049,
tnvestmentRate: 3.74 tnvestmentRate: 0.0374
} }
const param = { const param = {
...palnningParamsDefault, ...palnningParamsDefault,
...@@ -494,6 +495,25 @@ ...@@ -494,6 +495,25 @@
numberConverter(val){ numberConverter(val){
return dataHandling.numberConverter(val) return dataHandling.numberConverter(val)
}, },
// 获取房价增长率
queryCommercialHousingPrice(){
if(this.housePurchaseInfo.preOrderSize <= 90){
this.cityInfo['area'] = '1'
}else if(this.housePurchaseInfo.preOrderSize <= 144){
this.cityInfo['area'] = '2'
}else{
this.cityInfo['area'] = '3'
}
this.cityInfo = {
...this.cityInfo,
isNew:1,
}
api.queryCommercialHousingPrice(this.cityInfo).then(res=>{
if(res['success']){
this.planningParams.housePriceGrowthRate = res['data']['priceInfo']['rateB'] / 100;
}
})
}
}, },
mounted(){ mounted(){
// this.drawLine(); // this.drawLine();
......
...@@ -86,13 +86,13 @@ ...@@ -86,13 +86,13 @@
}, },
confirmParams(){ confirmParams(){
const params = { const params = {
housePriceGrowthRate:this.editParamLists.filter(item=>item.alias==='housePriceGrowthRate')[0].value,//房价增长率 housePriceGrowthRate:this.editParamLists.filter(item=>item.alias==='housePriceGrowthRate')[0].value / 100,//房价增长率
houseDepreciationRate:this.editParamLists.filter(item=>item.alias==='houseDepreciationRate')[0].value,//房屋折旧率 houseDepreciationRate:this.editParamLists.filter(item=>item.alias==='houseDepreciationRate')[0].value / 100,//房屋折旧率
downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位) downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位)
interestRate:this.editParamLists.filter(item=>item.alias==='interestRate')[0].value, //贷款年利率 interestRate:this.editParamLists.filter(item=>item.alias==='interestRate')[0].value / 100, //贷款年利率
tnvestmentRate:this.editParamLists.filter(item=>item.alias==='tnvestmentRate')[0].value,//投资回报率 tnvestmentRate:this.editParamLists.filter(item=>item.alias==='tnvestmentRate')[0].value / 100,//投资回报率
incomeRate:this.editParamLists.filter(item=>item.alias==='incomeRate')[0].value,//收入增长率 incomeRate:this.editParamLists.filter(item=>item.alias==='incomeRate')[0].value / 100,//收入增长率
acceptableLossRate:this.editParamLists.filter(item=>item.alias==='acceptableLossRate')[0].value,//可接受本金损失率 acceptableLossRate:this.editParamLists.filter(item=>item.alias==='acceptableLossRate')[0].value / 100,//可接受本金损失率
} }
this.sendData(params) this.sendData(params)
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment