Browse Source

修复柱状图缺失总金额

master
zhouhaibin 4 months ago
parent
commit
fc696f8bf4
  1. 45
      src/views/projectBoard/childBoard/bar.vue
  2. 4
      src/views/projectBoard/childBoard/gaiGeRenWu.vue
  3. 134
      src/views/projectBoard/childBoard/xingZhengQuHua.vue

45
src/views/projectBoard/childBoard/bar.vue

@ -3,13 +3,13 @@
</template>
<script lang="ts" name="PieChart" setup>
import { ref, reactive } from 'vue'
let receivingParameter = defineProps(["title", "data"])
let option = reactive({})
import { ref, reactive } from 'vue';
let receivingParameter = defineProps(['title', 'data']);
let option = reactive({});
option = {
title: {
text: receivingParameter.title
text: receivingParameter.title,
},
// tooltip: {
// trigger: 'axis',
@ -23,7 +23,7 @@ option = {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
containLabel: true,
},
xAxis: {
type: 'value',
@ -31,14 +31,20 @@ option = {
max: 1,
axisLabel: {
formatter: function (value, index) {
return (value*100) + "%";
}
}
return value * 100 + '%';
},
yAxis: {
},
},
yAxis: [
{
type: 'category',
data: receivingParameter.data.names
data: receivingParameter.data.names,
},
{
type: 'category',
data: receivingParameter.data.totalMoneys,
},
],
series: [
{
name: '上级资金支付执行率',
@ -47,13 +53,13 @@ option = {
label: {
show: true,
formatter: function (params) {
return (params.value*100).toFixed(0) + "%";
}
return (params.value * 100).toFixed(0) + '%';
},
},
emphasis: {
focus: 'series'
focus: 'series',
},
data: receivingParameter.data.superiorFundExecutionRates
data: receivingParameter.data.superiorFundExecutionRates,
},
{
name: '资金支付执行率',
@ -62,17 +68,16 @@ option = {
label: {
show: true,
formatter: function (params) {
return (params.value*100).toFixed() + "%";
}
return (params.value * 100).toFixed() + '%';
},
},
emphasis: {
focus: 'series'
focus: 'series',
},
data: receivingParameter.data.paymentExecutionRates
data: receivingParameter.data.paymentExecutionRates,
},
]
],
};
</script>
<style></style>

4
src/views/projectBoard/childBoard/gaiGeRenWu.vue

@ -190,7 +190,8 @@ export default {
barData: {
names:[],
paymentExecutionRates:[],
superiorFundExecutionRates:[]
superiorFundExecutionRates:[],
totalMoneys:[],
}
};
},
@ -204,6 +205,7 @@ export default {
this.barData.names.push(item.name)
this.barData.paymentExecutionRates.push(item.paymentExecutionRate)
this.barData.superiorFundExecutionRates.push(item.superiorFundExecutionRate)
this.barData.totalMoneys.push(item.totalMoney)
})
},
methods: {},

134
src/views/projectBoard/childBoard/xingZhengQuHua.vue

@ -5,14 +5,20 @@
<a-card title="项目总进度" :body-style="{ padding: 0, overflow: 'hidden' }">
<a-row>
<a-col :span="12" class="flex justify-center items-center h-58">
<el-progress type="dashboard" :stroke-width="18" :percentage="Number(data.totalProgress.progress)*100>0?Number(data.totalProgress.progress)*100:0" :width="200">
<el-progress
type="dashboard"
:stroke-width="18"
:percentage="
Number(data.totalProgress.progress) * 100 > 0
? Number(data.totalProgress.progress) * 100
: 0
"
:width="200"
>
<template #default="{ percentage }">
<div class="flex flex-col ...">
<div>总进度</div>
<div class="mt-4 text-sky-400"> {{ percentage }}%</div>
</div>
</template>
</el-progress>
@ -55,13 +61,21 @@
</a-col>
</a-row>
</a-card>
</a-col>
<a-col :span="12">
<a-card title="资金支付情况" :body-style="{ padding: 0, overflow: 'hidden' }">
<a-row>
<a-col :span="8" class="flex justify-center items-center h-58">
<el-progress type="dashboard" :stroke-width="18" :percentage="Number(data.countFundByFundType.paymentExecutionRate)*100>0?Number(data.countFundByFundType.paymentExecutionRate)*100:0" :width="200">
<el-progress
type="dashboard"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.paymentExecutionRate) * 100 > 0
? Number(data.countFundByFundType.paymentExecutionRate) * 100
: 0
"
:width="200"
>
<template #default="{ percentage }">
<div class="flex flex-col ...">
<div>合同总金额</div>
@ -76,8 +90,17 @@
<div>
<div class="flex flex-wrap">
<div class="mr-2">中央资金</div>
<div class="mr-2"><el-progress class="w-80" :text-inside="true" :stroke-width="18"
:percentage="Number(data.countFundByFundType.payCentralExecutionRate)*100>0?Number(data.countFundByFundType.payCentralExecutionRate)*100:0" />
<div class="mr-2"
><el-progress
class="w-80"
:text-inside="true"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.payCentralExecutionRate) * 100 > 0
? Number(data.countFundByFundType.payCentralExecutionRate) * 100
: 0
"
/>
</div>
<div>{{ data.countFundByFundType.totalCentral }}</div>
</div>
@ -85,8 +108,17 @@
<div class="mt-4">
<div class="flex flex-wrap">
<div class="mr-2">省级资金</div>
<div class="mr-2"><el-progress class="w-80" :text-inside="true" :stroke-width="18"
:percentage="Number(data.countFundByFundType.payProvincialExecutionRate)*100>0?Number(data.countFundByFundType.payProvincialExecutionRate)*100:0" />
<div class="mr-2"
><el-progress
class="w-80"
:text-inside="true"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.payProvincialExecutionRate) * 100 > 0
? Number(data.countFundByFundType.payProvincialExecutionRate) * 100
: 0
"
/>
</div>
<div>{{ data.countFundByFundType.totalProvincial }}</div>
</div>
@ -94,8 +126,17 @@
<div class="mt-4">
<div class="flex flex-wrap">
<div class="mr-2">市级资金</div>
<div class="mr-2"><el-progress class="w-80" :text-inside="true" :stroke-width="18"
:percentage="Number(data.countFundByFundType.payCityExecutionRate)*100>0?Number(data.countFundByFundType.payCityExecutionRate)*100:0" />
<div class="mr-2"
><el-progress
class="w-80"
:text-inside="true"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.payCityExecutionRate) * 100 > 0
? Number(data.countFundByFundType.payCityExecutionRate) * 100
: 0
"
/>
</div>
<div>{{ data.countFundByFundType.totalCity }}</div>
</div>
@ -103,16 +144,34 @@
<div class="mt-4">
<div class="flex flex-wrap">
<div class="mr-2">区县资金</div>
<div class="mr-2"><el-progress class="w-80" :text-inside="true" :stroke-width="18"
:percentage="Number(data.countFundByFundType.payCountyExecutionRate)*100>0?Number(data.countFundByFundType.payCountyExecutionRate)*100:0" />
<div class="mr-2"
><el-progress
class="w-80"
:text-inside="true"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.payCountyExecutionRate) * 100 > 0
? Number(data.countFundByFundType.payCountyExecutionRate) * 100
: 0
"
/>
</div>
<div>{{ data.countFundByFundType.totalCounty }}</div>
</div>
<div class="mt-4">
<div class="flex flex-wrap">
<div class="mr-2">自筹资金</div>
<div class="mr-2"><el-progress class="w-80" :text-inside="true" :stroke-width="18"
:percentage="Number(data.countFundByFundType.paySelfExecutionRate)*100>0?Number(data.countFundByFundType.paySelfExecutionRate)*100:0" />
<div class="mr-2"
><el-progress
class="w-80"
:text-inside="true"
:stroke-width="18"
:percentage="
Number(data.countFundByFundType.paySelfExecutionRate) * 100 > 0
? Number(data.countFundByFundType.paySelfExecutionRate) * 100
: 0
"
/>
</div>
<div>{{ data.countFundByFundType.totalSelf }}</div>
</div>
@ -120,17 +179,14 @@
</div>
</div>
</a-col>
</a-row>
</a-card>
</a-col>
</a-row>
<a-row :gutter="16" class="mt-4">
<a-col :span="12">
<a-card :body-style="{ padding: 0, overflow: 'hidden' }" class="h-104">
<bas_bar title="总进度" :data="bas_barData" />
</a-card>
</a-col>
<a-col :span="12">
@ -142,9 +198,9 @@
</div>
</template>
<script lang="ts">
import bas_bar from './bas_bar.vue'
import bar from './bar.vue'
import { showCountBoardByAdminDivision} from './childBoard.api'
import bas_bar from './bas_bar.vue';
import bar from './bar.vue';
import { showCountBoardByAdminDivision } from './childBoard.api';
export default {
components: {
bas_bar,
@ -183,35 +239,33 @@ export default {
paySelfExecutionRate: '0.00',
},
countFundByCondition: [],
progress:[]
progress: [],
},
bas_barData: {
names: [],
values:[]
values: [],
},
barData: {
names: [],
paymentExecutionRates: [],
superiorFundExecutionRates:[]
}
superiorFundExecutionRates: [],
totalMoneys: [],
},
};
},
async created() {
this.data = await showCountBoardByAdminDivision()
this.data.progress.forEach(item => {
this.bas_barData.names.push(item.name)
this.bas_barData.values.push(item.projectProgress)
})
this.data.countFundByCondition.forEach(item => {
this.barData.names.push(item.name)
this.barData.paymentExecutionRates.push(item.paymentExecutionRate)
this.barData.superiorFundExecutionRates.push(item.superiorFundExecutionRate)
})
this.data = await showCountBoardByAdminDivision();
this.data.progress.forEach((item) => {
this.bas_barData.names.push(item.name);
this.bas_barData.values.push(item.projectProgress);
});
this.data.countFundByCondition.forEach((item) => {
this.barData.names.push(item.name);
this.barData.paymentExecutionRates.push(item.paymentExecutionRate);
this.barData.superiorFundExecutionRates.push(item.superiorFundExecutionRate);
this.barData.totalMoneys.push(item.totalMoney);
});
},
methods: {},
};
</script>

Loading…
Cancel
Save