Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
5ae4238b20
|
|
@ -2,7 +2,8 @@
|
|||
NODE_ENV = development
|
||||
|
||||
# 标题
|
||||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
# VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
VUE_APP_TITLE = '托克逊能源管理平台'
|
||||
|
||||
# 接口地址
|
||||
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
NODE_ENV = production
|
||||
|
||||
# 标题
|
||||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
# VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
VUE_APP_TITLE = '托克逊能源管理平台'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_API_BASEURL = http://10.99.5.79:20309/api
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
<style lang="scss">
|
||||
@import '@/style/style.scss';
|
||||
.myTable{
|
||||
margin-left: 37px;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
.myTableHead{
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const routes = [
|
|||
"path": "/bi",
|
||||
"meta": {
|
||||
"title": "报表",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-trend-charts",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -141,7 +141,7 @@ const routes = [
|
|||
"path": "/enm_slag",
|
||||
"meta": {
|
||||
"title": "电石渣",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-opportunity",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -151,7 +151,7 @@ const routes = [
|
|||
"path": "/enm_slag/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/report"
|
||||
|
|
@ -161,7 +161,7 @@ const routes = [
|
|||
"path": "/enm_slag/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-odometer",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/power"
|
||||
|
|
@ -171,7 +171,7 @@ const routes = [
|
|||
"path": "/enm_slag/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/teamAnalysis"
|
||||
|
|
@ -181,7 +181,7 @@ const routes = [
|
|||
"path": "/enm_slag/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/workshopAnalysis"
|
||||
|
|
@ -191,7 +191,7 @@ const routes = [
|
|||
"path": "/enm_slag/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/handoverLog"
|
||||
|
|
@ -203,7 +203,7 @@ const routes = [
|
|||
"path": "/enm_rm",
|
||||
"meta": {
|
||||
"title": "原料磨",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-list",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -213,7 +213,7 @@ const routes = [
|
|||
"path": "/enm_rm/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_rm/report"
|
||||
|
|
@ -223,7 +223,7 @@ const routes = [
|
|||
"path": "/enm_rm/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-odometer",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_rm/power"
|
||||
|
|
@ -233,7 +233,7 @@ const routes = [
|
|||
"path": "/enm_rm/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_rm/teamAnalysis"
|
||||
|
|
@ -243,7 +243,7 @@ const routes = [
|
|||
"path": "/enm_rm/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_rm/workshopAnalysis"
|
||||
|
|
@ -253,7 +253,7 @@ const routes = [
|
|||
"path": "/enm_rm/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_rm/handoverLog"
|
||||
|
|
@ -265,7 +265,7 @@ const routes = [
|
|||
"path": "/enm_kiln",
|
||||
"meta": {
|
||||
"title": "回转窑",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-menu",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -275,7 +275,7 @@ const routes = [
|
|||
"path": "/enm_kiln/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/report"
|
||||
|
|
@ -285,7 +285,7 @@ const routes = [
|
|||
"path": "/enm_kiln/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-odometer",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/power"
|
||||
|
|
@ -295,7 +295,7 @@ const routes = [
|
|||
"path": "/enm_kiln/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/teamAnalysis"
|
||||
|
|
@ -305,7 +305,7 @@ const routes = [
|
|||
"path": "/enm_kiln/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/workshopAnalysis"
|
||||
|
|
@ -315,7 +315,7 @@ const routes = [
|
|||
"path": "/enm_kiln/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/handoverLog"
|
||||
|
|
@ -327,7 +327,7 @@ const routes = [
|
|||
"path": "/enm_coal",
|
||||
"meta": {
|
||||
"title": "煤磨",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-brush-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -337,7 +337,7 @@ const routes = [
|
|||
"path": "/enm_coal/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/report"
|
||||
|
|
@ -347,7 +347,7 @@ const routes = [
|
|||
"path": "/enm_coal/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-odometer",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/power"
|
||||
|
|
@ -357,7 +357,7 @@ const routes = [
|
|||
"path": "/enm_coal/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/teamAnalysis"
|
||||
|
|
@ -367,7 +367,7 @@ const routes = [
|
|||
"path": "/enm_coal/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/workshopAnalysis"
|
||||
|
|
@ -377,7 +377,7 @@ const routes = [
|
|||
"path": "/enm_coal/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/handoverLog"
|
||||
|
|
@ -389,7 +389,7 @@ const routes = [
|
|||
"path": "/enm_mill",
|
||||
"meta": {
|
||||
"title": "水泥磨",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-help-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -399,7 +399,7 @@ const routes = [
|
|||
"path": "/enm_mill/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/report"
|
||||
|
|
@ -409,7 +409,7 @@ const routes = [
|
|||
"path": "/enm_mill/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-odometer",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/power"
|
||||
|
|
@ -419,7 +419,7 @@ const routes = [
|
|||
"path": "/enm_mill/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/teamAnalysis"
|
||||
|
|
@ -429,7 +429,7 @@ const routes = [
|
|||
"path": "/enm_mill/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/workshopAnalysis"
|
||||
|
|
@ -439,7 +439,7 @@ const routes = [
|
|||
"path": "/enm_mill/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/handoverLog"
|
||||
|
|
@ -451,7 +451,7 @@ const routes = [
|
|||
"path": "/enm_pack",
|
||||
"meta": {
|
||||
"title": "水泥包装",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-goods-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -461,7 +461,7 @@ const routes = [
|
|||
"path": "/enm_pack/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/report"
|
||||
|
|
@ -481,7 +481,7 @@ const routes = [
|
|||
"path": "/enm_pack/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-operation",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/teamAnalysis"
|
||||
|
|
@ -491,7 +491,7 @@ const routes = [
|
|||
"path": "/enm_pack/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-data-line",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/workshopAnalysis"
|
||||
|
|
@ -501,7 +501,7 @@ const routes = [
|
|||
"path": "/enm_pack/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-document-copy",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/handoverLog"
|
||||
|
|
@ -523,7 +523,7 @@ const routes = [
|
|||
"path": "/em/equipment",
|
||||
"meta": {
|
||||
"title": "生产设备",
|
||||
"icon": "el-icon-grid",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["equipment"]
|
||||
},
|
||||
"component": "em/equipment"
|
||||
|
|
@ -1114,11 +1114,11 @@ const routes = [
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ungrouped",
|
||||
"path": "/ungrouped",
|
||||
"name": "base",
|
||||
"path": "/base",
|
||||
"meta": {
|
||||
"title": "未分组",
|
||||
"icon": "el-icon-grid",
|
||||
"title": "基础配置",
|
||||
"icon": "el-icon-question-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
|
|
@ -1163,7 +1163,19 @@ const routes = [
|
|||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/material"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "month",
|
||||
"path": "/month",
|
||||
"meta": {
|
||||
"title": "每月配置",
|
||||
"icon": "el-icon-question-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "priceset",
|
||||
"path": "/ungrouped/priceset",
|
||||
|
|
@ -1184,26 +1196,6 @@ const routes = [
|
|||
},
|
||||
"component": "ungrouped/feeset"
|
||||
},
|
||||
{
|
||||
"name": "stflog",
|
||||
"path": "/ungrouped/stflog",
|
||||
"meta": {
|
||||
"title": "停机记录",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/stflog"
|
||||
},
|
||||
{
|
||||
"name": "costing",
|
||||
"path": "/ungrouped/costing",
|
||||
"meta": {
|
||||
"title": "成本计算",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/costing"
|
||||
},
|
||||
{
|
||||
"name": "goalSetting",
|
||||
"path": "/ungrouped/goalSetting",
|
||||
|
|
@ -1214,16 +1206,19 @@ const routes = [
|
|||
},
|
||||
"component": "ungrouped/goalSetting"
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"path": "/ungrouped/quality",
|
||||
"meta": {
|
||||
"title": "质量报表",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/quality"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "energy",
|
||||
"path": "/energy",
|
||||
"meta": {
|
||||
"title": "全厂能源",
|
||||
"icon": "el-icon-question-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
|
||||
{
|
||||
"name": "energy",
|
||||
"path": "/ungrouped/energy",
|
||||
|
|
@ -1234,6 +1229,16 @@ const routes = [
|
|||
},
|
||||
"component": "ungrouped/energy"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"path": "/ungrouped/value",
|
||||
"meta": {
|
||||
"title": "工业产值",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/value"
|
||||
},
|
||||
{
|
||||
"name": "electric",
|
||||
"path": "/ungrouped/electric",
|
||||
|
|
@ -1244,6 +1249,38 @@ const routes = [
|
|||
},
|
||||
"component": "ungrouped/electric"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "rforms",
|
||||
"path": "/rforms",
|
||||
"meta": {
|
||||
"title": "全厂报表",
|
||||
"icon": "el-icon-question-filled",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "costing",
|
||||
"path": "/ungrouped/costing",
|
||||
"meta": {
|
||||
"title": "成本计算",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/costing"
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"path": "/ungrouped/quality",
|
||||
"meta": {
|
||||
"title": "质量报表",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["dataset"]
|
||||
},
|
||||
"component": "ungrouped/quality"
|
||||
}
|
||||
,{
|
||||
"name": "reportAll",
|
||||
"path": "/ungrouped/report",
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ export default {
|
|||
apiObj: this.$API.em.equipment.list,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
page_size:40,
|
||||
type:10
|
||||
},
|
||||
selection: [],
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@
|
|||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in monitoredOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
<el-option
|
||||
v-for="item in epOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -82,30 +82,29 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="工段数据">
|
||||
<el-switch v-model="form.is_all"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="计算公式">
|
||||
<el-input v-model="form.formula" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="自动采集">
|
||||
<el-switch v-model="form.is_auto"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" style="position: relative;">
|
||||
<el-form-item label="系数分配">
|
||||
<el-switch v-model="form.is_all"/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
v-if="form.is_all"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="position: absolute;right: 0;top:0"
|
||||
@click="addAllocate"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="!form.is_all">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="所属工段" prop="mgroup">
|
||||
<el-select
|
||||
v-model="form.mgroup"
|
||||
placeholder="所属工段"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="mgroupChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
|
|
@ -116,14 +115,24 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="工段分配">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addAllocate"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.is_all">
|
||||
<el-row>
|
||||
<template v-for="(item,$index) in form.mgroups_allocate" :key="$index">
|
||||
<el-col :md="11" :sm="24">
|
||||
<el-form-item label="所属工段" prop="mgroup">
|
||||
<el-form-item label="分配工段" prop="mgroup">
|
||||
<el-select
|
||||
v-model="item.mgroup"
|
||||
placeholder="所属工段"
|
||||
placeholder="分配工段"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
|
|
@ -141,9 +150,8 @@
|
|||
<el-input-number precision="2" v-model="item.ratio" step="0.1" min="0" max="1" clearable controls-position="right"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="2" :sm="24" v-if="$index!==0">
|
||||
<el-col :md="2" :sm="24">
|
||||
<el-button
|
||||
v-if="$index!==0"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="delAllocate($index)"
|
||||
|
|
@ -176,8 +184,8 @@ export default {
|
|||
form: {
|
||||
is_auto:true,
|
||||
belong_dept:null,
|
||||
mgroup:'',
|
||||
mgroups_allocate:[{mgroup:'',ratio:0}],
|
||||
mgroup:null,
|
||||
mgroups_allocate:[],
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: '请输入测点名称'}],
|
||||
|
|
@ -185,6 +193,7 @@ export default {
|
|||
unit: [{required: true, message: '请输入测点单位'}],
|
||||
unmgroupit: [{required: true, message: '请请选择测点集'}],
|
||||
},
|
||||
is_all_dept:false,
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
setFiltersVisible: false,
|
||||
|
|
@ -225,6 +234,9 @@ export default {
|
|||
this.materials = res;
|
||||
})
|
||||
},
|
||||
mgroupChange(e){
|
||||
this.form.mgroups_allocate.push({mgroup:e,ratio:1});
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
|
@ -232,7 +244,7 @@ export default {
|
|||
return this;
|
||||
},
|
||||
addAllocate(){
|
||||
this.form.mgroups_allocate.push({mgroup:'',ratio:0});
|
||||
this.form.mgroups_allocate.push({mgroup:null,ratio:0});
|
||||
},
|
||||
delAllocate(index){
|
||||
this.form.mgroups_allocate.splice(index,1)
|
||||
|
|
@ -242,6 +254,15 @@ export default {
|
|||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
if(this.form.mgroup==''){
|
||||
this.form.mgroup=null
|
||||
}
|
||||
if( this.form.mgroups_allocate.length>0){
|
||||
let arr = this.form.mgroups_allocate.filter(item=>{
|
||||
return item.mgroup!==''&&item.mgroup!==null
|
||||
})
|
||||
this.form.mgroups_allocate = arr;
|
||||
}
|
||||
if (this.mode == "add") {
|
||||
this.$API.enm.mpoint.create.req(this.form).then(res=>{
|
||||
this.isSaveing = false;
|
||||
|
|
@ -269,7 +290,7 @@ export default {
|
|||
debugger;
|
||||
console.log(data)
|
||||
if(data.mgroups_allocate.length>1){
|
||||
this.form.is_all = true
|
||||
this.is_all_dept = true
|
||||
}
|
||||
Object.assign(this.form, data);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@
|
|||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">煤磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
<th colspan="7">煤磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>总电耗</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
|
|
@ -32,16 +33,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<template v-for="(item1,ind) in item" :key="item1">
|
||||
<td v-if="ind==0||ind==1||ind==2||ind==3" class="numCell">{{item1}}</td>
|
||||
<td v-if="ind==4" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
|
||||
<td v-if="ind==5" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
|
||||
<td v-if="ind==6" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -117,6 +121,49 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
// alwaysShowContent:true,
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
// restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['煤磨排风机主电机', '煤磨主电机']
|
||||
};
|
||||
let yAxis= {
|
||||
type: 'value',
|
||||
name: '单位产品分布电耗(KW.h/t)',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
};
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -128,19 +175,20 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217512021835776',
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'煤磨排风机主电机',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'煤磨主电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
['煤磨排风机主电机','','KW.h','','','',''],
|
||||
['煤磨主电机','','KW.h','','','',''],
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
|
|
@ -149,12 +197,312 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
allValHour:0,
|
||||
allValDays:0,
|
||||
allValMonth:0,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '煤磨排风机主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '煤磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '煤磨排风机主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '煤磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '煤磨排风机主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '煤磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
let month = myDate.getMonth()+1;
|
||||
let days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//本月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let hourProduct=that.allValMonth = res2[0].total_production;//当前条件下的总产量
|
||||
params2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params2).then((res) => {
|
||||
let data2 = res;
|
||||
for (let i = 0; i < data2.length; i++) {
|
||||
that.tableDatas[i]=[];
|
||||
that.tableDatas[i][0]=data2[i].ep_monitored_name;
|
||||
that.tableDatas[i][1]=data2[i].ep_monitored_number;
|
||||
that.tableDatas[i][2]='KW.h';
|
||||
that.tableDatas[i][3]=data2[i].val;
|
||||
let val = hourProduct==0?'/':(data2[i].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[i][6]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res2=>{
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let hourProduct=that.allValDays = res3[0].total_production;
|
||||
params3.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params3).then((res) => {
|
||||
let data3 = res3;
|
||||
for (let j = 0; j < data3.length; j++) {
|
||||
let val = hourProduct==0?'/':(data3[j].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[j][5]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_s';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let hourProduct=that.allValHour = res4[0].total_production;
|
||||
params4.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params4).then((res) => {
|
||||
let data4 = res4;
|
||||
for (let k = 0; k < data4.length; k++) {
|
||||
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[k][4]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
query.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(query).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
let val=0;
|
||||
if(that.allValHour==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValHour).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='煤磨排风机主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='煤磨主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
query1.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
let val=0;
|
||||
if(that.allValDays==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValDays).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='煤磨排风机主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='煤磨主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
query2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
let val=0;
|
||||
if(that.allValMonth==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValMonth).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='煤磨排风机主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='煤磨主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="煤磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -144,6 +147,82 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
// restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量', '台时产量', '运转率', '分布电耗']
|
||||
};
|
||||
let yAxis= [{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '运转率 (%)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 0,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -155,20 +234,21 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217512021835776',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)','/',0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
|
|
@ -179,12 +259,385 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = that.hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.production_hour;
|
||||
that.tableDatas[2][3]=data3.run_hour;
|
||||
that.tableDatas[3][3]=data3.run_rate;
|
||||
that.tableDatas[4][3]=data3.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[4][2]=data4.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//月目标
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup='3346520558031773696';
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='台时产量(t/h)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转时间(h)'){
|
||||
that.tableDatas[2][6]=item5[str];
|
||||
that.tableDatas[2][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转率(%)'){
|
||||
that.tableDatas[3][6]=item5[str];
|
||||
that.tableDatas[3][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[4][6]=item5[str];
|
||||
that.tableDatas[4][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.production_hour;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
that.tableDatas[2][5]=data1.run_hour;
|
||||
that.tableDatas[2][9]=precen(that.tableDatas[2][5],that.tableDatas[2][8])
|
||||
that.tableDatas[3][5]=data1.run_rate;
|
||||
that.tableDatas[3][9]=precen(that.tableDatas[3][5],that.tableDatas[3][8])
|
||||
that.tableDatas[4][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[4][9]=precen(that.tableDatas[4][5],that.tableDatas[4][8])
|
||||
}else{}
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.production_hour;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
that.tableDatas[2][4]=data2.run_hour;
|
||||
that.tableDatas[2][7]=precen(that.tableDatas[2][4],that.tableDatas[2][6])
|
||||
that.tableDatas[3][4]=data2.run_rate;
|
||||
that.tableDatas[3][7]=precen(that.tableDatas[3][4],that.tableDatas[3][6])
|
||||
that.tableDatas[4][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[4][7]=precen(that.tableDatas[4][4],that.tableDatas[4][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
seriesData0[ind] = item.total_production;//总产量
|
||||
seriesData1[ind] = item.production_hour;//台时产量
|
||||
seriesData2[ind] = item.run_rate;//运转率
|
||||
seriesData3[ind] = item.elec_consume_unit;//分布电耗
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [];
|
||||
// debugger;
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [];
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -64,21 +64,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -90,29 +76,103 @@
|
|||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3347217512021835776',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3347217512021835776';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
debugger;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
debugger;
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
arr.push(item.run_rate);
|
||||
arr.push(item.production_cost_unit);
|
||||
//质量
|
||||
arr[6]=item.煤粉_细度_rate_pass!=null?item.煤粉_细度_rate_pass:'/';
|
||||
arr[7]=item.煤粉_水分_rate_pass!=null?item.煤粉_水分_rate_pass:'/';
|
||||
//设备
|
||||
arr[8]=item.煤磨排风机_consume_unit!=null?item.煤磨排风机_consume_unit:'/';
|
||||
|
||||
arr[9]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[10]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[11]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[12]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[13]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[14]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[15]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[16]=item.celec_consume_unit;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr)
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -20,28 +20,32 @@
|
|||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">回转窑工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
<th colspan="7">回转窑工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>总电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item.hours}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<template v-for="(item1,ind) in item" :key="item1">
|
||||
<td v-if="ind==0||ind==1||ind==2||ind==3" class="numCell">{{item1}}</td>
|
||||
<td v-if="ind==4" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
|
||||
<td v-if="ind==5" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
|
||||
<td v-if="ind==6" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -117,6 +121,49 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '15%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'15%',
|
||||
right:'0',
|
||||
orient:'vertical',
|
||||
data:['高温风机', '窑主电机', '篦冷机一室风机电机', '篦冷机二室风机电机', '篦冷机三室风机电机','窑头排风机主电机','充气梁风机(左)电机','充气梁风机(右)电机']
|
||||
};
|
||||
let yAxis= {
|
||||
type: 'value',
|
||||
name: '单位产品分布电耗(KW.h/t)',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
};
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -128,31 +175,32 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217246321065984',
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'高温风机',number:'NM001',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'窑主电机',number:'NM002',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室风机电机',number:'NM003',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机三室风机电机',number:'NM004',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机二室风机电机',number:'NM005',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室充气梁风机(左)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室充气梁风机(右)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'窑头排风机主电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'头煤粉罗茨电机(东、备用)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'尾煤粉罗茨电机(西)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3301',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3303',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3308',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3318',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'高温风机',number:'NM001',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'窑主电机',number:'NM002',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'篦冷机一室风机电机',number:'NM003',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'篦冷机三室风机电机',number:'NM004',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'篦冷机二室风机电机',number:'NM005',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'篦冷机一室充气梁风机(左)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'篦冷机一室充气梁风机(右)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'窑头排风机主电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'头煤粉罗茨电机(东、备用)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'尾煤粉罗茨电机(西)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'空压机3301',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'空压机3303',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'空压机3308',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
// {name:'空压机3318',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
|
|
@ -161,12 +209,464 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
allValHour:0,
|
||||
allValDays:0,
|
||||
allValMonth:0,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '高温风机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '窑主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机一室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机二室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机三室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '窑头排风机主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(左)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(右)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '高温风机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '窑主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机一室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机二室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机三室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '窑头排风机主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(左)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(右)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '高温风机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '窑主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机一室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机二室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '篦冷机三室风机电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '窑头排风机主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(左)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '充气梁风机(右)电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
let month = myDate.getMonth()+1;
|
||||
let days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//本月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let allValMonth =that.allValMonth= res2[0].total_production;//当前条件下的总产量
|
||||
params2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params2).then((res) => {
|
||||
let data2 = res;
|
||||
for (let i = 0; i < data2.length; i++) {
|
||||
that.tableDatas[i]=[];
|
||||
that.tableDatas[i][0]=data2[i].ep_monitored_name;
|
||||
that.tableDatas[i][1]=data2[i].ep_monitored_number;
|
||||
that.tableDatas[i][2]='KW.h';
|
||||
that.tableDatas[i][3]=data2[i].val;
|
||||
let val = allValMonth==0?'/':(data2[i].val/allValMonth).toFixed(2);
|
||||
that.tableDatas[i][6]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res2=>{
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let allValDays =that.allValDays= res3[0].total_production;
|
||||
params3.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params3).then((res) => {
|
||||
let data3 = res3;
|
||||
for (let j = 0; j < data3.length; j++) {
|
||||
let val = allValDays==0?'/':(data3[j].val/allValDays).toFixed(2);
|
||||
that.tableDatas[j][5]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_s';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let hourProduct = that.allValHour=res4[0].total_production;
|
||||
params4.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params4).then((res) => {
|
||||
let data4 = res4;
|
||||
for (let k = 0; k < data4.length; k++) {
|
||||
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[k][4]=val;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
query.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(query).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],
|
||||
seriesData6 = [],seriesData7 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
let val=0;
|
||||
if(that.allValHour==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValHour).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='高温风机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='窑主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室风机电机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机二室风机电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机三室风机电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='窑头排风机主电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(左)电机'){
|
||||
seriesData6[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(右)电机'){
|
||||
seriesData7[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
options.series[7].data=seriesData4;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
query1.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],
|
||||
seriesData6 = [],seriesData7 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
let val=0;
|
||||
if(that.allValDays==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValDays).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='高温风机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='窑主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室风机电机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机二室风机电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机三室风机电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='窑头排风机主电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(左)电机'){
|
||||
seriesData6[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(右)电机'){
|
||||
seriesData7[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
options.series[7].data=seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
query2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],
|
||||
seriesData6 = [],seriesData7 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
let val=0;
|
||||
if(that.allValMonth==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValMonth).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='高温风机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='窑主电机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室风机电机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机二室风机电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机三室风机电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='窑头排风机主电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(左)电机'){
|
||||
seriesData6[ind] = val;
|
||||
}else if(item.equip_name=='篦冷机一室充气梁风机(右)电机'){
|
||||
seriesData7[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
options.series[7].data=seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="回转窑工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -145,6 +148,115 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量', '台时产量', '运转率', '分布电耗','单位产品标煤耗', '成本']
|
||||
};
|
||||
let yAxis= [
|
||||
{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '运转率 ',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 0,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}%'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 60,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '标煤耗',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 120,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '成本(元)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[5]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}/元'
|
||||
}
|
||||
},
|
||||
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -156,25 +268,26 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217246321065984',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品综合电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品标煤耗(kgce/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品综合能耗(kgce/t)',1,1,1,1,1,1,1,1],
|
||||
['成本','电石渣成本(元/吨)',2,2,2,2,2,2,2,2],
|
||||
['产量','台时产量(t/h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)','/',0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品综合电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品标煤耗(kgce/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品综合能耗(kgce/t)',0,0,0,0,0,0,0,0],
|
||||
['成本','单位产品成本(元/吨)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
|
|
@ -184,12 +297,467 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '单位产品标煤耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 4,
|
||||
data: []
|
||||
}
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '单位产品标煤耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 4,
|
||||
data: []
|
||||
}
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '单位产品标煤耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 4,
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = that.hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.production_hour;
|
||||
that.tableDatas[2][3]=data3.run_hour;
|
||||
that.tableDatas[3][3]=data3.run_rate;
|
||||
that.tableDatas[4][3]=data3.elec_consume_unit;
|
||||
that.tableDatas[5][3]=data3.celec_consume_unit;
|
||||
that.tableDatas[6][3]=data3.coal_consume_unit;
|
||||
that.tableDatas[7][3]=data3.cen_consume_unit;
|
||||
that.tableDatas[8][3]=data3.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[4][2]=data4.elec_consume_unit;
|
||||
that.tableDatas[5][2]=data4.celec_consume_unit;
|
||||
that.tableDatas[6][2]=data4.coal_consume_unit;
|
||||
that.tableDatas[7][2]=data4.cen_consume_unit;
|
||||
that.tableDatas[8][2]=data4.production_cost_unit;
|
||||
}
|
||||
})
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup='3346520558031773696';
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='台时产量(t/h)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转时间(h)'){
|
||||
that.tableDatas[2][6]=item5[str];
|
||||
that.tableDatas[2][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转率(%)'){
|
||||
that.tableDatas[3][6]=item5[str];
|
||||
that.tableDatas[3][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[4][6]=item5[str];
|
||||
that.tableDatas[4][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品综合电耗(KW·h/t)'){
|
||||
that.tableDatas[5][6]=item5[str];
|
||||
that.tableDatas[5][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品标煤耗(kgce/t)'){
|
||||
that.tableDatas[6][6]=item5[str];
|
||||
that.tableDatas[6][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品综合能耗(kgce/t)'){
|
||||
that.tableDatas[7][6]=item5[str];
|
||||
that.tableDatas[7][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品成本(元/吨)'){
|
||||
that.tableDatas[8][6]=item5[str];
|
||||
that.tableDatas[8][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.production_hour;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
that.tableDatas[2][5]=data1.run_hour;
|
||||
that.tableDatas[2][9]=precen(that.tableDatas[2][5],that.tableDatas[2][8])
|
||||
that.tableDatas[3][5]=data1.run_rate;
|
||||
that.tableDatas[3][9]=precen(that.tableDatas[3][5],that.tableDatas[3][8])
|
||||
that.tableDatas[4][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[4][9]=precen(that.tableDatas[4][5],that.tableDatas[4][8])
|
||||
that.tableDatas[5][5]=data1.celec_consume_unit;
|
||||
that.tableDatas[5][9]=precen(that.tableDatas[5][5],that.tableDatas[5][8])
|
||||
that.tableDatas[6][5]=data1.coal_consume_unit;
|
||||
that.tableDatas[6][9]=precen(that.tableDatas[6][5],that.tableDatas[6][8])
|
||||
that.tableDatas[7][5]=data1.cen_consume_unit;
|
||||
that.tableDatas[7][9]=precen(that.tableDatas[7][5],that.tableDatas[7][8])
|
||||
that.tableDatas[8][5]=data1.production_cost_unit;
|
||||
that.tableDatas[8][9]=precen(that.tableDatas[8][5],that.tableDatas[8][8])
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.production_hour;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
that.tableDatas[2][4]=data2.run_hour;
|
||||
that.tableDatas[2][7]=precen(that.tableDatas[2][4],that.tableDatas[2][6])
|
||||
that.tableDatas[3][4]=data2.run_rate;
|
||||
that.tableDatas[3][7]=precen(that.tableDatas[3][4],that.tableDatas[3][6])
|
||||
that.tableDatas[4][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[4][7]=precen(that.tableDatas[4][4],that.tableDatas[4][6])
|
||||
that.tableDatas[5][4]=data2.celec_consume_unit;
|
||||
that.tableDatas[5][7]=precen(that.tableDatas[5][4],that.tableDatas[5][6])
|
||||
that.tableDatas[6][4]=data2.coal_consume_unit;
|
||||
that.tableDatas[6][7]=precen(that.tableDatas[6][4],that.tableDatas[6][6])
|
||||
that.tableDatas[7][4]=data2.cen_consume_unit;
|
||||
that.tableDatas[7][7]=precen(that.tableDatas[7][4],that.tableDatas[7][6])
|
||||
that.tableDatas[8][4]=data2.production_cost_unit;
|
||||
that.tableDatas[8][7]=precen(that.tableDatas[8][4],that.tableDatas[8][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [],seriesData5 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = item.coal_consume_unit;
|
||||
seriesData5[ind] = item.production_cost_unit;
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData5;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [],seriesData5 = [];
|
||||
// debugger;
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = item.coal_consume_unit;
|
||||
seriesData5[ind] = item.production_cost_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData5;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [],seriesData5 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.elec_consume_unit;
|
||||
seriesData4[ind] = item.coal_consume_unit;
|
||||
seriesData5[ind] = item.production_cost_unit;
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData5;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
<th>成本</th>
|
||||
<th colspan="8">质量</th>
|
||||
<th colspan="19">产品单位能耗</th>
|
||||
<th rowspan="2">得分</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总产量(t)</th>
|
||||
|
|
@ -61,8 +62,6 @@
|
|||
<th>水分(%)</th>
|
||||
<th>立升重(%)</th>
|
||||
<th>f-CaO(%)</th>
|
||||
<th>细度(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>高温风机单位产品标煤耗(kgce/t)</th>
|
||||
<th>篦冷机一室风机电机单位产品标煤耗(kgce/t)</th>
|
||||
<th>篦冷机三室风机电机单位产品标煤耗(kgce/t)</th>
|
||||
|
|
@ -85,39 +84,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -129,26 +96,126 @@
|
|||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3347217246321065984',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3347217246321065984';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
debugger;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
debugger;
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
arr.push(item.run_rate);
|
||||
arr.push(item.production_cost_unit);
|
||||
//质量
|
||||
arr[6]=item.入窑生料_CaO_rate_pass!=null?item.入窑生料_CaO_rate_pass:'/';
|
||||
arr[7]=item.入窑生料_Fe2O3_rate_pass!=null?item.入窑生料_Fe2O3_rate_pass:'/';
|
||||
arr[8]=item.入窑生料_细度_rate_pass!=null?item.入窑生料_细度_rate_pass:'/';
|
||||
arr[9]=item.入窑生料_水分_rate_pass!=null?item.入窑生料_水分_rate_pass:'/';
|
||||
arr[10]=item.熟料_立升重_rate_pass!=null?item.熟料_立升重_rate_pass:'/';
|
||||
arr[11]=item.熟料_fCaO_rate_pass!=null?item.熟料_fCaO_rate_pass:'/';
|
||||
//设备
|
||||
arr[12]=item.高温风机_consume_unit!=null?item.高温风机_consume_unit:'/';
|
||||
arr[13]=item.篦冷机一室风机_consume_unit!=null?item.篦冷机一室风机_consume_unit:'/';
|
||||
arr[14]=item.篦冷机三室风机_consume_unit!=null?item.篦冷机三室风机_consume_unit:'/';
|
||||
arr[15]=item.篦冷机二室风机_consume_unit!=null?item.篦冷机二室风机_consume_unit:'/';
|
||||
arr[16]=item.窑头排风机_consume_unit!=null?item.窑头排风机_consume_unit:'/';
|
||||
|
||||
//煤耗
|
||||
arr[17]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[18]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[19]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[20]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[21]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[22]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[23]=item.celec_consume_unit;//同比增长率(%)
|
||||
//电耗
|
||||
arr[24]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[25]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[26]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre1 = 0,huanbi1 = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre1 = 12;
|
||||
huanbi1 = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre1=ind-1;
|
||||
huanbi1 = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[27]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[28]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[29]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[30]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[31]=item.celec_consume_unit;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr)
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
@ -180,6 +247,6 @@
|
|||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
/* width: 1075px; */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -20,28 +20,32 @@
|
|||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">水泥磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
<th colspan="7">水泥磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>总电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<template v-for="(item1,ind) in item" :key="item1">
|
||||
<td v-if="ind==0||ind==1||ind==2||ind==3" class="numCell">{{item1}}</td>
|
||||
<td v-if="ind==4" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
|
||||
<td v-if="ind==5" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
|
||||
<td v-if="ind==6" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -117,6 +121,49 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '15%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'15%',
|
||||
right:'0',
|
||||
orient:'vertical',
|
||||
data:['循环风机1906', '系统风机', '水平涡流选粉机', '水泥磨主电机', '辊压机动辊电机','辊压机定辊电机','新增磨尾风机']
|
||||
};
|
||||
let yAxis= {
|
||||
type: 'value',
|
||||
name: '单位产品分布电耗(KW.h/t)',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
};
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -128,26 +175,27 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217651339837440',
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'循环风机1906',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'系统风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水平涡流选粉机1915电耗',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥磨主电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'辊压机动辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'辊压机定辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'新增磨尾风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥1#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥2#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'循环风机1906',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'系统风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'水平涡流选粉机1915电耗',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'水泥磨主电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'辊压机动辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'辊压机定辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'新增磨尾风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'水泥1#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
// {name:'水泥2#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
|
|
@ -156,12 +204,438 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
allValHour:0,
|
||||
allValDays:0,
|
||||
allValMonth:0,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '循环风机1906',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '系统风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水平涡流选粉机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水泥磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机动辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机定辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '新增磨尾风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '循环风机1906',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '系统风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水平涡流选粉机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水泥磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机动辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机定辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '新增磨尾风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '循环风机1906',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '系统风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水平涡流选粉机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '水泥磨主电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机动辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '辊压机定辊电机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '新增磨尾风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
let month = myDate.getMonth()+1;
|
||||
let days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//本月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let allValMonth =that.allValMonth = res2[0].total_production;//当前条件下的总产量
|
||||
params2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params2).then((res) => {
|
||||
let data2 = res;
|
||||
for (let i = 0; i < data2.length; i++) {
|
||||
that.tableDatas[i]=[];
|
||||
that.tableDatas[i][0]=data2[i].ep_monitored_name;
|
||||
that.tableDatas[i][1]=data2[i].ep_monitored_number;
|
||||
that.tableDatas[i][2]='KW.h';
|
||||
that.tableDatas[i][3]=data2[i].val;
|
||||
let val = allValMonth==0?'/':(data2[i].val/allValMonth).toFixed(2);
|
||||
that.tableDatas[i][6]=val;
|
||||
}
|
||||
debugger;
|
||||
console.log(that.tableDatas)
|
||||
})
|
||||
}
|
||||
}).then(res2=>{
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let allValDays=that.allValDays = res3[0].total_production;
|
||||
params3.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params3).then((res) => {
|
||||
let data3 = res3;
|
||||
for (let j = 0; j < data3.length; j++) {
|
||||
let val = allValDays==0?'/':(data3[j].val/allValDays).toFixed(2);
|
||||
that.tableDatas[j][5]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_s';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let hourProduct = that.allValHour = res4[0].total_production;
|
||||
params4.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params4).then((res) => {
|
||||
let data4 = res4;
|
||||
for (let k = 0; k < data4.length; k++) {
|
||||
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[k][4]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
query.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(query).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],seriesData6 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
let val=0;
|
||||
if(that.allValHour==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValHour).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='循环风机1906'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='系统风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='水平涡流选粉机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='水泥磨主电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='辊压机动辊电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='辊压机定辊电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='新增磨尾风机'){
|
||||
seriesData6[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
query1.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],seriesData6 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
let val=0;
|
||||
if(that.allValDays==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValDays).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='循环风机1906'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='系统风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='水平涡流选粉机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='水泥磨主电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='辊压机动辊电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='辊压机定辊电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='新增磨尾风机'){
|
||||
seriesData6[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
query2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],
|
||||
seriesData3 = [],seriesData4 = [],seriesData5 = [],seriesData6 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
let val=0;
|
||||
if(that.allValMonth==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValMonth).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='循环风机1906'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='系统风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='水平涡流选粉机'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='水泥磨主电机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='辊压机动辊电机'){
|
||||
seriesData4[ind] = val;
|
||||
}else if(item.equip_name=='辊压机定辊电机'){
|
||||
seriesData5[ind] = val;
|
||||
}else if(item.equip_name=='新增磨尾风机'){
|
||||
seriesData6[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
options.series[5].data=seriesData4;
|
||||
options.series[6].data=seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -144,6 +147,97 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量', '台时产量', '运转率', '分布电耗', '成本']
|
||||
};
|
||||
let yAxis= [{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '运转率 (%)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 0,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '成本(元)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -155,23 +249,24 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3347217651339837440',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)','/',0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品综合能耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品综合能耗(kce/t)',0,0,0,0,0,0,0,0],
|
||||
['成本','单位产品成本(元/吨)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
|
|
@ -181,12 +276,427 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = that.hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.production_hour;
|
||||
that.tableDatas[2][3]=data3.run_hour;
|
||||
that.tableDatas[3][3]=data3.run_rate;
|
||||
that.tableDatas[4][3]=data3.elec_consume_unit;
|
||||
that.tableDatas[5][3]=data3.cen_consume_unit;
|
||||
that.tableDatas[6][3]=data3.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[4][2]=data4.elec_consume_unit;
|
||||
that.tableDatas[5][2]=data4.cen_consume_unit;
|
||||
that.tableDatas[6][2]=data4.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//月目标
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup=that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='台时产量(t/h)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转时间(h)'){
|
||||
that.tableDatas[2][6]=item5[str];
|
||||
that.tableDatas[2][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转率(%)'){
|
||||
that.tableDatas[3][6]=item5[str];
|
||||
that.tableDatas[3][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[4][6]=item5[str];
|
||||
that.tableDatas[4][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品综合能耗(kgce/t)'){
|
||||
that.tableDatas[5][6]=item5[str];
|
||||
that.tableDatas[5][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品成本(元/吨)'){
|
||||
that.tableDatas[6][6]=item5[str];
|
||||
that.tableDatas[6][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.production_hour;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
that.tableDatas[2][5]=data1.run_hour;
|
||||
that.tableDatas[2][9]=precen(that.tableDatas[2][5],that.tableDatas[2][8])
|
||||
that.tableDatas[3][5]=data1.run_rate;
|
||||
that.tableDatas[3][9]=precen(that.tableDatas[3][5],that.tableDatas[3][8])
|
||||
that.tableDatas[4][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[4][9]=precen(that.tableDatas[4][5],that.tableDatas[4][8])
|
||||
that.tableDatas[5][5]=data1.cen_consume_unit;
|
||||
that.tableDatas[5][9]=precen(that.tableDatas[5][5],that.tableDatas[5][8])
|
||||
that.tableDatas[6][5]=data1.production_cost_unit;
|
||||
that.tableDatas[6][9]=precen(that.tableDatas[6][5],that.tableDatas[6][8])
|
||||
}else{}
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.production_hour;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
that.tableDatas[2][4]=data2.run_hour;
|
||||
that.tableDatas[2][7]=precen(that.tableDatas[2][4],that.tableDatas[2][6])
|
||||
that.tableDatas[3][4]=data2.run_rate;
|
||||
that.tableDatas[3][7]=precen(that.tableDatas[3][4],that.tableDatas[3][6])
|
||||
that.tableDatas[4][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[4][7]=precen(that.tableDatas[4][4],that.tableDatas[4][6])
|
||||
that.tableDatas[5][4]=data1.cen_consume_unit;
|
||||
that.tableDatas[5][7]=precen(that.tableDatas[5][4],that.tableDatas[5][6])
|
||||
that.tableDatas[6][4]=data1.production_cost_unit;
|
||||
that.tableDatas[6][7]=precen(that.tableDatas[6][4],that.tableDatas[6][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
// debugger;
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -70,24 +70,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -99,26 +82,103 @@
|
|||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3347217651339837440',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3346520558031773696';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
debugger;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
arr.push(item.run_rate);
|
||||
arr.push(item.production_cost_unit);
|
||||
//质量
|
||||
arr[6]=item.出磨水泥_比表面积_rate_pass!=null?item.出磨水泥_比表面积_rate_pass:'/';
|
||||
arr[7]=item.出磨水泥_SO3_rate_pass!=null?item.出磨水泥_SO3_rate_pass:'/';
|
||||
arr[8]=item.出磨水泥_掺量_rate_pass!=null?item.出磨水泥_掺量_rate_pass:'/';
|
||||
//设备
|
||||
arr[9]=item.循环风机1906_consume_unit!=null?item.循环风机1906_consume_unit:'/';
|
||||
arr[10]=item.系统风机_consume_unit!=null?item.系统风机_consume_unit:'/';
|
||||
arr[11]=item.水平涡流选粉机1915_consume_unit!=null?item.水平涡流选粉机1915_consume_unit:'/';
|
||||
arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
|
||||
|
||||
arr[13]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[14]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[15]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[16]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[17]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[18]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[19]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[20]=item.celec_consume_unit;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,187 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">水泥包装工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item.hours}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'烘干破主电机',number:'NM001',unit:'KW·h/t',hours:'120',days:'2000',month:'60000'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -49,6 +49,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -143,6 +145,64 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量','分布电耗']
|
||||
};
|
||||
let yAxis= [{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -154,18 +214,22 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
query: {
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
|
|
@ -175,12 +239,276 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[1][5]=data1.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[1][4]=data2.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[1][2]=data4.elec_consume_unit;
|
||||
}
|
||||
})
|
||||
//月目标
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup='3346520558031773696';
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
debugger;
|
||||
console.log(str,item5[str])
|
||||
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
|
||||
}
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [];
|
||||
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">电水泥包装工段班组月度对比分析</th>
|
||||
<th colspan="11">电水泥包装工段班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
|
|
@ -52,19 +52,11 @@
|
|||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
<th>得分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -75,27 +67,91 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3346520558031773696';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
|
||||
arr[3]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[4]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[5]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[6]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[7]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[8]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[9]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[10]=item.celec_consume_unit;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr)
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@
|
|||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:deptId ="deptId"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
|
|
@ -193,6 +194,7 @@ import otherDialog from "./other_form.vue";
|
|||
query: {
|
||||
mgroup:'3346520558031773696',
|
||||
},
|
||||
deptId :"3345780809943797760",
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
@ -210,10 +212,13 @@ import otherDialog from "./other_form.vue";
|
|||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
teamOptions:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
mounted(){
|
||||
this.getTeam();
|
||||
},
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
|
|
@ -230,6 +235,14 @@ import otherDialog from "./other_form.vue";
|
|||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
getTeam(){
|
||||
let form ={};
|
||||
form.page = 0;
|
||||
form.belong_dept = this.deptId;
|
||||
this.$API.mtm.team.list.req(form).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
//质量检验
|
||||
sflog_check(row){
|
||||
this.dialog.check = true;
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@
|
|||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.shift_name=='夜班'">
|
||||
<el-form-item label="煤粉热值">
|
||||
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
|
|
@ -96,6 +101,13 @@
|
|||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
props: {
|
||||
deptId: {
|
||||
// 接受外部v-model传入的值
|
||||
type: [String],
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
|
@ -131,7 +143,12 @@
|
|||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
debugger;
|
||||
let form ={};
|
||||
form.page = 0;
|
||||
form.belong_dept = this.deptId;
|
||||
debugger;
|
||||
this.$API.mtm.team.list.req(form).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
|
|
@ -166,6 +183,7 @@
|
|||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
obj.pcoal_heat = this.form.pcoal_heat;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
|
|
|
|||
|
|
@ -20,30 +20,34 @@
|
|||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">原料磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
<th colspan="7">原料磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>总电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<template v-for="(item1,ind) in item" :key="item1">
|
||||
<td v-if="ind==0||ind==1||ind==2||ind==3" class="numCell">{{item1}}</td>
|
||||
<td v-if="ind==4" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
|
||||
<td v-if="ind==5" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
|
||||
<td v-if="ind==6" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<sc-dialog v-model="chartShow" draggable>
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
|
@ -117,6 +121,47 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['立磨主电机', '循环风机', '烘干破主', '废气风机', '尾排风机']
|
||||
};
|
||||
let yAxis= {
|
||||
type: 'value',
|
||||
name: '单位产品分布电耗(KW.h/t)',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
};
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -128,24 +173,25 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3346520558031773696',
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'反击式破',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'立磨主电',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'循环风机',number:'NM003',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'烘干破主',number:'NM004',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'废气风机',number:'NM005',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'尾排风机',number:'NM006',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
['立磨主电机','','KW.h','','','',''],
|
||||
['循环风机','','KW.h','','','',''],
|
||||
['烘干破主','','KW.h','','','',''],
|
||||
['废气风机','','KW.h','','','',''],
|
||||
['尾排风机','','KW.h','','','',''],
|
||||
],
|
||||
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
|
|
@ -153,12 +199,384 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
allValHour:0,
|
||||
allValDays:0,
|
||||
allValMonth:0,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '立磨主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '循环风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '烘干破主',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '废气风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '尾排风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '立磨主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '循环风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '烘干破主',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '废气风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '尾排风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '立磨主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '循环风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '烘干破主',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '废气风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '尾排风机',
|
||||
type: 'bar',
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = that.hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//本月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let hourProduct=that.allValMonth = res2[0].total_production;//当前条件下的总产量
|
||||
params2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params2).then((res) => {
|
||||
let data2 = res;
|
||||
for (let i = 0; i < data2.length; i++) {
|
||||
that.tableDatas[i]=[];
|
||||
that.tableDatas[i][0]=data2[i].ep_monitored_name;
|
||||
that.tableDatas[i][1]=data2[i].ep_monitored_number;
|
||||
that.tableDatas[i][2]='KW.h';
|
||||
that.tableDatas[i][3]=data2[i].val;
|
||||
let val = hourProduct==0?'/':(data2[i].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[i][6]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res2=>{
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let hourProduct=that.allValDays = res3[0].total_production;
|
||||
params3.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params3).then((res) => {
|
||||
let data3 = res3;
|
||||
for (let j = 0; j < data3.length; j++) {
|
||||
let val = hourProduct==0?'/':(data3[j].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[j][5]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_s';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let hourProduct=that.allValHour= res4[0].total_production;
|
||||
params4.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params4).then((res) => {
|
||||
let data4 = res4;
|
||||
for (let k = 0; k < data4.length; k++) {
|
||||
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[k][4]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
query.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(query).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
let val=0;
|
||||
if(that.allValHour==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValHour).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='立磨主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='循环风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='烘干破主'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='废气风机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='尾排风机'){
|
||||
seriesData4[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
query1.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
let val=0;
|
||||
if(that.allValDays==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValDays).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='立磨主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='循环风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='烘干破主'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='废气风机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='尾排风机'){
|
||||
seriesData4[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
query2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
let val=0;
|
||||
if(that.allValMonth==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValMonth).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='立磨主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}else if(item.equip_name=='循环风机'){
|
||||
seriesData1[ind] = val;
|
||||
}else if(item.equip_name=='烘干破主'){
|
||||
seriesData2[ind] = val;
|
||||
}else if(item.equip_name=='废气风机'){
|
||||
seriesData3[ind] = val;
|
||||
}else if(item.equip_name=='尾排风机'){
|
||||
seriesData4[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
|
|
|||
|
|
@ -50,7 +50,11 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="原料磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
|
|
@ -129,6 +133,7 @@
|
|||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
|
|
@ -144,6 +149,100 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
// alwaysShowContent:true,
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
// restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量', '台时产量', '运转率', '分布电耗', '成本']
|
||||
};
|
||||
let yAxis= [{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '运转率 (%)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 0,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '成本(元)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -155,21 +254,22 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionHour:{},
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
hours:1,
|
||||
query: {
|
||||
mgroup:'3346520558031773696',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)','/',0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)','/',0,0,0,0,0,0,0],
|
||||
['能耗','生料分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['成本','生料成本(元/吨)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
|
|
@ -180,12 +280,431 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
option3:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
// alignWithLabel: true
|
||||
},
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 3,
|
||||
data: []
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
this.$nextTick(() => {
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = that.hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.production_hour;
|
||||
that.tableDatas[2][3]=data3.run_hour;
|
||||
that.tableDatas[3][3]=data3.run_rate;
|
||||
that.tableDatas[4][3]=data3.elec_consume_unit;
|
||||
that.tableDatas[5][3]=data3.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[4][2]=data4.elec_consume_unit;
|
||||
that.tableDatas[5][2]=data4.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//月目标
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup='3346520558031773696';
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
debugger;
|
||||
console.log(str,item5[str])
|
||||
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='台时产量(t/h)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转时间(h)'){
|
||||
that.tableDatas[2][6]=item5[str];
|
||||
that.tableDatas[2][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='运转率(%)'){
|
||||
that.tableDatas[3][6]=item5[str];
|
||||
that.tableDatas[3][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[4][6]=item5[str];
|
||||
that.tableDatas[4][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品成本(元/吨)'){
|
||||
that.tableDatas[5][6]=item5[str];
|
||||
that.tableDatas[5][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.production_hour;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
that.tableDatas[2][5]=data1.run_hour;
|
||||
that.tableDatas[2][9]=precen(that.tableDatas[2][5],that.tableDatas[2][8])
|
||||
that.tableDatas[3][5]=data1.run_rate;
|
||||
that.tableDatas[3][9]=precen(that.tableDatas[3][5],that.tableDatas[3][8])
|
||||
that.tableDatas[4][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[4][9]=precen(that.tableDatas[4][5],that.tableDatas[4][8])
|
||||
that.tableDatas[5][5]=data1.production_cost_unit;
|
||||
that.tableDatas[5][9]=precen(that.tableDatas[5][5],that.tableDatas[5][8])
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.production_hour;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
that.tableDatas[2][4]=data2.run_hour;
|
||||
that.tableDatas[2][7]=precen(that.tableDatas[2][4],that.tableDatas[2][6])
|
||||
that.tableDatas[3][4]=data2.run_rate;
|
||||
that.tableDatas[3][7]=precen(that.tableDatas[3][4],that.tableDatas[3][6])
|
||||
that.tableDatas[4][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[4][7]=precen(that.tableDatas[4][4],that.tableDatas[4][6])
|
||||
that.tableDatas[5][4]=data2.production_cost_unit;
|
||||
that.tableDatas[5][7]=precen(that.tableDatas[5][4],that.tableDatas[5][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取小时数据
|
||||
getHourData(){
|
||||
let that = this;
|
||||
let query = {};
|
||||
query.page = 0;
|
||||
query.year_s = that.year;
|
||||
query.month_s = that.month;
|
||||
query.day_s = that.days;
|
||||
query.type = 'hour_s';
|
||||
query.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.hour;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let hourXAxis = [];
|
||||
for (let i = 1; i <= that.hours; i++) {
|
||||
let item = i+'时'
|
||||
hourXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = hourXAxis;
|
||||
that.optionHour = options;
|
||||
})
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
// debugger;
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
// debugger;
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
// debugger;
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
|
||||
console.log(response)
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_hour;
|
||||
seriesData2[ind] = item.run_rate;
|
||||
seriesData3[ind] = item.production_cost_unit;
|
||||
seriesData4[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option3};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
options.series[3].data=seriesData3;
|
||||
options.series[4].data=seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
@ -200,6 +719,9 @@
|
|||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
getData(){
|
||||
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
|
|
|
|||
|
|
@ -2,25 +2,12 @@
|
|||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
></el-button> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
|
|
@ -39,7 +26,7 @@
|
|||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="19">原料磨工段班组月度对比分析</th>
|
||||
<th colspan="24">原料磨工段班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
@ -47,8 +34,9 @@
|
|||
<th colspan="2">产量</th>
|
||||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="4">质量</th>
|
||||
<th colspan="7">单位产品电耗</th>
|
||||
<th colspan="7">质量</th>
|
||||
<th colspan="10">单位产品电耗</th>
|
||||
<th rowspan="2">得分</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总产量(t)</th>
|
||||
|
|
@ -58,34 +46,25 @@
|
|||
<th>细度(%)</th>
|
||||
<th>Fe₂O₃(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>细度(%)</th>
|
||||
<th>Fe₂O₃(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>CaO(%)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>循环风机单位产品电耗(KW·h/t)</th>
|
||||
<th>尾排风机单位产品电耗(KW·h/t)</th>
|
||||
<th>废气风机单位产品电耗(KW·h/t)</th>
|
||||
|
||||
<th>当期值(kW·h/h)</th>
|
||||
<th>目标值(kW·h/h)</th>
|
||||
<th>当期与目标差值(kW·h/h)</th>
|
||||
<th>环期值(kW·h/h)</th>
|
||||
<th>当期与环期差值(kW·h/h)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -97,26 +76,109 @@
|
|||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3346520558031773696',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3346520558031773696';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
debugger;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
debugger;
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
arr.push(item.run_rate);
|
||||
arr.push(item.production_cost_unit);
|
||||
//质量
|
||||
arr[6]=item.辅料_细度_rate_pass!=null?item.辅料_细度_rate_pass:'/';
|
||||
arr[7]=item.辅料_Fe2O3_rate_pass!=null?item.辅料_Fe2O3_rate_pass:'/';
|
||||
arr[8]=item.辅料_水分_rate_pass!=null?item.辅料_水分_rate_pass:'/';
|
||||
arr[9]=item.干混生料_细度_rate_pass!=null?item.干混生料_细度_rate_pass:'/';
|
||||
arr[10]=item.干混生料_Fe2O3_rate_pass!=null?item.干混生料_Fe2O3_rate_pass:'/';
|
||||
arr[11]=item.干混生料_水分_rate_pass!=null?item.干混生料_水分_rate_pass:'/';
|
||||
arr[12]=item.干混生料_CaO_rate_pass!=null?item.干混生料_CaO_rate_pass:'/';
|
||||
//设备
|
||||
arr[13]=item.循环风机_consume_unit!=null?item.循环风机_consume_unit:'/';
|
||||
arr[13]=item.尾排风机_consume_unit!=null?item.尾排风机_consume_unit:'/';
|
||||
arr[13]=item.废气风机_consume_unit!=null?item.废气风机_consume_unit:'/';
|
||||
//
|
||||
arr[16]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[17]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[18]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[19]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[20]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[21]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[22]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[23]=item.celec_consume_unit;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr)
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,28 +20,31 @@
|
|||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">电石渣工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
<th colspan="7">电石渣工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>总电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)">{{item.hours}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<template v-for="(item1,ind) in item" :key="item1">
|
||||
<td v-if="ind==0||ind==1||ind==2||ind==3" class="numCell">{{item1}}</td>
|
||||
<td v-if="ind==4" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
|
||||
<td v-if="ind==5" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
|
||||
<td v-if="ind==6" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
|
||||
</template>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -117,6 +120,47 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const colors =['#647bfe'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['烘干破主电机']
|
||||
};
|
||||
let yAxis= {
|
||||
type: 'value',
|
||||
name: '单位产品分布电耗(KW.h/t)',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#647bfe'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
};
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
|
|
@ -128,18 +172,16 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
query: {
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'烘干破主电机',number:'NM001',unit:'KW·h/t',hours:'120',days:'2000',month:'60000'},
|
||||
// {name:'烘干破主电机',number:'NM001',unit:'KW·h/t',hours:'120',days:'2000',month:'60000'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
|
|
@ -148,12 +190,223 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
allValDays:0,
|
||||
allValMonth:0,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:{
|
||||
name: '烘干破主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
}
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:{
|
||||
name: '烘干破主电机',
|
||||
type: 'bar',
|
||||
data:[]
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
let month = myDate.getMonth()+1;
|
||||
let days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//本月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let allValMonth=that.allValMonth = res2[0].total_production;//当前条件下的总产量
|
||||
params2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params2).then((res) => {
|
||||
let data2 = res;
|
||||
for (let i = 0; i < data2.length; i++) {
|
||||
that.tableDatas[i]=[];
|
||||
that.tableDatas[i][0]=data2[i].ep_monitored_name;
|
||||
that.tableDatas[i][1]=data2[i].ep_monitored_number;
|
||||
that.tableDatas[i][2]='KW.h';
|
||||
that.tableDatas[i][3]=data2[i].val;
|
||||
let val = allValMonth==0?'/':(data2[i].val/allValMonth).toFixed(2);
|
||||
that.tableDatas[i][6]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res2=>{
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let allValDays=that.allValDays = res3[0].total_production;
|
||||
params3.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params3).then((res) => {
|
||||
let data3 = res3;
|
||||
for (let j = 0; j < data3.length; j++) {
|
||||
let val = allValDays==0?'/':(data3[j].val/allValDays).toFixed(2);
|
||||
that.tableDatas[j][5]=val;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_s';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let hourProduct = res4[0].total_production;
|
||||
params4.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.mpoint.stat.req(params4).then((res) => {
|
||||
let data4 = res4;
|
||||
for (let k = 0; k < data4.length; k++) {
|
||||
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
|
||||
that.tableDatas[k][4]=val;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
query1.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.day_s;
|
||||
let val=0;
|
||||
if(that.allValDays==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValDays).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='烘干破主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series.data=seriesData0;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
query2.mpoint__ep_monitored__power_kw__gte = 100;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
let val=0;
|
||||
if(that.allValMonth==0){
|
||||
val = ''
|
||||
}else{
|
||||
val = (item.val/that.allValMonth).toFixed(2);
|
||||
}
|
||||
if(item.equip_name=='烘干破主电机'){
|
||||
seriesData0[ind] = val;
|
||||
}
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series.data=seriesData0;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
|
||||
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="电石渣工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
|
|
@ -145,6 +147,82 @@
|
|||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const colors =['#647bfe','#cbd3fe','#91CC75','#EE6666'];
|
||||
let tooltip= {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
},
|
||||
confine:false,
|
||||
showContent: true,
|
||||
triggerOn:"mousemove",
|
||||
// alwaysShowContent:true,
|
||||
};
|
||||
let grid={
|
||||
right: '10%',
|
||||
left:'10%',
|
||||
top:'15%'
|
||||
};
|
||||
let toolbox={
|
||||
right:'5%',
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
// restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
};
|
||||
let legend= {
|
||||
top:'5%',
|
||||
data:['总产量', '分布电耗', '成本']
|
||||
};
|
||||
let yAxis= [{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '成本(元)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
];
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
|
|
@ -154,19 +232,18 @@
|
|||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
optionDay:{},
|
||||
optionMonth:{},
|
||||
year:2023,
|
||||
month:1,
|
||||
days:1,
|
||||
query: {
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['成本','电石渣成本(元/吨)',2,2,2,2,2,2,2,2],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['成本','电石渣成本(元/吨)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
|
|
@ -176,12 +253,272 @@
|
|||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
option1:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend:legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis:yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
},
|
||||
option2:{
|
||||
color: colors,
|
||||
tooltip:tooltip,
|
||||
grid: grid,
|
||||
toolbox: toolbox,
|
||||
legend: legend,
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 5,
|
||||
inside: true,
|
||||
},
|
||||
data: []
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series:[
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data:[]
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: '成本',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: []
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
function precen(a,b){
|
||||
if(b!==0&&b!==null&&a!==null){
|
||||
return a/b
|
||||
}else{
|
||||
return '/'
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year =that.year = myDate.getFullYear();
|
||||
let month = that.month = myDate.getMonth()+1;
|
||||
let days = that.days = myDate.getDate();
|
||||
let hours = myDate.getHours();
|
||||
let timeDate = myDate.getTime();
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,month_d = month,days_d = days;
|
||||
if(hours<21){//21点前,查找昨日数据为前一天数据
|
||||
let newDate = timeDate- dayTime;
|
||||
let lastDate = new Date(newDate);
|
||||
year_d = lastDate.getFullYear();
|
||||
month_d = lastDate.getMonth()+1;
|
||||
days_d = lastDate.getDate();
|
||||
}
|
||||
//上一小时的计算
|
||||
let hourTime = timeDate - 3600000;
|
||||
let hourDate = new Date(hourTime);
|
||||
let year_h = hourDate.getFullYear();
|
||||
let month_h = hourDate.getMonth()+1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = 'day_s';
|
||||
params3.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if(res3.length>0){
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3]=data3.total_production;
|
||||
that.tableDatas[1][3]=data3.elec_consume_unit;
|
||||
that.tableDatas[2][3]=data3.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = 'hour_st';
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if(res4.length>0){
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2]=data4.total_production;
|
||||
that.tableDatas[1][2]=data4.elec_consume_unit;
|
||||
that.tableDatas[2][2]=data4.production_cost_unit;
|
||||
}
|
||||
})
|
||||
//月目标
|
||||
let params5 = {};
|
||||
params5.page=0;
|
||||
params5.mgroup='3346520558031773696';
|
||||
this.$API.mtm.goal.list.req(params5).then((res5) => {
|
||||
if(res5.length>0){
|
||||
let data5 = res5;
|
||||
data5.forEach(item5=>{
|
||||
let str = 'goal_val_'+that.month;
|
||||
if(item5.goal_cate_name=='总产量(t)'){
|
||||
that.tableDatas[0][6]=item5[str];
|
||||
that.tableDatas[0][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
||||
that.tableDatas[1][6]=item5[str];
|
||||
that.tableDatas[1][8]=item5.goal_val;
|
||||
}else if(item5.goal_cate_name=='单位产品成本(元/吨)'){
|
||||
that.tableDatas[2][6]=item5[str];
|
||||
that.tableDatas[2][8]=item5.goal_val;
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(res=>{
|
||||
//年
|
||||
let params1 = {};
|
||||
params1.page = 0;
|
||||
params1.year_s = year;
|
||||
params1.type = 'year_s';
|
||||
params1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][5]=data1.total_production;
|
||||
that.tableDatas[0][9]=precen(that.tableDatas[0][5],that.tableDatas[0][8])
|
||||
that.tableDatas[1][5]=data1.elec_consume_unit;
|
||||
that.tableDatas[1][9]=precen(that.tableDatas[1][5],that.tableDatas[1][8])
|
||||
that.tableDatas[2][5]=data1.production_cost_unit;
|
||||
that.tableDatas[2][9]=precen(that.tableDatas[2][5],that.tableDatas[2][8])
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = 'month_s';
|
||||
params2.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][4]=data2.total_production;
|
||||
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
|
||||
that.tableDatas[1][4]=data2.elec_consume_unit;
|
||||
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
|
||||
that.tableDatas[2][4]=data2.production_cost_unit;
|
||||
that.tableDatas[2][7]=precen(that.tableDatas[2][4],that.tableDatas[2][6])
|
||||
}
|
||||
})
|
||||
})
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取天数据
|
||||
getDayData(){
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
query1.page = 0;
|
||||
query1.year_s = that.year;
|
||||
query1.month_s = that.month;
|
||||
query1.type = 'day_s';
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.day_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_cost_unit;
|
||||
seriesData2[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option1};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i+'日'
|
||||
dayXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = dayXAxis;
|
||||
that.optionDay = options;
|
||||
})
|
||||
},
|
||||
//获取月数据
|
||||
getMonthData(){
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
query2.page = 0;
|
||||
query2.year_s = that.year;
|
||||
query2.type = 'month_s';
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],seriesData1 = [], seriesData2 = [];
|
||||
let data = response;
|
||||
data.forEach(item => {
|
||||
let ind = item.month_s;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_cost_unit;
|
||||
seriesData2[ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = {...that.option2};
|
||||
options.series[0].data=seriesData0;
|
||||
options.series[1].data=seriesData1;
|
||||
options.series[2].data=seriesData2;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i+'月'
|
||||
monthXAxis.push(item)
|
||||
}
|
||||
options.xAxis.data = monthXAxis;
|
||||
that.optionMonth = options;
|
||||
})
|
||||
},
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
|
|
|
|||
|
|
@ -39,18 +39,23 @@
|
|||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="19">电石渣工段班组月度对比分析</th>
|
||||
<th colspan="12">电石渣工段班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">班组</th>
|
||||
<th colspan="2">产量</th>
|
||||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="4">质量</th>
|
||||
<th colspan="7">单位产品电耗</th>
|
||||
<th>月份</th>
|
||||
<th>班组</th>
|
||||
<th>总产量(t)</th>
|
||||
<th>单位产品成本(元)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
<th>得分</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<!-- <tr>
|
||||
<th>总产量(t)</th>
|
||||
<th>台时产量(t/h)</th>
|
||||
<th>运转率(%)</th>
|
||||
|
|
@ -66,26 +71,10 @@
|
|||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</tr> -->
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell">{{item0}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -96,27 +85,92 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
year_s:'',
|
||||
page : 0,
|
||||
type : 'month_st',
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableDatas:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
let query0={};
|
||||
query0.page = 0;
|
||||
query0.type='month_st';
|
||||
query0.year_s = year-1;
|
||||
query0.mgroup='3346491835287007232';
|
||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = res0;
|
||||
if(data0.length>0){
|
||||
data0.forEach(item0 => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
if(team_name0.indexOf('甲')>-1){
|
||||
ind0 = (n0-1)*3;
|
||||
}else if(team_name0.indexOf('乙')>-1){
|
||||
ind0 = (n0-1)*3+1;
|
||||
}else if(team_name0.indexOf('丙')>-1){
|
||||
ind0 = (n0-1)*3+2;
|
||||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
console.log(wrapArr0)
|
||||
}else{
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
if(data.length>0){
|
||||
data.forEach(item => {
|
||||
//先按月份排序,再按班组排序
|
||||
let n = item.month_s;
|
||||
let team_name = item.team_name;
|
||||
let ind = 0;
|
||||
if(team_name.indexOf('甲')>-1){
|
||||
ind = (n-1)*3;
|
||||
}else if(team_name.indexOf('乙')>-1){
|
||||
ind = (n-1)*3+1;
|
||||
}else if(team_name.indexOf('丙')>-1){
|
||||
ind = (n-1)*3+2;
|
||||
}
|
||||
wrapArrs[ind] = item;
|
||||
let arr = [];
|
||||
let time = ''+item.year_s+'.'+item.month_s;
|
||||
arr.push(time);
|
||||
arr.push(item.team_name);
|
||||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
|
||||
arr[4]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
arr[5]=item.celec_consume_unit;//目标值(KW·h/t)//需要接口获取
|
||||
arr[6]=item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,huanbi = 0;
|
||||
if(item.month_s==1){
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
||||
}else{
|
||||
ind_pre=ind-1;
|
||||
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
||||
}
|
||||
arr[7]=huanbi;//环期值(KW·h/t)上个月的值
|
||||
arr[8]=item.celec_consume_unit;//当期与环期差值(KW·h/t)
|
||||
arr[9]=item.celec_consume_unit;//环比增长率(%)
|
||||
arr[10]=item.celec_consume_unit;//同比增长率(%)
|
||||
arr[11]=0;//同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr)
|
||||
that.tableDatas = wrapArr;
|
||||
}else{
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,120 +11,186 @@
|
|||
</div>
|
||||
</el-card> -->
|
||||
<el-row :gutter="6" style="padding: 10px;">
|
||||
|
||||
<el-col>
|
||||
<el-card header="成本统计" style="border-radius: 10px;">
|
||||
<el-card header="产量及完成度" style="border-radius: 6px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣产量</div>
|
||||
<el-progress :percentage="90">
|
||||
<span class="item-percent">月完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">90%</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料产量</div>
|
||||
<el-progress :percentage="95">
|
||||
<span class="item-percent">月完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">95%</div>
|
||||
</div>
|
||||
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料产量</div>
|
||||
<el-progress :percentage="98">
|
||||
<span class="item-percent">月完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">98%</div>
|
||||
</div>
|
||||
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥产量</div>
|
||||
<el-progress :percentage="95">
|
||||
<span class="item-percent">月完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">95%</div>
|
||||
</div>
|
||||
<div style="display: inline-block;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计电石渣产量</div>
|
||||
<el-progress :percentage="75" status="success">
|
||||
<span class="item-percent">年完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">75%</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计生料产量</div>
|
||||
<el-progress :percentage="70" status="success">
|
||||
<span class="item-percent">年完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">70%</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计熟料产量</div>
|
||||
<el-progress :percentage="80" status="success">
|
||||
<span class="item-percent">年完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">80%</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计水泥产量</div>
|
||||
<el-progress :percentage="75" status="success">
|
||||
<span class="item-percent">年完成度</span>
|
||||
</el-progress>
|
||||
<div class="item-percent">75%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-card header="能耗" style="border-radius: 6px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月单位标煤耗</div>
|
||||
</div>
|
||||
<div style="display: inline-block;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合电耗</div>
|
||||
</div>
|
||||
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合能耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥粉磨分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">水泥月综合能耗</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="itemsWrap">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度电石渣分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度生料分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度熟料分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度熟料单位标煤耗</div>
|
||||
</div>
|
||||
<div style="display: inline-block;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度熟料综合电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度熟料综合能耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度水泥粉磨分布电耗</div>
|
||||
</div>
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年度水泥综合能耗</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-card header="成本统计" style="border-radius: 6px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣成本</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料成</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料成本</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="items" >
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥成本</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-card header="能耗" style="border-radius: 10px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月单位标煤耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合能耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">水泥月综合能耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥粉磨分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-card header="产量及完成度" style="border-radius: 10px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣产量</div>
|
||||
<div class="item-percent">99%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计电石渣产量</div>
|
||||
<div class="item-percent">99%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月单位标煤耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计生料产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合能耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计熟料产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">水泥月综合能耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计水泥产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -312,10 +378,15 @@
|
|||
color: #7f9eff;
|
||||
}
|
||||
.itemsWrap{
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
// display: flex;
|
||||
// padding: 20px;
|
||||
}
|
||||
.items{
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
padding: 0 20px;
|
||||
margin: 10px 0 20px 0;
|
||||
box-sizing: border-box;
|
||||
border-right: 1px dashed #cccccc;
|
||||
}
|
||||
.items:last-child{
|
||||
|
|
@ -326,21 +397,21 @@
|
|||
font-size: 24px;
|
||||
color: #1e2126;
|
||||
letter-spacing: .1px;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
line-height: 36px;
|
||||
}
|
||||
.item-name{
|
||||
font-size: 14px;
|
||||
color: #4e5b71;
|
||||
letter-spacing: .1px;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
line-height: 20px;
|
||||
}
|
||||
.item-percent{
|
||||
font-size: 9px;
|
||||
color: #b5c0ce;
|
||||
letter-spacing: .08px;
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
line-height: 12px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
<h2 v-if="baseConfig.base_name">{{baseConfig.base_name}}</h2>
|
||||
</div>
|
||||
<div class="login_adv__mask"></div>
|
||||
<div class="login_adv__bottom">
|
||||
<!-- <div class="login_adv__bottom">
|
||||
© {{$CONFIG.APP_NAMES}} {{$CONFIG.APP_VER}}
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="login_main">
|
||||
<div class="login_config">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
v-model="query.mgroup"
|
||||
placeholder="工段"
|
||||
clearable
|
||||
@change="mgroupChange"
|
||||
style="margin-left: 2px; width: 200px"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -28,50 +29,50 @@
|
|||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日"
|
||||
v-if="query.type==0"
|
||||
/>
|
||||
<!-- 选择班次 -->
|
||||
<el-select
|
||||
v-if="query.type==0"
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
/>
|
||||
<!-- 选择班次 -->
|
||||
<el-select
|
||||
v-if="query.type==0"
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="月份"
|
||||
v-if="query.type==1"
|
||||
/>
|
||||
<el-date-picker
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="年份"
|
||||
v-if="query.type==2"
|
||||
/>
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getTableData"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getTableData"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -88,15 +89,15 @@
|
|||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th :colspan="allCol">电石渣干粉核算</th>
|
||||
<th :colspan="allCol">{{tableName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th rowspan="3" v-if="query.type==0">班次</th>
|
||||
<th rowspan="3" v-if="query.type==0">班组</th>
|
||||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
|
|
@ -165,6 +166,7 @@
|
|||
{id:1,name:'日统计'},
|
||||
{id:2,name:'月统计'},
|
||||
],
|
||||
tableNmae:'',
|
||||
tableData1:[],
|
||||
optionsShift:[],
|
||||
sourceData:{}
|
||||
|
|
@ -186,7 +188,8 @@
|
|||
getMgroup(){
|
||||
this.$API.mtm.mgroup.list.req({page:0}).then(res=>{
|
||||
this.mgroupOptions = res;
|
||||
this.query.mgroup = res[8].id
|
||||
this.query.mgroup = res[8].id;
|
||||
this.tableName = '电石渣干粉核算'
|
||||
})
|
||||
},
|
||||
//班组列表
|
||||
|
|
@ -195,6 +198,22 @@
|
|||
this.optionsShift = res;
|
||||
})
|
||||
},
|
||||
mgroupChange(value){
|
||||
let arr = this.mgroupOptions.filter(item=>{
|
||||
return item.id==value
|
||||
})
|
||||
let name = arr[0].name;
|
||||
if(name=='电石渣'){
|
||||
this.tableName = '电石渣干粉核算'
|
||||
}else if(name=='原料磨'){
|
||||
this.tableName = '生料核算'
|
||||
}else if(name=='回转窑'){
|
||||
this.tableName = '熟料核算'
|
||||
}else if(name=='水泥磨'){
|
||||
this.tableName = '水泥核算'
|
||||
}
|
||||
|
||||
},
|
||||
//查询类型
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
|
|
@ -259,19 +278,21 @@
|
|||
}else if(that.query.type==1){
|
||||
time = itemData.year_s+'.'+itemData.month_s+'.'+itemData.day_s;
|
||||
}else{
|
||||
time = itemData.year_s;
|
||||
time = itemData.year_s+'.'+itemData.month_s;
|
||||
}
|
||||
dataArr.push(time);
|
||||
dataArr.push(itemData.shift);
|
||||
dataArr.push(itemData.shift);
|
||||
if(that.query.type==0){
|
||||
dataArr.push(itemData.shift);
|
||||
dataArr.push(itemData.team_name);
|
||||
}
|
||||
dataArr.push(itemData.total_production);
|
||||
dataArr.push(itemData.coal_consume_unit);
|
||||
dataArr.push(itemData.cen_consume_unit);
|
||||
let sub1data = itemData.imaterial_data;
|
||||
for(let i=0;i<sub1data.length;i++){
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].cost)
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].amount_consume)
|
||||
dataArr.push(sub1data[i].cost_unit)
|
||||
}
|
||||
let otherdata = itemData.other_cost_data;
|
||||
|
|
@ -303,36 +324,5 @@
|
|||
width:100%;
|
||||
overflow-x:scroll;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 70px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 80px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
#myTable{
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
.tableCell{
|
||||
min-width: 100px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
const colors = ['#5470C6', '#91CC75', '#EE6666'];
|
||||
const colors = [ '#647bfe', '#a9b6fe','#cbd3fe','#91CC75', '#EE6666'];
|
||||
import * as echarts from 'echarts';
|
||||
export default {
|
||||
name: "echartsmorey",
|
||||
|
|
@ -58,116 +58,194 @@
|
|||
dataX: [],
|
||||
dataY: [],
|
||||
dataY2: [],
|
||||
|
||||
option : {
|
||||
color: colors,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
right: '20%'
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['蒸发量', '降水量', '温度']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
// prettier-ignore
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '蒸发量',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
color: [ '#647bfe', '#8698fe', '#a9b6fe','#cbd3fe','#91CC75', '#EE6666'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value} ml'
|
||||
}
|
||||
grid: {
|
||||
right: '20%',
|
||||
left:'20%'
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '降水量',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1]
|
||||
toolbox: {
|
||||
feature: {
|
||||
dataView: { show: true, readOnly: false },
|
||||
restore: { show: true },
|
||||
saveAsImage: { show: true }
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value} ml'
|
||||
}
|
||||
legend: {
|
||||
data: ['总产量', '台时产量', '运转率', '分布电耗', '单位产品标煤耗', '成本']
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '温度',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
// prettier-ignore
|
||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '产量 (t)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[0]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '运转率 (%)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[1]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '成本(元)',
|
||||
position: 'right',
|
||||
alignTicks: true,
|
||||
offset: 160,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '分布电耗(KW.h)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '标煤耗 (t)',
|
||||
position: 'left',
|
||||
alignTicks: true,
|
||||
offset: 80,
|
||||
min:0,max:180,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '总产量',
|
||||
type: 'bar',
|
||||
yAxisIndex:0,
|
||||
data: [100, 120, 110, 130, 140, 120, 110, 120, 100,150, 120, 160]
|
||||
},
|
||||
{
|
||||
name: '台时产量',
|
||||
type: 'bar',
|
||||
data: [
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '运转率',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '分布电耗',
|
||||
type: 'line',
|
||||
yAxisIndex: 2,
|
||||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
|
||||
},
|
||||
{
|
||||
name: '单位产品标煤耗',
|
||||
type: 'bar',
|
||||
yAxisIndex: 2,
|
||||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value} °C'
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '蒸发量',
|
||||
type: 'bar',
|
||||
data: [
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '降水量',
|
||||
type: 'bar',
|
||||
yAxisIndex: 1,
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '温度',
|
||||
type: 'line',
|
||||
yAxisIndex: 2,
|
||||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(dataX, dataY) {
|
||||
this.myChart = echarts.init(document.getElementById("main"));
|
||||
let option = {
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
this.myChart.setOption(this.option);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.dataX = this.list.map(item => item.x);
|
||||
// 第1个Y轴
|
||||
this.dataY.push({
|
||||
name: "AA",
|
||||
type: "line", // 直线
|
||||
yAxisIndex: 0, // 第几个Y轴 索引值
|
||||
symbolSize: '10',
|
||||
// lineStyle: { color: '#4485f4' },
|
||||
data: this.list.map(item => item.y)
|
||||
});
|
||||
// 第2个Y轴
|
||||
this.dataY.push({
|
||||
name: "BB",
|
||||
type: "line",
|
||||
yAxisIndex: 1, // 第几个Y轴 索引值
|
||||
data: this.list.map(item => item.z)
|
||||
});
|
||||
// 第3个Y轴
|
||||
this.dataY.push({
|
||||
name: "CC",
|
||||
type: "line",
|
||||
yAxisIndex: 2, // 第几个Y轴 索引值
|
||||
data: this.list.map(item => item.k)
|
||||
});
|
||||
|
||||
this.init(this.dataX, this.dataY);
|
||||
});
|
||||
let option = {
|
||||
//标题
|
||||
title: {
|
||||
text: '多坐标折线图',
|
||||
|
|
@ -372,39 +450,6 @@
|
|||
series: dataY
|
||||
};
|
||||
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
this.myChart.setOption(this.option);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.dataX = this.list.map(item => item.x);
|
||||
// 第1个Y轴
|
||||
this.dataY.push({
|
||||
name: "AA",
|
||||
type: "line", // 直线
|
||||
yAxisIndex: 0, // 第几个Y轴 索引值
|
||||
symbolSize: '10',
|
||||
// lineStyle: { color: '#4485f4' },
|
||||
data: this.list.map(item => item.y)
|
||||
});
|
||||
// 第2个Y轴
|
||||
this.dataY.push({
|
||||
name: "BB",
|
||||
type: "line",
|
||||
yAxisIndex: 1, // 第几个Y轴 索引值
|
||||
data: this.list.map(item => item.z)
|
||||
});
|
||||
// 第3个Y轴
|
||||
this.dataY.push({
|
||||
name: "CC",
|
||||
type: "line",
|
||||
yAxisIndex: 2, // 第几个Y轴 索引值
|
||||
data: this.list.map(item => item.k)
|
||||
});
|
||||
|
||||
this.init(this.dataX, this.dataY);
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<div class="app-container">
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">全厂电量统计</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="7">全厂电量统计</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车间</th>
|
||||
<th>工段</th>
|
||||
|
|
@ -17,19 +19,23 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="9">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==9" rowspan="18">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==27" rowspan="12">{{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==49" colspan="3">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==8||index==26||index==37||index==38" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-if="index==0" rowspan="10">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==10" 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==40" rowspan="10" colspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==50" 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-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>{{item[1]}}</td>
|
||||
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==49">{{item[5]}}</td>
|
||||
<td class="numCell" style="display:none" v-if="index==8||index==26||index==37||index==38||index==39||index==40||index==41||index==42||index==43||index==44||index==45||index==46||index==47||index==48||index==49"></td>
|
||||
<td class="numCell" v-if="index!==50">{{item[5]}}</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>
|
||||
</table>
|
||||
|
|
@ -48,13 +54,14 @@
|
|||
},
|
||||
tableDatas:[
|
||||
['原料车间','电石渣','电石渣',1,2,3,4 ],
|
||||
['原料车间','电石渣合计',1,2,3,4 ],
|
||||
['原料车间','原料磨','反击式破碎机',1,2,3,4],
|
||||
['原料车间','原料磨','立磨主电机'],
|
||||
['原料车间','原料磨','循环风机'],
|
||||
['原料车间','原料磨','烘干破主电机'],
|
||||
['原料车间','原料磨','废气风机' ],
|
||||
['原料车间','原料磨','尾排风机'],
|
||||
['原料车间','原料磨','原料磨合计' ],
|
||||
['原料车间','立磨主电机'],
|
||||
['原料车间','循环风机'],
|
||||
['原料车间','烘干破主电机'],
|
||||
['原料车间','废气风机' ],
|
||||
['原料车间','尾排风机'],
|
||||
['原料车间','原料磨合计' ],
|
||||
['原料车间','原料车间合计'],
|
||||
|
||||
['烧成车间','回转窑','高温风机'],
|
||||
|
|
@ -115,11 +122,9 @@
|
|||
}
|
||||
},
|
||||
getData(){
|
||||
this.$API.bi.dataset.exec.req('3349203178834325504',).then((res) => {
|
||||
let data0 = this.sourceData = res.data2.ds0;
|
||||
// debugger;
|
||||
console.log(this.sourceData)
|
||||
});
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,138 +75,53 @@
|
|||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">{{ tableName }}</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1" v-if="deptName=='原料车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th colspan="11">原料车间</th>
|
||||
<th v-if="deptName=='原料车间'" colspan="11">原料车间</th>
|
||||
<th v-if="deptName=='烧成车间'" colspan="16">烧成车间</th>
|
||||
<th v-if="deptName=='水泥车间'" colspan="10">水泥车间</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="deptName=='原料车间'">
|
||||
<th colspan="4">电石渣</th>
|
||||
<th colspan="6">原料磨</th>
|
||||
<th>原料车间压缩空气</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th>水(t)</th>
|
||||
<th>窑尾余热利用(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th>压缩空气(m3)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td style="width: 45px;">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable2" v-if="deptName=='烧成车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th colspan="16">烧成车间</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="deptName=='烧成车间'">
|
||||
<th colspan="11">回转窑</th>
|
||||
<th colspan="4">煤磨</th>
|
||||
<th>烧成车间压缩空气</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th>煤粉(t)</th>
|
||||
<th>煤粉折标煤(tce)</th>
|
||||
<th>水(t)</th>
|
||||
<th>柴油(t)</th>
|
||||
<th>柴油折标煤(tce)</th>
|
||||
<th>余热锅炉外送蒸汽(t)</th>
|
||||
<th>余热锅炉外送蒸汽折标煤(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th>压缩空气(m3)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td style="width: 45px;">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable3" v-if="deptName=='水泥车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th colspan="10">水泥车间</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="deptName=='水泥车间'">
|
||||
<th colspan="5">水泥磨</th>
|
||||
<th colspan="4">包装</th>
|
||||
<th>水泥车间压缩空气</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th>水(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">煤粉(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">煤粉折标煤(tce)</th>
|
||||
<th v-if="deptName!='原料车间'">水(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">柴油(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">柴油折标煤(tce)</th>
|
||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽折标煤(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th v-if="deptName=='原料车间'">水(t)</th>
|
||||
<th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th>压缩空气(m3)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<template v-if="item!==null&&item!==undefined">
|
||||
<td v-for="(item1,index1) in item" :key="index1">{{ item1 }}</td>
|
||||
</template>
|
||||
|
||||
<!-- <td style="width: 45px;">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -230,36 +145,7 @@
|
|||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
],
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
tableHead:['车间','工段','能源分类','1号','2号','3号','4号','5号','6号','7号','8号'],
|
||||
tableDatas2:[
|
||||
['原料车间','电石渣','电量(KW.h)',1,2,3,4,5,6],
|
||||
['原料车间','电石渣','水(t)',1,2,3,4,5,6],
|
||||
['原料车间','原料磨','电量(KW.h)',1,2,3,4,5,6],
|
||||
['原料车间','原料磨','水(t)',1,2,3,4,5,6],
|
||||
['原料车间','压缩空气(m3)',1,2,3,4,5,6],
|
||||
|
||||
['烧成车间','回转窑','电量(KW.h)',1,2,3,4,5,6],
|
||||
['烧成车间','回转窑','煤粉(t)',1,2,3,4,5,6],
|
||||
['烧成车间','回转窑','水(t)',1,2,3,4,5,6],
|
||||
['烧成车间','回转窑','蒸汽(t)',1,2,3,4,5,6],
|
||||
['烧成车间','煤磨','电量(KW.h)',1,2,3,4,5,6],
|
||||
['烧成车间','煤磨','水(t)',1,2,3,4,5,6],
|
||||
['烧成车间','压缩空气(m3)',1,2,3,4,5,6],
|
||||
|
||||
['水泥车间','水泥磨','电量(KW.h)',1,2,3,4,5,6],
|
||||
['水泥车间','水泥磨','水(t)',1,2,3,4,5,6],
|
||||
['水泥车间','包装','电量(KW.h)',1,2,3,4,5,6],
|
||||
['水泥车间','包装','水(t)',1,2,3,4,5,6],
|
||||
['水泥车间','压缩空气(m3)',1,2,3,4,5,6],
|
||||
],
|
||||
deptOptions:[],
|
||||
tableDatas3:[],
|
||||
sourceData:{}
|
||||
|
|
@ -291,6 +177,7 @@
|
|||
that.deptOptions.forEach(item=>{
|
||||
if(item.id==e){
|
||||
that.deptName = item.name;
|
||||
that.tableDatas3 = [];
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -306,7 +193,6 @@
|
|||
getData(){
|
||||
let that = this;
|
||||
let params = {};
|
||||
let id = '';
|
||||
let arr = [];
|
||||
if(that.query.type==0){//日
|
||||
params.type='day_s';
|
||||
|
|
@ -318,6 +204,7 @@
|
|||
params.year_s = Number(that.query.year);
|
||||
}
|
||||
params.mgroup__belong_dept = that.query.belong_dept;
|
||||
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let data = res.results;
|
||||
let wrapArr = [];
|
||||
|
|
@ -354,21 +241,39 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
// debugger;
|
||||
// console.log(wrapArr);
|
||||
wrapArr.forEach((item1)=>{
|
||||
//item1------一天的数据
|
||||
if(item1!=undefined){
|
||||
let itemArr = [];
|
||||
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
||||
itemArr[0] = time;
|
||||
itemArr[1] = item1[0].elec_consume;
|
||||
itemArr[2] = item1[0].coal_consume_unit;
|
||||
itemArr[3] = item1[0].total_production;
|
||||
itemArr[4] = item1[0].cen_consume_unit;
|
||||
itemArr[5] = item1[1].elec_consume;
|
||||
itemArr[6] = item1[1].coal_consume_unit;
|
||||
itemArr[7] = item1[1].cen_consume_unit;
|
||||
itemArr[8] = item1[1].cen_consume_unit;
|
||||
itemArr[9] = item1[1].total_production;
|
||||
itemArr[10] = item1[1].cen_consume_unit;
|
||||
itemArr.push(time)
|
||||
itemArr.push( item1[0].elec_consume)
|
||||
itemArr.push( item1[0].elec_coal_consume)
|
||||
if(that.deptName=='烧成车间'){
|
||||
itemArr.push( item1[0].pcoal_consume)//煤粉(t)
|
||||
itemArr.push( item1[0].pcoal_coal_consume)//煤粉折标煤(tce)
|
||||
itemArr.push( item1[0].water_consume)//水(t)
|
||||
itemArr.push( item1[0].pcoal_consume)//柴油(t)
|
||||
itemArr.push( item1[0].pcoal_coal_consume)//柴油折标煤(tce)
|
||||
itemArr.push( item1[0].out_steam)//余热锅炉外送蒸汽(t)
|
||||
itemArr.push( item1[0].out_steam_coal)//余热锅炉外送蒸汽折标煤(tce)
|
||||
}else if(that.deptName=='水泥车间'){
|
||||
itemArr.push( item1[0].water_consume)//水
|
||||
}
|
||||
itemArr.push( item1[0].total_production)
|
||||
itemArr.push( item1[0].cen_consume_unit)
|
||||
|
||||
itemArr.push( item1[1].elec_consume)
|
||||
itemArr.push( item1[1].elec_consume*0.1229/1000)
|
||||
if(that.deptName=='原料车间'){
|
||||
itemArr.push( item1[1].water_consume)//水
|
||||
itemArr.push( item1[1].kiln_end_heat)//窑尾余热
|
||||
}
|
||||
itemArr.push( item1[1].total_production)
|
||||
itemArr.push( item1[1].cen_consume_unit)
|
||||
itemArr.push( item1[1].cair_consume)//压缩空气
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" prop="belong_dept">
|
||||
<el-form-item label="所属部门">
|
||||
<el-select
|
||||
v-model="form.belong_dept"
|
||||
placeholder="所属部门"
|
||||
|
|
|
|||
|
|
@ -109,12 +109,6 @@
|
|||
//获取物料列表
|
||||
getMaterial(){
|
||||
this.$API.mtm.material.list.req({page:0}).then(res=>{
|
||||
// let data = [];
|
||||
// res.forEach(element => {
|
||||
// if(element.type!==0){
|
||||
// data.push(element)
|
||||
// }
|
||||
// });
|
||||
this.options = res;
|
||||
})
|
||||
},
|
||||
|
|
@ -143,8 +137,8 @@
|
|||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
let arr = that.form.date.split('-');
|
||||
that.form.year = arr[0];
|
||||
that.form.month = arr[1];
|
||||
that.form.year = Number(arr[0]);
|
||||
that.form.month = Number(arr[1]);
|
||||
if(that.mode==='add'){
|
||||
that.$API.fim.priceset.create.req(that.form).then(res=>{
|
||||
that.isSaveing = false;
|
||||
|
|
@ -155,7 +149,12 @@
|
|||
that.isSaveing = false;
|
||||
})
|
||||
}else{
|
||||
res = that.$API.fim.priceset.update.req(that.form.id,that.form).then(res=>{
|
||||
let form = {};
|
||||
form.year = that.form.year;
|
||||
form.month = that.form.month;
|
||||
form.material = that.form.material;
|
||||
form.price_unit = that.form.price_unit;
|
||||
res = that.$API.fim.priceset.update.req(that.form.id,form).then(res=>{
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.visible = false;
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.mgroup"
|
||||
placeholder="工段"
|
||||
v-model="query.belong_dept"
|
||||
placeholder="车间"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="年份"
|
||||
v-if="query.type==2"
|
||||
v-if="query.type==1"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
|
|
@ -43,17 +43,17 @@
|
|||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="月份"
|
||||
v-if="query.type==1"
|
||||
v-if="query.type==0"
|
||||
/>
|
||||
|
||||
<el-date-picker
|
||||
<!-- <el-date-picker
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日"
|
||||
v-if="query.type==0"
|
||||
/>
|
||||
/> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
|
@ -73,14 +73,13 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<!-- <div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">{{tableTime}}</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 80px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr colspan="7"> <th colspan="7">{{tableName}}</th></tr>
|
||||
<tr>
|
||||
<template v-for="(date,ind) in tableHead" :key="ind">
|
||||
<!-- <th v-if="ind==1" colspan="2">{{date}}</th> -->
|
||||
<th>{{date}}</th>
|
||||
</template>
|
||||
</tr>
|
||||
|
|
@ -100,196 +99,32 @@
|
|||
<td class="numCell">{{item[6]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableContainer">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="28">原料车间</th>
|
||||
<th colspan="32">烧成车间</th>
|
||||
<th colspan="12">水泥车间</th>
|
||||
<th :colspan="titleLength">{{ tableName }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="12">辅料</th>
|
||||
<th colspan="16">干混生料</th>
|
||||
<th colspan="16">入窑生料</th>
|
||||
<th colspan="8">熟料</th>
|
||||
<th colspan="8">煤粉</th>
|
||||
<th colspan="12">出磨水泥</th>
|
||||
<th rowspan="41">日期</th>
|
||||
<th :colspan="header4.length">{{deptName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">细度</th>
|
||||
<th colspan="4">Fe2O3</th>
|
||||
<th colspan="4">水分</th>
|
||||
<th colspan="4">CaO</th>
|
||||
<th colspan="4">Fe2O3</th>
|
||||
<th colspan="4">细度</th>
|
||||
<th colspan="4">水分</th>
|
||||
<th colspan="4">CaO</th>
|
||||
<th colspan="4">Fe2O3</th>
|
||||
<th colspan="4">细度</th>
|
||||
<th colspan="4">水分</th>
|
||||
<th colspan="4">立升重</th>
|
||||
<th colspan="4">f-CaO</th>
|
||||
<th colspan="4">细度</th>
|
||||
<th colspan="4">水分</th>
|
||||
<th colspan="4">比表面积</th>
|
||||
<th colspan="4">SO3</th>
|
||||
<th colspan="4">掺量</th>
|
||||
<th :colspan="item.lengths*4" v-for="(item,index) in header2Obj" :key="index">{{ item.name }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
<th>平均值</th>
|
||||
<th>检次</th>
|
||||
<th>合次</th>
|
||||
<th>合格率</th>
|
||||
|
||||
<th colspan="4" v-for="item in header3" :key="item">{{item}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="item in header4" :key="item">{{item}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :key="index">
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td v-for="(item1,index1) in item" :key="index1" class="numCell">{{item1}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -302,13 +137,13 @@
|
|||
type:0,
|
||||
year:'',
|
||||
month:'',
|
||||
day:'',
|
||||
search_type:'',
|
||||
},
|
||||
options:[
|
||||
{id:0,name:'日报表'},
|
||||
{id:1,name:'月报表'},
|
||||
{id:2,name:'年报表'},
|
||||
],
|
||||
titleLength:1,
|
||||
mgroupOptions:[],
|
||||
tableTime:'',
|
||||
tableName:'质检日报表',
|
||||
|
|
@ -336,17 +171,13 @@
|
|||
['水泥车间','出磨水泥','掺量'],
|
||||
],
|
||||
exportLoading:false,
|
||||
tableData1:[
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
],
|
||||
header2:[],
|
||||
header3:[],
|
||||
header4:[],
|
||||
tableData:[],
|
||||
header2Obj:[],
|
||||
deptOptions:[],
|
||||
arrLength:[0,0,0],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -360,18 +191,9 @@
|
|||
days = '0'+days;
|
||||
}
|
||||
this.query.day = myDate.getFullYear()+'-'+month+'-'+days;
|
||||
this.getTableData();
|
||||
this.getMgroup();
|
||||
|
||||
this.getGroup();
|
||||
},
|
||||
methods: {
|
||||
//获取工段列表
|
||||
getMgroup(){
|
||||
this.$API.mtm.mgroup.list.req({page:0}).then(res=>{
|
||||
this.mgroupOptions = res;
|
||||
this.query.mgroup = res[8].id
|
||||
})
|
||||
},
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
this.tableName = '质检日报表'
|
||||
|
|
@ -381,40 +203,239 @@
|
|||
this.tableName = '质检年报表'
|
||||
}
|
||||
},
|
||||
deptChange(e){
|
||||
let that = this;
|
||||
that.deptOptions.forEach(item=>{
|
||||
if(item.id==e){
|
||||
that.deptName = item.name;
|
||||
}
|
||||
})
|
||||
},
|
||||
getGroup() {
|
||||
let that = this;
|
||||
that.$API.system.dept.list.req({ page_size: 3 , type:'dept'}).then(res=>{
|
||||
that.deptOptions = res.results;
|
||||
that.deptName = res.results[0].name;
|
||||
that.query.belong_dept = res.results[0].id;
|
||||
this.getTableData();
|
||||
});
|
||||
},
|
||||
getTableData(){
|
||||
let that = this;
|
||||
let params = {query:{}};
|
||||
let id = '';
|
||||
that.tableDatas3 = [];
|
||||
that.header2Obj=[];
|
||||
that.header2 = [];//物料
|
||||
that.header3 = [];//检测项
|
||||
that.header4 = [];//检测项
|
||||
let params = {};
|
||||
let arr = [];
|
||||
if(that.query.type==0){//日
|
||||
arr = that.query.day.split('-');
|
||||
params.query.year_s = arr[0];
|
||||
params.query.month_s = arr[1];
|
||||
params.query.day_s = arr[2];
|
||||
id='zjrbb'
|
||||
}else if(that.query.type==1){//月
|
||||
arr = that.query.month.split('-');
|
||||
params.query.year_s = arr[0];
|
||||
params.query.month_s = arr[1];
|
||||
id='zjybb'
|
||||
}else{//年
|
||||
params.query.year_s = that.query.year;
|
||||
id='zjnbb'
|
||||
params.year_s = arr[0];
|
||||
params.month_s = arr[1];
|
||||
params.type = 'day_s'
|
||||
}else if(that.query.type==1){//月
|
||||
params.type = 'month_s'
|
||||
params.year_s = that.query.year;
|
||||
}
|
||||
that.$API.bi.dataset.exec.req(id,params).then(res=>{
|
||||
that.time =
|
||||
that.tableName = res.name;
|
||||
let data = res.data.ds0;
|
||||
that.tableHead = data[0];
|
||||
that.tableDatas = data.slice(1,data.length);
|
||||
for(let i=0;i<that.tableDatas.length;i++){
|
||||
that.tableDatas[i][3] = that.tableDatas[i][3].tofixed(2);
|
||||
that.tableDatas[i][4] = that.tableDatas[i][4].tofixed(2);
|
||||
that.tableDatas[i][5] = that.tableDatas[i][5].tofixed(2);
|
||||
that.tableDatas[i][6] = that.tableDatas[i][6].tofixed(2);
|
||||
}
|
||||
that.tableDatas;
|
||||
})
|
||||
params.mgroup__belong_dept = that.query.belong_dept;
|
||||
// that.$API.enm.enstat.req(params).then(res=>{
|
||||
// let data = res.results;
|
||||
// let list = [];
|
||||
// data.forEach(item => {
|
||||
// let index = item.day_s;
|
||||
// if(list[index]){}else{
|
||||
// list[index] = [];
|
||||
// }
|
||||
// list[index].push(item);
|
||||
// })
|
||||
// let header2=[],header2Obj=[],header3=[],header4=[];
|
||||
// list = list.filter(item=>{
|
||||
// return item
|
||||
// })
|
||||
// console.log(list)
|
||||
// console.log('000000000000000')
|
||||
// //list按天分好的数组
|
||||
// list.forEach((item0,index0)=>{
|
||||
// //data1某一天的数据
|
||||
// let data1 = item0;
|
||||
// let dayData=[],wrapData = [[],[],[]];
|
||||
// dayData[0]= data1[0].day_s!=null?data1[0].year_s+'.'+data1[0].month_s+'.'+data1[0].day_s:data1[0].year_s+'.'+data1[0].month_s;
|
||||
// data1.forEach(item1 => {
|
||||
// if(item1.belong_dept_name=='原料车间'){
|
||||
// wrapData[0].push(item1)
|
||||
// }else if(item1.belong_dept_name=='烧成车间'){
|
||||
// wrapData[1].push(item1)
|
||||
// }else if(item1.belong_dept_name=='水泥车间'){
|
||||
// wrapData[2].push(item1)
|
||||
// }
|
||||
// });
|
||||
// //wrapData按车间分的数组
|
||||
// for(let i=0;i<wrapData.length;i++){
|
||||
// let data2 = wrapData[i];
|
||||
// //一个车间的数据
|
||||
// for(let j=0;j<data2.length;j++){
|
||||
// //一个工段的检测项目
|
||||
// let data3 = data2[j].qua_data;
|
||||
// //四个工段
|
||||
// data3.forEach(item3=>{
|
||||
// if(index0==0){
|
||||
// header3.push(item3.testitem_name)
|
||||
// if(header2.indexOf(item3.material_name)>-1){
|
||||
// let indexObj = header2.indexOf(item3.material_name);
|
||||
// header2Obj[indexObj].length = header2Obj[indexObj].length+1;
|
||||
// }else{
|
||||
// header2.push(item3.material_name);
|
||||
// header2Obj.push({name:item3.material_name,length:1})
|
||||
// }
|
||||
// console.log(header2)
|
||||
// console.log(header2Obj)
|
||||
// header4.push('平均值')
|
||||
// header4.push('检次')
|
||||
// header4.push('合次')
|
||||
// header4.push('及格率')
|
||||
// }
|
||||
// dayData.push(item3.val_avg)
|
||||
// dayData.push(item3.num_test)
|
||||
// dayData.push(item3.num_ok)
|
||||
// let pass = item3.rate_pass*100+'%'
|
||||
// dayData.push(pass)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if(index0==0){
|
||||
// that.header2Obj=header2Obj;
|
||||
// that.header2 = header2;//物料
|
||||
// that.header3 = header3;//检测项
|
||||
// that.header4 = header4;//检测项
|
||||
// console.log(header2)
|
||||
// console.log(header3)
|
||||
// console.log(header4)
|
||||
// }
|
||||
// that.tableData.push(dayData)
|
||||
// })
|
||||
// // debugger;
|
||||
// // console.log(that.tableData)
|
||||
// // that.time =
|
||||
// // that.tableName = res.name;
|
||||
// // let data = res.data.ds0;
|
||||
// // that.tableHead = data[0];
|
||||
// // that.tableDatas = data.slice(1,data.length);
|
||||
// // for(let i=0;i<that.tableDatas.length;i++){
|
||||
// // that.tableDatas[i][3] = that.tableDatas[i][3].tofixed(2);
|
||||
// // that.tableDatas[i][4] = that.tableDatas[i][4].tofixed(2);
|
||||
// // that.tableDatas[i][5] = that.tableDatas[i][5].tofixed(2);
|
||||
// // that.tableDatas[i][6] = that.tableDatas[i][6].tofixed(2);
|
||||
// // }
|
||||
// // that.tableDatas;
|
||||
// })
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let data = res.results;
|
||||
let wrapArr = [];
|
||||
let innerArr = [];
|
||||
let ind = 0;
|
||||
//1、将相同日期或月份/年份的数据放到一组
|
||||
let header2=[],header2Obj=[],header3=[],header4=[];
|
||||
data.forEach(item => {
|
||||
if(that.query.type==0){//日统计
|
||||
ind = item.day_s-1;
|
||||
}else if(that.query.type==1){//月统计
|
||||
ind = item.month_s-1;
|
||||
}
|
||||
if(wrapArr[ind]){
|
||||
}else{
|
||||
wrapArr[ind] = [];
|
||||
}
|
||||
if(that.deptName=='原料车间'){
|
||||
wrapArr[ind].push(item)
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
if(item.mgroup_name=='回转窑'){
|
||||
wrapArr[ind][1]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}
|
||||
}else{
|
||||
wrapArr[ind].push(item)
|
||||
}
|
||||
});
|
||||
wrapArr = wrapArr.filter(item=>{
|
||||
return item
|
||||
})
|
||||
wrapArr.forEach((item1,index1)=>{
|
||||
if(item1!=undefined){
|
||||
console.log(item1)//一天的数据
|
||||
let itemArr = [];
|
||||
let header2tem=[],header2Objtem=[],header3tem=[],header4tem=[];
|
||||
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
||||
itemArr.push(time)
|
||||
//遍历每个工段
|
||||
item1.forEach(item2=>{
|
||||
let data2 =item2.qua_data;
|
||||
//遍历一个工段的物料检验数据
|
||||
data2.forEach((item3,index3)=>{
|
||||
//item3一个检验数据
|
||||
if(header2tem.indexOf(item3.material_name)>-1){
|
||||
let indexObj = header2tem.indexOf(item3.material_name);
|
||||
header2Objtem[indexObj].lengths = header2Objtem[indexObj].lengths+1;
|
||||
}else{
|
||||
header2tem.push(item3.material_name);
|
||||
header2Objtem.push({name:item3.material_name,lengths:1})
|
||||
}
|
||||
header3tem.push(item3.testitem_name)
|
||||
header4tem.push('平均值')
|
||||
header4tem.push('检次')
|
||||
header4tem.push('合次')
|
||||
header4tem.push('及格率')
|
||||
let indexObj = header2tem.indexOf(item3.material_name);
|
||||
debugger;
|
||||
if(indexObj>0&&index3==0){
|
||||
let inde = indexObj-1;
|
||||
let ind =header2Objtem[inde].lengths*4+1;
|
||||
itemArr[ind] = item3.val_avg.toFixed(2);
|
||||
itemArr.push(item3.num_test)
|
||||
itemArr.push(item3.num_ok)
|
||||
let pass = (item3.rate_pass*100).toFixed(2);
|
||||
pass= pass+'%';
|
||||
itemArr.push(pass)
|
||||
}else{
|
||||
itemArr.push(item3.val_avg.toFixed(2))
|
||||
itemArr.push(item3.num_test)
|
||||
itemArr.push(item3.num_ok)
|
||||
let pass = (item3.rate_pass*100).toFixed(2);
|
||||
pass= pass+'%';
|
||||
itemArr.push(pass)
|
||||
}
|
||||
that.titleLength =itemArr.length;
|
||||
})
|
||||
})
|
||||
innerArr.push(itemArr)
|
||||
console.log('0000000000000');
|
||||
console.log(itemArr);
|
||||
console.log(header2tem);
|
||||
console.log(header2Objtem);
|
||||
console.log(header3tem);
|
||||
console.log(header4tem);
|
||||
console.log('1111111111111');
|
||||
if(header2tem.length>header2.length){
|
||||
header2 = header2tem;
|
||||
}
|
||||
if(header2Objtem.length>header2Obj.length){
|
||||
header2Obj=header2Objtem;
|
||||
}
|
||||
if(header3tem.length>header3.length){
|
||||
header3 = header3tem;
|
||||
}
|
||||
if(header4tem.length>header4.length){
|
||||
header4 = header4tem;
|
||||
}
|
||||
}
|
||||
})
|
||||
that.tableDatas3 = innerArr;
|
||||
that.header2Obj=header2Obj;
|
||||
that.header2 = header2;//物料
|
||||
that.header3 = header3;//检测项
|
||||
that.header4 = header4;//检测项
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
|
|
@ -431,38 +452,8 @@
|
|||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#myTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#myTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.tableContainer{
|
||||
overflow-x: scroll;
|
||||
}
|
||||
#myTable1{
|
||||
width: 100%;
|
||||
}
|
||||
#myTable1 .numCell,#myTable1 th{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -3,9 +3,11 @@
|
|||
<div class="app-container">
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">全厂报表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">全厂报表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th colspan="2">项目</th>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="12">全厂能源统计</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">工业总产值(万元)</th>
|
||||
<th rowspan="2">工业增加值(万元)</th>
|
||||
<th colspan="3">综合能源消费</th>
|
||||
<th colspan="3">单位总产值能耗</th>
|
||||
<th colspan="3">单位工业增加值能耗</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>当期值(tce)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
<th>当期值(tce/万元)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
<th>当期值(tce/万元)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-for="item1 in item" :key="item1">{{item1}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
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() {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -59,8 +59,7 @@ export default {
|
|||
components: {
|
||||
account: defineAsyncComponent(() => import("./user/account")),
|
||||
seting: defineAsyncComponent(() => import("./user/seting")),
|
||||
pushSettings: defineAsyncComponent(() => import("./user/pushSettings")),
|
||||
clockRecord: defineAsyncComponent(() => import("./user/clock_record")),
|
||||
pushSettings: defineAsyncComponent(() => import("./user/pushSettings"))
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -83,11 +82,6 @@ export default {
|
|||
title: "修改密码",
|
||||
component: "pushSettings",
|
||||
},
|
||||
{
|
||||
icon: "el-icon-platform",
|
||||
title: "打卡记录",
|
||||
component: "clockRecord",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue