工作台近三年资金拨付情况bugfix

Lvtianfang
吕天方 6 days ago
parent df49b2fa3b
commit b2c99eab5d

@ -12,15 +12,15 @@
<div class="BJinsannianzijinchart-right">
<div class="yushuan">
<span>资金预算</span>
<div class="number-box">{{ obj.fundBudget }} <span class="number-unit-box">万元</span></div>
<div class="number-box">{{ obj.fundBudget ? obj.fundBudget : 0 }} <span class="number-unit-box">万元</span></div>
</div>
<div class="yushuan">
<span>追加预算</span>
<div class="bottom_number number-box">{{ obj.additionBudget }} <span class="number-unit-box">万元</span></div>
<div class="bottom_number number-box">{{ obj.additionBudget ? obj.additionBudget : 0 }} <span class="number-unit-box">万元</span></div>
</div>
</div>
</div>
<div class="echart_boxs_bottom">拨付资金 <span>{{ obj.appropriationFund }}</span>万元 (执行率 <span>{{ obj.implementationRate }}</span>% )</div>
<div class="echart_boxs_bottom">拨付资金 <span>{{ obj.appropriationFund ? obj.appropriationFund : 0 }}</span>万元 (执行率 <span>{{ obj.implementationRate ? obj.implementationRate : 0 }}</span>% )</div>
</div>
<div class="echart_boxs echart_boxs_right">
<div class="echart_boxs_top">
@ -34,15 +34,15 @@
<div class="BJinsannianzijinchart-right">
<div class="yushuan">
<span>资金预算</span>
<div class="number-box">{{ objTwo.fundBudget }} <span class="number-unit-box">万元</span></div>
<div class="number-box">{{ objTwo.fundBudget ? objTwo.fundBudget : 0 }} <span class="number-unit-box">万元</span></div>
</div>
<div class="yushuan">
<span>追加预算</span>
<div class="bottom_number number-box">{{ objTwo.additionBudget }} <span class="number-unit-box">万元</span></div>
<div class="bottom_number number-box">{{ objTwo.additionBudget ? objTwo.additionBudget : 0 }} <span class="number-unit-box">万元</span></div>
</div>
</div>
</div>
<div class="echart_boxs_bottom">拨付资金 <span>{{ objTwo.appropriationFund }}</span>万元 (执行率 <span>{{ objTwo.implementationRate }}</span>% )</div>
<div class="echart_boxs_bottom">拨付资金 <span>{{ objTwo.appropriationFund ? objTwo.appropriationFund : 0 }}</span>万元 (执行率 <span>{{ objTwo.implementationRate ? objTwo.implementationRate : 0 }}</span>% )</div>
</div>
</div>
</template>
@ -237,40 +237,50 @@ export default {
]
};
threeYearsFund(Year).then(res=>{
res.data.map(item=>{
if(item.serviceType == "1") {
this.obj = item;
option.series[0].data[0].value = item.implementationRate
// fundBudget additionBudget
if(item.fundBudget <= 0) {
let color = [ [0, '#00AEFF'], [1, '#FFA42B ']] //
option.series[0].axisLine.lineStyle.color = color
} else if(item.additionBudget <= 0) {
let color = [ [1, '#00AEFF'], [1, '#FFA42B ']] //
option.series[0].axisLine.lineStyle.color = color
} else {
let count = item.fundBudget + item.additionBudget;
const percentage = (item.fundBudget / count);
let color = [ [Number(percentage.toFixed(1)), '#00AEFF'], [Number(percentage.toFixed(1)) + 0.03, '#F5F8FA'], [1, '#FFA42B ']]
option.series[0].axisLine.lineStyle.color = color;
}
} else {
this.objTwo = item;
optionTwo.series[0].data[0].value = item.implementationRate
if(item.fundBudget <= 0) {
let color = [ [0, '#00AEFF'], [1, '#FFA42B ']] //
optionTwo.series[0].axisLine.lineStyle.color = color
} else if(item.additionBudget <= 0) {
let color = [ [1, '#00AEFF'], [1, '#FFA42B ']] //
optionTwo.series[0].axisLine.lineStyle.color = color
if(res.data.length == 0) {
let color = [ [1, '#00AEFF']] //
option.series[0].axisLine.lineStyle.color = color
optionTwo.series[0].axisLine.lineStyle.color = color
option.series[0].data[0].value = 0
optionTwo.series[0].data[0].value = 0
this.obj = {}
this.objTwo = {}
} else {
res.data.map(item=>{
if(item.serviceType == "1") {
this.obj = item;
option.series[0].data[0].value = item.implementationRate
// fundBudget additionBudget
if(item.fundBudget <= 0) {
let color = [ [0, '#00AEFF'], [1, '#FFA42B ']] //
option.series[0].axisLine.lineStyle.color = color
} else if(item.additionBudget <= 0) {
let color = [ [1, '#00AEFF'], [1, '#FFA42B ']] //
option.series[0].axisLine.lineStyle.color = color
} else {
let count = item.fundBudget + item.additionBudget;
const percentage = (item.fundBudget / count);
let color = [ [Number(percentage.toFixed(1)), '#00AEFF'], [Number(percentage.toFixed(1)) + 0.03, '#F5F8FA'], [1, '#FFA42B ']]
option.series[0].axisLine.lineStyle.color = color;
}
} else {
let count = item.fundBudget + item.additionBudget;
const percentage = (item.fundBudget / count);
let color = [ [Number(percentage.toFixed(1)), '#00AEFF'], [Number(percentage.toFixed(1)) + 0.03, '#F5F8FA'], [1, '#FFA42B ']]
optionTwo.series[0].axisLine.lineStyle.color = color;
this.objTwo = item;
optionTwo.series[0].data[0].value = item.implementationRate
if(item.fundBudget <= 0) {
let color = [ [0, '#00AEFF'], [1, '#FFA42B ']] //
optionTwo.series[0].axisLine.lineStyle.color = color
} else if(item.additionBudget <= 0) {
let color = [ [1, '#00AEFF'], [1, '#FFA42B ']] //
optionTwo.series[0].axisLine.lineStyle.color = color
} else {
let count = item.fundBudget + item.additionBudget;
const percentage = (item.fundBudget / count);
let color = [ [Number(percentage.toFixed(1)), '#00AEFF'], [Number(percentage.toFixed(1)) + 0.03, '#F5F8FA'], [1, '#FFA42B ']]
optionTwo.series[0].axisLine.lineStyle.color = color;
}
}
}
})
})
}
this.chart.setOption(option)
this.chartTwo.setOption(optionTwo)
})

Loading…
Cancel
Save