Commit 8ccea150 by kyle

购房能力测算优化

parent 3c2ec528
......@@ -45,8 +45,12 @@ export default {
if(num){
if(type===1){
const dataNum = (num * Math.pow(10, digitNum + 1) / Math.pow(10, digitNum + 1)).toString();
if(dataNum.indexOf('.')>-1){
return (Number(dataNum.slice(0, dataNum.indexOf('.') + digitNum + 1)) + 10 / Math.pow(10, digitNum + 1)).toFixed(digitNum)
}else{
return dataNum;
}
}else{
return (num * Math.pow(10, digitNum + 1) / Math.pow(10, digitNum + 1)).toFixed(digitNum)
}
}else{
......
......@@ -19,7 +19,7 @@ const config = {
stage,
prod
}
let env = 'stage';
let env = 'dev';
// if (process.env.NODE_ENV === 'development') {
// env = 'dev';
// }else if (process.env.NODE_ENV === 'production') {
......
......@@ -43,7 +43,7 @@
<view class="inputContent">
<input class="uni-input" type="digit" placeholder="请输入"
v-model="housePurchaseInfo.targetPrice" maxlength="12"
/><label for="">m²/元</label>
/><label for="">元/m²</label>
</view>
</view>
<view class="inputItem">
......@@ -161,7 +161,7 @@
</radio-group>
</view>
<view id="myEcharts" style="height: 450rpx;"></view>
<view style="text-align: center;color: #c3c1c1;font-size: 22rpx;">
<view style="text-align: center;color: #c3c1c1;font-size: 22rpx;" v-if="isNeedDis">
差额 = 可实现的 - 你想要的
</view>
<view class="resultSummaryContent">
......@@ -280,6 +280,7 @@
value: '4',
name: '总贷款(万元)'
}],
isNeedDis:true,
isNeedOfficialAccountQrcode:true,
tipsPrice:null,
tipsTotalPrice:null,
......@@ -430,13 +431,26 @@
// 绘制图表
let list1;
let showLists;
let dataOption = ['可实现的', '你想要的', '差额'];
if(this.housePurchasePrices.length){
if(type){
list1 = this.housePurchasePrices.filter((item)=>{
return item.priceType == type
})[0];
showLists = [].concat(this.formatFloat(list1.pvPriceRealization / 10000,2,2),this.formatFloat(list1.pvPriceDesired/10000,2,2),
{value:this.formatFloat(Math.abs(list1.pvDifference)/10000),itemStyle:{color:'#ff0000'}})
this.isNeedDis = list1.pvDifference>0;
if(list1.pvDifference>0){
showLists = [].concat(
this.formatFloat(list1.pvPriceRealization / 10000,2,2),
this.formatFloat(list1.pvPriceDesired/10000,2,2),
{value:this.formatFloat(Math.abs(list1.pvDifference)/10000),
itemStyle:{color:'#ff0000'}})
}else{
showLists = [].concat(
this.formatFloat(list1.pvPriceRealization / 10000,2,2),
this.formatFloat(list1.pvPriceDesired/10000,2,2));
dataOption = ['可实现的', '你想要的']
}
}
}
this.myChart.setOption({
......@@ -445,7 +459,7 @@
left: '20%', // 调整这个属性
},
xAxis: {
data: ['可实现的', '你想要的', '差额'],
data: dataOption,
axisTick:{//坐标轴刻度相关设置。
show: false,
},
......
......@@ -48,7 +48,7 @@
{id:'02',name:'房屋折旧率',value:2,type:'number',remark:'',alias:'houseDepreciationRate',isShow:true},
{id:'03',name:'首付款最低成数',value:30,type:'number',remark:'',alias:'downPaymentMin',isShow:true},
{id:'05',name:'资产投资回报率',value:3.74,type:'number',remark:'',alias:'tnvestmentRate',isShow:true},
{id:'06',name:'投入资金增长率',value:0,type:'number',remark:'"年末预备投入房产资金"将会按照该设定值进行增长型测算',alias:'incomeRate',isShow:true},
{id:'06',name:'投入资金增长率',value:0,type:'number',remark:'"每年投入房产资金"将会按照该设定值进行增长型测算',alias:'incomeRate',isShow:true},
{id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate',isShow:true}
],
editParamLists:[],
......
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