parent
7c87b66242
commit
2c9d1df0d9
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="department-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="form"></SvgIcon>
|
||||
<span style=" padding-left: 15px"
|
||||
>科室执行情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div style="position: relative;height: 100%;width: 100%;">
|
||||
<div id="department-chart"></div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import ElementResize from 'element-resize-detector'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon
|
||||
},
|
||||
name: "card3",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "3",
|
||||
name: "科室执行情况",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
departmentList: [
|
||||
{
|
||||
money_total_1: "1900000.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "11",
|
||||
plan_department_id: 2,
|
||||
use_money_total: 0,
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
plan_department: {
|
||||
id: 2,
|
||||
pid: 0,
|
||||
name: "办公室(党建作风办)",
|
||||
manager_id: 7,
|
||||
leader_id: 4,
|
||||
sortnumber: 1,
|
||||
created_at: "2021-06-22 07:01:41",
|
||||
updated_at: "2023-03-22 14:56:51",
|
||||
deleted_at: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: "",
|
||||
tableHeight: 200,
|
||||
table: [
|
||||
{
|
||||
title: "科室",
|
||||
width: 100,
|
||||
key: "plan_department.name",
|
||||
fixed: "left",
|
||||
render:(h,{row}) => {
|
||||
return h('span',{},row.plan_department?.name)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "执行情况",
|
||||
minWidth: 160,
|
||||
fixed: "right",
|
||||
render: (h, { row }) => {
|
||||
let m2 = row?.money_total_2 ? Number(row?.money_total_2) : 0;
|
||||
let m1 = row?.money_total_1 ? Number(row?.money_total_1) : 0;
|
||||
let m3 = row?.use_money_total ? Number(row?.use_money_total) : 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "年初预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_1",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_1));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "调整后预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_2",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_2));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
width: 120,
|
||||
align: "right",
|
||||
key: "use_money_total",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.use_money_total));
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
grid: {
|
||||
left: "15%"
|
||||
},
|
||||
tooltip: {
|
||||
show: true
|
||||
},
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
xAxis: {
|
||||
data: this.departmentList.map((item) => item.department.name),
|
||||
},
|
||||
yAxis: {
|
||||
axisLabel: {
|
||||
color: '#999'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
barWidth: 30,
|
||||
type: 'bar',
|
||||
stack: "a",
|
||||
name: "合计金额(元)",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 1, color: '#83bff6' },
|
||||
{ offset: 0.5, color: '#188df0' },
|
||||
{ offset: 0, color: '#188df0' }
|
||||
]),
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 1, color: '#4f86f5' },
|
||||
{ offset: 0.3, color: '#3f79f1' },
|
||||
{ offset: 0, color: '#3171f4' }
|
||||
])
|
||||
}
|
||||
},
|
||||
data: this.departmentList.map(item => (parseFloat(item.money_total_2) ? parseFloat(item.money_total_2) : parseFloat(item.money_total_1) - parseFloat(item.use_money_total))),
|
||||
},
|
||||
{
|
||||
barWidth: 30,
|
||||
type: "bar",
|
||||
stack: "a",
|
||||
name: "已使用金额(元)",
|
||||
label: {
|
||||
show: true,
|
||||
color: "#188df0",
|
||||
position: "top",
|
||||
formatter: (params) => {
|
||||
console.log(params)
|
||||
let m2 = this.departmentList[params.dataIndex]?.money_total_2 ? Number(this.departmentList[params.dataIndex]?.money_total_2) : 0;
|
||||
let m1 = this.departmentList[params.dataIndex]?.money_total_1 ? Number(this.departmentList[params.dataIndex]?.money_total_1) : 0;
|
||||
let m3 = this.departmentList[params.dataIndex]?.use_money_total ? Number(this.departmentList[params.dataIndex]?.use_money_total) : 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return Number(per) + "%";
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#b4cef3' },
|
||||
{ offset: 0.5, color: '#aecbf5' },
|
||||
{ offset: 1, color: '#9fc4f9' }
|
||||
]),
|
||||
borderRadius: [20, 20, 0, 0]
|
||||
},
|
||||
data: this.departmentList.map(item => parseFloat(item.use_money_total))
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.chart = echarts.init(document.getElementById("department-chart"));
|
||||
this.setOptions();
|
||||
let cardDom = document.getElementById('department-card');
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
//this.setOptions()
|
||||
this.chart.resize();
|
||||
// this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
departmentList() {
|
||||
if (this.getStatistic)
|
||||
return this.getStatistic()?.statistic?.departmentList || [];
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
departmentList: {
|
||||
handler: function (newVal) {
|
||||
this.setOptions()
|
||||
},
|
||||
immediate: false
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-progress--line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-progress__text {
|
||||
word-break: keep-all;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
#department-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 200px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="department-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="form"></SvgIcon>
|
||||
<span style=" padding-left: 15px"
|
||||
>科室执行情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div style="position: relative;height: 100%;width: 100%;">
|
||||
<div id="department-chart"></div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import ElementResize from 'element-resize-detector'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon
|
||||
},
|
||||
name: "card3",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "3",
|
||||
name: "科室执行情况",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
departmentList: [
|
||||
{
|
||||
money_total_1: "1900000.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "11",
|
||||
plan_department_id: 2,
|
||||
use_money_total: 0,
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
plan_department: {
|
||||
id: 2,
|
||||
pid: 0,
|
||||
name: "办公室(党建作风办)",
|
||||
manager_id: 7,
|
||||
leader_id: 4,
|
||||
sortnumber: 1,
|
||||
created_at: "2021-06-22 07:01:41",
|
||||
updated_at: "2023-03-22 14:56:51",
|
||||
deleted_at: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: "",
|
||||
tableHeight: 200,
|
||||
table: [
|
||||
{
|
||||
title: "科室",
|
||||
width: 100,
|
||||
key: "plan_department.name",
|
||||
fixed: "left",
|
||||
render:(h,{row}) => {
|
||||
return h('span',{},row.plan_department?.name)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "执行情况",
|
||||
minWidth: 160,
|
||||
fixed: "right",
|
||||
render: (h, { row }) => {
|
||||
let m2 = row?.money_total_2 || 0;
|
||||
let m1 = row?.money_total_1 || 0;
|
||||
let m3 = row?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "年初预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_1",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_1));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "调整后预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_2",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_2));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
width: 120,
|
||||
align: "right",
|
||||
key: "use_money_total",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.use_money_total));
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
grid: {
|
||||
left: "15%"
|
||||
},
|
||||
tooltip: {
|
||||
show: true
|
||||
},
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
xAxis: {
|
||||
data: this.departmentList.map((item) => item.plan_department.name),
|
||||
},
|
||||
yAxis: {
|
||||
axisLabel: {
|
||||
color: '#999'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
barWidth: 30,
|
||||
type: 'bar',
|
||||
stack: "a",
|
||||
name: "合计金额(元)",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 1, color: '#83bff6' },
|
||||
{ offset: 0.5, color: '#188df0' },
|
||||
{ offset: 0, color: '#188df0' }
|
||||
]),
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 1, color: '#4f86f5' },
|
||||
{ offset: 0.3, color: '#3f79f1' },
|
||||
{ offset: 0, color: '#3171f4' }
|
||||
])
|
||||
}
|
||||
},
|
||||
data: this.departmentList.map(item => (parseFloat(item.money_total_2) ? parseFloat(item.money_total_2) : parseFloat(item.money_total_1) - parseFloat(item.use_money_total))),
|
||||
},
|
||||
{
|
||||
barWidth: 30,
|
||||
type: "bar",
|
||||
stack: "a",
|
||||
name: "已使用金额(元)",
|
||||
label: {
|
||||
show: true,
|
||||
color: "#188df0",
|
||||
position: "top",
|
||||
formatter: (params) => {
|
||||
console.log(params)
|
||||
let m2 = this.departmentList[params.dataIndex]?.money_total_2 || 0;
|
||||
let m1 = this.departmentList[params.dataIndex]?.money_total_1 || 0;
|
||||
let m3 = this.departmentList[params.dataIndex]?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return Number(per) + "%";
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#b4cef3' },
|
||||
{ offset: 0.5, color: '#aecbf5' },
|
||||
{ offset: 1, color: '#9fc4f9' }
|
||||
]),
|
||||
borderRadius: [20, 20, 0, 0]
|
||||
},
|
||||
data: this.departmentList.map(item => parseFloat(item.use_money_total))
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.chart = echarts.init(document.getElementById("department-chart"));
|
||||
this.setOptions();
|
||||
let cardDom = document.getElementById('department-card');
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
//this.setOptions()
|
||||
this.chart.resize();
|
||||
// this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
departmentList() {
|
||||
if (this.getStatistic)
|
||||
return this.getStatistic()?.statistic?.departmentList || [];
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
departmentList: {
|
||||
handler: function (newVal) {
|
||||
this.setOptions()
|
||||
},
|
||||
immediate: false
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-progress--line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-progress__text {
|
||||
word-break: keep-all;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
#department-chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 200px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="wengao"></SvgIcon>
|
||||
<span style="padding-left: 15px"
|
||||
>项目支出</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-yuan">
|
||||
<SvgIcon icon-class="yuan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_1 || 0) }}</div>
|
||||
<div class="progress-card-item__label">年初预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhangdan">
|
||||
<SvgIcon icon-class="zhangdan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_2 || 0) }}</div>
|
||||
<div class="progress-card-item__label">调整后预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhifu">
|
||||
<SvgIcon icon-class="zhifu"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.use_money_total || 0)}}</div>
|
||||
<div class="progress-card-item__label">已支付金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? statistic.progress.money_total_2 : statistic.progress.money_total_1,name:'合计金额'},{value:statistic.progress.use_money_total,name:'已用金额'}]" ></MyProgress>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px;" :data="departments" size="small" :columns="table" :max-height="280"></Table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import {deepCopy, moneyFormatter} from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
import MyProgress from "@/components/Progress/index.vue";
|
||||
import {statistic} from "@/api/system/temporaryPlan";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MyProgress,
|
||||
SvgIcon
|
||||
},
|
||||
name: "card8",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "9",
|
||||
name: "项目支出",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
departmentList: [
|
||||
{
|
||||
money_total_1: "1900000.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "11",
|
||||
plan_department_id: 2,
|
||||
use_money_total: 0,
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
plan_department: {
|
||||
id: 2,
|
||||
pid: 0,
|
||||
name: "办公室(党建作风办)",
|
||||
manager_id: 7,
|
||||
leader_id: 4,
|
||||
sortnumber: 1,
|
||||
created_at: "2021-06-22 07:01:41",
|
||||
updated_at: "2023-03-22 14:56:51",
|
||||
deleted_at: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
statistic: {
|
||||
progress: {
|
||||
money_total_1: 0,
|
||||
money_total_2: 0,
|
||||
use_money_total: 0
|
||||
}
|
||||
},
|
||||
list: [],
|
||||
table: [
|
||||
{
|
||||
title: "序号",
|
||||
type: "index",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
key: "plan_department.name",
|
||||
minWidth: 180,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "left" } }, params.row.plan_department.name);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "年初预算数(元)",
|
||||
key: "money_total_1",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_1));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "调整后预算数(元)",
|
||||
key: "money_total_2",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_2));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
key: "money_total",
|
||||
align: "center",
|
||||
width: 140,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "进展情况",
|
||||
key: "rate",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, row) => {
|
||||
let m2 = row?.money_total_2 || 0;
|
||||
let m1 = row?.money_total_1 || 0;
|
||||
let m3 = row?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
return h("Button", {
|
||||
props: {
|
||||
size: "small"
|
||||
}
|
||||
} , "查看")
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
moneyFormatter,
|
||||
init() {
|
||||
let cardDom = this.$el;
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
},
|
||||
async getStatistics() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
const res = await statistic(this.select,true)
|
||||
function handleDataStructure(data) {
|
||||
let cData = deepCopy(data)
|
||||
cData.progress.money_total_1 = isNaN(Number(cData.progress.plan_money)) ? 0 : Number(cData.progress.plan_money)
|
||||
cData.progress.money_total_2 = isNaN(Number(cData.progress.plan_money)) ? 0 : Number(cData.progress.plan_money)
|
||||
cData.progress.use_money_total = isNaN(Number(cData.progress.use_money)) ? 0 : Number(cData.progress.use_money)
|
||||
|
||||
cData.departmentList = cData.statistic.departmentList.map(i => ({
|
||||
...i,
|
||||
money_total_1: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
money_total_2: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
use_money_total: isNaN(Number(i.use_money)) ? 0 : Number(i.use_money)
|
||||
}))
|
||||
cData.typeList = cData.statistic.typeList.map(i => ({
|
||||
...i,
|
||||
money_total_1: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
money_total_2: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
use_money_total: isNaN(Number(i.use_money)) ? 0 : Number(i.use_money)
|
||||
}))
|
||||
return cData
|
||||
}
|
||||
this.statistic = handleDataStructure(res)
|
||||
this.$emit('send-data',res)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
departments () {
|
||||
return this.getStatistics()?.statistic?.departmentList
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getStatistic();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
::v-deep .ivu-table th,::v-deep .ivu-table td {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
.progress-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
&__label {
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
line-height: 7px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.worker-progress__icon {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
svg {
|
||||
border-radius: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
.icon-yuan {
|
||||
background: #56b7f9;
|
||||
color: #fff;
|
||||
filter: drop-shadow(0px 6px 6px rgba(43,188,255,0.5));
|
||||
svg {
|
||||
color: #56b7f9;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.icon-zhangdan {
|
||||
background: #446df6;
|
||||
filter: drop-shadow(0px 6px 6px rgba(54,117,255,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
.icon-zhifu {
|
||||
background: #f2a93f;
|
||||
filter: drop-shadow(0px 6px 6px rgba(255,164,45,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-progress--circle .el-progress__text {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,618 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="wengao"></SvgIcon>
|
||||
<span style="padding-left: 15px"
|
||||
>项目支出</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-yuan">
|
||||
<SvgIcon icon-class="yuan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_1 || 0) }}</div>
|
||||
<div class="progress-card-item__label">年初预算合计金额</div>
|
||||
</div>
|
||||
<div class="pro<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="wengao"></SvgIcon>
|
||||
<span style="padding-left: 15px"
|
||||
>项目支出</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-yuan">
|
||||
<SvgIcon icon-class="yuan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_1 || 0) }}</div>
|
||||
<div class="progress-card-item__label">年初预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhangdan">
|
||||
<SvgIcon icon-class="zhangdan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_2 || 0) }}</div>
|
||||
<div class="progress-card-item__label">调整后预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhifu">
|
||||
<SvgIcon icon-class="zhifu"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.use_money_total || 0)}}</div>
|
||||
<div class="progress-card-item__label">已支付金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? statistic.progress.money_total_2 : statistic.progress.money_total_1,name:'合计金额'},{value:statistic.progress.use_money_total,name:'已用金额'}]" ></MyProgress>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px;" :data="departments" size="small" :columns="table" :max-height="280"></Table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
import MyProgress from "@/components/Progress/index.vue";
|
||||
import {statistic} from "@/api/dashboard/notice";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MyProgress,
|
||||
SvgIcon
|
||||
},
|
||||
name: "card8",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "9",
|
||||
name: "项目支出",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
departmentList: [
|
||||
{
|
||||
money_total_1: "1900000.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "11",
|
||||
plan_department_id: 2,
|
||||
use_money_total: 0,
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
plan_department: {
|
||||
id: 2,
|
||||
pid: 0,
|
||||
name: "办公室(党建作风办)",
|
||||
manager_id: 7,
|
||||
leader_id: 4,
|
||||
sortnumber: 1,
|
||||
created_at: "2021-06-22 07:01:41",
|
||||
updated_at: "2023-03-22 14:56:51",
|
||||
deleted_at: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
statistic: {
|
||||
progress: {
|
||||
money_total_1: 0,
|
||||
money_total_2: 0,
|
||||
use_money_total: 0
|
||||
}
|
||||
},
|
||||
list: [],
|
||||
table: [
|
||||
{
|
||||
title: "序号",
|
||||
type: "index",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
key: "plan_department.name",
|
||||
minWidth: 180,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "left" } }, params.row.plan_department.name);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "年初预算数(元)",
|
||||
key: "money_total_1",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_1));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "调整后预算数(元)",
|
||||
key: "money_total_2",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_2));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
key: "money_total",
|
||||
align: "center",
|
||||
width: 140,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "进展情况",
|
||||
key: "rate",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, row) => {
|
||||
let m2 = row?.money_total_2 || 0;
|
||||
let m1 = row?.money_total_1 || 0;
|
||||
let m3 = row?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
return h("Button", {
|
||||
props: {
|
||||
size: "small"
|
||||
}
|
||||
} , "查看")
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
moneyFormatter,
|
||||
init() {
|
||||
let cardDom = this.$el;
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
},
|
||||
async getStatistics() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
const res = await statistic(this.select,true)
|
||||
this.statistic = res
|
||||
this.$emit('send-data',res)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
departments () {
|
||||
return this.getStatistics()?.statistic?.departmentList
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getStatistic();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
::v-deep .ivu-table th,::v-deep .ivu-table td {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
.progress-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
&__label {
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
line-height: 7px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.worker-progress__icon {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
svg {
|
||||
border-radius: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
.icon-yuan {
|
||||
background: #56b7f9;
|
||||
color: #fff;
|
||||
filter: drop-shadow(0px 6px 6px rgba(43,188,255,0.5));
|
||||
svg {
|
||||
color: #56b7f9;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.icon-zhangdan {
|
||||
background: #446df6;
|
||||
filter: drop-shadow(0px 6px 6px rgba(54,117,255,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
.icon-zhifu {
|
||||
background: #f2a93f;
|
||||
filter: drop-shadow(0px 6px 6px rgba(255,164,45,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-progress--circle .el-progress__text {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
gress-card-item">
|
||||
<div class="worker-progress__icon icon-zhangdan">
|
||||
<SvgIcon icon-class="zhangdan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{ moneyFormatter(statistic.progress.money_total_2 || 0) }}</div>
|
||||
<div class="progress-card-item__label">调整后预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhifu">
|
||||
<SvgIcon icon-class="zhifu"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.use_money_total || 0)}}</div>
|
||||
<div class="progress-card-item__label">已支付金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? statistic.progress.money_total_2 : statistic.progress.money_total_1,name:'合计金额'},{value:statistic.progress.use_money_total,name:'已用金额'}]" ></MyProgress>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table style="margin-top: 20px;" :data="departments" size="small" :columns="table" :max-height="280"></Table>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
import MyProgress from "@/components/Progress/index.vue";
|
||||
import {statistic} from "@/api/dashboard/notice";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MyProgress,
|
||||
SvgIcon
|
||||
},
|
||||
name: "card8",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "9",
|
||||
name: "项目支出",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
departmentList: [
|
||||
{
|
||||
money_total_1: "1900000.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "11",
|
||||
plan_department_id: 2,
|
||||
use_money_total: 0,
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
plan_department: {
|
||||
id: 2,
|
||||
pid: 0,
|
||||
name: "办公室(党建作风办)",
|
||||
manager_id: 7,
|
||||
leader_id: 4,
|
||||
sortnumber: 1,
|
||||
created_at: "2021-06-22 07:01:41",
|
||||
updated_at: "2023-03-22 14:56:51",
|
||||
deleted_at: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
statistic: {
|
||||
progress: {
|
||||
money_total_1: 0,
|
||||
money_total_2: 0,
|
||||
use_money_total: 0
|
||||
}
|
||||
},
|
||||
list: [],
|
||||
table: [
|
||||
{
|
||||
title: "序号",
|
||||
type: "index",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
key: "plan_department.name",
|
||||
minWidth: 180,
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "left" } }, params.row.plan_department.name);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "年初预算数(元)",
|
||||
key: "money_total_1",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_1));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "调整后预算数(元)",
|
||||
key: "money_total_2",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total_2));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
key: "money_total",
|
||||
align: "center",
|
||||
width: 140,
|
||||
render: (h, params) => {
|
||||
return h("p",{ style: { "text-align": "right" } }, moneyFormatter(params.row.money_total));
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "进展情况",
|
||||
key: "rate",
|
||||
align: "center",
|
||||
width: 160,
|
||||
render: (h, row) => {
|
||||
let m2 = row?.money_total_2 || 0;
|
||||
let m1 = row?.money_total_1 || 0;
|
||||
let m3 = row?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
return h("Button", {
|
||||
props: {
|
||||
size: "small"
|
||||
}
|
||||
} , "查看")
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
moneyFormatter,
|
||||
init() {
|
||||
let cardDom = this.$el;
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
},
|
||||
async getStatistics() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
const res = await statistic(this.select,true)
|
||||
this.statistic = res
|
||||
this.$emit('send-data',res)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
departments () {
|
||||
return this.getStatistics()?.statistic?.departmentList
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getStatistic();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
::v-deep .ivu-table th,::v-deep .ivu-table td {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
.progress-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
&__label {
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
line-height: 7px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.worker-progress__icon {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
svg {
|
||||
border-radius: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
.icon-yuan {
|
||||
background: #56b7f9;
|
||||
color: #fff;
|
||||
filter: drop-shadow(0px 6px 6px rgba(43,188,255,0.5));
|
||||
svg {
|
||||
color: #56b7f9;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.icon-zhangdan {
|
||||
background: #446df6;
|
||||
filter: drop-shadow(0px 6px 6px rgba(54,117,255,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
.icon-zhifu {
|
||||
background: #f2a93f;
|
||||
filter: drop-shadow(0px 6px 6px rgba(255,164,45,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-progress--circle .el-progress__text {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="calendar-check"></SvgIcon>
|
||||
<span style="padding-left: 15px;">预算总体执行情况</span>
|
||||
<DatePicker transfer :value="select.year" placeholder="选择所属年份" placement="bottom" style="width: 130px;margin-left: auto;"
|
||||
type="year" @on-change="changeYear"></DatePicker>
|
||||
</div>
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-yuan">
|
||||
<SvgIcon icon-class="yuan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.money_total_1 || 0)}}</div>
|
||||
<div class="progress-card-item__label">年初预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhangdan">
|
||||
<SvgIcon icon-class="zhangdan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.money_total_2 || 0)}}</div>
|
||||
<div class="progress-card-item__label">调整后预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhifu">
|
||||
<SvgIcon icon-class="zhifu"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.use_money_total || 0)}}</div>
|
||||
<div class="progress-card-item__label">已支付金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? (statistic.progress.money_total_2 - statistic.progress.use_money_total) : (statistic.progress.money_total_1 - statistic.progress.use_money_total),name:'预算未执行金额'},{value:statistic.progress.use_money_total,name:'预算已执行金额'}]" ></MyProgress>
|
||||
<!-- <el-progress :width="145" type="circle" stroke-width="20" :format="per => `${per}%\n执行率`" :percentage="40"></el-progress>-->
|
||||
<!-- <div class="progress-card-item__num">-->
|
||||
<!-- {{toper(statistic.progress.money_total_1 || 0,statistic.progress.money_total_2 || 0,statistic.progress.use_money_total || 0)}}%-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="progress-card-item__label">执行率</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MyProgress from "@/components/Progress";
|
||||
import SvgIcon from "@/components/SvgIcon";
|
||||
import {deepCopy, moneyFormatter} from "@/utils"
|
||||
import { statistic } from '@/api/system/temporaryPlan'
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon,
|
||||
MyProgress
|
||||
},
|
||||
name:"card1",
|
||||
layout:{
|
||||
x:0,
|
||||
y:0,
|
||||
w:4,
|
||||
h:5,
|
||||
i:"1",
|
||||
name:"预算统计",
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
statistic: {
|
||||
progress: {
|
||||
money_total_1: 0,
|
||||
money_total_2: 0,
|
||||
use_money_total: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
moneyFormatter,
|
||||
toper(m1, m2, m3) {
|
||||
if (m2 != 0) {
|
||||
return ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
return ((m3 / m1) * 100).toFixed(2);
|
||||
} else
|
||||
return 0
|
||||
},
|
||||
changeYear(e) {
|
||||
this.select.year = e;
|
||||
this.getStatistic()
|
||||
},
|
||||
async getStatistic() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
const res = await statistic(this.select,true)
|
||||
function handleDataStructure(data) {
|
||||
let cData = deepCopy(data)
|
||||
cData.progress.money_total_1 = isNaN(Number(cData.progress.plan_money)) ? 0 : Number(cData.progress.plan_money)
|
||||
cData.progress.money_total_2 = isNaN(Number(cData.progress.plan_money)) ? 0 : Number(cData.progress.plan_money)
|
||||
cData.progress.use_money_total = isNaN(Number(cData.progress.use_money)) ? 0 : Number(cData.progress.use_money)
|
||||
|
||||
cData.departmentList = cData.departmentList.map(i => ({
|
||||
...i,
|
||||
money_total_1: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
money_total_2: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
use_money_total: isNaN(Number(i.use_money)) ? 0 : Number(i.use_money)
|
||||
}))
|
||||
cData.typeList = cData.typeList.map(i => ({
|
||||
...i,
|
||||
money_total_1: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
money_total_2: isNaN(Number(i.plan_money)) ? 0 : Number(i.plan_money),
|
||||
use_money_total: isNaN(Number(i.use_money)) ? 0 : Number(i.use_money)
|
||||
}))
|
||||
return cData
|
||||
}
|
||||
this.statistic = handleDataStructure(res)
|
||||
this.$emit('send-data', this.statistic)
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getStatistic();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.progress-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
&__label {
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
line-height: 7px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.worker-progress__icon {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
svg {
|
||||
border-radius: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
.icon-yuan {
|
||||
background: #56b7f9;
|
||||
color: #fff;
|
||||
filter: drop-shadow(0px 6px 6px rgba(43,188,255,0.5));
|
||||
svg {
|
||||
color: #56b7f9;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.icon-zhangdan {
|
||||
background: #446df6;
|
||||
filter: drop-shadow(0px 6px 6px rgba(54,117,255,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
.icon-zhifu {
|
||||
background: #f2a93f;
|
||||
filter: drop-shadow(0px 6px 6px rgba(255,164,45,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-progress--circle .el-progress__text {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.progress-card-item > .icon-yuan > svg > use {
|
||||
transform: scale(0.55);
|
||||
transform-origin: center;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="calendar-check"></SvgIcon>
|
||||
<span style="padding-left: 15px;">预算总体执行情况</span>
|
||||
<DatePicker transfer :value="select.year" placeholder="选择所属年份" placement="bottom" style="width: 130px;margin-left: auto;"
|
||||
type="year" @on-change="changeYear"></DatePicker>
|
||||
</div>
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-yuan">
|
||||
<SvgIcon icon-class="yuan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.money_total_1 || 0)}}</div>
|
||||
<div class="progress-card-item__label">年初预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhangdan">
|
||||
<SvgIcon icon-class="zhangdan"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.money_total_2 || 0)}}</div>
|
||||
<div class="progress-card-item__label">调整后预算合计金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<div class="worker-progress__icon icon-zhifu">
|
||||
<SvgIcon icon-class="zhifu"></SvgIcon>
|
||||
</div>
|
||||
<div class="progress-card-item__num">{{moneyFormatter(statistic.progress.use_money_total || 0)}}</div>
|
||||
<div class="progress-card-item__label">已支付金额</div>
|
||||
</div>
|
||||
<div class="progress-card-item">
|
||||
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? statistic.progress.money_total_2 : statistic.progress.money_total_1,name:'合计金额'},{value:statistic.progress.use_money_total,name:'已用金额'}]" ></MyProgress>
|
||||
<!-- <el-progress :width="145" type="circle" stroke-width="20" :format="per => `${per}%\n执行率`" :percentage="40"></el-progress>-->
|
||||
<!-- <div class="progress-card-item__num">-->
|
||||
<!-- {{toper(statistic.progress.money_total_1 || 0,statistic.progress.money_total_2 || 0,statistic.progress.use_money_total || 0)}}%-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="progress-card-item__label">执行率</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MyProgress from "@/components/Progress";
|
||||
import SvgIcon from "@/components/SvgIcon";
|
||||
import { moneyFormatter } from "@/utils"
|
||||
import { statistic } from '@/api/dashboard/notice'
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon,
|
||||
MyProgress
|
||||
},
|
||||
name:"card1",
|
||||
layout:{
|
||||
x:0,
|
||||
y:0,
|
||||
w:4,
|
||||
h:5,
|
||||
i:"1",
|
||||
name:"预算统计",
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
statistic: {
|
||||
progress: {
|
||||
money_total_1: 0,
|
||||
money_total_2: 0,
|
||||
use_money_total: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
moneyFormatter,
|
||||
toper(m1, m2, m3) {
|
||||
if (m2 != 0) {
|
||||
return ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
return ((m3 / m1) * 100).toFixed(2);
|
||||
} else
|
||||
return 0
|
||||
},
|
||||
changeYear(e) {
|
||||
this.select.year = e;
|
||||
this.getStatistic()
|
||||
},
|
||||
async getStatistic() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
const res = await statistic(this.select,true)
|
||||
this.statistic = res
|
||||
this.$emit('send-data',res)
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getStatistic();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.progress-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
&__label {
|
||||
font-size: 15px;
|
||||
color: #000000;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
line-height: 7px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.worker-progress__icon {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
|
||||
svg {
|
||||
border-radius: 100%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
}
|
||||
}
|
||||
.icon-yuan {
|
||||
background: #56b7f9;
|
||||
color: #fff;
|
||||
filter: drop-shadow(0px 6px 6px rgba(43,188,255,0.5));
|
||||
svg {
|
||||
color: #56b7f9;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.icon-zhangdan {
|
||||
background: #446df6;
|
||||
filter: drop-shadow(0px 6px 6px rgba(54,117,255,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
.icon-zhifu {
|
||||
background: #f2a93f;
|
||||
filter: drop-shadow(0px 6px 6px rgba(255,164,45,0.5));
|
||||
svg {
|
||||
color: #fff;
|
||||
width: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-progress--circle .el-progress__text {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.progress-card-item > .icon-yuan > svg > use {
|
||||
transform: scale(0.55);
|
||||
transform-origin: center;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="type-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="wengao"></SvgIcon>
|
||||
<span style="padding-left: 15px"
|
||||
>预算类型执行情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div id="type-card-body" style="position: relative;height: 100%;width: 100%;">
|
||||
<div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
|
||||
<Table style="width: 100%;" :height="tableHeight" size="small" :data="departmentList" :columns="table"></Table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon
|
||||
},
|
||||
name: "card3",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "5",
|
||||
name: "预算类型执行情况",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
typeList: [
|
||||
{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "1150000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
table: [
|
||||
{
|
||||
title: "预算类别",
|
||||
width: 100,
|
||||
key: "type_detail.value",
|
||||
render: (h, { row }) => h('span', row.type_detail?.value),
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "执行情况",
|
||||
minWidth: 120,
|
||||
fixed: "right",
|
||||
render: (h, { row }) => {
|
||||
let m2 = row?.money_total_2 ? Number(row?.money_total_2) : 0;
|
||||
let m1 = row?.money_total_1 ? Number(row?.money_total_1) : 0;
|
||||
let m3 = row?.use_money_total ? Number(row?.use_money_total) : 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
"stroke-width": 13,
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "年初预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_1",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_1));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "调整后预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_2",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_2));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
width: 120,
|
||||
align: "right",
|
||||
key: "use_money_total",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.use_money_total));
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let cardDom = document.getElementById('type-card');
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
departmentList() {
|
||||
if (this.getStatistic)
|
||||
return this.getStatistic()?.statistic?.typeList || [];
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
::v-deep .ivu-table th,::v-deep .ivu-table td {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
::v-deep .el-progress {
|
||||
white-space: nowrap;
|
||||
}
|
||||
::v-deep .el-progress__text {
|
||||
color: rgb(77, 139, 220);
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="type-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<SvgIcon style="color: #3171f4;width: 22px;height: 22px;" icon-class="wengao"></SvgIcon>
|
||||
<span style="padding-left: 15px"
|
||||
>预算类型执行情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="margin-left: auto; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div id="type-card-body" style="position: relative;height: 100%;width: 100%;">
|
||||
<div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
|
||||
<Table style="width: 100%;" :height="tableHeight" size="small" :data="departmentList" :columns="table"></Table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
SvgIcon
|
||||
},
|
||||
name: "card3",
|
||||
layout: {
|
||||
x: 0,
|
||||
y: 5,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "5",
|
||||
name: "预算类型执行情况",
|
||||
},
|
||||
inject: {
|
||||
getStatistic: {
|
||||
default: () => {
|
||||
return () => {
|
||||
return {
|
||||
statistic: {
|
||||
typeList: [
|
||||
{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "1150000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},{
|
||||
money_total_1: "17549700.00",
|
||||
money_total_2: "0.00",
|
||||
ids: "23,39,38,36,35,33,32,30,28,26,25,6,22,20,17,16,14,13,12,11,9,8",
|
||||
type: 7,
|
||||
use_money_total: "50000.00",
|
||||
type_text: "项目经费",
|
||||
money_total: "0.00",
|
||||
end_money: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
table: [
|
||||
{
|
||||
title: "预算类别",
|
||||
width: 100,
|
||||
key: "type_text",
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "执行情况",
|
||||
minWidth: 120,
|
||||
fixed: "right",
|
||||
render: (h, { row }) => {
|
||||
let m2 = row?.money_total_2 || 0;
|
||||
let m1 = row?.money_total_1 || 0;
|
||||
let m3 = row?.use_money_total || 0;
|
||||
let per = 0;
|
||||
|
||||
if (m2 != 0) {
|
||||
per = ((m3 / m2) * 100).toFixed(2);
|
||||
} else if (m1 != 0) {
|
||||
per = ((m3 / m1) * 100).toFixed(2);
|
||||
}
|
||||
return h("el-progress", {
|
||||
props: {
|
||||
"stroke-width": 13,
|
||||
percentage: Number(per),
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "年初预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_1",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_1));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "调整后预算合计金额(元)",
|
||||
width: 170,
|
||||
align: "right",
|
||||
key: "money_total_2",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.money_total_2));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "已使用(元)",
|
||||
width: 120,
|
||||
align: "right",
|
||||
key: "use_money_total",
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, moneyFormatter(row.use_money_total));
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let cardDom = document.getElementById('type-card');
|
||||
let cardTitleH = 58;
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
departmentList() {
|
||||
if (this.getStatistic)
|
||||
return this.getStatistic()?.statistic?.typeList || [];
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clearfix {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
::v-deep .el-card__body {
|
||||
width: 100%;
|
||||
height: calc(100% - 58px);
|
||||
}
|
||||
::v-deep .ivu-table th,::v-deep .ivu-table td {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
::v-deep .el-progress {
|
||||
white-space: nowrap;
|
||||
}
|
||||
::v-deep .el-progress__text {
|
||||
color: rgb(77, 139, 220);
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue