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
8ccea150
Commit
8ccea150
authored
Oct 27, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购房能力测算优化
parent
3c2ec528
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
common/common.ts
+4
-0
environments/environment.ts
+1
-1
pages/housePurchase/housePurchase.vue
+19
-5
pages/housePurchase/planningParameters.vue
+1
-1
No files found.
common/common.ts
View file @
8ccea150
...
@@ -45,8 +45,12 @@ export default {
...
@@ -45,8 +45,12 @@ export default {
if
(
num
){
if
(
num
){
if
(
type
===
1
){
if
(
type
===
1
){
const
dataNum
=
(
num
*
Math
.
pow
(
10
,
digitNum
+
1
)
/
Math
.
pow
(
10
,
digitNum
+
1
)).
toString
();
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
)
return
(
Number
(
dataNum
.
slice
(
0
,
dataNum
.
indexOf
(
'.'
)
+
digitNum
+
1
))
+
10
/
Math
.
pow
(
10
,
digitNum
+
1
)).
toFixed
(
digitNum
)
}
else
{
}
else
{
return
dataNum
;
}
}
else
{
return
(
num
*
Math
.
pow
(
10
,
digitNum
+
1
)
/
Math
.
pow
(
10
,
digitNum
+
1
)).
toFixed
(
digitNum
)
return
(
num
*
Math
.
pow
(
10
,
digitNum
+
1
)
/
Math
.
pow
(
10
,
digitNum
+
1
)).
toFixed
(
digitNum
)
}
}
}
else
{
}
else
{
...
...
environments/environment.ts
View file @
8ccea150
...
@@ -19,7 +19,7 @@ const config = {
...
@@ -19,7 +19,7 @@ const config = {
stage
,
stage
,
prod
prod
}
}
let
env
=
'
stage
'
;
let
env
=
'
dev
'
;
// if (process.env.NODE_ENV === 'development') {
// if (process.env.NODE_ENV === 'development') {
// env = 'dev';
// env = 'dev';
// }else if (process.env.NODE_ENV === 'production') {
// }else if (process.env.NODE_ENV === 'production') {
...
...
pages/housePurchase/housePurchase.vue
View file @
8ccea150
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<view
class=
"inputContent"
>
<view
class=
"inputContent"
>
<input
class=
"uni-input"
type=
"digit"
placeholder=
"请输入"
<input
class=
"uni-input"
type=
"digit"
placeholder=
"请输入"
v-model=
"housePurchaseInfo.targetPrice"
maxlength=
"12"
v-model=
"housePurchaseInfo.targetPrice"
maxlength=
"12"
/><label
for=
""
>
m²/元
</label>
/><label
for=
""
>
元/m²
</label>
</view>
</view>
</view>
</view>
<view
class=
"inputItem"
>
<view
class=
"inputItem"
>
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
</radio-group>
</radio-group>
</view>
</view>
<view
id=
"myEcharts"
style=
"height: 450rpx;"
></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>
<view
class=
"resultSummaryContent"
>
<view
class=
"resultSummaryContent"
>
...
@@ -280,6 +280,7 @@
...
@@ -280,6 +280,7 @@
value
:
'4'
,
value
:
'4'
,
name
:
'总贷款(万元)'
name
:
'总贷款(万元)'
}],
}],
isNeedDis
:
true
,
isNeedOfficialAccountQrcode
:
true
,
isNeedOfficialAccountQrcode
:
true
,
tipsPrice
:
null
,
tipsPrice
:
null
,
tipsTotalPrice
:
null
,
tipsTotalPrice
:
null
,
...
@@ -430,13 +431,26 @@
...
@@ -430,13 +431,26 @@
// 绘制图表
// 绘制图表
let
list1
;
let
list1
;
let
showLists
;
let
showLists
;
let
dataOption
=
[
'可实现的'
,
'你想要的'
,
'差额'
];
if
(
this
.
housePurchasePrices
.
length
){
if
(
this
.
housePurchasePrices
.
length
){
if
(
type
){
if
(
type
){
list1
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
list1
=
this
.
housePurchasePrices
.
filter
((
item
)
=>
{
return
item
.
priceType
==
type
return
item
.
priceType
==
type
})[
0
];
})[
0
];
showLists
=
[].
concat
(
this
.
formatFloat
(
list1
.
pvPriceRealization
/
10000
,
2
,
2
),
this
.
formatFloat
(
list1
.
pvPriceDesired
/
10000
,
2
,
2
),
this
.
isNeedDis
=
list1
.
pvDifference
>
0
;
{
value
:
this
.
formatFloat
(
Math
.
abs
(
list1
.
pvDifference
)
/
10000
),
itemStyle
:{
color
:
'#ff0000'
}})
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
({
this
.
myChart
.
setOption
({
...
@@ -445,7 +459,7 @@
...
@@ -445,7 +459,7 @@
left
:
'20%'
,
// 调整这个属性
left
:
'20%'
,
// 调整这个属性
},
},
xAxis
:
{
xAxis
:
{
data
:
[
'可实现的'
,
'你想要的'
,
'差额'
]
,
data
:
dataOption
,
axisTick
:{
//坐标轴刻度相关设置。
axisTick
:{
//坐标轴刻度相关设置。
show
:
false
,
show
:
false
,
},
},
...
...
pages/housePurchase/planningParameters.vue
View file @
8ccea150
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
{
id
:
'02'
,
name
:
'房屋折旧率'
,
value
:
2
,
type
:
'number'
,
remark
:
''
,
alias
:
'houseDepreciationRate'
,
isShow
:
true
},
{
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
:
'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
:
'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
}
{
id
:
'07'
,
name
:
'可接受本金损失'
,
value
:
10
,
type
:
'number'
,
remark
:
''
,
alias
:
'acceptableLossRate'
,
isShow
:
true
}
],
],
editParamLists
:[],
editParamLists
:[],
...
...
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