Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
f5dd8b1c
Commit
f5dd8b1c
authored
Sep 29, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小数点
parent
5c2e967c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
18 deletions
+86
-18
package-lock.json
+50
-2
pages/housePurchase/housePurchase.vue
+30
-10
pages/housePurchase/planningParameters.vue
+6
-6
No files found.
package-lock.json
View file @
f5dd8b1c
{
"name"
:
"sfp-program"
,
"lockfileVersion"
:
2
,
"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"
:
{
"echarts"
:
{
"version"
:
"5.3.3"
,
...
...
@@ -18,7 +66,7 @@
},
"nanoid"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm
mirror.com
/nanoid/-/nanoid-4.0.0.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/nanoid/-/nanoid-4.0.0.tgz"
,
"integrity"
:
"sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
},
"tslib"
:
{
...
...
pages/housePurchase/housePurchase.vue
View file @
f5dd8b1c
...
...
@@ -33,7 +33,7 @@
<text>
预购面积:
</text>
<view
class=
"inputContent"
>
<input
class=
"uni-input"
type=
"number"
placeholder=
"请输入"
v-model=
"housePurchaseInfo.preOrderSize"
v-model=
"housePurchaseInfo.preOrderSize"
@
blur=
"queryCommercialHousingPrice()"
/><label
for=
""
>
m²
</label>
</view>
</view>
...
...
@@ -156,8 +156,8 @@
</view>
<view
class=
"line"
v-for=
"houseItem in housePurchasePrices"
>
<view
class=
"line_title"
>
{{
getResultTitle
(
houseItem
.
priceType
)
}}
<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/can.png"
alt=
""
v-show=
"houseItem.fvDifference
<
=
0
"
>
<img
src=
"../../static/images/cannot.png"
alt=
""
v-show=
"houseItem.fvDifference
>
0"
>
</view>
<view
class=
"content"
>
<view
class=
"left"
>
...
...
@@ -317,7 +317,8 @@
console
.
log
(
this
.
houseLoanOldList
)
},
onchange
(
e
)
{
const
value
=
e
.
detail
.
value
const
value
=
e
.
detail
.
value
;
this
.
queryCommercialHousingPrice
();
},
onnodeclick
(
node
)
{
this
.
cityInfo
=
{
...
...
@@ -429,13 +430,13 @@
}
// 规划参数默认值
const
palnningParamsDefault
=
{
acceptableLossRate
:
10
,
acceptableLossRate
:
0.1
,
downPaymentMin
:
30
,
houseDepreciationRate
:
2
,
housePriceGrowthRate
:
6.
25
,
incomeRate
:
"3"
,
interestRate
:
4.
9
,
tnvestmentRate
:
3.
74
houseDepreciationRate
:
0.0
2
,
housePriceGrowthRate
:
0.06
25
,
incomeRate
:
0.03
,
interestRate
:
0.04
9
,
tnvestmentRate
:
0.03
74
}
const
param
=
{
...
palnningParamsDefault
,
...
...
@@ -494,6 +495,25 @@
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
(){
// this.drawLine();
...
...
pages/housePurchase/planningParameters.vue
View file @
f5dd8b1c
...
...
@@ -86,13 +86,13 @@
},
confirmParams
(){
const
params
=
{
housePriceGrowthRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
0
].
value
,
//房价增长率
houseDepreciationRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'houseDepreciationRate'
)[
0
].
value
,
//房屋折旧率
housePriceGrowthRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'housePriceGrowthRate'
)[
0
].
value
/
100
,
//房价增长率
houseDepreciationRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'houseDepreciationRate'
)[
0
].
value
/
100
,
//房屋折旧率
downPaymentMin
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'downPaymentMin'
)[
0
].
value
,
//首付款最低成数(百分位)
interestRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'interestRate'
)[
0
].
value
,
//贷款年利率
tnvestmentRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'tnvestmentRate'
)[
0
].
value
,
//投资回报率
incomeRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'incomeRate'
)[
0
].
value
,
//收入增长率
acceptableLossRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'acceptableLossRate'
)[
0
].
value
,
//可接受本金损失率
interestRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'interestRate'
)[
0
].
value
/
100
,
//贷款年利率
tnvestmentRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'tnvestmentRate'
)[
0
].
value
/
100
,
//投资回报率
incomeRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'incomeRate'
)[
0
].
value
/
100
,
//收入增长率
acceptableLossRate
:
this
.
editParamLists
.
filter
(
item
=>
item
.
alias
===
'acceptableLossRate'
)[
0
].
value
/
100
,
//可接受本金损失率
}
this
.
sendData
(
params
)
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment