feat(mine): 原拓展结余改为当期结余,添加拓展结余
This commit is contained in:
parent
578c0f8178
commit
e819dc852c
|
@ -86,6 +86,31 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 当前结余状态 -->
|
<!-- 当前结余状态 -->
|
||||||
|
<view class="yestDay">
|
||||||
|
<view class="yes_t">当期拓展</view>
|
||||||
|
<view
|
||||||
|
:class="
|
||||||
|
balanceProgress.leftValue != 0 ||
|
||||||
|
balanceProgress.rightValue != 0
|
||||||
|
? 'ju_left_bottom1'
|
||||||
|
: 'ju_left_bottom'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="current-progress"
|
||||||
|
:style="{
|
||||||
|
width: yesPercent(
|
||||||
|
balanceProgress.leftValue,
|
||||||
|
balanceProgress.rightValue
|
||||||
|
),
|
||||||
|
}"
|
||||||
|
></view>
|
||||||
|
<view class="cha">
|
||||||
|
左区 {{ balanceProgress.leftValue || 0 }}/右区
|
||||||
|
{{ balanceProgress.rightValue || 0 }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="yestDay">
|
<view class="yestDay">
|
||||||
<view class="yes_t">拓展结余</view>
|
<view class="yes_t">拓展结余</view>
|
||||||
<view
|
<view
|
||||||
|
@ -574,6 +599,36 @@ export default {
|
||||||
rightProgress = (rightValue / total) * 100
|
rightProgress = (rightValue / total) * 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
leftProgress,
|
||||||
|
rightProgress,
|
||||||
|
leftValue: leftValue.toFixed(0),
|
||||||
|
rightValue: rightValue.toFixed(0),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
totalBalanceProgress() {
|
||||||
|
if (!this.balanceData.tree || !this.balanceData.tree.length) {
|
||||||
|
return {
|
||||||
|
leftProgress: 0,
|
||||||
|
rightProgress: 0,
|
||||||
|
leftValue: 0,
|
||||||
|
rightValue: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const treeData = this.balanceData.tree[0]
|
||||||
|
const leftValue = parseFloat(treeData.leftFirstSurplusAll) || 0
|
||||||
|
const rightValue = parseFloat(treeData.rightFirstSurplusAll) || 0
|
||||||
|
const total = leftValue + rightValue
|
||||||
|
|
||||||
|
let leftProgress = 0
|
||||||
|
let rightProgress = 0
|
||||||
|
|
||||||
|
if (total > 0) {
|
||||||
|
leftProgress = (leftValue / total) * 100
|
||||||
|
rightProgress = (rightValue / total) * 100
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
leftProgress,
|
leftProgress,
|
||||||
rightProgress,
|
rightProgress,
|
||||||
|
|
Loading…
Reference in New Issue