parent
b926016c65
commit
78929be215
@ -1,52 +1,93 @@
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import Cookies from "js-cookie";
|
||||
import { Message } from "element-ui";
|
||||
import { show, save } from "@/api/system/expand";
|
||||
import store from "@/store";
|
||||
const state = {
|
||||
sidebar: {
|
||||
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
|
||||
withoutAnimation: false
|
||||
opened: Cookies.get("sidebarStatus")
|
||||
? !!+Cookies.get("sidebarStatus")
|
||||
: true,
|
||||
withoutAnimation: false,
|
||||
},
|
||||
device: 'desktop',
|
||||
workerLayout:[],
|
||||
}
|
||||
|
||||
device: "desktop",
|
||||
workerLayout: {},
|
||||
};
|
||||
const getter = {
|
||||
layout: (state) => {
|
||||
return state["app/workerLayout"]?.config || [];
|
||||
},
|
||||
};
|
||||
const mutations = {
|
||||
TOGGLE_SIDEBAR: state => {
|
||||
state.sidebar.opened = !state.sidebar.opened
|
||||
state.sidebar.withoutAnimation = false
|
||||
TOGGLE_SIDEBAR: (state) => {
|
||||
state.sidebar.opened = !state.sidebar.opened;
|
||||
state.sidebar.withoutAnimation = false;
|
||||
if (state.sidebar.opened) {
|
||||
Cookies.set('sidebarStatus', 1)
|
||||
Cookies.set("sidebarStatus", 1);
|
||||
} else {
|
||||
Cookies.set('sidebarStatus', 0)
|
||||
Cookies.set("sidebarStatus", 0);
|
||||
}
|
||||
},
|
||||
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
||||
Cookies.set('sidebarStatus', 0)
|
||||
state.sidebar.opened = false
|
||||
state.sidebar.withoutAnimation = withoutAnimation
|
||||
Cookies.set("sidebarStatus", 0);
|
||||
state.sidebar.opened = false;
|
||||
state.sidebar.withoutAnimation = withoutAnimation;
|
||||
},
|
||||
TOGGLE_DEVICE: (state, device) => {
|
||||
state.device = device
|
||||
state.device = device;
|
||||
},
|
||||
SET_LAYOUT: (state, layout) => {
|
||||
state.workerLayout = layout;
|
||||
},
|
||||
SET_LAYOUT:(state,layout) => {
|
||||
state.workerLayout = layout
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const actions = {
|
||||
toggleSideBar({ commit }) {
|
||||
commit('TOGGLE_SIDEBAR')
|
||||
commit("TOGGLE_SIDEBAR");
|
||||
},
|
||||
closeSideBar({ commit }, { withoutAnimation }) {
|
||||
commit('CLOSE_SIDEBAR', withoutAnimation)
|
||||
commit("CLOSE_SIDEBAR", withoutAnimation);
|
||||
},
|
||||
toggleDevice({ commit }, device) {
|
||||
commit('TOGGLE_DEVICE', device)
|
||||
}
|
||||
}
|
||||
commit("TOGGLE_DEVICE", device);
|
||||
},
|
||||
getLayout({ commit, state }) {
|
||||
return state.workerLayout.config
|
||||
? JSON.parse(state.workerLayout.config)
|
||||
: new Promise((resolve, reject) => {
|
||||
show({
|
||||
admin_id: store.state.user.userId,
|
||||
}).then((res) => {
|
||||
commit("SET_LAYOUT", res);
|
||||
resolve(JSON.parse(res?.config) || [])
|
||||
});
|
||||
});
|
||||
},
|
||||
setLayout({ commit }) {
|
||||
show({
|
||||
admin_id: store.state.user.userId,
|
||||
}).then((res) => {
|
||||
commit("SET_LAYOUT", res);
|
||||
});
|
||||
},
|
||||
saveLayout({ commit, dispatch, state }, layout) {
|
||||
save({
|
||||
id: state.workerLayout.id,
|
||||
name: "1",
|
||||
config: JSON.stringify(layout),
|
||||
}).then((res) => {
|
||||
dispatch("setLayout");
|
||||
Message({
|
||||
type: "success",
|
||||
message: "保存成功",
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getter,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
actions,
|
||||
};
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header">
|
||||
<span style="border-left: 3px solid #338DE3FF;padding-left: 6px;">进度</span>
|
||||
<i class="el-icon-more" style="float: right;font-size: 20px;"></i>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;flex-wrap: wrap;align-items: center;justify-content: space-evenly;align-content: center;">
|
||||
<el-progress type="circle" :percentage="25"></el-progress>
|
||||
<el-progress type="circle" :percentage="100" status="success"></el-progress>
|
||||
<el-progress type="circle" :percentage="70" status="warning"></el-progress>
|
||||
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"card1",
|
||||
layout:{
|
||||
x:0,
|
||||
y:0,
|
||||
w:4,
|
||||
h:5,
|
||||
i:"card1"
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -1,37 +0,0 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header">
|
||||
<span style="border-left: 3px solid #338DE3FF;padding-left: 6px;">卡片名称</span>
|
||||
<i class="el-icon-more" style="float: right;font-size: 20px;"></i>
|
||||
</div>
|
||||
<div>
|
||||
<el-progress :percentage="50"></el-progress>
|
||||
<el-progress :percentage="100" status="success"></el-progress>
|
||||
<el-progress :percentage="100" status="warning"></el-progress>
|
||||
<el-progress :percentage="50" status="exception"></el-progress>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:'card2',
|
||||
layout:{
|
||||
x:4,
|
||||
y:0,
|
||||
w:6,
|
||||
h:4,
|
||||
i:"card2"
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="department-card">
|
||||
<div slot="header">
|
||||
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
|
||||
>科室进展情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="float: right; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Table :height="tableHeight" size="small" :data="departmentList" :columns="table"></Table>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import ElementResize from 'element-resize-detector'
|
||||
|
||||
export default {
|
||||
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 {
|
||||
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: {
|
||||
init() {
|
||||
let cardDom = document.getElementById('department-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?.departmentList || [];
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="todo-card">
|
||||
<div slot="header">
|
||||
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
|
||||
>待办事项</span
|
||||
>
|
||||
<i class="el-icon-more" style="float: right; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Table :height="tableHeight" :loading="loading" size="small" :data="/^\/system/.test(this.$route.path) ? example : list" :columns="table"></Table>
|
||||
|
||||
<div ref="todo-page" style="display: flex; justify-content: center; margin: 10px 0">
|
||||
<Page :total="/^\/system/.test(this.$route.path) ? example.length : total"
|
||||
size="small"
|
||||
show-elevator
|
||||
show-total
|
||||
@on-change="e => {
|
||||
select.page = e;
|
||||
getNotices();
|
||||
}"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNotice, readNotice } from '@/api/dashboard/notice'
|
||||
import ElementResize from 'element-resize-detector'
|
||||
|
||||
export default {
|
||||
name: "card2",
|
||||
layout: {
|
||||
x: 4,
|
||||
y: 0,
|
||||
w: 6,
|
||||
h: 4,
|
||||
i: "2",
|
||||
name: "待办事项",
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
example:[
|
||||
{
|
||||
type: 1,
|
||||
content: "示例1",
|
||||
created_at:this.$moment().format("YYYY-MM-DD HH:mm:ss"),
|
||||
read_count: true
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
content: "示例2",
|
||||
created_at:this.$moment().format("YYYY-MM-DD HH:mm:ss"),
|
||||
read_count: false
|
||||
}
|
||||
],
|
||||
select:{
|
||||
page: 1,
|
||||
page_size: 10
|
||||
},
|
||||
tableHeight: 120,
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
table: [
|
||||
{
|
||||
type: "index",
|
||||
title: "序号",
|
||||
align: "center",
|
||||
width: 64
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
align: "center",
|
||||
width: 100,
|
||||
render: (h, { row }) => {
|
||||
return h("span", {}, row.type === 1 ? "合同流程" : "付款计划");
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "内容",
|
||||
key: "content",
|
||||
align: "left",
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "下发时间",
|
||||
key: "created_at",
|
||||
width: 180,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "read_count",
|
||||
width: 120,
|
||||
render: (h, { row }) => {
|
||||
return row.read_count
|
||||
? h(
|
||||
"el-link",
|
||||
{
|
||||
props: {
|
||||
type: "success",
|
||||
underline: false,
|
||||
},
|
||||
},
|
||||
"已读"
|
||||
)
|
||||
: h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
ghost: true
|
||||
},
|
||||
on: {
|
||||
['click']:e => {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
|
||||
readNotice({
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '已读'
|
||||
})
|
||||
this.getNotices()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
"未读"
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getNotices() {
|
||||
if(/^\/system/.test(this.$route.path)) return
|
||||
try{
|
||||
this.loading = true
|
||||
const res = await getNotice(this.select,true);
|
||||
this.list = res.data;
|
||||
this.total = res.total;
|
||||
this.loading = false
|
||||
}catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
|
||||
init() {
|
||||
let cardDom = document.getElementById('todo-card');
|
||||
let cardTitleH = 58;
|
||||
let page = this.$refs['todo-page']
|
||||
const elementResize = ElementResize({
|
||||
strategy:'scroll'
|
||||
})
|
||||
elementResize.listenTo(cardDom,ele => {
|
||||
this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH - page.getBoundingClientRect().height
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getNotices();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="border-left: 3px solid #338DE3FF;padding-left: 6px;">预算总体进展情况</span>
|
||||
<DatePicker transfer :value="select.year" placeholder="选择所属年份" placement="bottom" style="width: 130px;float: right;"
|
||||
type="year" @on-change="changeYear"></DatePicker>
|
||||
</div>
|
||||
<div class="progress-card">
|
||||
<div class="progress-card-item">
|
||||
<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="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="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">
|
||||
<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 { moneyFormatter } from "@/utils"
|
||||
import { statistic } from '@/api/dashboard/notice'
|
||||
export default {
|
||||
name:"card1",
|
||||
layout:{
|
||||
x:0,
|
||||
y:0,
|
||||
w:4,
|
||||
h:5,
|
||||
i:"1",
|
||||
name:"预算统计",
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
statistic: {
|
||||
progress: {}
|
||||
}
|
||||
}
|
||||
},
|
||||
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">
|
||||
.progress-card {
|
||||
display: flex;
|
||||
|
||||
&-item {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
|
||||
&__label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
&__num {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
|
||||
padding: 6px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="hover" id="type-card">
|
||||
<div slot="header">
|
||||
<span style="border-left: 3px solid #338de3ff; padding-left: 6px"
|
||||
>预算类型进展情况</span
|
||||
>
|
||||
<i class="el-icon-more" style="float: right; font-size: 20px"></i>
|
||||
</div>
|
||||
|
||||
<div id="type-card-body">
|
||||
<Table :height="tableHeight" size="small" :data="departmentList" :columns="table"></Table>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ElementResize from "element-resize-detector";
|
||||
import { moneyFormatter } from "@/utils";
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
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: "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,
|
||||
},{
|
||||
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: 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: {
|
||||
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"></style>
|
||||
Loading…
Reference in new issue