Commit 59998b94 authored by 李苏's avatar 李苏 💬

预算执行分析 功能 图表

parent b9f67503
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: 'hafms/yszxfxlog/query',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/hafms/yszxfxlog/delete',
method: 'post',
data: query||{}
})
}
export function doQueryDetail(query){
return request({
url:'hafms/yszxfxlog/queryDetail',
method: 'post',
data: query||{}
})
}
......@@ -27,93 +27,97 @@ import Layout from '@/layout'
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
}
*/
export const powerRoutes=[
{
export const powerRoutes = [{
path: '/jccspz',
component: 'Layout',
hidden: false,
alwaysShow:true,
alwaysShow: true,
redirect: 'ysflZbdl',
meta: {title: "基础数据", icon: "fa-cog", noCache: false, link: null,mkid:901010000},
children: [
{
component:'jccspz/ysflZbdl/index',
hidden:false,
meta:{
meta: {
title: "基础数据",
icon: "fa-cog",
noCache: false,
link: null,
mkid: 901010000
},
children: [{
component: 'jccspz/ysflZbdl/index',
hidden: false,
meta: {
"title": "预算分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":901001000,
"mkid": 901001000,
},
name: 'ysflZbdl',
path: "ysflZbdl"
},
name:'ysflZbdl',
path:"ysflZbdl"
},
// {
// component:'jccspz/xqsxZbxl/index',
// hidden:false,
// meta:{
// "title": "需求事项",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901010600,
// },
// name:'xqsxZbxl',
// path:"xqsxZbxl"
// },
{
component:'jccspz/erpKjkm/index',
hidden:false,
meta:{
// {
// component:'jccspz/xqsxZbxl/index',
// hidden:false,
// meta:{
// "title": "需求事项",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901010600,
// },
// name:'xqsxZbxl',
// path:"xqsxZbxl"
// },
{
component: 'jccspz/erpKjkm/index',
hidden: false,
meta: {
"title": "会计科目",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010200,
"mkid": 901010200,
},
name: 'erpKjkm',
path: "erpKjkm"
},
name:'erpKjkm',
path:"erpKjkm"
},
{
component:'jccspz/fymxwd/index',
hidden:false,
meta:{
{
component: 'jccspz/fymxwd/index',
hidden: false,
meta: {
"title": "费用明细维度",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010700,
"mkid": 901010700,
},
name: 'fymxwd',
path: "fymxwd"
},
name:'fymxwd',
path:"fymxwd"
},
// {
// component:'jccspz/zbfs/index',
// hidden:false,
// meta:{
// "title": "中标方式",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901030320,
// },
// name:'zbfs',
// path:"zbfs"
// },
{
component:'jccspz/xmbwh/index',
hidden:false,
meta:{
// {
// component:'jccspz/zbfs/index',
// hidden:false,
// meta:{
// "title": "中标方式",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901030320,
// },
// name:'zbfs',
// path:"zbfs"
// },
{
component: 'jccspz/xmbwh/index',
hidden: false,
meta: {
"title": "项目包维护",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010300,
},
name:'xmbwh',
path:"xmbwh"
}
"mkid": 901010300,
},
name: 'xmbwh',
path: "xmbwh"
}
]
},
/* ERP项目明细账管理*/
......@@ -121,49 +125,54 @@ export const powerRoutes=[
path: '/erpxmmxzgl',
component: 'Layout',
hidden: false,
alwaysShow:true,
alwaysShow: true,
redirect: 'xmmxcx',
meta: {title: "项目明细账管理", icon: "fa-cog", noCache: false, link: null,mkid:901020000},
children: [
{
component:'erpxmmxzgl/xmmxcx/index',
hidden:false,
meta:{
meta: {
title: "项目明细账管理",
icon: "fa-cog",
noCache: false,
link: null,
mkid: 901020000
},
children: [{
component: 'erpxmmxzgl/xmmxcx/index',
hidden: false,
meta: {
"title": "项目信息",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010400,
"mkid": 901010400,
},
name: 'xmmxcx',
path: "xmmxcx"
},
name:'xmmxcx',
path:"xmmxcx"
},
{
component:'erpxmmxzgl/erpxmmxz/index',
hidden:false,
meta:{
{
component: 'erpxmmxzgl/erpxmmxz/index',
hidden: false,
meta: {
"title": "项目明细账",
"icon": "",
"noCache": false,
"link": null,
"mkid":901020100,
"mkid": 901020100,
},
name: 'erpxmmxz',
path: "erpxmmxz"
},
name:'erpxmmxz',
path:"erpxmmxz"
},
{
component:'erpxmmxzgl/xhzl/index',
hidden:false,
meta:{
{
component: 'erpxmmxzgl/xhzl/index',
hidden: false,
meta: {
"title": "消耗总览(定期导入)",
"icon": "",
"noCache": false,
"link": null,
"mkid":901030340,
},
name:'xhzl',
path:"xhzl"
}
"mkid": 901030340,
},
name: 'xhzl',
path: "xhzl"
}
]
},
/* 预算申报及审批*/
......@@ -171,102 +180,121 @@ export const powerRoutes=[
path: '/sbysjsp',
component: 'Layout',
hidden: false,
alwaysShow:true,
alwaysShow: true,
redirect: 'yssbkfsz',
meta: {title: "预算申报", icon: "fa-cog", noCache: false, link: null,mkid:901030000},
meta: {
title: "预算申报",
icon: "fa-cog",
noCache: false,
link: null,
mkid: 901030000
},
children: [
{
component:'sbysjsp/yssq/index',
hidden:false,
meta:{
{
component: 'sbysjsp/yssq/index',
hidden: false,
meta: {
"title": "年初测算",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030100,
"mkid": 901030100,
},
name: 'yssq',
path: "yssq"
},
name:'yssq',
path:"yssq"
},
// {
// component:'sbysjsp/mxsx/index',
// hidden:false,
// meta:{
// "title": "明细事项",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid": 901030200,
// },
// name:'mxsx',
// path:"mxsx"
// },
{
component:'sbysjsp/yssqtz/index',
hidden:false,
meta:{
// {
// component:'sbysjsp/mxsx/index',
// hidden:false,
// meta:{
// "title": "明细事项",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid": 901030200,
// },
// name:'mxsx',
// path:"mxsx"
// },
{
component: 'sbysjsp/yssqtz/index',
hidden: false,
meta: {
"title": "预算调整",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030300,
"mkid": 901030300,
},
name: 'yssqtz',
path: "yssqtz"
},
name:'yssqtz',
path:"yssqtz"
},
{
component:'sbysjsp/yshz/index',
hidden:false,
meta:{
{
component: 'sbysjsp/yshz/index',
hidden: false,
meta: {
"title": "预算汇总查询",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030400,
"mkid": 901030400,
},
name: 'yshz',
path: "yshz"
},
name:'yshz',
path:"yshz"
},
{
component:'sbysjsp/lqnd/index',
hidden:false,
meta:{
{
component: 'sbysjsp/lqnd/index',
hidden: false,
meta: {
"title": "两区农电",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030500,
"mkid": 901030500,
},
name: 'lqnd',
path: "lqnd"
},
name:'lqnd',
path:"lqnd"
},
{
component:'sbysjsp/hyha/index',
hidden:false,
meta:{
{
component: 'sbysjsp/hyha/index',
hidden: false,
meta: {
"title": "淮阴淮安",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030510,
"mkid": 901030510,
},
name: 'hyha',
path: "hyha"
},
name:'hyha',
path:"hyha"
},
{
component:'sbysjsp/yszxjd/index',
hidden:false,
meta:{
{
component: 'sbysjsp/yszxjd/index',
hidden: false,
meta: {
"title": "预算执行进度",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030520,
"mkid": 901030520,
},
name: 'yszxjd',
path: "yszxjd"
},
name:'yszxjd',
path:"yszxjd"
}
{
component: 'sbysjsp/yszxfx/index',
hidden: false,
meta: {
"title": "预算执行分析",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030530,
},
name: 'yszxfx',
path: "yszxfx"
}
]
......@@ -276,24 +304,28 @@ export const powerRoutes=[
path: '/znjh',
component: 'Layout',
hidden: false,
alwaysShow:true,
alwaysShow: true,
redirect: 'znjhgl',
meta: {title: "智能稽核", icon: "fa-cog", noCache: false, link: null,mkid:901040000},
children: [
{
component:'znjh/xmznjh/index',
hidden:false,
meta:{
"title": "稽核预警",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901040100,
},
name:'xmznjh',
path:"xmznjh"
meta: {
title: "智能稽核",
icon: "fa-cog",
noCache: false,
link: null,
mkid: 901040000
},
children: [{
component: 'znjh/xmznjh/index',
hidden: false,
meta: {
"title": "稽核预警",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901040100,
},
]
name: 'xmznjh',
path: "xmznjh"
}, ]
},
/* 汇总查询报表*/
......@@ -301,91 +333,93 @@ export const powerRoutes=[
path: '/hzcxbb',
component: 'Layout',
hidden: false,
alwaysShow:true,
alwaysShow: true,
redirect: 'erpxmmxz',
meta: {title: "汇总查询报表", icon: "fa-cog", noCache: false, link: null,mkid:901050000},
children: [
{
component:'hzcxbb/erpxmmxz/index',
hidden:false,
meta:{
meta: {
title: "汇总查询报表",
icon: "fa-cog",
noCache: false,
link: null,
mkid: 901050000
},
children: [{
component: 'hzcxbb/erpxmmxz/index',
hidden: false,
meta: {
"title": "ERP项目明细账汇总查询",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901020200,
"mkid": 901020200,
},
name: 'erpxmmxz',
path: "erpxmmxz"
},
{
component: 'hzcxbb/kshdp/index',
hidden: false,
meta: {
"title": "可视化大屏",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901020300,
},
name: 'kshdp',
path: "kshdp"
},
name:'erpxmmxz',
path:"erpxmmxz"
},
{
component:'hzcxbb/kshdp/index',
hidden:false,
meta:{
"title": "可视化大屏",
"icon": "",
"noCache": false,
"link": null,
"mkid":901020300,
},
name:'kshdp',
path:"kshdp"
},
{
component:'hzcxbb/szkb/index',
hidden:false,
meta:{
"title": "数字看板",
"icon": "",
"noCache": false,
"link": null,
"mkid":'901020400',
},
name:'szkb',
path:"szkb"
},
// {
// component:'hzcxbb/render/index',
// hidden:false,
// meta:{
// "title": "render",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":'test',
// },
// name:'render',
// path:"render"
// },
// {
// component:'hzcxbb/ysspzl/index',
// hidden:false,
// meta:{
// "title": "预算申报及下达总览",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901040100,
// },
// name:'ysspzl',
// path:"ysspzl"
// }
{
component: 'hzcxbb/szkb/index',
hidden: false,
meta: {
"title": "数字看板",
"icon": "",
"noCache": false,
"link": null,
"mkid": '901020400',
},
name: 'szkb',
path: "szkb"
},
// {
// component:'hzcxbb/render/index',
// hidden:false,
// meta:{
// "title": "render",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":'test',
// },
// name:'render',
// path:"render"
// },
// {
// component:'hzcxbb/ysspzl/index',
// hidden:false,
// meta:{
// "title": "预算申报及下达总览",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid":901040100,
// },
// name:'ysspzl',
// path:"ysspzl"
// }
]
},
]
// 公共路由
export const constantRoutes = [
{
export const constantRoutes = [{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect')
}
]
children: [{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect')
}]
},
{
path: '/login',
......@@ -411,29 +445,32 @@ export const constantRoutes = [
path: '',
component: Layout,
redirect: 'index',
children: [
{
path: 'index',
component: () => import('@/views/hzcxbb/szkb/index'),
name: 'Index',
// redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
children: [{
path: 'index',
component: () => import('@/views/hzcxbb/szkb/index'),
name: 'Index',
// redirect: '/user/profile',
meta: {
title: '首页',
icon: 'dashboard',
affix: true
}
}]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: () => import('common/src/views/user/profile/index'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
children: [{
path: 'profile',
component: () => import('common/src/views/user/profile/index'),
name: 'Profile',
meta: {
title: '个人中心',
icon: 'user'
}
]
}]
},
/* 陕钢铁预写死页面*/
]
......@@ -453,6 +490,8 @@ Router.prototype.push = function push(location) {
export default new Router({
// mode: 'history',
mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
scrollBehavior: () => ({
y: 0
}),
routes: constantRoutes
})
})
\ No newline at end of file
......@@ -106,11 +106,35 @@
<i class="i3"></i>
<i class="i4"></i>
<div class="full itembg ">
<span class="com-count-title">
示例图例
</span>
<div ref="slt" class="com-count-body">
</div>
<!-- 轮播图-->
<el-carousel :indicator-position='"none"' style="overflow: hidden;" :interval='10000' class="full"
:autoplay="true">
<el-carousel-item>
<span class="com-count-title">
预算执行分析-标准成本(单位)
</span>
<div ref="slt" v-echartResize="()=>{
if(slt1){
slt1.resize()
}
}" class="com-count-body">
</div>
</el-carousel-item>
<el-carousel-item>
<span class="com-count-title">
预算执行分析-标准成本(科目)
</span>
<div ref="slt2" v-echartResize="()=>{
if(slt2){
slt2.resize()
}
}" class="com-count-body">
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
</div>
......@@ -121,10 +145,10 @@
<i class="i3"></i>
<i class="i4"></i>
<div class="full ">
<!-- <span class="com-count-title">
<!-- <span class="com-count-title">
预算执行进度-淮安本部
</span> -->
<div class="com-count-body" style="height: 100%;" >
<div class="com-count-body" style="height: 100%;">
<!-- 标题-->
<div class="lbbt">
<div class="flex1 text-center ">
......@@ -172,17 +196,33 @@
<i class="i2"></i>
<i class="i3"></i>
<i class="i4"></i>
<div class="full ">
<span class="com-count-title">
测试图例
</span>
<div ref="sdt" v-echartResize="()=>{
if(sdtCharts){
sdtCharts.resize()
<el-carousel :indicator-position='"none"' style="overflow: hidden;" :interval='10000' class="full"
:autoplay="true">
<el-carousel-item>
<span class="com-count-title">
预算执行分析-成本性项目(单位)
</span>
<div ref="slt3" v-echartResize="()=>{
if(slt3){
slt3.resize()
}
}" class="com-count-body">
</div>
</div>
}" class="com-count-body">
</div>
</el-carousel-item>
<el-carousel-item>
<span class="com-count-title">
预算执行分析-成本性项目(专业)
</span>
<div ref="slt4" v-echartResize="()=>{
if(slt4){
slt4.resize()
}
}" class="com-count-body">
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
</div>
......@@ -224,11 +264,15 @@
},
data() {
return {
slt4: null,
slt3: null,
slt2: null,
slt1: null,
/* echart实例*/
lg1:null,
lg2:null,
lg3:null,
lg4:null,
lg1: null,
lg2: null,
lg3: null,
lg4: null,
/* 定时器id*/
DELAYNUM: null,
/* 两区农电预算一览 */
......@@ -286,11 +330,10 @@
return item.bmName == '涟水县供电公司'
})
/* 滚动表格数据*/
this.$post('hafms/yszxjdlog/queryRepDetail', {
}).then(res => {
this.$post('hafms/yszxjdlog/queryRepDetail', {}).then(res => {
if (res.success) {
this.listData = res.data.records.filter(item=>{
return item.gsbz=='Y'
this.listData = res.data.records.filter(item => {
return item.gsbz == 'Y'
})
}
})
......@@ -307,7 +350,6 @@
hzxList: hzxList,
lsxList: lsxList
})
this.sdtCharts = this.initsdt()
this.szkbmapCharts.on("click", (params) => {
if (params.data) {
//获取到定义的数据
......@@ -326,6 +368,9 @@
this.initLqnd()
this.initLqnd2()
this.initslt()
this.initslt2()
this.initslt3()
this.initslt4()
},
initLqnd() {
......@@ -353,11 +398,11 @@
const LENGTH = 6
/* 选取前LENGTH个展示*/
lxh1.sort(function(a, b) {
return b.ndysmb - a.ndysmb;
});
lxh2.sort(function(a, b) {
return b.ndysmb - a.ndysmb;
});
return b.ndysmb - a.ndysmb;
});
lxh2.sort(function(a, b) {
return b.ndysmb - a.ndysmb;
});
let showLxg1 = lxh1.filter((item, index) => {
if (index < LENGTH) {
return true
......@@ -398,10 +443,10 @@
const LENGTH = 6
lxh1.sort(function(a, b) {
return b.ndysmb - a.ndysmb;
return b.ndysmb - a.ndysmb;
});
lxh2.sort(function(a, b) {
return b.ndysmb - a.ndysmb;
return b.ndysmb - a.ndysmb;
});
/* 选取前LENGTH个展示*/
let showLxg1 = lxh1.filter((item, index) => {
......@@ -520,237 +565,711 @@
return huaian1
},
initslt() {
/* 预算执行分析-标准成本-8月(单位).xlsx数据*/
this.$post('hafms/yszxfxlog/queryRepDetail', {
lx: 'BZDW'
}).then(res => {
if (res.success && res.data.records) {
const {
records
} = res.data
if (records.length != 0) {
this.slt1 = this.initsltdo(records)
}
}
})
},
initslt3() {
/* 预算执行分析-标准成本-8月(单位).xlsx数据*/
this.$post('hafms/yszxfxlog/queryRepDetail', {
lx: 'CBDW'
}).then(res => {
if (res.success && res.data.records) {
const {
records
} = res.data
if (records.length != 0) {
this.slt3 = this.initsltdo3(records)
}
}
})
},
initslt4() {
/* 预算执行分析-标准成本-8月(单位).xlsx数据*/
this.$post('hafms/yszxfxlog/queryRepDetail', {
lx: 'CBKM'
}).then(res => {
if (res.success && res.data.records) {
const {
records
} = res.data
if (records.length != 0) {
records.sort(function(a, b) {
return b.wcl - a.wcl;
});
let apidata = records.filter((item, index) => {
if (index < 6) {
return true
} else {
return false
}
})
this.slt4 = this.initsltdo4(apidata)
}
}
})
},
initsltdo3(apidata) {
/* 预算执行分析-标准成本-8月(单位).xlsx图例生成*/
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb']
const charts = this.$echarts.init(this.$refs["slt3"]);
let XAXIS = apidata.map(item => item.bmName || '未设置部门')
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
legend: {
right: 10,
top: 10,
textStyle: {
color: '#61d2f7'
},
left: 'center',
itemWidth: 9,
itemHeight: 9,
data: ['年度预算目标值', '立项值', '发生值']
},
grid: {
left: '10%',
top: '23%',
right: '10%',
bottom: '15%',
},
xAxis: {
type: 'category',
data: XAXIS,
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
color: "#fff",
fontSize: 10,
interval: 0,
},
},
yAxis: {
name: "(万元)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
show: false,
lineStyle: {
color: "#0177d4",
},
},
},
series: [{
stack: '预算',
name: '年度预算目标值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[0],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.ysmbje)
},
{
stack: '预算',
name: '立项值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[1],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.lxje)
},
{
stack: '预算', // 设置堆叠的组名
type: "bar",
name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
label: {
show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.fsje)
},
],
};
charts.setOption(option);
return charts
},
initsltdo(apidata) {
/* 预算执行分析-标准成本-8月(单位).xlsx图例生成*/
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb']
const charts = this.$echarts.init(this.$refs["slt"]);
var num = 77.8
var color = new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgb(255,46,46)', // 0% 处的颜色
let XAXIS = apidata.map(item => item.bmName || '未设置部门')
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
{
offset: 1,
color: 'rgb(255,100,46)', // 100% 处的颜色
legend: {
right: 10,
top: 10,
textStyle: {
color: '#61d2f7'
},
left: 'center',
itemWidth: 9,
itemHeight: 9,
data: ['年度预算目标值', '立项值', '发生值']
},
]);
let data1 = {
name: '',
value: num
}
let n = num;
let progress = (n * 0.01).toFixed(2);
var colorSet = [
[progress, color],
[1, 'rgba(0, 97, 226, 0.25)'],
];
let sizeC1 = 'rgb(255,215,37)';
let fontSize = 23;
var rich = {
white: {
height: 30,
fontSize: fontSize * 0.6,
color: 'rgba(255,255,255,0.5)',
grid: {
left: '10%',
top: '23%',
right: '10%',
bottom: '15%',
},
bule: {
fontSize: fontSize * 2,
color: sizeC1,
xAxis: {
type: 'category',
data: XAXIS,
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
color: "#fff",
fontSize: 10,
interval: 0,
},
},
yAxis: {
name: "(万元)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
show: false,
lineStyle: {
color: "#0177d4",
},
},
},
series: [{
stack: '预算',
name: '年度预算目标值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[0],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.ysmbje)
},
{
stack: '预算',
name: '立项值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[1],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.lxje)
},
{
stack: '预算', // 设置堆叠的组名
type: "bar",
name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
label: {
show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.fsje)
},
],
};
charts.setOption(option);
return charts
},
initslt2() {
/* 预算执行分析-标准成本-8月().xlsx数据*/
this.$post('hafms/yszxfxlog/queryRepDetail', {
lx: 'BZKM'
}).then(res => {
if (res.success && res.data.records) {
const {
records
} = res.data
if (records.length != 0) {
records.sort(function(a, b) {
return b.wcl - a.wcl;
});
let apidata = records.filter((item, index) => {
if (index < 6) {
return true
} else {
return false
}
})
this.slt2 = this.initsltdo2(apidata)
}
}
})
},
initsltdo4(apidata) {
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb','#9adc6f']
const charts = this.$echarts.init(this.$refs["slt4"]);
let XAXIS = apidata.map(item => item.xmflname || 'xmflname')
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
legend: {
right: 10,
top: 10,
textStyle: {
color: '#61d2f7'
},
left: 'center',
itemWidth: 9,
itemHeight: 9,
data: ['年度预算目标值', '立项值', '发生值']
},
grid: {
left: '10%',
top: '23%',
right: '10%',
bottom: '15%',
},
xAxis: {
type: 'category',
data: XAXIS,
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
color: "#fff",
fontSize: 10,
interval: 0,
},
},
yAxis: [{
name: "(万元)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
show: false,
lineStyle: {
color: "#0177d4",
},
},
},
{
name: "(完成率)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
show: false,
lineStyle: {
color: "#0177d4",
},
},
max: 100
},
],
series: [{
name: '完成率',
type: "line",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[4],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
yAxisIndex: 1,
data: apidata.map(item => item.wcl.toFixed(2))
}, {
stack: '预算',
name: '年度预算目标值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[0],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.ysmbje)
},
{
stack: '预算',
name: '立项值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[1],
},
},
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.lxje)
},
{
stack: '预算', // 设置堆叠的组名
type: "bar",
name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
label: {
show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.fsje)
},
],
};
charts.setOption(option);
return charts
},
initsltdo2(apidata) {
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb','#9adc6f']
const charts = this.$echarts.init(this.$refs["slt2"]);
let XAXIS = apidata.map(item => item.xmflname || 'xmflname')
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
radius: {
height: 35,
fontSize: 23,
color: sizeC1,
textAlign: 'center',
legend: {
right: 10,
top: 10,
textStyle: {
color: '#61d2f7'
},
left: 'center',
itemWidth: 9,
itemHeight: 9,
data: ['年度预算目标值', '立项值', '发生值']
},
size: {
height: 400,
grid: {
left: '10%',
top: '23%',
right: '10%',
bottom: '15%',
},
};
var option = {
title: [{
text: '处理率',
x: 'center',
top: '32%',
textStyle: {
color: '#fff',
fontSize: 14,
fontWeight: '100',
xAxis: {
type: 'category',
data: XAXIS,
axisLine: {
lineStyle: {
color: "#0177d4",
},
},
{
text: num + '%',
x: 'center',
top: '50%',
textStyle: {
fontSize: 13,
color: '#00f0ff',
foontWeight: '500',
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
color: "#fff",
fontSize: 10,
interval: 0,
},
],
tooltip: {
formatter: '{a} <br/>{b} : {c}%',
},
series: [{
type: 'gauge',
center: ['50%', '60%'],
radius: '110%',
startAngle: '210',
endAngle: '-30',
pointer: {
show: false,
},
data: data1,
title: {
show: false,
yAxis: [{
name: "(万元)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
show: true,
lineStyle: {
color: colorSet,
width: 10,
// shadowBlur: 15,
// shadowColor: '#fff',
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: 1,
color: "#0177d4",
},
},
axisTick: {
show: false,
axisLabel: {
color: "#fff",
fontSize: 10,
},
splitLine: {
show: false,
length: 12,
lineStyle: {
color: '#00377a',
width: 2,
type: 'solid',
color: "#0177d4",
},
},
axisLabel: {
show: false,
},
},
// 左边刻度线
{
type: 'gauge',
center: ['50%', '60%'],
radius: '120%',
startAngle: '210',
endAngle: '-30',
min: 0,
zlevel: 10,
max: 100,
splitNumber: 12,
// 展示当前进度
progress: {
show: false,
name: "(完成率)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
// 仪表盘指针
pointer: {
show: false,
},
// 仪表盘轴线相关配置
axisLine: {
show: false,
lineStyle: {
color: [
[1, 'transparent']
],
width: 20,
color: "#0177d4",
},
},
// 刻度样式
axisTick: {
show: false,
axisLabel: {
color: "#fff",
fontSize: 10,
},
// 分隔线样式
splitLine: {
show: false,
lineStyle: {
color: "#0177d4",
},
},
// 刻度标签
axisLabel: {
show: true,
distance: -24,
formatter: function(value) {
if (value === 0) {
return '{white|' + value + '}';
}
return '';
max: 100
},
],
series: [{
name: '完成率',
type: "line",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[4],
},
rich: rich,
},
// 表盘中指针的固定点
anchor: {
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
yAxisIndex: 1,
data: apidata.map(item => item.wcl.toFixed(2))
}, {
stack: '预算',
name: '年度预算目标值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[0],
},
},
detail: {
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: [{
value: 20,
}, ],
data: apidata.map(item => item.ysmbje)
},
// // 又边刻度线
{
type: 'gauge',
center: ['50%', '60%'],
radius: '120%',
startAngle: '210',
endAngle: '-30',
min: 0,
zlevel: 10,
max: 100,
splitNumber: 12,
// 展示当前进度
progress: {
show: false,
},
// 仪表盘指针
pointer: {
show: false,
},
// 仪表盘轴线相关配置
axisLine: {
show: false,
lineStyle: {
color: [
[1, 'transparent']
],
width: 20,
stack: '预算',
name: '立项值',
type: "bar",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[1],
},
},
// 刻度样式
axisTick: {
show: false,
},
// 分隔线样式
splitLine: {
label: {
show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
// 刻度标签
axisLabel: {
show: true,
distance: -30,
formatter: function(value) {
if (value === 100) {
return '{white|' + value + '}';
}
return '';
},
rich: rich,
color: 'rgba(255,255,255,.85)',
fontSize: 12,
},
// 表盘中指针的固定点
anchor: {
show: false,
data: apidata.map(item => item.lxje)
},
{
stack: '预算', // 设置堆叠的组名
type: "bar",
name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
detail: {
label: {
show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: [{
value: 0,
}, ],
data: apidata.map(item => item.fsje)
},
],
};
......@@ -759,112 +1278,7 @@
return charts
},
initsdt() {
const charts = this.$echarts.init(this.$refs["sdt"]);
const option = {
legend: {
bottom: 10,
textStyle: {
color: '#61d2f7' // 设置图例项字体颜色为红色
},
left: 'center',
itemWidth: 9,
itemHeight: 9,
data: ['2018溢价率', '2019溢价率']
},
xAxis: {
axisLine: { // 改变x轴颜色
show: false,
lineStyle: {
color: '#26D9FF',
}
},
axisTick: {
show: false
},
axisLabel: { // 改变x轴字体颜色和大小
textStyle: {
color: "#333",
fontSize: 12
},
},
splitLine: {
show: false,
},
},
yAxis: {
name: '%',
nameTextStyle: {
color: '#61d2f7',
padding: [0, 25, 0, 0]
},
axisLine: { // 改变y轴颜色
lineStyle: {
color: '#61d2f7'
}
},
axisTick: {
show: false
},
axisLabel: { // 改变y轴字体颜色和大小
//formatter: '{value} m³ ', // 给y轴添加单位
textStyle: {
color: "#61d2f7",
fontSize: 12
},
},
splitLine: {
lineStyle: {
color: "#61d2f7"
}
},
},
series: [{
name: '2018溢价率',
type: 'scatter',
itemStyle: {
color: "#3E9FFF",
},
symbolSize: 12,
data: [
[10.0, 8.04],
[8.0, 6.95],
[13.0, 7.58],
[9.0, 8.81],
[11.0, 8.33],
[14.0, 9.96],
[6.0, 7.24],
[4.0, 4.26],
[12.0, 10.84],
[7.0, 4.82],
[5.0, 5.68]
],
}, {
name: '2019溢价率',
type: 'scatter',
itemStyle: {
color: "#F7B500",
},
symbolSize: 12,
data: [
[9.0, 5.04],
[11.0, 7.95],
[12.0, 8.58],
[5.0, 11.81],
[7.0, 12.33],
[11.0, 7.96],
[7.0, 9.24],
[6.0, 8.26],
[10.0, 11.84],
[7.0, 3.82],
[6.0, 4.68]
],
}]
}
charts.setOption(option);
return charts
},
initlg1(apidata) {
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb']
let XAXIS = apidata.map(item => item.fyname)
......@@ -903,11 +1317,11 @@
},
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
color: "#fff",
fontSize: 10,
interval: 0,
......@@ -1063,11 +1477,11 @@
fontSize: 10,
interval: 0,
formatter: function(value) {
if (value.length > 7) {
return value.slice(0,7) + '...';
}
return value;
},
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
},
},
yAxis: {
......@@ -1221,11 +1635,11 @@
fontSize: 10,
interval: 0,
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
},
},
yAxis: {
......@@ -1379,11 +1793,11 @@
fontSize: 10,
interval: 0,
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
if (value.length > 7) {
return value.slice(0, 7) + '...';
}
return value;
},
},
},
yAxis: {
......@@ -1593,93 +2007,106 @@
</script>
<style lang="scss" scoped>
#szkb{
.com-count-title{
transform: translateY(10px);
font-size: 1vw;
color:#3aafe8;
line-height: 2vh;
font-weight: 600;
&::before{
content: '';
height: .5vw;
width: .5vw;
display: inline-block;
background-color: #bde4ff;
border-radius: 50%;
margin-bottom: .1vh;
}
#szkb {
.com-count-title {
transform: translateY(10px);
font-size: 1vw;
color: #3aafe8;
line-height: 2vh;
font-weight: 600;
&::before {
content: '';
height: .5vw;
width: .5vw;
display: inline-block;
background-color: #bde4ff;
border-radius: 50%;
margin-bottom: .1vh;
}
}
.com-count-body {
font-size: .65vw;
height: calc(100% - 2vh);
width: 100%;
}
.itembg {
background-image: url(./static/itembg.png);
background-size: 100% 100%;
}
background-image: url(./static/bg.png);
background-size: 100% 100%;
height: 100vh;
width: 100vw;
.title {
background-image: url(./static/bg_top.png);
background-size: 100% 100%;
height: 8vh;
width: 100%;
text-align: center;
line-height: 8vh;
color: #bde4ff;
font-size: 1.8vw;
font-weight: 700;
}
.main {
height: 58vh;
width: 100%;
display: flex;
.first {
height: 100%;
width: 30%;
padding: 0.5vh;
}
.com-count-body{
font-size: .65vw;
height: calc(100% - 2vh);
width: 100%;
.second {
height: 100%;
width: 40%;
padding: 0.5vh;
}
.itembg{
background-image: url(./static/itembg.png);
background-size: 100% 100%;
.third {
height: 100%;
width: 30%;
padding: 0.5vh;
}
background-image: url(./static/bg.png);
background-size: 100% 100%;
height: 100vh;
width: 100vw;
.title{
background-image: url(./static/bg_top.png);
background-size: 100% 100%;
height: 8vh;
width: 100%;
text-align: center;
line-height: 8vh;
color: #bde4ff;
font-size: 1.8vw;
font-weight: 700;
}
.bottom {
display: flex;
height: 39vh;
width: 100%;
margin-top: 1vh;
.first {
height: 100%;
width: 30%;
padding: 0.5vh;
}
.main{
height: 58vh;
width: 100%;
display: flex;
.first{
height: 100%;
width: 30%;
padding:0.5vh;
}
.second{
height: 100%;
width: 40%;
padding:0.5vh;
}
.third{
height: 100%;
width: 30%;
padding:0.5vh;
}
.second {
height: 100%;
width: 40%;
padding: 0.5vh;
}
.bottom{
display: flex;
height: 39vh;
width: 100%;
margin-top: 1vh;
.first{
height: 100%;
width: 30%;
padding:0.5vh;
}
.second{
height: 100%;
width: 40%;
padding:0.5vh;
}
.third{
height: 100%;
width: 30%;
padding:0.5vh;
}
.third {
height: 100%;
width: 30%;
padding: 0.5vh;
}
}
.itemtitle{
}
.itemtitle {
margin-top: 1vh;
margin-bottom: 1vh;
height: 5vh;
......@@ -1690,7 +2117,8 @@
color: #bde4ff;
font-weight: 700;
}
.itemtitleb{
.itemtitleb {
margin-top: 1vh;
margin-bottom: 1vh;
height: 4vh;
......@@ -1701,118 +2129,137 @@
color: #bde4ff;
font-weight: 700;
}
.maintitle{
width: 60%;margin-right: 20%;margin-left: 20%;border-radius: 30px;
background-color:rgba(58,175,232,.6) ;
border-radius: 18px;
.maintitle {
width: 60%;
margin-right: 20%;
margin-left: 20%;
border-radius: 30px;
background-color: rgba(58, 175, 232, .6);
border-radius: 18px;
}
.itemtitlebg1{
background: linear-gradient(to right,#3aafe8,rgba(48,82,174,0));
.itemtitlebg1 {
background: linear-gradient(to right, #3aafe8, rgba(48, 82, 174, 0));
}
.itemtitlebg2{
background: linear-gradient(to left,#3aafe8,rgba(48,82,174,0));
.itemtitlebg2 {
background: linear-gradient(to left, #3aafe8, rgba(48, 82, 174, 0));
}
.itemtitlebg3{
background: linear-gradient(to left,rgba(48,82,174,0) ,#3aafe8 30% ,rgba(48,82,174,0));
.itemtitlebg3 {
background: linear-gradient(to left, rgba(48, 82, 174, 0), #3aafe8 30%, rgba(48, 82, 174, 0));
}
.itemmain{
height:51vh;
.itemmain {
height: 51vh;
width: 100%;
}
.itemmainb{
height:32vh;
.itemmainb {
height: 32vh;
width: 100%;
}
.boxall {
border: 1px solid #3486da;
background: rgba(0,70,190,.1);
padding: .6vw;
position: relative;
margin-bottom: 0.25rem;
z-index: 10;
.i1{
border-right: 3px solid #3486da;
right: -2px;
position: absolute;
width: 1vw;
height:1vw;
content: "";
border-top: 3px solid #3486da;
top: -2px;
}
.i2{
border-left: 3px solid #3486da;
left: -2px;
position: absolute;
width: 1vw;
height:1vw;
content: "";
border-top: 3px solid #3486da;
top: -2px;
}
.i3{
border-right: 3px solid #3486da;
right: -2px;
position: absolute;
width: 1vw;
height:1vw;
content: "";
border-top: 3px solid #3486da;
bottom: -2px;
transform: rotate(90deg);
}
.i4{
border-left: 3px solid #3486da;
left: -2px;
position: absolute;
width: 1vw;
height:1vw;
content: "";
border-top: 3px solid #3486da;
bottom: -2px;
transform: rotate(-90deg);
}
.lbbt{
height: 4vh;
width: 100%;
font-size: .9vw;
display: flex;
line-height: 4vh;
color: #61d2f7;
}
.flex1{
flex: 1;
}
.lbbody{
height: calc(100% - 4vh);
}
.lbbody div{
flex: 1;
line-height: 25px;
font-size: 13px;
text-align: center;
}
.lbtit > :nth-child(odd) {
-webkit-box-shadow: #07417a 0px 0px 10px;
-moz-box-shadow: #07417a 0px 0px 10px;
box-shadow: inset 0 0 30px #07417a;
/*position: relative;*/
}
.lbtit > :nth-child(even) {
-webkit-box-shadow: #3486da 0px 0px 10px;
-moz-box-shadow: #3486da 0px 0px 10px;
box-shadow: inset 0 0 30px #3486da;
/*position: relative;*/
}
border: 1px solid #3486da;
background: rgba(0, 70, 190, .1);
padding: .6vw;
position: relative;
margin-bottom: 0.25rem;
z-index: 10;
.i1 {
border-right: 3px solid #3486da;
right: -2px;
position: absolute;
width: 1vw;
height: 1vw;
content: "";
border-top: 3px solid #3486da;
top: -2px;
}
.i2 {
border-left: 3px solid #3486da;
left: -2px;
position: absolute;
width: 1vw;
height: 1vw;
content: "";
border-top: 3px solid #3486da;
top: -2px;
}
.i3 {
border-right: 3px solid #3486da;
right: -2px;
position: absolute;
width: 1vw;
height: 1vw;
content: "";
border-top: 3px solid #3486da;
bottom: -2px;
transform: rotate(90deg);
}
.i4 {
border-left: 3px solid #3486da;
left: -2px;
position: absolute;
width: 1vw;
height: 1vw;
content: "";
border-top: 3px solid #3486da;
bottom: -2px;
transform: rotate(-90deg);
}
.lbbt {
height: 4vh;
width: 100%;
font-size: .9vw;
display: flex;
line-height: 4vh;
color: #61d2f7;
}
.flex1 {
flex: 1;
}
.lbbody {
height: calc(100% - 4vh);
}
.lbbody div {
flex: 1;
line-height: 25px;
font-size: 13px;
text-align: center;
}
.lbtit> :nth-child(odd) {
-webkit-box-shadow: #07417a 0px 0px 10px;
-moz-box-shadow: #07417a 0px 0px 10px;
box-shadow: inset 0 0 30px #07417a;
/*position: relative;*/
}
.lbtit> :nth-child(even) {
-webkit-box-shadow: #3486da 0px 0px 10px;
-moz-box-shadow: #3486da 0px 0px 10px;
box-shadow: inset 0 0 30px #3486da;
/*position: relative;*/
}
}
// @import url("szkb.scss");
</style>
<template>
<div class=" flex">
<el-tabs @tab-click="handleClick" v-model="activeName" :tab-position="'left'">
<el-tab-pane style="font-size: 12px;" v-for="(item,index) in paneList" :key="item.id" :name="item.id"
:lx="item.lx" :label="item.title"></el-tab-pane>
</el-tabs>
<div style="flex: 1;overflow: hidden;">
<div class="min_full" style="border-left: 0px;">
<!-- right-->
<el-row class="tool-bar">
<!-- <ToolButton :app='app'></ToolButton> -->
<ImportTempButton @success='success' url="hafms/yszhcxlog//excel/import" :params="{
lx:'B'
}" />
<!-- 导入-->
<el-button @click="del" size="mini" type="danger">删除当前报表</el-button>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager :operateButtons='false' disableQuery @getData='getData' :ref="'TablePager'" :app='app'
:query='query' @selectItem='selectItem' @getRow='getRow'>
</TablePager>
</div>
</div>
</div>
</div>
</template>
<script>
import {
doQuery,
doDelete,
doQueryDetail
} from '@/api/sbysjsp/yszxfx.js';
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
/* 初始额外赋值*/
async mounted() {
/* 查询数值*/
this.init()
// this.$refs['TablePager'].pageQuery()
},
data() {
return {
activeName: '',
paneList: [],
baseUrl: 'hafms/yszxfxlog',
/* 查询参数*/
queryParams: {
},
/* 表格标题对应参数*/
tableTitle: [
// {
// title: "预算科目",
// field: "fyname",
// fieldType: "ftString",
// width: 160
// },
// {
// title: "加载中",
// fieldType: "ftString",
// field: "title",
// width: 160,
// subtitle: [
// {
// label: "年度预算目标值(万元)",
// prop: "ndysmb",
// fieldType: "ftString",
// width: 230
// },
// {
// prop: "phmb",
// label: "平衡目标值(万元)",
// width: "120"
// },
// {
// prop: "ljfj",
// label: "累计分解值(万元)",
// width: "120"
// },
// {
// prop: "fjl",
// label: "分解率",
// width: "120"
// },
// {
// prop: "fsz",
// label: "发生值(万元)",
// width: "120"
// },
// {
// prop: "wcl",
// label: "完成率",
// width: "120"
// },
// ]
// },
// {
// title: "加载中",
// fieldType: "ftString",
// field: "title",
// width: 160,
// subtitle: [{
// label: "年度预算目标值(万元)",
// prop: "ndysmb2",
// fieldType: "ftString",
// width: 230
// },
// {
// prop: "phmb2",
// label: "平衡目标值(万元)",
// width: "120"
// },
// {
// prop: "ljfj2",
// label: "累计分解值(万元)",
// width: "120"
// },
// {
// prop: "fjl2",
// label: "分解率",
// width: "120"
// },
// {
// prop: "fsz2",
// label: "发生值(万元)",
// width: "120"
// },
// {
// prop: "wcl2",
// label: "完成率",
// width: "120"
// },
// ]
// },
]
}
},
methods: {
/* 切换新表头*/
transXbt(lx) {
console.log(this.$refs.TablePager.newGridList)
if (lx == 'BZDW') {
this.$refs.TablePager.newGridList = [
{
label: '单位名称',
prop: 'bmName',
show: true
},
{
label: '年度预算目标值(万元)',
prop: 'ysmbje',
show: true
},
{
label: '立项值(万元)',
prop: 'lxje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '下达率(%)',
prop: 'lxl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '发生值(万元)',
prop: 'fsje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '完成率(%)',
prop: 'wcl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '排名',
prop: 'pm',
show: true
}
]
} else if (lx == 'BZKM') {
this.$refs.TablePager.newGridList = [{
label: '项目类别',
prop: 'xmflname',
show: true
},
{
label: '年度预算目标值(万元)',
prop: 'ysmbje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '待分解(万元)',
prop: 'dfjje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '立项值(万元)',
prop: 'lxje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '下达率(%)',
prop: 'lxl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '发生值(万元)',
prop: 'fsje',
show: true
},
{
label: '完成率(%)',
prop: 'wcl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
}
]
}else if (lx == 'CBKM') {
this.$refs.TablePager.newGridList = [{
label: '项目类别',
prop: 'xmflname',
show: true
},
{
label: '年度预算目标值(万元)',
prop: 'ysmbje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '待分解(万元)',
prop: 'dfjje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '立项值(万元)',
prop: 'lxje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '立项率(%)',
prop: 'lxl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '发生值(万元)',
prop: 'fsje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '完成率(%)',
prop: 'wcl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
}
]
}else if (lx == 'CBDW') {
this.$refs.TablePager.newGridList = [
{
label: '单位名称',
prop: 'bmName',
show: true
},
{
label: '年度预算目标值(万元)',
prop: 'ysmbje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '立项值(万元)',
prop: 'lxje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '立项率(%)',
prop: 'lxl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '发生值(万元)',
prop: 'fsje',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(4);
} else {
return value
}
}
}
},
{
label: '完成率(%)',
prop: 'wcl',
show: true,
formatter(a, b, value) {
if (!value || value === "undefined" || value === '') {
return 0;
} else {
if (!isNaN(value)) {
return parseFloat(value).toFixed(3);
} else {
return value
}
}
}
},
{
label: '排名',
prop: 'pm',
show: true
}
]
}
},
del() {
if (this.paneList.length > 0 && this.activeName) {
this.$confirm('是否删除当前报表, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
doDelete({
id: this.activeName
}).then(e => {
if (e.success) {
this.$success('操作成功')
/* 初始化list*/
this.init()
}
})
})
} else {
this.$warning('当前无数据,请刷新或者导入后进行操作')
}
},
init() {
doQuery({
}).then(res => {
if (res.success) {
if (res.data && res.data.records && res.data.records.length != 0) {
this.paneList = res.data.records || []
if (this.paneList[0]) {
this.transXbt(this.paneList[0].lx)
this.activeName = this.paneList[0].id
this.showTabData(this.paneList[0].id)
/* 查询第一个list*/
}
}
}
})
},
/* 导入成功回调*/
success() {
this.init()
},
/*数据处理*/
showTabData(id) {
/* 控制查询loading */
this.$refs.TablePager.loading = true
doQueryDetail({
mid: id
}).then(res => {
if (res.success) {
let records = res.data.records || []
/* 数据处理*/
this.$refs.TablePager['tableData'] = records
}
}).finally(e => {
this.$refs.TablePager.loading = false
})
},
handleClick(item) {
console.log(item)
this.transXbt(item.$attrs.lx)
this.showTabData(item.name)
},
/* 基础查询*/
query: doQuery,
apiDelete: doDelete,
queryDetail: doQueryDetail
},
components: {
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment