fixed:部分修改
This commit is contained in:
parent
62631a2490
commit
fda89dde11
|
@ -2,31 +2,8 @@
|
||||||
// 书写格式与动态路由格式一致,全部经由框架统一转换
|
// 书写格式与动态路由格式一致,全部经由框架统一转换
|
||||||
// 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
|
// 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
|
||||||
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
|
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
|
||||||
// 示例如下
|
|
||||||
|
|
||||||
// const routes = [
|
|
||||||
// {
|
|
||||||
// name: "demo",
|
|
||||||
// path: "/demo",
|
|
||||||
// meta: {
|
|
||||||
// icon: "el-icon-eleme-filled",
|
|
||||||
// title: "演示",
|
|
||||||
// role: ["SA"]
|
|
||||||
// },
|
|
||||||
// children: [{
|
|
||||||
// name: "demopage",
|
|
||||||
// path: "/demopage",
|
|
||||||
// component: "test/autocode/index",
|
|
||||||
// meta: {
|
|
||||||
// icon: "el-icon-menu",
|
|
||||||
// title: "演示页面",
|
|
||||||
// role: ["SA"]
|
|
||||||
// }
|
|
||||||
// }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
|
//首页
|
||||||
{
|
{
|
||||||
"name": "home",
|
"name": "home",
|
||||||
"path": "/home",
|
"path": "/home",
|
||||||
|
@ -104,6 +81,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//报表
|
||||||
{
|
{
|
||||||
"name": "bi",
|
"name": "bi",
|
||||||
"path": "/bi",
|
"path": "/bi",
|
||||||
|
@ -136,6 +114,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//电石渣
|
||||||
{
|
{
|
||||||
"name": "enm_slag",
|
"name": "enm_slag",
|
||||||
"path": "/enm_slag",
|
"path": "/enm_slag",
|
||||||
|
@ -198,6 +177,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//原料磨
|
||||||
{
|
{
|
||||||
"name": "enm_rm",
|
"name": "enm_rm",
|
||||||
"path": "/enm_rm",
|
"path": "/enm_rm",
|
||||||
|
@ -260,6 +240,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//回转窑
|
||||||
{
|
{
|
||||||
"name": "enm_kiln",
|
"name": "enm_kiln",
|
||||||
"path": "/enm_kiln",
|
"path": "/enm_kiln",
|
||||||
|
@ -322,6 +303,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//煤磨
|
||||||
{
|
{
|
||||||
"name": "enm_coal",
|
"name": "enm_coal",
|
||||||
"path": "/enm_coal",
|
"path": "/enm_coal",
|
||||||
|
@ -384,6 +366,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//水泥磨
|
||||||
{
|
{
|
||||||
"name": "enm_mill",
|
"name": "enm_mill",
|
||||||
"path": "/enm_mill",
|
"path": "/enm_mill",
|
||||||
|
@ -446,6 +429,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//水泥包装
|
||||||
{
|
{
|
||||||
"name": "enm_pack",
|
"name": "enm_pack",
|
||||||
"path": "/enm_pack",
|
"path": "/enm_pack",
|
||||||
|
@ -508,6 +492,104 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//全厂能源
|
||||||
|
{
|
||||||
|
"name": "energy",
|
||||||
|
"path": "/energy",
|
||||||
|
"meta": {
|
||||||
|
"title": "全厂能源",
|
||||||
|
"icon": "el-icon-share",
|
||||||
|
"type": "menu",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"children": [
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "energy",
|
||||||
|
"path": "/ungrouped/energy",
|
||||||
|
"meta": {
|
||||||
|
"title": "能源统计",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/energy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "value",
|
||||||
|
"path": "/ungrouped/value",
|
||||||
|
"meta": {
|
||||||
|
"title": "工业产值",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/value"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "electric",
|
||||||
|
"path": "/ungrouped/electric",
|
||||||
|
"meta": {
|
||||||
|
"title": "全厂电量统计",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/electric"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
//全厂报表
|
||||||
|
{
|
||||||
|
"name": "rforms",
|
||||||
|
"path": "/rforms",
|
||||||
|
"meta": {
|
||||||
|
"title": "全厂报表",
|
||||||
|
"icon": "el-icon-histogram",
|
||||||
|
"type": "menu",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "costing",
|
||||||
|
"path": "/ungrouped/costing",
|
||||||
|
"meta": {
|
||||||
|
"title": "成本计算",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/costing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "quality",
|
||||||
|
"path": "/ungrouped/quality",
|
||||||
|
"meta": {
|
||||||
|
"title": "质量报表",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/quality"
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"name": "reportAll",
|
||||||
|
"path": "/ungrouped/report",
|
||||||
|
"meta": {
|
||||||
|
"title": "生产报表",
|
||||||
|
"icon": "el-icon-grid",
|
||||||
|
"perms": ["enm"]
|
||||||
|
},
|
||||||
|
"component": "ungrouped/report"
|
||||||
|
}
|
||||||
|
// ,{
|
||||||
|
// "name": "echart",
|
||||||
|
// "path": "/ungrouped/echart",
|
||||||
|
// "meta": {
|
||||||
|
// "title": "图表",
|
||||||
|
// "icon": "el-icon-grid",
|
||||||
|
// "perms": ["enm"]
|
||||||
|
// },
|
||||||
|
// "component": "ungrouped/echart"
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
//设备
|
||||||
{
|
{
|
||||||
"name": "em",
|
"name": "em",
|
||||||
"path": "/em",
|
"path": "/em",
|
||||||
|
@ -530,6 +612,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//事件
|
||||||
{
|
{
|
||||||
"name": "ecm",
|
"name": "ecm",
|
||||||
"path": "/ecm",
|
"path": "/ecm",
|
||||||
|
@ -606,6 +689,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//风控
|
||||||
{
|
{
|
||||||
"name": "opm",
|
"name": "opm",
|
||||||
"path": "/opm",
|
"path": "/opm",
|
||||||
|
@ -759,6 +843,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//相关方
|
||||||
{
|
{
|
||||||
"name": "rpm",
|
"name": "rpm",
|
||||||
"path": "/rpm",
|
"path": "/rpm",
|
||||||
|
@ -843,6 +928,7 @@ const routes = [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//访客
|
||||||
{
|
{
|
||||||
"name": "vm",
|
"name": "vm",
|
||||||
"path": "/vm",
|
"path": "/vm",
|
||||||
|
@ -896,6 +982,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//审批
|
||||||
{
|
{
|
||||||
"name": "wf",
|
"name": "wf",
|
||||||
"path": "/wf",
|
"path": "/wf",
|
||||||
|
@ -994,6 +1081,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//区域
|
||||||
{
|
{
|
||||||
"name": "am",
|
"name": "am",
|
||||||
"path": "/am",
|
"path": "/am",
|
||||||
|
@ -1055,6 +1143,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//人事
|
||||||
{
|
{
|
||||||
"name": "hrm",
|
"name": "hrm",
|
||||||
"path": "/hrm",
|
"path": "/hrm",
|
||||||
|
@ -1113,6 +1202,7 @@ const routes = [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//基础配置
|
||||||
{
|
{
|
||||||
"name": "base",
|
"name": "base",
|
||||||
"path": "/base",
|
"path": "/base",
|
||||||
|
@ -1166,6 +1256,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//每月配置
|
||||||
{
|
{
|
||||||
"name": "month",
|
"name": "month",
|
||||||
"path": "/month",
|
"path": "/month",
|
||||||
|
@ -1208,101 +1299,8 @@ const routes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "energy",
|
//系统
|
||||||
"path": "/energy",
|
|
||||||
"meta": {
|
|
||||||
"title": "全厂能源",
|
|
||||||
"icon": "el-icon-share",
|
|
||||||
"type": "menu",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"children": [
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "energy",
|
|
||||||
"path": "/ungrouped/energy",
|
|
||||||
"meta": {
|
|
||||||
"title": "能源统计",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/energy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "value",
|
|
||||||
"path": "/ungrouped/value",
|
|
||||||
"meta": {
|
|
||||||
"title": "工业产值",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/value"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "electric",
|
|
||||||
"path": "/ungrouped/electric",
|
|
||||||
"meta": {
|
|
||||||
"title": "全厂电量统计",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/electric"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "rforms",
|
|
||||||
"path": "/rforms",
|
|
||||||
"meta": {
|
|
||||||
"title": "全厂报表",
|
|
||||||
"icon": "el-icon-histogram",
|
|
||||||
"type": "menu",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"name": "costing",
|
|
||||||
"path": "/ungrouped/costing",
|
|
||||||
"meta": {
|
|
||||||
"title": "成本计算",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/costing"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "quality",
|
|
||||||
"path": "/ungrouped/quality",
|
|
||||||
"meta": {
|
|
||||||
"title": "质量报表",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/quality"
|
|
||||||
}
|
|
||||||
,{
|
|
||||||
"name": "reportAll",
|
|
||||||
"path": "/ungrouped/report",
|
|
||||||
"meta": {
|
|
||||||
"title": "生产报表",
|
|
||||||
"icon": "el-icon-grid",
|
|
||||||
"perms": ["enm"]
|
|
||||||
},
|
|
||||||
"component": "ungrouped/report"
|
|
||||||
}
|
|
||||||
// ,{
|
|
||||||
// "name": "echart",
|
|
||||||
// "path": "/ungrouped/echart",
|
|
||||||
// "meta": {
|
|
||||||
// "title": "图表",
|
|
||||||
// "icon": "el-icon-grid",
|
|
||||||
// "perms": ["enm"]
|
|
||||||
// },
|
|
||||||
// "component": "ungrouped/echart"
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "sys",
|
"name": "sys",
|
||||||
"path": "/sys",
|
"path": "/sys",
|
||||||
|
@ -1381,6 +1379,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
//运维
|
||||||
{
|
{
|
||||||
"name": "ops",
|
"name": "ops",
|
||||||
"path": "/ops",
|
"path": "/ops",
|
||||||
|
@ -1454,6 +1453,4 @@ const routes = [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="form.shift_name=='夜班'&&mgroupId=='3347217246321065984'">
|
<el-col :md="12" :sm="24" v-if="form.shift_name=='白班'&&mgroupId=='3347217246321065984'">
|
||||||
<el-form-item label="煤粉热值">
|
<el-form-item label="煤粉热值">
|
||||||
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
|
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="['widgets-home', customizing?'customizing':'']" ref="main">
|
<div class="widgets-home" ref="main">
|
||||||
<div class="widgets-content">
|
<div class="widgets-content">
|
||||||
<div class="widgets" ref="widgets">
|
<div class="widgets" ref="widgets">
|
||||||
<div class="widgets-wrapper">
|
<div class="widgets-wrapper">
|
||||||
<!-- <el-card shadow="hover" class="item-background" style="wdith:100%;padding: 0 20px 0 10px;">
|
|
||||||
<div class="time">
|
|
||||||
<div>{{ day }}</div>
|
|
||||||
<text>当前时间</text>
|
|
||||||
<h3>{{ time }}</h3>
|
|
||||||
</div>
|
|
||||||
</el-card> -->
|
|
||||||
<el-row :gutter="6" style="padding: 10px;">
|
<el-row :gutter="6" style="padding: 10px;">
|
||||||
|
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-card header="产量及完成度" style="border-radius: 5px;box-shadow: none;">
|
<el-card header="产量及完成度" style="border-radius: 5px;box-shadow: none;">
|
||||||
<div class="itemsWrap">
|
<div class="itemsWrap">
|
||||||
|
@ -21,7 +13,6 @@
|
||||||
<el-progress :percentage="90" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="90" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">90%</span>
|
<span class="item-percent">90%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">90%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="monthData.原料磨">{{ monthData.原料磨.total_production }}</div>
|
<div class="item-number" v-if="monthData.原料磨">{{ monthData.原料磨.total_production }}</div>
|
||||||
|
@ -29,27 +20,21 @@
|
||||||
<el-progress :percentage="95" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="95" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">95%</span>
|
<span class="item-percent">95%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">95%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="monthData.回转窑">{{ monthData.回转窑.total_production }}</div>
|
<div class="item-number" v-if="monthData.回转窑">{{ monthData.回转窑.total_production }}</div>
|
||||||
<div class="item-name">月熟料产量</div>
|
<div class="item-name">月熟料产量</div>
|
||||||
<el-progress :percentage="98" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="98" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">98%</span>
|
<span class="item-percent">98%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">98%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="monthData.水泥磨">{{ monthData.水泥磨.total_production }}</div>
|
<div class="item-number" v-if="monthData.水泥磨">{{ monthData.水泥磨.total_production }}</div>
|
||||||
<div class="item-name">月水泥产量</div>
|
<div class="item-name">月水泥产量</div>
|
||||||
<el-progress :percentage="95" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="95" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">95%</span>
|
<span class="item-percent">95%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">95%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="yearData.电石渣">{{ yearData.电石渣.total_production }}</div>
|
<div class="item-number" v-if="yearData.电石渣">{{ yearData.电石渣.total_production }}</div>
|
||||||
|
@ -57,7 +42,6 @@
|
||||||
<el-progress :percentage="75" status="success" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="75" status="success" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">75%</span>
|
<span class="item-percent">75%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">75%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="yearData.原料磨">{{ yearData.原料磨.total_production }}</div>
|
<div class="item-number" v-if="yearData.原料磨">{{ yearData.原料磨.total_production }}</div>
|
||||||
|
@ -65,7 +49,6 @@
|
||||||
<el-progress :percentage="70" status="success" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="70" status="success" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">70%</span>
|
<span class="item-percent">70%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">70%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="yearData.回转窑">{{ yearData.回转窑.total_production }}</div>
|
<div class="item-number" v-if="yearData.回转窑">{{ yearData.回转窑.total_production }}</div>
|
||||||
|
@ -73,7 +56,6 @@
|
||||||
<el-progress :percentage="80" status="success" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="80" status="success" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">80%</span>
|
<span class="item-percent">80%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">80%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
<div class="item-number" v-if="yearData.水泥磨">{{ yearData.水泥磨.total_production }}</div>
|
<div class="item-number" v-if="yearData.水泥磨">{{ yearData.水泥磨.total_production }}</div>
|
||||||
|
@ -81,7 +63,6 @@
|
||||||
<el-progress :percentage="75" status="success" :text-inside="true" :stroke-width="14">
|
<el-progress :percentage="75" status="success" :text-inside="true" :stroke-width="14">
|
||||||
<span class="item-percent">75%</span>
|
<span class="item-percent">75%</span>
|
||||||
</el-progress>
|
</el-progress>
|
||||||
<!-- <div class="item-percent">75%</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,9 +105,7 @@
|
||||||
<div class="item-number" v-if="monthData.水泥磨">{{ monthData.水泥磨.cen_consume_unit }}</div>
|
<div class="item-number" v-if="monthData.水泥磨">{{ monthData.水泥磨.cen_consume_unit }}</div>
|
||||||
<div class="item-name">水泥月综合能耗</div>
|
<div class="item-name">水泥月综合能耗</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="itemsWrap">
|
<div class="itemsWrap">
|
||||||
<div class="items" >
|
<div class="items" >
|
||||||
|
@ -163,7 +142,6 @@
|
||||||
<div class="item-name">本年度水泥综合能耗</div>
|
<div class="item-name">本年度水泥综合能耗</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -197,44 +175,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import scEcharts from "@/components/scEcharts";
|
|
||||||
import draggable from 'vuedraggable'
|
|
||||||
import allComps from './components'
|
|
||||||
const colors = ['#5470C6', '#91CC75', '#EE6666'];
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
draggable,
|
|
||||||
scEcharts
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
time: '',
|
time: '',
|
||||||
day: '',
|
day: '',
|
||||||
customizing: false,
|
|
||||||
allComps: allComps,
|
|
||||||
selectLayout: [],
|
|
||||||
defaultGrid: {
|
|
||||||
//默认分栏数量和宽度
|
|
||||||
layout: [8, 8, 12,8,4,12],
|
|
||||||
//小组件分布,com取值:views/home/components 文件名
|
|
||||||
copmsList: [
|
|
||||||
['echarts'],
|
|
||||||
['progress'],
|
|
||||||
['time'],
|
|
||||||
['ver'],
|
|
||||||
|
|
||||||
],
|
|
||||||
},
|
|
||||||
grid: [],
|
|
||||||
year_s:'',
|
year_s:'',
|
||||||
month_s:'',
|
month_s:'',
|
||||||
yearData:[],
|
yearData:[],
|
||||||
monthData:[],
|
monthData:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
|
||||||
this.grid = this.$TOOL.data.get("grid") || JSON.parse(JSON.stringify(this.defaultGrid))
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$emit('on-mounted');
|
this.$emit('on-mounted');
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -250,30 +201,6 @@
|
||||||
// this.showTime()
|
// this.showTime()
|
||||||
// },1000)
|
// },1000)
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
allCompsList(){
|
|
||||||
var allCompsList = []
|
|
||||||
for(var key in this.allComps){
|
|
||||||
allCompsList.push({
|
|
||||||
key: key,
|
|
||||||
title: allComps[key].title,
|
|
||||||
icon: allComps[key].icon,
|
|
||||||
description: allComps[key].description
|
|
||||||
})
|
|
||||||
}
|
|
||||||
var myCopmsList = this.grid.copmsList.reduce(function(a, b){return a.concat(b)})
|
|
||||||
for(let comp of allCompsList){
|
|
||||||
const _item = myCopmsList.find((item)=>{return item === comp.key})
|
|
||||||
if(_item){
|
|
||||||
comp.disabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return allCompsList
|
|
||||||
},
|
|
||||||
nowCompsList(){
|
|
||||||
return this.grid.copmsList.reduce(function(a, b){return a.concat(b)})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getYearData(){
|
getYearData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -282,15 +209,11 @@
|
||||||
obj.type = 'year_s';
|
obj.type = 'year_s';
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
this.$API.enm.enstat.req(obj).then((res) => {
|
this.$API.enm.enstat.req(obj).then((res) => {
|
||||||
debugger;
|
|
||||||
console.log('getYearData:')
|
|
||||||
console.log(res)
|
|
||||||
let yearData = {};
|
let yearData = {};
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let label = item.mgroup_name;
|
let label = item.mgroup_name;
|
||||||
yearData[label] = item;
|
yearData[label] = item;
|
||||||
});
|
});
|
||||||
console.log(yearData)
|
|
||||||
that.yearData = yearData;
|
that.yearData = yearData;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -302,15 +225,11 @@
|
||||||
obj.type = 'month_s';
|
obj.type = 'month_s';
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
that.$API.enm.enstat.req(obj).then((res) => {
|
that.$API.enm.enstat.req(obj).then((res) => {
|
||||||
console.log('getMonthData:')
|
|
||||||
console.log(res)
|
|
||||||
let monthData = {};
|
let monthData = {};
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let label = item.mgroup_name;
|
let label = item.mgroup_name;
|
||||||
monthData[label] = item;
|
monthData[label] = item;
|
||||||
});
|
});
|
||||||
console.log(monthData.电石渣)
|
|
||||||
console.log(monthData.电石渣.total_production)
|
|
||||||
that.monthData = monthData;
|
that.monthData = monthData;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -324,37 +243,6 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.item-background {background: linear-gradient(to right, #8E54E9, #5683ec);color: #fff;}
|
|
||||||
.time{display: flex;justify-content: space-between;}
|
|
||||||
.time p {font-size: 14px;margin-top: 13px;opacity: 0.8;}
|
|
||||||
.numberCard{
|
|
||||||
padding: 5px;
|
|
||||||
text-align: left;
|
|
||||||
color: #979797;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.costCard{
|
|
||||||
width: 100%;
|
|
||||||
padding: 5px;
|
|
||||||
text-align: left;
|
|
||||||
color: #979797;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.itemNumber{
|
|
||||||
font-size: 30px;
|
|
||||||
color: #46d388;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
.itemNumber.yearNumber{
|
|
||||||
color: #7f9eff;
|
|
||||||
}
|
|
||||||
.itemsWrap{
|
|
||||||
// display: flex;
|
|
||||||
// padding: 20px;
|
|
||||||
}
|
|
||||||
.items{
|
.items{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
@ -365,9 +253,6 @@
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: 0 0 10px 6px #eeeeee57;
|
box-shadow: 0 0 10px 6px #eeeeee57;
|
||||||
}
|
}
|
||||||
// .items:last-child{
|
|
||||||
// border-right: 0;
|
|
||||||
// }
|
|
||||||
.item-number{
|
.item-number{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
@ -385,7 +270,7 @@
|
||||||
}
|
}
|
||||||
.item-percent{
|
.item-percent{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #b5c0ce;
|
color: #ffffff;
|
||||||
letter-spacing: .08px;
|
letter-spacing: .08px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
|
|
|
@ -34,24 +34,25 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||||
<td class="numCell" v-if="index==0" rowspan="10">{{item[0]}}</td>
|
<td class="numCell" v-if="index==0" rowspan="9">{{item[0]}}</td>
|
||||||
<td class="numCell" v-else-if="index==10" rowspan="18">{{item[0]}}</td>
|
<td class="numCell" v-else-if="index==9" rowspan="18">{{item[0]}}</td>
|
||||||
<td class="numCell" v-else-if="index==28" rowspan="12">{{item[0]}}</td>
|
<td class="numCell" v-else-if="index==27" rowspan="12">{{item[0]}}</td>
|
||||||
<td class="numCell" v-else-if="index==40" rowspan="10" colspan="2">{{item[0]}}</td>
|
<td class="numCell" v-else-if="index==39" rowspan="10" colspan="2">{{item[0]}}</td>
|
||||||
<td class="numCell" v-else-if="index==50" colspan="3">{{item[0]}}</td>
|
<td class="numCell" v-else-if="index==49" colspan="3">{{item[0]}}</td>
|
||||||
|
|
||||||
<td class="numCell" v-if="index==9||index==27||index==38||index==39" colspan="2">{{item[1]}}</td>
|
<td class="numCell" v-if="index==8||index==26||index==37||index==38" colspan="2">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==0" rowspan="2">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==0" rowspan="2">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else-if="index==2" rowspan="7">{{item[1]}}</td>
|
<td class="numCell" v-else-if="index==2" rowspan="6">{{item[1]}}</td>
|
||||||
|
<td class="numCell" v-else-if="index==9" rowspan="14">{{item[1]}}</td>
|
||||||
|
<td class="numCell" v-else-if="index==23" rowspan="3">{{item[1]}}</td>
|
||||||
|
<td class="numCell" v-else-if="index==27" rowspan="10">{{item[1]}}</td>
|
||||||
<td class="numCell" v-else>{{item[1]}}</td>
|
<td class="numCell" v-else>{{item[1]}}</td>
|
||||||
|
|
||||||
<td class="numCell">{{item[2]}}</td>
|
<td class="numCell">{{item[2]}}</td>
|
||||||
<td class="numCell">{{item[3]}}</td>
|
<td class="numCell">{{item[3]}}</td>
|
||||||
<td class="numCell">{{item[4]}}</td>
|
<td class="numCell">{{item[4]}}</td>
|
||||||
<td class="numCell" v-if="index!==50">{{item[5]}}</td>
|
<td class="numCell" v-if="item[5]">{{item[5]}}</td>
|
||||||
|
<td class="numCell" v-if="item[6]">{{item[6]}}</td>
|
||||||
<td class="numCell" style="display:none" v-if="index==1||index==3||index==4||index==8||index==5||index==6||index==7||index==9||index==27||index==38||index==39||index==40||index==50||index==41||index==42||index==43||index==44||index==45||index==46||index==47||index==48||index==49"></td>
|
|
||||||
<td class="numCell" v-else>{{item[6]}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,67 +69,72 @@
|
||||||
days:'',
|
days:'',
|
||||||
},
|
},
|
||||||
tableDatas:[
|
tableDatas:[
|
||||||
['原料车间','电石渣','电石渣',1,2,3,4 ],
|
['原料车间','电石渣','烘干破主电机',1,2,3,4 ],//0
|
||||||
['原料车间','电石渣合计',1,2,3,4 ],
|
['原料车间','电石渣合计',1,2,3,4 ],
|
||||||
['原料车间','原料磨','反击式破碎机',1,2,3,4],
|
['原料车间','原料磨','反击式破碎机',1,2,3,4],
|
||||||
['原料车间','立磨主电机'],
|
['原料车间','立磨主电机',1,2,3,4],
|
||||||
['原料车间','循环风机'],
|
['原料车间','循环风机',1,2,3,4],
|
||||||
['原料车间','烘干破主电机'],
|
['原料车间','废气风机' ,1,2,3,4],//5
|
||||||
['原料车间','废气风机' ],
|
['原料车间','尾排风机',1,2,3,4],
|
||||||
['原料车间','尾排风机'],
|
['原料车间','原料磨合计' ,1,2,3,4],
|
||||||
['原料车间','原料磨合计' ],
|
['原料车间','原料车间合计',1,2,3,4],//8
|
||||||
['原料车间','原料车间合计'],
|
|
||||||
|
|
||||||
['烧成车间','回转窑','高温风机'],
|
['烧成车间','回转窑','高温风机',1,2,3,4],//9
|
||||||
['烧成车间','回转窑','窑主电机'],
|
['烧成车间','窑主电机',1,2,3,4],//10
|
||||||
['烧成车间','回转窑','篦冷机一室风机电机'],
|
['烧成车间','篦冷机一室风机电机',1,2,3,4],
|
||||||
['烧成车间','回转窑','篦冷机三室风机电机'],
|
['烧成车间','篦冷机三室风机电机',1,2,3,4],
|
||||||
['烧成车间','回转窑','篦冷机二室风机电机'],
|
['烧成车间','篦冷机二室风机电机',1,2,3,4],
|
||||||
['烧成车间','回转窑','篦冷机一室充气梁风机(左)电机'],
|
['烧成车间','篦冷机一室充气梁风机(左)',1,2,3,4],
|
||||||
['烧成车间','回转窑','篦冷机一室充气梁风机(右)电机'],
|
['烧成车间','篦冷机一室充气梁风机(右)',1,2,3,4],//15
|
||||||
['烧成车间','回转窑','窑头排风机主电机'],
|
['烧成车间','窑头排风机主电机',1,2,3,4],
|
||||||
['烧成车间','回转窑','头煤粉罗茨电机(东、备用)'],
|
['烧成车间','头煤粉罗茨电机(东、备用)',1,2,3,4],
|
||||||
['烧成车间','回转窑','尾煤粉罗茨电机(西)'],
|
['烧成车间','尾煤粉罗茨电机(西)',1,2,3,4],
|
||||||
['烧成车间','回转窑','空压机3301'],
|
['烧成车间','空压机3301',1,2,3,4],
|
||||||
['烧成车间','回转窑','空压机3308'],
|
['烧成车间','空压机3308',1,2,3,4],//20
|
||||||
['烧成车间','回转窑','空压机3318'],
|
['烧成车间','空压机3318',1,2,3,4],//21
|
||||||
['烧成车间','回转窑','回转窑合计'],
|
['烧成车间','回转窑合计',1,2,3,4],
|
||||||
['烧成车间','煤磨','煤磨主电机'],
|
['烧成车间','煤磨','煤磨主电机',1,2,3,4],
|
||||||
['烧成车间','煤磨','煤磨排风机主电机'],
|
['烧成车间','煤磨排风机主电机',1,2,3,4],
|
||||||
['烧成车间','煤磨','煤磨合计'],
|
['烧成车间','煤磨合计',1,2,3,4],//25
|
||||||
['烧成车间','烧成车间合计'],
|
['烧成车间','烧成车间合计',1,2,3,4],//26
|
||||||
|
|
||||||
['水泥车间','水泥磨','循环风机1906'],
|
['水泥车间','水泥磨','循环风机1906',1,2,3,4],//27
|
||||||
['水泥车间','水泥磨','系统风机'],
|
['水泥车间','系统风机',1,2,3,4],
|
||||||
['水泥车间','水泥磨','水平涡流选粉机1915'],
|
['水泥车间','水平涡流选粉机1915',1,2,3,4],
|
||||||
['水泥车间','水泥磨','水泥磨主电机'],
|
['水泥车间','水泥磨主电机',1,2,3,4],//30
|
||||||
['水泥车间','水泥磨','辊压机动辊电机'],
|
['水泥车间','辊压机动辊电机',1,2,3,4],
|
||||||
['水泥车间','水泥磨','辊压机定辊电机'],
|
['水泥车间','辊压机定辊电机',1,2,3,4],
|
||||||
['水泥车间','水泥磨','新增磨尾风机'],
|
['水泥车间','新增磨尾风机',1,2,3,4],
|
||||||
['水泥车间','水泥磨','水泥1#空压机'],
|
['水泥车间','水泥1#空压机',1,2,3,4],
|
||||||
['水泥车间','水泥磨','水泥2#空压机'],
|
['水泥车间','水泥2#空压机',1,2,3,4],//35
|
||||||
['水泥车间','水泥磨','水泥磨合计计'],
|
['水泥车间','水泥磨合计计',1,2,3,4],
|
||||||
['水泥车间','水泥包装合计'],
|
['水泥车间','水泥包装合计',1,2,3,4],//37
|
||||||
['水泥车间','水泥车间合计'],
|
['水泥车间','水泥车间合计',1,2,3,4],//38
|
||||||
|
|
||||||
['生活区','食堂'],
|
['生活区','食堂',1,2,3,4],//39
|
||||||
['生活区','单元楼'],
|
['生活区','单元楼',1,2,3,4],//40
|
||||||
['生活区','单身宿舍'],
|
['生活区','单身宿舍',1,2,3,4],
|
||||||
['生活区','办公楼'],
|
['生活区','办公楼',1,2,3,4],
|
||||||
['生活区','余热锅炉'],
|
['生活区','余热锅炉',1,2,3,4],
|
||||||
['生活区','污水站'],
|
['生活区','污水站',1,2,3,4],
|
||||||
['生活区','南门办公区'],
|
['生活区','南门办公区',1,2,3,4],//45
|
||||||
['生活区','东门办公区'],
|
['生活区','东门办公区',1,2,3,4],
|
||||||
['生活区','地磅'],
|
['生活区','地磅',1,2,3,4],
|
||||||
['生活区','生活区合计'],
|
['生活区','生活区合计',1,2,3,4],
|
||||||
['全厂电量'],
|
['全厂电量',1,2,3,4],
|
||||||
],
|
],
|
||||||
sourceData:{}
|
sourceData:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.test(0)
|
let that = this;
|
||||||
// this.getData();
|
var nowDate = new Date();
|
||||||
|
that.year = nowDate.getFullYear();
|
||||||
|
that.month = nowDate.getMonth()+1;
|
||||||
|
that.day = nowDate.getDate();
|
||||||
|
that.hour = nowDate.getHours();
|
||||||
|
that.timeDate = nowDate.getTime();
|
||||||
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
test(index){
|
test(index){
|
||||||
|
@ -137,8 +143,168 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getData(){
|
getData(){
|
||||||
this.$API.enm.enstat.req(params).then((res) => {
|
let that = this;
|
||||||
|
function dataPush(name,value){
|
||||||
|
let index=0;
|
||||||
|
if(name=='烘干破主电机'){
|
||||||
|
index=0;
|
||||||
|
that.tableDatas[0][3] = value;
|
||||||
|
}else if(name=='电石渣合计'){
|
||||||
|
index=1;
|
||||||
|
that.tableDatas[1][2] = value;
|
||||||
|
}else if(name=='反击式破碎机'){
|
||||||
|
index=2;
|
||||||
|
}else if(name=='立磨主电机'){
|
||||||
|
index=3;
|
||||||
|
}else if(name=='循环风机'){
|
||||||
|
index=4;
|
||||||
|
}else if(name=='废气风机'){
|
||||||
|
index=5;
|
||||||
|
}else if(name=='尾排风机'){
|
||||||
|
index=6;
|
||||||
|
}else if(name=='原料磨合计'){
|
||||||
|
index=7;
|
||||||
|
}else if(name=='高温风机'){
|
||||||
|
index=9;
|
||||||
|
}else if(name=='窑主电机'){
|
||||||
|
index=10;
|
||||||
|
}else if(name=='篦冷机一室风机电机'){
|
||||||
|
index=11;
|
||||||
|
}else if(name=='篦冷机三室风机电机'){
|
||||||
|
index=12;
|
||||||
|
}else if(name=='篦冷机二室风机电机'){
|
||||||
|
index=13;
|
||||||
|
}else if(name=='篦冷机一室充气梁风机(左)'){
|
||||||
|
index=14;
|
||||||
|
}else if(name=='篦冷机一室充气梁风机(右)'){
|
||||||
|
index=15;
|
||||||
|
}else if(name=='窑头排风机主电机'){
|
||||||
|
index=16;
|
||||||
|
}else if(name=='头煤粉罗茨电机(东、备用)'){
|
||||||
|
index=17;
|
||||||
|
}else if(name=='尾煤粉罗茨电机(西)'){
|
||||||
|
index=18;
|
||||||
|
}else if(name=='空压机3301'){
|
||||||
|
index=19;
|
||||||
|
}else if(name=='空压机3308'){
|
||||||
|
index=20;
|
||||||
|
}else if(name=='空压机3318'){
|
||||||
|
index=21;
|
||||||
|
}else if(name=='回转窑合计'){
|
||||||
|
index=22;
|
||||||
|
}else if(name=='煤磨主电机'){
|
||||||
|
index=23;
|
||||||
|
}else if(name=='煤磨排风机主电机'){
|
||||||
|
index=24;
|
||||||
|
}else if(name=='煤磨合计'){
|
||||||
|
index=25;
|
||||||
|
}else if(name=='循环风机1906'){
|
||||||
|
index=27;
|
||||||
|
}else if(name=='系统风机'){
|
||||||
|
index=28;
|
||||||
|
}else if(name=='水平涡流选粉机1915'){
|
||||||
|
index=29;
|
||||||
|
}else if(name=='水泥磨主电机'){
|
||||||
|
index=30;
|
||||||
|
}else if(name=='辊压机动辊电机'){
|
||||||
|
index=31;
|
||||||
|
}else if(name=='辊压机定辊电机'){
|
||||||
|
index=32;
|
||||||
|
}else if(name=='新增磨尾风机'){
|
||||||
|
index=33;
|
||||||
|
}else if(name=='水泥1#空压机'){
|
||||||
|
index=34;
|
||||||
|
}else if(name=='水泥2#空压机'){
|
||||||
|
index=35;
|
||||||
|
}else if(name=='水泥磨合计计'){
|
||||||
|
index=36;
|
||||||
|
}else if(name=='水泥包装合计'){
|
||||||
|
index=37;
|
||||||
|
}else if(name=='食堂'){
|
||||||
|
index=39;
|
||||||
|
}else if(name=='单元楼'){
|
||||||
|
index=40;
|
||||||
|
}else if(name=='单身宿舍'){
|
||||||
|
index=41;
|
||||||
|
}else if(name=='办公楼'){
|
||||||
|
index=42;
|
||||||
|
}else if(name=='余热锅炉'){
|
||||||
|
index=43;
|
||||||
|
}else if(name=='污水站'){
|
||||||
|
index=44;
|
||||||
|
}else if(name=='南门办公区'){
|
||||||
|
index=45;
|
||||||
|
}else if(name=='东门办公区'){
|
||||||
|
index=46;
|
||||||
|
}else if(name=='生活区合计'){
|
||||||
|
index=47;
|
||||||
|
}else if(name=='地磅'){
|
||||||
|
index=48;
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
let obj = {};
|
||||||
|
obj.type='hour_s';
|
||||||
|
obj.year = that.year;
|
||||||
|
obj.month = that.month;
|
||||||
|
obj.day = that.day-1;
|
||||||
|
obj.hour = that.hour;
|
||||||
|
obj.page = 0;
|
||||||
|
obj.mpoint__ep_monitored__power_kw__gte=100;
|
||||||
|
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
||||||
|
//上小时
|
||||||
|
res.forEach(item=>{
|
||||||
|
let i = dataPush(item.mpoint_name);
|
||||||
|
let k = 3;
|
||||||
|
})
|
||||||
|
}).then(()=>{
|
||||||
|
//昨日
|
||||||
|
let obj1 = {};
|
||||||
|
obj1.type='day_s';
|
||||||
|
let dayTime = 24 * 60 * 60 * 1000;
|
||||||
|
|
||||||
|
let year_d = that.year,month_d = that.month,days_d = that.day;
|
||||||
|
if(that.hour<21){//21点前,查找昨日数据为前一天数据
|
||||||
|
let newDate = that.timeDate- dayTime;
|
||||||
|
let lastDate = new Date(newDate);
|
||||||
|
year_d = lastDate.getFullYear();
|
||||||
|
month_d = lastDate.getMonth()+1;
|
||||||
|
days_d = lastDate.getDate();
|
||||||
|
}
|
||||||
|
obj1.year_s = year_d;
|
||||||
|
obj1.month_s = month_d;
|
||||||
|
obj1.day_s = days_d;
|
||||||
|
obj1.page = 0;
|
||||||
|
obj1.mpoint__ep_monitored__power_kw__gte=100;
|
||||||
|
this.$API.enm.mpoint.stat.req(obj1).then((res1) => {
|
||||||
|
debugger;
|
||||||
|
console.log(res1);
|
||||||
|
|
||||||
|
})
|
||||||
|
//本月
|
||||||
|
let obj2 = {};
|
||||||
|
obj2.type='month_s';
|
||||||
|
obj2.year_s = this.year;
|
||||||
|
obj2.month_s = this.month;
|
||||||
|
obj2.page = 0;
|
||||||
|
obj2.mpoint__ep_monitored__power_kw__gte=100;
|
||||||
|
this.$API.enm.mpoint.stat.req(obj2).then((res2) => {
|
||||||
|
debugger;
|
||||||
|
console.log(res2)
|
||||||
|
})
|
||||||
|
//本年
|
||||||
|
let obj3 = {};
|
||||||
|
obj3.type='year_s';
|
||||||
|
obj3.year_s = this.year;
|
||||||
|
obj3.page = 0;
|
||||||
|
obj3.mpoint__ep_monitored__power_kw__gte=100;
|
||||||
|
this.$API.enm.mpoint.stat.req(obj3).then((res3) => {
|
||||||
|
debugger;
|
||||||
|
console.log(res3)
|
||||||
|
res3.forEach(item3=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -55,26 +55,117 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timeStamp:0,
|
timeStamp:0,
|
||||||
listQuery:{
|
year_s:'',
|
||||||
belong_dept:'',
|
tableDatas:[],
|
||||||
task2__year:'',
|
|
||||||
page:0
|
|
||||||
},
|
|
||||||
query:{
|
|
||||||
time:'',
|
|
||||||
time2:'',
|
|
||||||
},
|
|
||||||
tableDatas:[
|
|
||||||
['2023.1','2000','100',100,10,10,100,10,10,100,10,10],
|
|
||||||
['2023.2','2000','100',100,10,10,100,10,10,100,10,10],
|
|
||||||
['2023.3','2000','100',100,10,10,100,10,10,100,10,10],
|
|
||||||
['2023.4','2000','100',100,10,10,100,10,10,100,10,10],
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
var myDate = new Date();
|
||||||
|
let year = myDate.getFullYear();
|
||||||
|
that.year_s = year;
|
||||||
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getData(){
|
||||||
|
let that = this;
|
||||||
|
let wrapArr = [],wrapArr2 = [];
|
||||||
|
let obj = {};
|
||||||
|
obj.year_s = this.year_s-1;
|
||||||
|
obj.page = 0;
|
||||||
|
that.$API.enm.enstat2.req(obj).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
res.forEach(item=>{
|
||||||
|
let ind = item.month_s-1;
|
||||||
|
wrapArr[ind] =item;
|
||||||
|
})
|
||||||
|
}else{}
|
||||||
|
let obj2 = {};
|
||||||
|
obj2.year_s = this.year_s;
|
||||||
|
obj2.page = 0;
|
||||||
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
|
if(res2.length>0){
|
||||||
|
res2.forEach(item2=>{
|
||||||
|
let ind2 = item2.month_s-1;
|
||||||
|
wrapArr2[ind2] =item2;
|
||||||
|
})
|
||||||
|
}else{}
|
||||||
|
for(let i=0;i<wrapArr2.length;i++){
|
||||||
|
if(Boolean(wrapArr2[i])){
|
||||||
|
if(this.tableDatas[i]){}else{
|
||||||
|
this.tableDatas[i] = [];
|
||||||
|
}
|
||||||
|
let time = wrapArr2[i].year_s+'.'+wrapArr2[i].month_s;
|
||||||
|
this.tableDatas[i][0] = time;
|
||||||
|
this.tableDatas[i][1] = wrapArr2[i].industry_total_val;
|
||||||
|
this.tableDatas[i][2] = wrapArr2[i].industry_add_val;
|
||||||
|
this.tableDatas[i][3] = wrapArr2[i].en_consume;
|
||||||
|
let tValue3 = 0,hValue3 = 0,tPercent3 = 0,hPercent3 = 0;
|
||||||
|
if(wrapArr2[i].month_s>1){
|
||||||
|
tValue3 = wrapArr2[i-1]?wrapArr2[i-1].en_consume:'/';
|
||||||
|
}else{
|
||||||
|
tValue3 = wrapArr[12]? wrapArr[12].en_consume:'/';
|
||||||
|
}
|
||||||
|
if(tValue3!=='/'&&tValue3!==0){
|
||||||
|
tPercent3 = (wrapArr2[i].en_consume-tValue3)/tValue3*100;
|
||||||
|
}else{
|
||||||
|
tPercent3 = '/';
|
||||||
|
}
|
||||||
|
hValue3 = wrapArr[i]?wrapArr[i].en_consume:'/';
|
||||||
|
if(hValue3!=='/'&&hValue3!==0){
|
||||||
|
hPercent3 = (wrapArr2[i].en_consume-hValue3)/hValue3*100;
|
||||||
|
}else{
|
||||||
|
hPercent3 = '/';
|
||||||
|
}
|
||||||
|
this.tableDatas[i][4] = hPercent3;
|
||||||
|
this.tableDatas[i][5] = tPercent3;
|
||||||
|
this.tableDatas[i][6] = wrapArr2[i].en_consume_unit;
|
||||||
|
let tValue6 = 0,hValue6 = 0,tPercent6 = 0,hPercent6 = 0;
|
||||||
|
if(wrapArr2[i].month_s>1){
|
||||||
|
tValue6 = wrapArr2[i-1]?wrapArr2[i-1].en_consume_unit:'/';
|
||||||
|
}else{
|
||||||
|
tValue6 = wrapArr[12]? wrapArr[12].en_consume_unit:'/';
|
||||||
|
}
|
||||||
|
if(tValue6!=='/'&&tValue6!==0){
|
||||||
|
tPercent6 = (wrapArr2[i].en_consume_unit-tValue6)/tValue6*100;
|
||||||
|
}else{
|
||||||
|
tPercent6 = '/';
|
||||||
|
}
|
||||||
|
hValue6 = wrapArr[i]?wrapArr[i].en_consume_unit:'/';
|
||||||
|
if(hValue6!=='/'&&hValue6!==0){
|
||||||
|
hPercent6 = (wrapArr2[i].en_consume_unit-hValue6)/hValue6*100;
|
||||||
|
}else{
|
||||||
|
hPercent6 = '/';
|
||||||
|
}
|
||||||
|
this.tableDatas[i][7] = hPercent6;
|
||||||
|
this.tableDatas[i][8] = tPercent6;
|
||||||
|
this.tableDatas[i][9] = wrapArr2[i].en_add_consume_unit;
|
||||||
|
let tValue9 = 0,hValue9 = 0,tPercent9 = 0,hPercent9 = 0;
|
||||||
|
if(wrapArr2[i].month_s>1){
|
||||||
|
tValue9 = wrapArr2[i-1]?wrapArr2[i-1].en_add_consume_unit:'/';
|
||||||
|
}else{
|
||||||
|
tValue9 = wrapArr[12]? wrapArr[12].en_add_consume_unit:'/';
|
||||||
|
}
|
||||||
|
if(tValue9!=='/'&&tValue9!==0){
|
||||||
|
tPercent9 = (wrapArr2[i].en_add_consume_unit-tValue9)/tValue9*100;
|
||||||
|
}else{
|
||||||
|
tPercent9 = '/';
|
||||||
|
}
|
||||||
|
hValue9 = wrapArr[i]?wrapArr[i].en_add_consume_unit:'/';
|
||||||
|
if(hValue9!=='/'&&hValue9!==0){
|
||||||
|
hPercent9 = (wrapArr2[i].en_add_consume_unit-hValue9)/hValue9*100;
|
||||||
|
}else{
|
||||||
|
hPercent9 = '/';
|
||||||
|
}
|
||||||
|
this.tableDatas[i][10] = hPercent9;
|
||||||
|
this.tableDatas[i][11] = tPercent9;
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
this.$XLSX('#myTable', this.tableName)
|
this.$XLSX('#myTable', this.tableName)
|
||||||
|
|
Loading…
Reference in New Issue