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,27 +27,31 @@ import Layout from '@/layout' ...@@ -27,27 +27,31 @@ import Layout from '@/layout'
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
} }
*/ */
export const powerRoutes=[ export const powerRoutes = [{
{
path: '/jccspz', path: '/jccspz',
component: 'Layout', component: 'Layout',
hidden: false, hidden: false,
alwaysShow:true, alwaysShow: true,
redirect: 'ysflZbdl', redirect: 'ysflZbdl',
meta: {title: "基础数据", icon: "fa-cog", noCache: false, link: null,mkid:901010000}, meta: {
children: [ title: "基础数据",
{ icon: "fa-cog",
component:'jccspz/ysflZbdl/index', noCache: false,
hidden:false, link: null,
meta:{ mkid: 901010000
},
children: [{
component: 'jccspz/ysflZbdl/index',
hidden: false,
meta: {
"title": "预算分类", "title": "预算分类",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901001000, "mkid": 901001000,
}, },
name:'ysflZbdl', name: 'ysflZbdl',
path:"ysflZbdl" path: "ysflZbdl"
}, },
// { // {
// component:'jccspz/xqsxZbxl/index', // component:'jccspz/xqsxZbxl/index',
...@@ -63,30 +67,30 @@ export const powerRoutes=[ ...@@ -63,30 +67,30 @@ export const powerRoutes=[
// path:"xqsxZbxl" // path:"xqsxZbxl"
// }, // },
{ {
component:'jccspz/erpKjkm/index', component: 'jccspz/erpKjkm/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "会计科目", "title": "会计科目",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901010200, "mkid": 901010200,
}, },
name:'erpKjkm', name: 'erpKjkm',
path:"erpKjkm" path: "erpKjkm"
}, },
{ {
component:'jccspz/fymxwd/index', component: 'jccspz/fymxwd/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "费用明细维度", "title": "费用明细维度",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901010700, "mkid": 901010700,
}, },
name:'fymxwd', name: 'fymxwd',
path:"fymxwd" path: "fymxwd"
}, },
// { // {
// component:'jccspz/zbfs/index', // component:'jccspz/zbfs/index',
...@@ -102,17 +106,17 @@ export const powerRoutes=[ ...@@ -102,17 +106,17 @@ export const powerRoutes=[
// path:"zbfs" // path:"zbfs"
// }, // },
{ {
component:'jccspz/xmbwh/index', component: 'jccspz/xmbwh/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "项目包维护", "title": "项目包维护",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901010300, "mkid": 901010300,
}, },
name:'xmbwh', name: 'xmbwh',
path:"xmbwh" path: "xmbwh"
} }
] ]
}, },
...@@ -121,48 +125,53 @@ export const powerRoutes=[ ...@@ -121,48 +125,53 @@ export const powerRoutes=[
path: '/erpxmmxzgl', path: '/erpxmmxzgl',
component: 'Layout', component: 'Layout',
hidden: false, hidden: false,
alwaysShow:true, alwaysShow: true,
redirect: 'xmmxcx', redirect: 'xmmxcx',
meta: {title: "项目明细账管理", icon: "fa-cog", noCache: false, link: null,mkid:901020000}, meta: {
children: [ title: "项目明细账管理",
{ icon: "fa-cog",
component:'erpxmmxzgl/xmmxcx/index', noCache: false,
hidden:false, link: null,
meta:{ mkid: 901020000
},
children: [{
component: 'erpxmmxzgl/xmmxcx/index',
hidden: false,
meta: {
"title": "项目信息", "title": "项目信息",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901010400, "mkid": 901010400,
}, },
name:'xmmxcx', name: 'xmmxcx',
path:"xmmxcx" path: "xmmxcx"
}, },
{ {
component:'erpxmmxzgl/erpxmmxz/index', component: 'erpxmmxzgl/erpxmmxz/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "项目明细账", "title": "项目明细账",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901020100, "mkid": 901020100,
}, },
name:'erpxmmxz', name: 'erpxmmxz',
path:"erpxmmxz" path: "erpxmmxz"
}, },
{ {
component:'erpxmmxzgl/xhzl/index', component: 'erpxmmxzgl/xhzl/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "消耗总览(定期导入)", "title": "消耗总览(定期导入)",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901030340, "mkid": 901030340,
}, },
name:'xhzl', name: 'xhzl',
path:"xhzl" path: "xhzl"
} }
] ]
}, },
...@@ -171,23 +180,29 @@ export const powerRoutes=[ ...@@ -171,23 +180,29 @@ export const powerRoutes=[
path: '/sbysjsp', path: '/sbysjsp',
component: 'Layout', component: 'Layout',
hidden: false, hidden: false,
alwaysShow:true, alwaysShow: true,
redirect: 'yssbkfsz', 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: [ children: [
{ {
component:'sbysjsp/yssq/index', component: 'sbysjsp/yssq/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "年初测算", "title": "年初测算",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030100, "mkid": 901030100,
}, },
name:'yssq', name: 'yssq',
path:"yssq" path: "yssq"
}, },
// { // {
// component:'sbysjsp/mxsx/index', // component:'sbysjsp/mxsx/index',
...@@ -203,69 +218,82 @@ export const powerRoutes=[ ...@@ -203,69 +218,82 @@ export const powerRoutes=[
// path:"mxsx" // path:"mxsx"
// }, // },
{ {
component:'sbysjsp/yssqtz/index', component: 'sbysjsp/yssqtz/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "预算调整", "title": "预算调整",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030300, "mkid": 901030300,
}, },
name:'yssqtz', name: 'yssqtz',
path:"yssqtz" path: "yssqtz"
}, },
{ {
component:'sbysjsp/yshz/index', component: 'sbysjsp/yshz/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "预算汇总查询", "title": "预算汇总查询",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030400, "mkid": 901030400,
}, },
name:'yshz', name: 'yshz',
path:"yshz" path: "yshz"
}, },
{ {
component:'sbysjsp/lqnd/index', component: 'sbysjsp/lqnd/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "两区农电", "title": "两区农电",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030500, "mkid": 901030500,
}, },
name:'lqnd', name: 'lqnd',
path:"lqnd" path: "lqnd"
}, },
{ {
component:'sbysjsp/hyha/index', component: 'sbysjsp/hyha/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "淮阴淮安", "title": "淮阴淮安",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030510, "mkid": 901030510,
}, },
name:'hyha', name: 'hyha',
path:"hyha" path: "hyha"
}, },
{ {
component:'sbysjsp/yszxjd/index', component: 'sbysjsp/yszxjd/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "预算执行进度", "title": "预算执行进度",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901030520, "mkid": 901030520,
}, },
name:'yszxjd', name: 'yszxjd',
path:"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=[ ...@@ -276,24 +304,28 @@ export const powerRoutes=[
path: '/znjh', path: '/znjh',
component: 'Layout', component: 'Layout',
hidden: false, hidden: false,
alwaysShow:true, alwaysShow: true,
redirect: 'znjhgl', redirect: 'znjhgl',
meta: {title: "智能稽核", icon: "fa-cog", noCache: false, link: null,mkid:901040000}, meta: {
children: [ title: "智能稽核",
{ icon: "fa-cog",
component:'znjh/xmznjh/index', noCache: false,
hidden:false, link: null,
meta:{ mkid: 901040000
},
children: [{
component: 'znjh/xmznjh/index',
hidden: false,
meta: {
"title": "稽核预警", "title": "稽核预警",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901040100, "mkid": 901040100,
}, },
name:'xmznjh', name: 'xmznjh',
path:"xmznjh" path: "xmznjh"
}, }, ]
]
}, },
/* 汇总查询报表*/ /* 汇总查询报表*/
...@@ -301,48 +333,53 @@ export const powerRoutes=[ ...@@ -301,48 +333,53 @@ export const powerRoutes=[
path: '/hzcxbb', path: '/hzcxbb',
component: 'Layout', component: 'Layout',
hidden: false, hidden: false,
alwaysShow:true, alwaysShow: true,
redirect: 'erpxmmxz', redirect: 'erpxmmxz',
meta: {title: "汇总查询报表", icon: "fa-cog", noCache: false, link: null,mkid:901050000}, meta: {
children: [ title: "汇总查询报表",
{ icon: "fa-cog",
component:'hzcxbb/erpxmmxz/index', noCache: false,
hidden:false, link: null,
meta:{ mkid: 901050000
},
children: [{
component: 'hzcxbb/erpxmmxz/index',
hidden: false,
meta: {
"title": "ERP项目明细账汇总查询", "title": "ERP项目明细账汇总查询",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid": 901020200, "mkid": 901020200,
}, },
name:'erpxmmxz', name: 'erpxmmxz',
path:"erpxmmxz" path: "erpxmmxz"
}, },
{ {
component:'hzcxbb/kshdp/index', component: 'hzcxbb/kshdp/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "可视化大屏", "title": "可视化大屏",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":901020300, "mkid": 901020300,
}, },
name:'kshdp', name: 'kshdp',
path:"kshdp" path: "kshdp"
}, },
{ {
component:'hzcxbb/szkb/index', component: 'hzcxbb/szkb/index',
hidden:false, hidden: false,
meta:{ meta: {
"title": "数字看板", "title": "数字看板",
"icon": "", "icon": "",
"noCache": false, "noCache": false,
"link": null, "link": null,
"mkid":'901020400', "mkid": '901020400',
}, },
name:'szkb', name: 'szkb',
path:"szkb" path: "szkb"
}, },
// { // {
// component:'hzcxbb/render/index', // component:'hzcxbb/render/index',
...@@ -375,17 +412,14 @@ export const powerRoutes=[ ...@@ -375,17 +412,14 @@ export const powerRoutes=[
] ]
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [{
{
path: '/redirect', path: '/redirect',
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [{
{
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
component: () => import('@/views/redirect') component: () => import('@/views/redirect')
} }]
]
}, },
{ {
path: '/login', path: '/login',
...@@ -411,29 +445,32 @@ export const constantRoutes = [ ...@@ -411,29 +445,32 @@ export const constantRoutes = [
path: '', path: '',
component: Layout, component: Layout,
redirect: 'index', redirect: 'index',
children: [ children: [{
{
path: 'index', path: 'index',
component: () => import('@/views/hzcxbb/szkb/index'), component: () => import('@/views/hzcxbb/szkb/index'),
name: 'Index', name: 'Index',
// redirect: '/user/profile', // redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: {
title: '首页',
icon: 'dashboard',
affix: true
} }
] }]
}, },
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: 'noredirect', redirect: 'noredirect',
children: [ children: [{
{
path: 'profile', path: 'profile',
component: () => import('common/src/views/user/profile/index'), component: () => import('common/src/views/user/profile/index'),
name: 'Profile', name: 'Profile',
meta: { title: '个人中心', icon: 'user' } meta: {
title: '个人中心',
icon: 'user'
} }
] }]
}, },
/* 陕钢铁预写死页面*/ /* 陕钢铁预写死页面*/
] ]
...@@ -453,6 +490,8 @@ Router.prototype.push = function push(location) { ...@@ -453,6 +490,8 @@ Router.prototype.push = function push(location) {
export default new Router({ export default new Router({
// mode: 'history', // mode: 'history',
mode: 'hash', mode: 'hash',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({
y: 0
}),
routes: constantRoutes routes: constantRoutes
}) })
\ No newline at end of file
...@@ -106,11 +106,35 @@ ...@@ -106,11 +106,35 @@
<i class="i3"></i> <i class="i3"></i>
<i class="i4"></i> <i class="i4"></i>
<div class="full itembg "> <div class="full itembg ">
<!-- 轮播图-->
<el-carousel :indicator-position='"none"' style="overflow: hidden;" :interval='10000' class="full"
:autoplay="true">
<el-carousel-item>
<span class="com-count-title"> <span class="com-count-title">
示例图例 预算执行分析-标准成本(单位)
</span> </span>
<div ref="slt" class="com-count-body"> <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> </div>
</el-carousel-item>
</el-carousel>
</div> </div>
</div> </div>
</div> </div>
...@@ -124,7 +148,7 @@ ...@@ -124,7 +148,7 @@
<!-- <span class="com-count-title"> <!-- <span class="com-count-title">
预算执行进度-淮安本部 预算执行进度-淮安本部
</span> --> </span> -->
<div class="com-count-body" style="height: 100%;" > <div class="com-count-body" style="height: 100%;">
<!-- 标题--> <!-- 标题-->
<div class="lbbt"> <div class="lbbt">
<div class="flex1 text-center "> <div class="flex1 text-center ">
...@@ -172,17 +196,33 @@ ...@@ -172,17 +196,33 @@
<i class="i2"></i> <i class="i2"></i>
<i class="i3"></i> <i class="i3"></i>
<i class="i4"></i> <i class="i4"></i>
<div class="full "> <el-carousel :indicator-position='"none"' style="overflow: hidden;" :interval='10000' class="full"
:autoplay="true">
<el-carousel-item>
<span class="com-count-title"> <span class="com-count-title">
测试图例 预算执行分析-成本性项目(单位)
</span> </span>
<div ref="sdt" v-echartResize="()=>{ <div ref="slt3" v-echartResize="()=>{
if(sdtCharts){ if(slt3){
sdtCharts.resize() slt3.resize()
} }
}" class="com-count-body"> }" class="com-count-body">
</div> </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> </div>
</el-carousel-item>
</el-carousel>
</div> </div>
</div> </div>
</div> </div>
...@@ -224,11 +264,15 @@ ...@@ -224,11 +264,15 @@
}, },
data() { data() {
return { return {
slt4: null,
slt3: null,
slt2: null,
slt1: null,
/* echart实例*/ /* echart实例*/
lg1:null, lg1: null,
lg2:null, lg2: null,
lg3:null, lg3: null,
lg4:null, lg4: null,
/* 定时器id*/ /* 定时器id*/
DELAYNUM: null, DELAYNUM: null,
/* 两区农电预算一览 */ /* 两区农电预算一览 */
...@@ -286,11 +330,10 @@ ...@@ -286,11 +330,10 @@
return item.bmName == '涟水县供电公司' return item.bmName == '涟水县供电公司'
}) })
/* 滚动表格数据*/ /* 滚动表格数据*/
this.$post('hafms/yszxjdlog/queryRepDetail', { this.$post('hafms/yszxjdlog/queryRepDetail', {}).then(res => {
}).then(res => {
if (res.success) { if (res.success) {
this.listData = res.data.records.filter(item=>{ this.listData = res.data.records.filter(item => {
return item.gsbz=='Y' return item.gsbz == 'Y'
}) })
} }
}) })
...@@ -307,7 +350,6 @@ ...@@ -307,7 +350,6 @@
hzxList: hzxList, hzxList: hzxList,
lsxList: lsxList lsxList: lsxList
}) })
this.sdtCharts = this.initsdt()
this.szkbmapCharts.on("click", (params) => { this.szkbmapCharts.on("click", (params) => {
if (params.data) { if (params.data) {
//获取到定义的数据 //获取到定义的数据
...@@ -326,6 +368,9 @@ ...@@ -326,6 +368,9 @@
this.initLqnd() this.initLqnd()
this.initLqnd2() this.initLqnd2()
this.initslt() this.initslt()
this.initslt2()
this.initslt3()
this.initslt4()
}, },
initLqnd() { initLqnd() {
...@@ -520,237 +565,531 @@ ...@@ -520,237 +565,531 @@
return huaian1 return huaian1
}, },
initslt() { initslt() {
const charts = this.$echarts.init(this.$refs["slt"]); /* 预算执行分析-标准成本-8月(单位).xlsx数据*/
var num = 77.8 this.$post('hafms/yszxfxlog/queryRepDetail', {
var color = new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{ lx: 'BZDW'
offset: 0, }).then(res => {
color: 'rgb(255,46,46)', // 0% 处的颜色 if (res.success && res.data.records) {
const {
records
} = res.data
if (records.length != 0) {
this.slt1 = this.initsltdo(records)
}
}
})
}, },
{ initslt3() {
offset: 1, /* 预算执行分析-标准成本-8月(单位).xlsx数据*/
color: 'rgb(255,100,46)', // 100% 处的颜色 this.$post('hafms/yszxfxlog/queryRepDetail', {
}, lx: 'CBDW'
]); }).then(res => {
let data1 = { if (res.success && res.data.records) {
name: '', const {
value: num records
} } = res.data
let n = num; if (records.length != 0) {
let progress = (n * 0.01).toFixed(2); this.slt3 = this.initsltdo3(records)
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)',
},
bule: {
fontSize: fontSize * 2,
color: sizeC1,
},
radius: {
height: 35,
fontSize: 23,
color: sizeC1,
textAlign: 'center',
},
size: {
height: 400,
}, },
}; 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 = { var option = {
tooltip: {
title: [{ trigger: 'axis',
text: '处理率', axisPointer: {
x: 'center', type: 'shadow',
top: '32%', },
},
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: { textStyle: {
color: '#fff', color: "#fff",
fontSize: 14, fontSize: 10,
fontWeight: '100',
}, },
}, },
data: apidata.map(item => item.lxje)
},
{ {
text: num + '%', stack: '预算', // 设置堆叠的组名
x: 'center', type: "bar",
top: '50%', name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
label: {
show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: { textStyle: {
fontSize: 13, color: "#fff",
color: '#00f0ff', fontSize: 10,
foontWeight: '500',
}, },
}, },
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"]);
let XAXIS = apidata.map(item => item.bmName || '未设置部门')
var option = {
tooltip: { tooltip: {
formatter: '{a} <br/>{b} : {c}%', 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: [{ series: [{
type: 'gauge', stack: '预算',
center: ['50%', '60%'], name: '年度预算目标值',
radius: '110%', type: "bar",
startAngle: '210', barWidth: 18,
endAngle: '-30', itemStyle: {
pointer: { 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, show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
},
},
data: apidata.map(item => item.lxje)
}, },
data: data1, {
title: { stack: '预算', // 设置堆叠的组名
type: "bar",
name: '发生值',
barWidth: 18,
itemStyle: {
normal: {
color: colorList[3], // 设置柱状图的颜色
},
},
label: {
show: false, 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: { axisLine: {
show: true,
lineStyle: { lineStyle: {
color: colorSet, color: "#0177d4",
width: 10,
// shadowBlur: 15,
// shadowColor: '#fff',
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: 1,
}, },
}, },
axisTick: { axisLabel: {
show: false, color: "#fff",
fontSize: 10,
}, },
splitLine: { splitLine: {
show: false, show: false,
length: 12,
lineStyle: { lineStyle: {
color: '#00377a', color: "#0177d4",
width: 2,
type: 'solid',
},
},
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,
}, },
// 仪表盘指针 max: 100
pointer: {
show: false,
}, },
// 仪表盘轴线相关配置
axisLine: {
show: false,
lineStyle: {
color: [
[1, 'transparent']
], ],
width: 20, series: [{
name: '完成率',
type: "line",
barWidth: 18,
itemStyle: {
normal: {
color: colorList[4],
}, },
}, },
// 刻度样式 label: {
axisTick: {
show: false, show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
}, },
// 分隔线样式
splitLine: {
show: false,
}, },
// 刻度标签 yAxisIndex: 1,
axisLabel: { data: apidata.map(item => item.wcl.toFixed(2))
show: true, }, {
distance: -24, stack: '预算',
formatter: function(value) { name: '年度预算目标值',
if (value === 0) { type: "bar",
return '{white|' + value + '}'; barWidth: 18,
} itemStyle: {
return ''; normal: {
color: colorList[0],
}, },
rich: rich,
}, },
// 表盘中指针的固定点 label: {
anchor: {
show: false, show: false,
position: 'top',
textStyle: {
color: "#fff",
fontSize: 10,
}, },
detail: {
show: false,
}, },
data: [{ data: apidata.map(item => item.ysmbje)
value: 20,
}, ],
}, },
// // 又边刻度线
{ {
type: 'gauge', stack: '预算',
center: ['50%', '60%'], name: '立项值',
radius: '120%', type: "bar",
startAngle: '210', barWidth: 18,
endAngle: '-30', itemStyle: {
min: 0, normal: {
zlevel: 10, color: colorList[1],
max: 100,
splitNumber: 12,
// 展示当前进度
progress: {
show: false,
}, },
// 仪表盘指针
pointer: {
show: false,
}, },
// 仪表盘轴线相关配置 label: {
axisLine: {
show: false, show: false,
lineStyle: { position: 'top',
color: [ textStyle: {
[1, 'transparent'] color: "#fff",
], fontSize: 10,
width: 20,
},
}, },
// 刻度样式
axisTick: {
show: false,
}, },
// 分隔线样式 data: apidata.map(item => item.lxje)
splitLine: {
show: false,
}, },
// 刻度标签 {
axisLabel: { stack: '预算', // 设置堆叠的组名
show: true, type: "bar",
distance: -30, name: '发生值',
formatter: function(value) { barWidth: 18,
if (value === 100) { itemStyle: {
return '{white|' + value + '}'; normal: {
} color: colorList[3], // 设置柱状图的颜色
return '';
}, },
rich: rich,
color: 'rgba(255,255,255,.85)',
fontSize: 12,
}, },
// 表盘中指针的固定点 label: {
anchor: {
show: false, show: false,
position: 'top', // 在柱子顶部显示数字
textStyle: {
color: "#fff",
fontSize: 10,
}, },
detail: {
show: false,
}, },
data: [{ data: apidata.map(item => item.fsje)
value: 0,
}, ],
}, },
], ],
}; };
...@@ -759,112 +1098,187 @@ ...@@ -759,112 +1098,187 @@
return charts return charts
}, },
initsdt() { initsltdo2(apidata) {
const charts = this.$echarts.init(this.$refs["sdt"]); let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb','#9adc6f']
const option = { const charts = this.$echarts.init(this.$refs["slt2"]);
let XAXIS = apidata.map(item => item.xmflname || 'xmflname')
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
},
legend: { legend: {
bottom: 10, right: 10,
top: 10,
textStyle: { textStyle: {
color: '#61d2f7' // 设置图例项字体颜色为红色 color: '#61d2f7'
}, },
left: 'center', left: 'center',
itemWidth: 9, itemWidth: 9,
itemHeight: 9, itemHeight: 9,
data: ['2018溢价率', '2019溢价率'] data: ['年度预算目标值', '立项值', '发生值']
},
grid: {
left: '10%',
top: '23%',
right: '10%',
bottom: '15%',
}, },
xAxis: { xAxis: {
axisLine: { // 改变x轴颜色 type: 'category',
show: false, data: XAXIS,
axisLine: {
lineStyle: { lineStyle: {
color: '#26D9FF', color: "#0177d4",
},
},
axisLabel: {
formatter: function(value) {
if (value.length > 7) {
return value.slice(0, 7) + '...';
} }
return value;
}, },
axisTick: { color: "#fff",
show: false fontSize: 10,
interval: 0,
},
},
yAxis: [{
name: "(万元)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
},
axisLine: {
lineStyle: {
color: "#0177d4",
}, },
axisLabel: { // 改变x轴字体颜色和大小
textStyle: {
color: "#333",
fontSize: 12
}, },
axisLabel: {
color: "#fff",
fontSize: 10,
}, },
splitLine: { splitLine: {
show: false, show: false,
lineStyle: {
color: "#0177d4",
}, },
}, },
yAxis: { },
name: '%', {
name: "(完成率)",
nameTextStyle: { nameTextStyle: {
color: '#61d2f7', color: "#fff",
padding: [0, 25, 0, 0] fontSize: 10,
}, },
axisLine: { // 改变y轴颜色 axisLine: {
lineStyle: { lineStyle: {
color: '#61d2f7' color: "#0177d4",
}
},
axisTick: {
show: false
}, },
axisLabel: { // 改变y轴字体颜色和大小
//formatter: '{value} m³ ', // 给y轴添加单位
textStyle: {
color: "#61d2f7",
fontSize: 12
}, },
axisLabel: {
color: "#fff",
fontSize: 10,
}, },
splitLine: { splitLine: {
show: false,
lineStyle: { lineStyle: {
color: "#61d2f7" color: "#0177d4",
}
}, },
}, },
max: 100
},
],
series: [{ series: [{
name: '2018溢价率', name: '完成率',
type: 'scatter', type: "line",
barWidth: 18,
itemStyle: { itemStyle: {
color: "#3E9FFF", normal: {
}, color: colorList[4],
symbolSize: 12, },
data: [ },
[10.0, 8.04], label: {
[8.0, 6.95], show: false,
[13.0, 7.58], position: 'top',
[9.0, 8.81], textStyle: {
[11.0, 8.33], color: "#fff",
[14.0, 9.96], fontSize: 10,
[6.0, 7.24], },
[4.0, 4.26], },
[12.0, 10.84], yAxisIndex: 1,
[7.0, 4.82], data: apidata.map(item => item.wcl.toFixed(2))
[5.0, 5.68]
],
}, { }, {
name: '2019溢价率', stack: '预算',
type: 'scatter', 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: { itemStyle: {
color: "#F7B500", normal: {
}, color: colorList[3], // 设置柱状图的颜色
symbolSize: 12, },
data: [ },
[9.0, 5.04], label: {
[11.0, 7.95], show: false,
[12.0, 8.58], position: 'top', // 在柱子顶部显示数字
[5.0, 11.81], textStyle: {
[7.0, 12.33], color: "#fff",
[11.0, 7.96], fontSize: 10,
[7.0, 9.24], },
[6.0, 8.26], },
[10.0, 11.84], data: apidata.map(item => item.fsje)
[7.0, 3.82], },
[6.0, 4.68]
], ],
}] };
}
charts.setOption(option); charts.setOption(option);
return charts return charts
}, },
initlg1(apidata) { initlg1(apidata) {
let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb'] let colorList = ['#f18c6e', '#d5f69b', '#22f2e5', '#2ca4fb']
let XAXIS = apidata.map(item => item.fyname) let XAXIS = apidata.map(item => item.fyname)
...@@ -1064,7 +1478,7 @@ ...@@ -1064,7 +1478,7 @@
interval: 0, interval: 0,
formatter: function(value) { formatter: function(value) {
if (value.length > 7) { if (value.length > 7) {
return value.slice(0,7) + '...'; return value.slice(0, 7) + '...';
} }
return value; return value;
}, },
...@@ -1593,14 +2007,15 @@ ...@@ -1593,14 +2007,15 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#szkb{ #szkb {
.com-count-title{ .com-count-title {
transform: translateY(10px); transform: translateY(10px);
font-size: 1vw; font-size: 1vw;
color:#3aafe8; color: #3aafe8;
line-height: 2vh; line-height: 2vh;
font-weight: 600; font-weight: 600;
&::before{
&::before {
content: ''; content: '';
height: .5vw; height: .5vw;
width: .5vw; width: .5vw;
...@@ -1610,20 +2025,24 @@ ...@@ -1610,20 +2025,24 @@
margin-bottom: .1vh; margin-bottom: .1vh;
} }
} }
.com-count-body{
.com-count-body {
font-size: .65vw; font-size: .65vw;
height: calc(100% - 2vh); height: calc(100% - 2vh);
width: 100%; width: 100%;
} }
.itembg{
.itembg {
background-image: url(./static/itembg.png); background-image: url(./static/itembg.png);
background-size: 100% 100%; background-size: 100% 100%;
} }
background-image: url(./static/bg.png); background-image: url(./static/bg.png);
background-size: 100% 100%; background-size: 100% 100%;
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
.title{
.title {
background-image: url(./static/bg_top.png); background-image: url(./static/bg_top.png);
background-size: 100% 100%; background-size: 100% 100%;
height: 8vh; height: 8vh;
...@@ -1634,52 +2053,60 @@ ...@@ -1634,52 +2053,60 @@
font-size: 1.8vw; font-size: 1.8vw;
font-weight: 700; font-weight: 700;
} }
.main{
.main {
height: 58vh; height: 58vh;
width: 100%; width: 100%;
display: flex; display: flex;
.first{
.first {
height: 100%; height: 100%;
width: 30%; width: 30%;
padding:0.5vh; padding: 0.5vh;
} }
.second{
.second {
height: 100%; height: 100%;
width: 40%; width: 40%;
padding:0.5vh; padding: 0.5vh;
} }
.third{
.third {
height: 100%; height: 100%;
width: 30%; width: 30%;
padding:0.5vh; padding: 0.5vh;
} }
} }
.bottom{
.bottom {
display: flex; display: flex;
height: 39vh; height: 39vh;
width: 100%; width: 100%;
margin-top: 1vh; margin-top: 1vh;
.first{
.first {
height: 100%; height: 100%;
width: 30%; width: 30%;
padding:0.5vh; padding: 0.5vh;
} }
.second{
.second {
height: 100%; height: 100%;
width: 40%; width: 40%;
padding:0.5vh; padding: 0.5vh;
} }
.third{
.third {
height: 100%; height: 100%;
width: 30%; width: 30%;
padding:0.5vh; padding: 0.5vh;
} }
} }
} }
.itemtitle{ .itemtitle {
margin-top: 1vh; margin-top: 1vh;
margin-bottom: 1vh; margin-bottom: 1vh;
height: 5vh; height: 5vh;
...@@ -1690,7 +2117,8 @@ ...@@ -1690,7 +2117,8 @@
color: #bde4ff; color: #bde4ff;
font-weight: 700; font-weight: 700;
} }
.itemtitleb{
.itemtitleb {
margin-top: 1vh; margin-top: 1vh;
margin-bottom: 1vh; margin-bottom: 1vh;
height: 4vh; height: 4vh;
...@@ -1701,28 +2129,37 @@ ...@@ -1701,28 +2129,37 @@
color: #bde4ff; color: #bde4ff;
font-weight: 700; font-weight: 700;
} }
.maintitle{
width: 60%;margin-right: 20%;margin-left: 20%;border-radius: 30px; .maintitle {
background-color:rgba(58,175,232,.6) ; width: 60%;
margin-right: 20%;
margin-left: 20%;
border-radius: 30px;
background-color: rgba(58, 175, 232, .6);
border-radius: 18px; 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%; width: 100%;
} }
.itemmainb{
height:32vh; .itemmainb {
height: 32vh;
width: 100%; width: 100%;
} }
...@@ -1730,54 +2167,59 @@ ...@@ -1730,54 +2167,59 @@
.boxall { .boxall {
border: 1px solid #3486da; border: 1px solid #3486da;
background: rgba(0,70,190,.1); background: rgba(0, 70, 190, .1);
padding: .6vw; padding: .6vw;
position: relative; position: relative;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
z-index: 10; z-index: 10;
.i1{
.i1 {
border-right: 3px solid #3486da; border-right: 3px solid #3486da;
right: -2px; right: -2px;
position: absolute; position: absolute;
width: 1vw; width: 1vw;
height:1vw; height: 1vw;
content: ""; content: "";
border-top: 3px solid #3486da; border-top: 3px solid #3486da;
top: -2px; top: -2px;
} }
.i2{
.i2 {
border-left: 3px solid #3486da; border-left: 3px solid #3486da;
left: -2px; left: -2px;
position: absolute; position: absolute;
width: 1vw; width: 1vw;
height:1vw; height: 1vw;
content: ""; content: "";
border-top: 3px solid #3486da; border-top: 3px solid #3486da;
top: -2px; top: -2px;
} }
.i3{
.i3 {
border-right: 3px solid #3486da; border-right: 3px solid #3486da;
right: -2px; right: -2px;
position: absolute; position: absolute;
width: 1vw; width: 1vw;
height:1vw; height: 1vw;
content: ""; content: "";
border-top: 3px solid #3486da; border-top: 3px solid #3486da;
bottom: -2px; bottom: -2px;
transform: rotate(90deg); transform: rotate(90deg);
} }
.i4{
.i4 {
border-left: 3px solid #3486da; border-left: 3px solid #3486da;
left: -2px; left: -2px;
position: absolute; position: absolute;
width: 1vw; width: 1vw;
height:1vw; height: 1vw;
content: ""; content: "";
border-top: 3px solid #3486da; border-top: 3px solid #3486da;
bottom: -2px; bottom: -2px;
transform: rotate(-90deg); transform: rotate(-90deg);
} }
.lbbt{
.lbbt {
height: 4vh; height: 4vh;
width: 100%; width: 100%;
font-size: .9vw; font-size: .9vw;
...@@ -1785,26 +2227,31 @@ ...@@ -1785,26 +2227,31 @@
line-height: 4vh; line-height: 4vh;
color: #61d2f7; color: #61d2f7;
} }
.flex1{
.flex1 {
flex: 1; flex: 1;
} }
.lbbody{
.lbbody {
height: calc(100% - 4vh); height: calc(100% - 4vh);
} }
.lbbody div{
.lbbody div {
flex: 1; flex: 1;
line-height: 25px; line-height: 25px;
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
} }
.lbtit > :nth-child(odd) {
.lbtit> :nth-child(odd) {
-webkit-box-shadow: #07417a 0px 0px 10px; -webkit-box-shadow: #07417a 0px 0px 10px;
-moz-box-shadow: #07417a 0px 0px 10px; -moz-box-shadow: #07417a 0px 0px 10px;
box-shadow: inset 0 0 30px #07417a; box-shadow: inset 0 0 30px #07417a;
/*position: relative;*/ /*position: relative;*/
} }
.lbtit > :nth-child(even) {
.lbtit> :nth-child(even) {
-webkit-box-shadow: #3486da 0px 0px 10px; -webkit-box-shadow: #3486da 0px 0px 10px;
-moz-box-shadow: #3486da 0px 0px 10px; -moz-box-shadow: #3486da 0px 0px 10px;
box-shadow: inset 0 0 30px #3486da; box-shadow: inset 0 0 30px #3486da;
......
<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