Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
33a55ffa65
|
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M19.836 10.486a.9.9 0 0 1-.21.47l-9.75 10.71a.94.94 0 0 1-.49.33q-.125.015-.25 0a1 1 0 0 1-.41-.09a.92.92 0 0 1-.45-.46a.9.9 0 0 1-.07-.58l.86-6.86h-3.63a1.7 1.7 0 0 1-.6-.15a1.29 1.29 0 0 1-.68-.99a1.3 1.3 0 0 1 .09-.62l3.78-9.45c.1-.239.266-.444.48-.59a1.3 1.3 0 0 1 .72-.21h7.24c.209.004.414.055.6.15c.188.105.349.253.47.43c.112.179.18.38.2.59a1.2 1.2 0 0 1-.1.61l-2.39 5.57h3.65a1 1 0 0 1 .51.16a1 1 0 0 1 .43 1z" />
|
||||
</svg>
|
||||
</template>
|
||||
|
|
@ -22,4 +22,5 @@ export { default as Shebei } from './Shebei.vue'
|
|||
export { default as Xiaoshou } from './Xiaoshou.vue'
|
||||
export { default as Zhixing } from './Zhixing.vue'
|
||||
export { default as Zhizao } from './Zhizao.vue'
|
||||
export { default as Env } from './Env.vue'
|
||||
export { default as Env } from './Env.vue'
|
||||
export { default as Elec } from './Elec.vue'
|
||||
|
|
@ -121,6 +121,16 @@
|
|||
fit="cover"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始照片:" span=2 v-if="form.work_imgs&&form.work_imgs.length>0">
|
||||
<el-image
|
||||
v-for = "item in form.work_imgs_"
|
||||
:key = "item.id"
|
||||
style="margin-right: 8px;height: 146px;height:146px;"
|
||||
:src="item.path"
|
||||
:preview-src-list="[item.path]"
|
||||
fit="cover"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="作业照片:" span=2 v-if="form.work_imgs&&form.work_imgs.length>0">
|
||||
<el-image
|
||||
v-for = "item in form.work_imgs_"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,16 @@ const routes = [
|
|||
},
|
||||
component: "home/testx",
|
||||
},
|
||||
{
|
||||
name: "blank",
|
||||
path: "/blank",
|
||||
meta: {
|
||||
title: "控制台",
|
||||
// icon: "el-icon-monitor",
|
||||
perms: ["home_blank"],
|
||||
},
|
||||
component: "home/blank",
|
||||
},
|
||||
{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
|
|
@ -53,7 +63,7 @@ const routes = [
|
|||
title: "控制台",
|
||||
// icon: "el-icon-monitor",
|
||||
affix: true,
|
||||
perms: ["enm"],
|
||||
perms: ["enmdashboard"],
|
||||
},
|
||||
component: "home/enm_home",
|
||||
},
|
||||
|
|
@ -235,7 +245,7 @@ const routes = [
|
|||
path: "/enm_slag",
|
||||
meta: {
|
||||
title: "电石渣",
|
||||
icon: "el-icon-opportunity",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_slag"],
|
||||
},
|
||||
|
|
@ -341,7 +351,7 @@ const routes = [
|
|||
path: "/enm_rm",
|
||||
meta: {
|
||||
title: "原料磨",
|
||||
icon: "el-icon-list",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_rm"],
|
||||
},
|
||||
|
|
@ -404,7 +414,7 @@ const routes = [
|
|||
path: "/enm_rmbase",
|
||||
meta: {
|
||||
title: "原料磨",
|
||||
icon: "el-icon-list",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_rmbase"],
|
||||
},
|
||||
|
|
@ -467,7 +477,7 @@ const routes = [
|
|||
path: "/enm_coal",
|
||||
meta: {
|
||||
title: "煤磨",
|
||||
icon: "el-icon-brush-filled",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_coal"],
|
||||
},
|
||||
|
|
@ -530,7 +540,7 @@ const routes = [
|
|||
path: "/enm_coalbase",
|
||||
meta: {
|
||||
title: "煤磨",
|
||||
icon: "el-icon-brush-filled",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_coalbase"],
|
||||
},
|
||||
|
|
@ -921,7 +931,7 @@ const routes = [
|
|||
path: "/enm_energy",
|
||||
meta: {
|
||||
title: "电量报表",
|
||||
icon: "el-icon-share",
|
||||
icon: "sc-icon-elec",
|
||||
type: "menu",
|
||||
perms: ["enm_energy"],
|
||||
},
|
||||
|
|
@ -1016,16 +1026,16 @@ const routes = [
|
|||
},
|
||||
component: "enm_energy/month_base",
|
||||
},
|
||||
{
|
||||
name: "energyPicture",
|
||||
path: "/enm_energy/energyPicture",
|
||||
meta: {
|
||||
title: "能源流向",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm_energy_picture"],
|
||||
},
|
||||
component: "enm_energy/energyPicture",
|
||||
},
|
||||
// {
|
||||
// name: "energyPicture",
|
||||
// path: "/enm_energy/energyPicture",
|
||||
// meta: {
|
||||
// title: "能源流向",
|
||||
// // icon: "el-icon-grid",
|
||||
// perms: ["enm_energy_picture"],
|
||||
// },
|
||||
// component: "enm_energy/energyPicture",
|
||||
// },
|
||||
],
|
||||
},
|
||||
//全厂报表
|
||||
|
|
@ -2697,6 +2707,39 @@ const routes = [
|
|||
},
|
||||
component: "enm_base/search",
|
||||
},
|
||||
//计算中心
|
||||
{
|
||||
name: "fac_cal",
|
||||
path: "/fac_cal",
|
||||
meta: {
|
||||
title: "计算中心",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["fac_cal"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/fac_cal/mpointstat",
|
||||
meta: {
|
||||
title: "计算数据",
|
||||
// icon: "el-icon-postcard",
|
||||
type: "menu",
|
||||
perms: ["mpointstat"],
|
||||
},
|
||||
component: "fac_cal/mpointstat",
|
||||
},
|
||||
{
|
||||
path: "/fac_cal/caltask",
|
||||
meta: {
|
||||
title: "计算任务",
|
||||
// icon: "el-icon-postcard",
|
||||
type: "menu",
|
||||
perms: ["caltask"],
|
||||
},
|
||||
component: "fac_cal/caltask",
|
||||
},
|
||||
]
|
||||
},
|
||||
//基础配置
|
||||
{
|
||||
name: "enm_base",
|
||||
|
|
@ -2720,7 +2763,7 @@ const routes = [
|
|||
component: "enm_base/team",
|
||||
},
|
||||
{
|
||||
name: "mgruop",
|
||||
name: "mgroup",
|
||||
path: "/enm_base/mgruop",
|
||||
meta: {
|
||||
title: "工段",
|
||||
|
|
@ -2779,7 +2822,7 @@ const routes = [
|
|||
title: "每月配置",
|
||||
icon: "el-icon-checked",
|
||||
type: "menu",
|
||||
perms: ["enm"],
|
||||
perms: ["enm_monthSet"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
|
@ -2808,7 +2851,7 @@ const routes = [
|
|||
meta: {
|
||||
title: "月度年度目标值",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm"],
|
||||
perms: ["enm_goal"],
|
||||
},
|
||||
component: "enm_monthSet/goalSetting",
|
||||
},
|
||||
|
|
@ -2869,6 +2912,16 @@ const routes = [
|
|||
},
|
||||
component: "sys/role",
|
||||
},
|
||||
{
|
||||
path: "/sys/myschedule",
|
||||
name: "myschedule",
|
||||
meta: {
|
||||
title: "定时策略",
|
||||
type: "menu",
|
||||
perms: ["myschedule"],
|
||||
},
|
||||
component: "sys/myschedule"
|
||||
},
|
||||
{
|
||||
path: "/sys/dict",
|
||||
name: "dict",
|
||||
|
|
@ -2966,6 +3019,17 @@ const routes = [
|
|||
perms: ["bigScreenP_dept"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/bigScreenP_heihua",
|
||||
name: "bigScreenP_heihua",
|
||||
meta: {
|
||||
title: "黑化车间",
|
||||
icon: "el-icon-trend-charts",
|
||||
perms: ["bigScreenP_dept10"],
|
||||
fullpage: true,
|
||||
},
|
||||
component: "bigScreen/index_heihuadept.vue",
|
||||
},
|
||||
{
|
||||
path: "/bigScreenP_10",
|
||||
name: "bigScreenP_10",
|
||||
|
|
@ -3181,6 +3245,72 @@ const routes = [
|
|||
},
|
||||
component: "statistics/stock_statistics.vue",
|
||||
},
|
||||
//合格数统计——光芯
|
||||
{
|
||||
name: "pass_num_gx",
|
||||
path: "/statistic/pass_num_gx",
|
||||
meta: {
|
||||
title: "合格数统计",
|
||||
icon: "el-icon-DataAnalysis",
|
||||
perms: ["pass_num_gx"],
|
||||
},
|
||||
component: "statistics/pass_num_gx.vue",
|
||||
},
|
||||
//任务进度统计——光芯
|
||||
{
|
||||
name: "task_rate_gx",
|
||||
path: "/statistic/task_rate_gx",
|
||||
meta: {
|
||||
title: "任务进度",
|
||||
icon: "el-icon-DataAnalysis",
|
||||
perms: ["task_rate_gx"],
|
||||
},
|
||||
component: "statistics/task_rate_gx.vue",
|
||||
},
|
||||
//库存统计——光芯
|
||||
{
|
||||
path: "/statistic_inm",
|
||||
name: "statistic_inm",
|
||||
meta: {
|
||||
title: "库存统计",
|
||||
icon: "el-icon-trend-charts",
|
||||
perms: ["statistic_inm_gx"],
|
||||
},
|
||||
component: "statistics/statistics_inm.vue",
|
||||
},
|
||||
//过程检验统计——光芯
|
||||
{
|
||||
path: "/process_check_gx",
|
||||
name: "process_check_gx",
|
||||
meta: {
|
||||
title: "过程检验统计",
|
||||
icon: "el-icon-trend-charts",
|
||||
perms: ["process_check_gx"],
|
||||
},
|
||||
component: "statistics/process_check_gx.vue",
|
||||
},
|
||||
//成品检验统计——光芯
|
||||
{
|
||||
path: "/good_check_gx",
|
||||
name: "good_check_gx",
|
||||
meta: {
|
||||
title: "成品检验统计",
|
||||
icon: "el-icon-trend-charts",
|
||||
perms: ["good_check_gx"],
|
||||
},
|
||||
component: "statistics/good_check_gx.vue",
|
||||
},
|
||||
//扫边车间数据汇总——光芯
|
||||
// {
|
||||
// path: "/statistics_saobian",
|
||||
// name: "statistics_saobian",
|
||||
// meta: {
|
||||
// title: "扫边车间统计",
|
||||
// icon: "el-icon-trend-charts",
|
||||
// perms: ["statistic_inm"],
|
||||
// },
|
||||
// component: "statistics/statistics_saobian.vue",
|
||||
// },
|
||||
//综合查询
|
||||
{
|
||||
name: "total_statistics",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,992 @@
|
|||
<template>
|
||||
<el-container class="dashboard">
|
||||
<el-header class="header">
|
||||
<div class="title">黑化车间生产数据看板</div>
|
||||
<div class="timer">{{ currentDay }} {{ currentTime }}</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<!-- 黑化 -->
|
||||
<el-row style="height: 30%" :gutter="10">
|
||||
<el-col :xs="7" :md="7" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle bgimg">
|
||||
<div class="boxlabel">昨日黑化合格统计</div>
|
||||
</div>
|
||||
<div style="height: 4px"></div>
|
||||
<div class="boxmain bigdata border">
|
||||
<div v-for="item in yesHeihuaData" :key="item.物料名" class="lineDiv">
|
||||
<span>{{ item.物料名 }}</span>
|
||||
<span class="boxmainItemNumber">{{item.合格数}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="7" :md="7">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">
|
||||
昨日黑化不合格统计
|
||||
</div>
|
||||
</div>
|
||||
<div class="boxmain" id="pieChart1"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="10" :md="10" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">黑化任务进度</div>
|
||||
</div>
|
||||
<div style="height: 2px"></div>
|
||||
<div class="boxmain" id="scrollContainer">
|
||||
<scScrollTavle
|
||||
v-if="table1Visible"
|
||||
:tableHeight="tableHeight"
|
||||
:rowData="processData1"
|
||||
:titleData="liData"
|
||||
:refValue="refValue1"
|
||||
></scScrollTavle>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height: 0.3%"></div>
|
||||
<!-- 退火 -->
|
||||
<el-row style="height: 30%" :gutter="10">
|
||||
<el-col :xs="7" :md="7" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle bgimg">
|
||||
<div class="boxlabel">昨日退火合格统计</div>
|
||||
</div>
|
||||
<div style="height: 4px"></div>
|
||||
<div class="boxmain bigdata border">
|
||||
<!-- flex_center -->
|
||||
<div v-for="item in yesTuihuoData" :key="item.物料名" class="lineDiv">
|
||||
<span>{{ item.物料名 }}</span>
|
||||
<span class="boxmainItemNumber">{{item.合格数}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="7" :md="7">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">
|
||||
昨日退火不合格统计
|
||||
</div>
|
||||
</div>
|
||||
<div class="boxmain" id="pieChart2"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="10" :md="10" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">退火任务进度</div>
|
||||
</div>
|
||||
<div style="height: 2px"></div>
|
||||
<div class="boxmain" id="scrollContainer">
|
||||
<scScrollTavle
|
||||
v-if="table2Visible"
|
||||
:tableHeight="tableHeight"
|
||||
:rowData="processData2"
|
||||
:titleData="liData"
|
||||
:refValue="refValue2"
|
||||
></scScrollTavle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 合格数/合格率 -->
|
||||
<div style="height: 0.3%"></div>
|
||||
<el-row style="height: 39%" :gutter="10">
|
||||
<el-col :xs="24" :md="12">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">黑化车间本月合格数统计</div>
|
||||
</div>
|
||||
<div class="boxmain" id="chart1"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">黑化车间本月合格率统计</div>
|
||||
</div>
|
||||
<div class="boxmain" id="chart2"></div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import scScrollTavle from "@/components/scScrollTable.vue";
|
||||
function deepCopy(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
export default {
|
||||
components: { scScrollTavle },
|
||||
data() {
|
||||
return {
|
||||
basicOption: {
|
||||
backgroundColor: "",
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
type: "cross",
|
||||
label: {
|
||||
backgroundColor: "#6a7985",
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
icon: "stack",
|
||||
right: 0,
|
||||
data: [
|
||||
{
|
||||
backgroundColor: "rgb(1,235,239)",
|
||||
name: "黑化",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(250,205,0)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(254,129,0)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
textStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
{
|
||||
backgroundColor: "rgb(250,205,0)",
|
||||
name: "退火",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(1,235,239)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(5, 158, 163)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
textStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
// saveAsImage: {}
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "2%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
boundaryGap: true,
|
||||
data: [],
|
||||
nameTextStyle: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
axisLabel: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: "",
|
||||
type: "value",
|
||||
nameTextStyle: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
axisLabel: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
type: "dashed", //y轴分割线类型
|
||||
color: "rgba(102,102,102,0.9)",
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "黑化",
|
||||
type: "bar",
|
||||
// stack: "Ad",
|
||||
barWidth: 10,
|
||||
emphasis: {
|
||||
focus: "series",
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: "top",
|
||||
color: "#fff",
|
||||
},
|
||||
itemStyle: {
|
||||
borderRadius: [5, 5, 0, 0],
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(250,205,0)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(254,129,0)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(250,205,0)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(254,129,0)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
smooth: true,
|
||||
// lineStyle: {
|
||||
// width: 1,
|
||||
// color: "rgb(1,235,239)",
|
||||
// },
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "退火",
|
||||
type: "bar",
|
||||
// stack: "Ad",
|
||||
barWidth: 10,
|
||||
emphasis: {
|
||||
focus: "series",
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: "top",
|
||||
color: "#fff",
|
||||
},
|
||||
itemStyle: {
|
||||
borderRadius: [5, 5, 0, 0],
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(1,235,239)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(5, 158, 163)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(1,235,239)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(5, 158, 163)",
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
smooth: true,
|
||||
// lineStyle: {
|
||||
// width: 1,
|
||||
// color: "rgb(1,235,239)",
|
||||
// },
|
||||
data: [10,50,80,60,65,58,70,80,90,100,110,120],
|
||||
},
|
||||
],
|
||||
},
|
||||
pieOption: {
|
||||
backgroundColor: "",
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
legend: {
|
||||
top: "bottom",
|
||||
},
|
||||
series: {
|
||||
name: "不合格统计",
|
||||
type: "pie",
|
||||
radius: "50%",
|
||||
itemStyle: {
|
||||
borderRadius: 2,
|
||||
},
|
||||
center: ["50%", "45%"],
|
||||
data: [
|
||||
{ value: 0, name: "划伤" },
|
||||
{ value: 0, name: "气泡" },
|
||||
{ value: 0, name: "水纹" },
|
||||
{ value: 0, name: "崩边" },
|
||||
{ value: 0, name: "雾面" },
|
||||
{ value: 0, name: "麻点" },
|
||||
{ value: 0, name: "线痕" },
|
||||
{ value: 0, name: "破损" },
|
||||
{ value: 0, name: "其他" },
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: "rgba(0, 0, 0, 0.5)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tableHeight: 100,
|
||||
table1Visible: false,
|
||||
table2Visible: false,
|
||||
refValue1: "moocBox1",
|
||||
refValue2: "moocBox2",
|
||||
liData: ["序号","产出名称","规格","型号","开始时间","结束时间","完成进度","产量","状态"],
|
||||
processData1: [],
|
||||
processData2: [],
|
||||
todayMtask: [],
|
||||
speed: 2000,
|
||||
myScroll: null,
|
||||
iliHeight: 30,
|
||||
time: null,
|
||||
delay: 20,
|
||||
start_date: "",
|
||||
end_date: "",
|
||||
yesterday: "",
|
||||
dayInterval: null,
|
||||
chartInterval1: null,
|
||||
chartInterval2: null,
|
||||
chartInterval3: null,
|
||||
stateOption: {
|
||||
30: "生产中",
|
||||
40: "已完成",
|
||||
},
|
||||
currentTime: "",
|
||||
currentDay: "",
|
||||
today: "",
|
||||
yesterdayObjet: {},
|
||||
yesHeihuaData:[
|
||||
{年: 2024, 月: 7, 日: 5, 物料名: "CNC_黑化", 生产数: 260, 合格数: 240, 不合格数: 0, 划伤: 0, 气泡: 0, 水纹: 0, 崩边: 0, 雾面: 0,麻点:0},
|
||||
],
|
||||
yesTuihuoData:[
|
||||
{年: 2024, 月: 7, 日: 5, 物料名: "CNC_退火", 生产数: 250, 合格数: 240, 不合格数: 0, 划伤: 0, 气泡: 0, 水纹: 0, 崩边: 0, 雾面: 0,麻点:0},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//表格table的高度
|
||||
this.tableHeight = document.getElementById("scrollContainer").clientHeight;
|
||||
this.table1Visible = true;
|
||||
this.table2Visible = true;
|
||||
|
||||
this.showTime();
|
||||
this.dayInterval = setInterval(() => {
|
||||
this.showTime();
|
||||
}, 1000);
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
this.days = days;
|
||||
this.currentYear = year;
|
||||
this.currentMonth = month;
|
||||
this.currentDay = day;
|
||||
month = month < 10 ? "0" + month : month;
|
||||
this.start_date = year + "-" + month + "-01";
|
||||
this.end_date =
|
||||
year + "-" + month + "-" + new Date(year, month, 0).getDate();
|
||||
this.today = year + "-" + month + "-" + day;
|
||||
let yesterday = new Date(date.getTime() - 24 * 60 * 60 * 1000);
|
||||
this.yesterday =
|
||||
yesterday.getFullYear() +
|
||||
"-" +
|
||||
(yesterday.getMonth() + 1) +
|
||||
"-" +
|
||||
yesterday.getDate();
|
||||
this.getProductLine1();
|
||||
// this.getProductLine2();
|
||||
this.getMtask1();
|
||||
this.getMtask2();
|
||||
},
|
||||
methods: {
|
||||
//时间
|
||||
showTime() {
|
||||
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
|
||||
this.currentDay = this.$TOOL.dateFormat(
|
||||
new Date(),
|
||||
"yyyy年MM月dd日"
|
||||
);
|
||||
},
|
||||
setChart(name, option = null) {
|
||||
// 根据name 渲染数据, option需填写,否则option为模拟数据
|
||||
var myChart = echarts.getInstanceByDom(
|
||||
document.getElementById(name)
|
||||
);
|
||||
if (myChart == undefined) {
|
||||
myChart = echarts.init(document.getElementById(name), "dark", {
|
||||
renderer: "svg",
|
||||
});
|
||||
}
|
||||
if (option == null) {
|
||||
option = Object.assign({}, this.basicOption);
|
||||
}
|
||||
setTimeout(() => {
|
||||
try {
|
||||
myChart.setOption(option);
|
||||
} catch (error) {}
|
||||
}, 500);
|
||||
return myChart;
|
||||
},
|
||||
//黑化合格数统计
|
||||
getProductLine1() {
|
||||
let that = this;
|
||||
let obj = {
|
||||
query: {
|
||||
start_date: that.start_date,
|
||||
end_date: that.end_date,
|
||||
mgroup_name: "黑化",
|
||||
"group_bys_material": "",
|
||||
"order_bys_material": "",
|
||||
"select_cols_material": "",
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m", obj).then((res) => {
|
||||
console.log("本月黑化生产统计:", res);
|
||||
let list2 = res.data2.ds0;
|
||||
let seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [];
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
seriesData1[i] = 0;
|
||||
seriesData2[i] = 0;
|
||||
}
|
||||
if (list2.length > 0) {
|
||||
list2.forEach((item2) => {
|
||||
let index2 = item2.日 - 1;
|
||||
//合格率=当天的合格数/当天的总生产数
|
||||
seriesData1[index2] += item2.合格数;
|
||||
seriesData2[index2] += item2.生产数;
|
||||
});
|
||||
}
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
if(seriesData2[i]>0&&seriesData1[i] >=0){
|
||||
seriesData3[i] = Math.round(seriesData1[i]/seriesData2[i])*100 ;
|
||||
}else{
|
||||
seriesData3[i]=0;
|
||||
}
|
||||
}
|
||||
let chart1Option = deepCopy(this.basicOption);
|
||||
let chart2Option = deepCopy(this.basicOption);
|
||||
|
||||
|
||||
chart1Option.series[0].data = seriesData1;
|
||||
chart2Option.series[0].type = 'line';
|
||||
chart2Option.series[0].data = seriesData3;
|
||||
that.getProductLine2(chart1Option,chart2Option);
|
||||
});
|
||||
|
||||
//黑化生产昨日统计
|
||||
let obj2 = {
|
||||
query: {
|
||||
start_date: that.yesterday,
|
||||
end_date: that.yesterday,
|
||||
mgroup_name: "黑化",
|
||||
"group_bys_material": "",
|
||||
"order_bys_material": "",
|
||||
"select_cols_material": "",
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m", obj2).then((res2) => {
|
||||
// console.log("黑化生产昨日统计:", res2);
|
||||
that.yesHeihuaData = res2.data2.ds0;
|
||||
let pieOption = deepCopy(that.pieOption);
|
||||
if (res2.data2.ds0.length > 0) {
|
||||
res2.data2.ds0.forEach((item) => {
|
||||
pieOption.series.data[0].value += item.划伤;
|
||||
pieOption.series.data[1].value += item.气泡;
|
||||
pieOption.series.data[2].value = item.水纹;
|
||||
pieOption.series.data[3].value = item.崩边;
|
||||
pieOption.series.data[4].value = item.雾面;
|
||||
pieOption.series.data[5].value = item.麻点;
|
||||
pieOption.series.data[5].value = item.线痕;
|
||||
pieOption.series.data[5].value = item.破损;
|
||||
pieOption.series.data[5].value = item.其他;
|
||||
});
|
||||
}
|
||||
let pieChart1 = this.setChart("pieChart1", pieOption);
|
||||
let index1 = 0;
|
||||
this.chartInterval3 = setInterval(function () {
|
||||
if (index1 < that.pieOption.series.data.length) {
|
||||
pieChart1.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
pieChart1.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index1,
|
||||
});
|
||||
pieChart1.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index1,
|
||||
});
|
||||
index1++;
|
||||
} else {
|
||||
index1 = 0;
|
||||
}
|
||||
}, 3000);
|
||||
debugger;
|
||||
});
|
||||
},
|
||||
//退火合格数统计
|
||||
getProductLine2(chart1Option,chart2Option) {
|
||||
let that = this;
|
||||
let obj = {
|
||||
query: {
|
||||
start_date: that.start_date,
|
||||
end_date: that.end_date,
|
||||
mgroup_name: "退火",
|
||||
"group_bys_material": "",
|
||||
"order_bys_material": "",
|
||||
"select_cols_material": "",
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m", obj).then((res) => {
|
||||
// console.log("本月退火生产统计:", res);
|
||||
let list = res.data2.ds0;
|
||||
let seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
xAxisData = [];
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
let day = i + 1;
|
||||
let text = day + "日";
|
||||
xAxisData[i] = text;
|
||||
seriesData1[i] = 0;
|
||||
seriesData2[i] = 0;
|
||||
}
|
||||
if (list.length > 0) {
|
||||
list.forEach((item2) => {
|
||||
let index2 = item2.日 - 1;
|
||||
seriesData1[index2] += item2.合格数;
|
||||
seriesData2[index2] += item2.生产数;
|
||||
});
|
||||
}
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
if(seriesData2[i]>0&&seriesData1[i] >=0){
|
||||
seriesData3[i] = Math.round(seriesData1[i]/seriesData2[i])*100 ;
|
||||
}else{
|
||||
seriesData3[i]=0;
|
||||
}
|
||||
}
|
||||
chart1Option.xAxis.data = xAxisData;
|
||||
chart2Option.xAxis.data = xAxisData;
|
||||
|
||||
|
||||
chart1Option.series[1].data = seriesData1;
|
||||
chart2Option.series[1].type = 'line';
|
||||
chart2Option.series[1].data = seriesData3;
|
||||
|
||||
let chart1 = this.setChart("chart1", chart1Option);
|
||||
let chart2 = this.setChart("chart2", chart2Option);
|
||||
|
||||
let index2 = 0;
|
||||
this.chartInterval2 = setInterval(function () {
|
||||
if (index2 < chart1Option.series[0].data.length) {
|
||||
chart2.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
chart2.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
chart2.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
chart1.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
chart1.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
chart1.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
index2++;
|
||||
} else {
|
||||
index2 = 0;
|
||||
}
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
//车间生产昨日统计
|
||||
let obj2 = {
|
||||
query: {
|
||||
start_date: that.yesterday,
|
||||
end_date: that.yesterday,
|
||||
mgroup_name: "退火",
|
||||
"group_bys_material": "",
|
||||
"order_bys_material": "",
|
||||
"select_cols_material": "",
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m", obj2).then((res2) => {
|
||||
// console.log("车间生产昨日统计:", res2);
|
||||
that.yesTuihuoData = res2.data2.ds0;
|
||||
let pieOption = deepCopy(that.pieOption);
|
||||
if (res2.data2.ds0.length > 0) {
|
||||
res2.data2.ds0.forEach((item) => {
|
||||
pieOption.series.data[0].value += item.划伤;
|
||||
pieOption.series.data[1].value += item.气泡;
|
||||
pieOption.series.data[2].value = item.水纹;
|
||||
pieOption.series.data[3].value = item.崩边;
|
||||
pieOption.series.data[4].value = item.雾面;
|
||||
pieOption.series.data[5].value = item.麻点;
|
||||
pieOption.series.data[5].value = item.线痕;
|
||||
pieOption.series.data[5].value = item.破损;
|
||||
pieOption.series.data[5].value = item.其他;
|
||||
});
|
||||
}
|
||||
let pieChart2 = this.setChart("pieChart2", pieOption);
|
||||
let index2 = 0;
|
||||
this.chartInterval3 = setInterval(function () {
|
||||
if (index2 < pieOption.series.data.length) {
|
||||
pieChart2.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
pieChart2.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
pieChart2.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
index2++;
|
||||
} else {
|
||||
index2 = 0;
|
||||
}
|
||||
}, 3000);
|
||||
debugger;
|
||||
});
|
||||
},
|
||||
//黑化任务进度
|
||||
getMtask1() {
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, search: '黑化'})
|
||||
.then((res) => {
|
||||
if(res.length != 1){
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
let mgroup = res[0].id;
|
||||
let obj = {};
|
||||
// obj.start_date__gte = this.start_date;
|
||||
// obj.end_date__lte = this.end_date;
|
||||
obj.mgroup = mgroup;
|
||||
obj.page = 0;
|
||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||
let processData = [];
|
||||
res.forEach((item) => {
|
||||
let arr = [],
|
||||
obj1 = {},
|
||||
obj2 = {},
|
||||
obj3 = {},
|
||||
obj4 = {},
|
||||
obj5 = {},
|
||||
obj6 = {},
|
||||
obj7 = {},
|
||||
obj8 = {};
|
||||
obj1.elType = "primary";
|
||||
obj1.value = item.material_out_.name;
|
||||
obj2.elType = "primary";
|
||||
obj2.value = item.material_out_.specification;
|
||||
obj8.elType = "primary";
|
||||
obj8.value = item.material_out_.model;
|
||||
obj3.elType = "primary";
|
||||
obj3.value = item.start_date;
|
||||
obj4.elType = "primary";
|
||||
obj4.value = item.end_date;
|
||||
obj5.elType = "progress";
|
||||
let process = Math.round(
|
||||
(item.count_ok / item.count) * 100
|
||||
);
|
||||
obj5.value = process;
|
||||
obj6.elType = "primary";
|
||||
obj6.value = item.count_ok;
|
||||
obj7.elType = "tag";
|
||||
obj7.value = item.state;
|
||||
arr.push(obj1);
|
||||
arr.push(obj2);
|
||||
arr.push(obj8);
|
||||
arr.push(obj3);
|
||||
arr.push(obj4);
|
||||
arr.push(obj5);
|
||||
arr.push(obj6);
|
||||
arr.push(obj7);
|
||||
processData.push(arr);
|
||||
});
|
||||
this.processData1 = processData;
|
||||
});
|
||||
});
|
||||
},
|
||||
//退火任务进度
|
||||
getMtask2() {
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0, search: '退火'})
|
||||
.then((res) => {
|
||||
if(res.length != 1){
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
let mgroup = res[0].id;
|
||||
let obj = {};
|
||||
// obj.start_date__gte = this.start_date;
|
||||
// obj.end_date__lte = this.end_date;
|
||||
obj.mgroup = mgroup;
|
||||
obj.page = 0;
|
||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||
let processData = [];
|
||||
res.forEach((item) => {
|
||||
let arr = [],
|
||||
obj1 = {},
|
||||
obj2 = {},
|
||||
obj3 = {},
|
||||
obj4 = {},
|
||||
obj5 = {},
|
||||
obj6 = {},
|
||||
obj7 = {},
|
||||
obj8 = {};
|
||||
obj1.elType = "primary";
|
||||
obj1.value = item.material_out_.name;
|
||||
obj2.elType = "primary";
|
||||
obj2.value = item.material_out_.specification;
|
||||
obj8.elType = "primary";
|
||||
obj8.value = item.material_out_.model;
|
||||
obj3.elType = "primary";
|
||||
obj3.value = item.start_date;
|
||||
obj4.elType = "primary";
|
||||
obj4.value = item.end_date;
|
||||
obj5.elType = "progress";
|
||||
let process = Math.round(
|
||||
(item.count_ok / item.count) * 100
|
||||
);
|
||||
obj5.value = process;
|
||||
obj6.elType = "primary";
|
||||
obj6.value = item.count_ok;
|
||||
obj7.elType = "tag";
|
||||
obj7.value = item.state;
|
||||
arr.push(obj1);
|
||||
arr.push(obj2);
|
||||
arr.push(obj8);
|
||||
arr.push(obj3);
|
||||
arr.push(obj4);
|
||||
arr.push(obj5);
|
||||
arr.push(obj6);
|
||||
arr.push(obj7);
|
||||
processData.push(arr);
|
||||
});
|
||||
this.processData2 = processData;
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@font-face {
|
||||
font-family: "myfont";
|
||||
/* 字体名称 */
|
||||
src: url("../../utils/youShe.ttf");
|
||||
/* 字体文件相对路径 */
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
background-image: url("/public/img/photon_bg.png");
|
||||
color: #fff;
|
||||
font-family: "Microsoft Yahei" !important;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: url("/public/img/photon_header.png");
|
||||
border-bottom: none;
|
||||
background-size: 100% 100%;
|
||||
font-size: 26px;
|
||||
display: block;
|
||||
height: 80px;
|
||||
color: rgb(149, 255, 255);
|
||||
font-family: "Microsoft Yahei";
|
||||
text-align: center;
|
||||
padding: 12px 0px;
|
||||
}
|
||||
.header > .title {
|
||||
font-weight: bold;
|
||||
font-family: "myfont";
|
||||
font-size: 32px;
|
||||
}
|
||||
.header > .timer {
|
||||
font-size: 14px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
.box {
|
||||
background: rgba(10, 63, 68, 0.5);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.boxtitle {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
height: 36px;
|
||||
background: linear-gradient(
|
||||
40deg,
|
||||
rgba(11, 101, 140, 0.451),
|
||||
rgba(0, 34, 48, 0.335),
|
||||
rgba(11, 101, 140, 0.451)
|
||||
);
|
||||
}
|
||||
|
||||
.bgimg {
|
||||
background-image: url("https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png");
|
||||
background-size: 140% 100%;
|
||||
}
|
||||
|
||||
.boxlabel {
|
||||
margin-left: 6px;
|
||||
font-size: 18px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.boxmain {
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
.lineDiv {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.boxmainItemNumber {
|
||||
color: rgb(42,234,200);
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-face:24px;
|
||||
font-family: electronicFont;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.boxmain {
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.flex_center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.border {
|
||||
border: 1px dashed #49bcf7;
|
||||
}
|
||||
|
||||
.bigdata {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.marquee_top {
|
||||
transition: all 0.5s ease-in-out;
|
||||
margin-top: -26px;
|
||||
}
|
||||
|
||||
.totall {
|
||||
color: #fff;
|
||||
background-color: rgb(10, 63, 68);
|
||||
}
|
||||
|
||||
.rollData {
|
||||
background-color: rgb(10, 39, 50);
|
||||
}
|
||||
|
||||
.rollData:nth-of-type(2n + 1) {
|
||||
background-color: rgb(0, 59, 81);
|
||||
}
|
||||
.halfBox {
|
||||
height: 50%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -519,7 +519,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -560,7 +560,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -601,7 +601,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
|
|||
|
|
@ -171,6 +171,14 @@ export default {
|
|||
}
|
||||
return classInfo;
|
||||
},
|
||||
precen(a, b) {
|
||||
if (b !== 0 && b !== null && a !== null) {
|
||||
let precen = (a / b)* 100;
|
||||
return precen.toFixed(2) + "%";
|
||||
} else {
|
||||
return "/";
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
|
|
@ -255,11 +263,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate = 0;
|
||||
if (
|
||||
lastDiff == "/" &&
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = (lastDiff / lastNum) * 100;
|
||||
lastRate = this.precen(lastDiff, lastNum);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -512,7 +512,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -553,7 +553,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "煤磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@
|
|||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let params = {};
|
||||
let params = {page:0};
|
||||
let arr = [];
|
||||
if(that.query.type==0){//日
|
||||
params.type='day_s';
|
||||
|
|
@ -205,11 +205,14 @@
|
|||
}else if(that.query.type==1){//月
|
||||
params.type='month_s';
|
||||
params.year_s = Number(that.query.year);
|
||||
}else if (that.query.type==2){
|
||||
params.type='year_s';
|
||||
params.year_s = Number(that.query.yearStart);
|
||||
}
|
||||
params.mgroup__belong_dept = that.query.belong_dept;
|
||||
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let data = res.results;
|
||||
let data = res;
|
||||
let wrapArr = [];
|
||||
let innerArr = [];
|
||||
let ind = 0;
|
||||
|
|
@ -229,31 +232,41 @@
|
|||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='原料磨'){
|
||||
wrapArr[ind][1]=item
|
||||
}else if(item.mgroup_name=='原料压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
if(item.mgroup_name=='回转窑'){
|
||||
wrapArr[ind][1]=item
|
||||
}else if (item.mgroup_name=='烧成压缩空气') {
|
||||
wrapArr[ind][2]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}
|
||||
}else{
|
||||
if(item.mgroup_name=='水泥磨'){
|
||||
wrapArr[ind][1]=item
|
||||
}else if(item.mgroup_name=='水泥压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}
|
||||
}
|
||||
});
|
||||
// debugger;
|
||||
// console.log(wrapArr);
|
||||
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;
|
||||
let time = item1[0].day_s && item1[0].month_s
|
||||
? item1[0].year_s + '.' + item1[0].month_s + '.' + item1[0].day_s
|
||||
: item1[0].month_s
|
||||
? item1[0].year_s + '.' + item1[0].month_s
|
||||
: item1[0].year_s;
|
||||
itemArr.push(time)
|
||||
itemArr.push( item1[0].elec_consume)
|
||||
itemArr.push( item1[0].elec_coal_consume)
|
||||
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)
|
||||
|
|
@ -265,18 +278,26 @@
|
|||
}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)
|
||||
itemArr.push( item1[0].total_production) //总产量
|
||||
itemArr.push( item1[0].cen_consume_unit) // 单位产品综合能耗
|
||||
if (item1[1]){
|
||||
itemArr.push( item1[1].elec_consume)
|
||||
itemArr.push( item1[1].elec_coal_consume)
|
||||
}else{
|
||||
itemArr.push( 0)
|
||||
itemArr.push( 0)
|
||||
}
|
||||
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)//压缩空气
|
||||
if(item1 &&item1[2]){
|
||||
itemArr.push(item1[2].cair_consume)//压缩空气
|
||||
}else{
|
||||
itemArr.push( 0)
|
||||
}
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@ export default {
|
|||
wrapArr2[i].industry_total_val;
|
||||
this.tableDatas[i][2] =
|
||||
wrapArr2[i].industry_add_val;
|
||||
this.tableDatas[i][3] = wrapArr2[i].en_consume;
|
||||
this.tableDatas[i][3] = wrapArr2[i].en_consume; //当期值
|
||||
let tValue3 = 0,
|
||||
hValue3 = 0,
|
||||
tPercent3 = 0,
|
||||
hPercent3 = 0;
|
||||
if (wrapArr2[i].month_s > 1) {
|
||||
if (wrapArr2[i].month_s > 1 && i>0) {
|
||||
tValue3 = wrapArr2[i - 1]
|
||||
? wrapArr2[i - 1].en_consume
|
||||
: "/";
|
||||
|
|
@ -126,9 +126,9 @@ export default {
|
|||
}
|
||||
if (tValue3 !== "/" && tValue3 !== 0) {
|
||||
tPercent3 =
|
||||
((wrapArr2[i].en_consume - tValue3) /
|
||||
(((wrapArr2[i].en_consume - tValue3) /
|
||||
tValue3) *
|
||||
100;
|
||||
100).toFixed(2);
|
||||
} else {
|
||||
tPercent3 = "/";
|
||||
}
|
||||
|
|
@ -141,14 +141,14 @@ export default {
|
|||
} else {
|
||||
hPercent3 = "/";
|
||||
}
|
||||
this.tableDatas[i][4] = hPercent3;
|
||||
this.tableDatas[i][5] = tPercent3;
|
||||
this.tableDatas[i][6] = wrapArr2[i].en_consume_unit;
|
||||
this.tableDatas[i][4] = hPercent3; //环比
|
||||
this.tableDatas[i][5] = tPercent3; //同比
|
||||
this.tableDatas[i][6] = wrapArr2[i].en_consume_unit; //总产值当前
|
||||
let tValue6 = 0,
|
||||
hValue6 = 0,
|
||||
tPercent6 = 0,
|
||||
hPercent6 = 0;
|
||||
if (wrapArr2[i].month_s > 1) {
|
||||
if (wrapArr2[i].month_s > 1 && i > 0) {
|
||||
tValue6 = wrapArr2[i - 1]
|
||||
? wrapArr2[i - 1].en_consume_unit
|
||||
: "/";
|
||||
|
|
@ -156,7 +156,7 @@ export default {
|
|||
tValue6 = wrapArr[12]
|
||||
? wrapArr[12].en_consume_unit
|
||||
: "/";
|
||||
}
|
||||
}
|
||||
if (tValue6 !== "/" && tValue6 !== 0) {
|
||||
tPercent6 =
|
||||
((wrapArr2[i].en_consume_unit - tValue6) /
|
||||
|
|
@ -176,15 +176,15 @@ export default {
|
|||
} else {
|
||||
hPercent6 = "/";
|
||||
}
|
||||
this.tableDatas[i][7] = hPercent6;
|
||||
this.tableDatas[i][8] = tPercent6;
|
||||
this.tableDatas[i][7] = hPercent6; //总产值环比
|
||||
this.tableDatas[i][8] = tPercent6; //总产值同比
|
||||
this.tableDatas[i][9] =
|
||||
wrapArr2[i].en_add_consume_unit;
|
||||
let tValue9 = 0,
|
||||
hValue9 = 0,
|
||||
tPercent9 = 0,
|
||||
hPercent9 = 0;
|
||||
if (wrapArr2[i].month_s > 1) {
|
||||
if (wrapArr2[i].month_s > 1 && i > 0) {
|
||||
tValue9 = wrapArr2[i - 1]
|
||||
? wrapArr2[i - 1].en_add_consume_unit
|
||||
: "/";
|
||||
|
|
|
|||
|
|
@ -473,10 +473,6 @@ export default {
|
|||
that.days = myDate.getDate();
|
||||
that.hours = myDate.getHours();
|
||||
that.getMpoints();
|
||||
that.getTableHourData();
|
||||
that.getHourData(that.year, that.month, that.days);
|
||||
that.getDayData(that.year, that.month);
|
||||
that.getMonthData(that.year);
|
||||
},
|
||||
methods: {
|
||||
getMpoints() {
|
||||
|
|
@ -484,9 +480,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.page = 0;
|
||||
obj.enabled = 1;
|
||||
// obj.enabled = 1;
|
||||
obj.material__code__in = "elec,elec_0";
|
||||
obj.ep_monitored__isnull = 0;
|
||||
obj.need_display = 1;
|
||||
obj.ordering = "report_sortstr";
|
||||
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
||||
|
|
@ -497,13 +492,17 @@ export default {
|
|||
});
|
||||
console.log("arr", arr);
|
||||
that.mpoints = arr;
|
||||
|
||||
that.getTableHourData();
|
||||
that.getHourData(that.year, that.month, that.days);
|
||||
that.getDayData(that.year, that.month);
|
||||
that.getMonthData(that.year);
|
||||
});
|
||||
},
|
||||
typeRadioChange() {
|
||||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
console.log(val);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
|
|
@ -637,7 +636,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -678,7 +677,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// // obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -719,7 +718,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -728,13 +727,14 @@ export default {
|
|||
seriesData.push([]);
|
||||
}
|
||||
let data = response;
|
||||
console.log('sd',seriesData, that.mpoints)
|
||||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index != undefined){
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
for (let j = 0; j < that.mpoints.length; j++) {
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ export default {
|
|||
params.year = that.query.year_s;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
let data = [];
|
||||
if (res.length > 0) {
|
||||
data = res[0];
|
||||
}
|
||||
that.getData(data);
|
||||
// let data = [];
|
||||
// if (res.length > 0) {
|
||||
// this.data = res;
|
||||
// }
|
||||
that.getData(res);
|
||||
});
|
||||
},
|
||||
getData(goalData) {
|
||||
|
|
@ -215,46 +215,81 @@ export default {
|
|||
? item.入窑生料_Fe2O3_rate_pass
|
||||
: "/";
|
||||
arr[8] =
|
||||
item.入窑生料_细度_rate_pass != null
|
||||
? item.入窑生料_细度_rate_pass
|
||||
item.出磨煤粉_细度_rate_pass != null
|
||||
? item.出磨煤粉_细度_rate_pass
|
||||
: "/";
|
||||
arr[9] =
|
||||
item.入窑生料_水分_rate_pass != null
|
||||
? item.入窑生料_水分_rate_pass
|
||||
item.出磨煤粉_水分_rate_pass != null
|
||||
? item.出磨煤粉_水分_rate_pass
|
||||
: "/";
|
||||
arr[10] =
|
||||
item.熟料_立升重_rate_pass != null
|
||||
? item.熟料_立升重_rate_pass
|
||||
item.出窑熟料_立升重_rate_pass != null
|
||||
? item.出窑熟料_立升重_rate_pass
|
||||
: "/";
|
||||
arr[11] =
|
||||
item.熟料_fCaO_rate_pass != null
|
||||
? item.熟料_fCaO_rate_pass
|
||||
item.出窑熟料_fCaO_rate_pass != null
|
||||
? item.出窑熟料_fCaO_rate_pass
|
||||
: "/";
|
||||
|
||||
//煤耗
|
||||
arr[12] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[5] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
arr[6] = arr[4] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
arr[12] = item.coal_consume_unit; //当期值(KW·h/t)
|
||||
let keyValue = "goal_val_" + n;
|
||||
if (goalData.length > 0){
|
||||
goalData.forEach((item) => {
|
||||
if (item.id == "3638341891940192256") {
|
||||
arr[13] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}else if (item.id == "3637651365016526848"){
|
||||
arr[25] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}
|
||||
});
|
||||
};
|
||||
let dq = 0
|
||||
if (arr[13] !== null && arr[13] !== undefined){
|
||||
dq = arr[12] - arr[13]; //当期与目标差值(KW·h/t)
|
||||
}else{
|
||||
dq == "/"
|
||||
};
|
||||
arr[14] = dq; //当期与目标差值
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]
|
||||
? wrapArr0[ind_pre].elec_consume_unit
|
||||
? wrapArr0[ind_pre].coal_consume_unit
|
||||
: "/";
|
||||
} else {
|
||||
ind_pre = ind - 1;
|
||||
huanbi = wrapArr[ind_pre]
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
? wrapArr[ind_pre].coal_consume_unit
|
||||
? wrapArr[ind_pre].coal_consume_unit
|
||||
: "/"
|
||||
: "/";
|
||||
}
|
||||
arr[15] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[16] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[17] = item.celec_consume_unit; //环比增长率(%)
|
||||
arr[18] = item.celec_consume_unit; //同比增长率(%)
|
||||
if(huanbi !=="/"){
|
||||
arr[16] = arr[12] - huanbi; //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[16] = "/"
|
||||
};
|
||||
if (arr[15] !== "/"&& arr[15]!== 0 && arr[16]!=="/") {
|
||||
arr[17] = (arr[16] / arr[15]) * 100; //环比增长率(%)
|
||||
} else{
|
||||
arr[17] = "/"
|
||||
};
|
||||
let sameRate = 0;
|
||||
if (
|
||||
wrapArr0[ind] &&
|
||||
wrapArr0[ind].coal_consume_unit
|
||||
) {
|
||||
sameRate =
|
||||
((arrs[1] -
|
||||
wrapArr0[ind].coal_consume_unit) /
|
||||
wrapArr0[ind].coal_consume_unit) *
|
||||
100;
|
||||
} else {
|
||||
sameRate = "/";
|
||||
}
|
||||
arr[18] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||
//电耗
|
||||
//设备
|
||||
arr[19] =
|
||||
|
|
@ -278,8 +313,10 @@ export default {
|
|||
? item.窑头排风机_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)
|
||||
// arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
if (item.elec_consume_unit != null &&item.elec_consume_unit !== "/"){
|
||||
arr[26] = arr[24]-arr[25] //当期与目标差值(KW·h/t)
|
||||
}
|
||||
let ind_pre1 = 0,
|
||||
huanbi1 = 0;
|
||||
if (item.month_s == 1) {
|
||||
|
|
@ -296,13 +333,18 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
arr[27] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[28] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[29] = item.celec_consume_unit; //环比增长率(%)
|
||||
if(arr[27]!=="/" && huanbi1!=="/"){
|
||||
arr[28] = arr[24] - huanbi1; //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[28] = "/"
|
||||
}
|
||||
if(arr[28]!=="/" && huanbi1!=="/"){
|
||||
arr[29] = (arr[28] / huanbi1) * 100; //环比增长率(%)
|
||||
}else{
|
||||
arr[29] = "/"}; //环比增长率(%)
|
||||
arr[30] = item.celec_consume_unit; //同比增长率(%)
|
||||
arr[31] = item.celec_consume_unit; //同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr);
|
||||
that.tableDatas = wrapArr;
|
||||
} else {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ export default {
|
|||
obj.hour = hours_h;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
// // obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
||||
|
|
@ -469,7 +469,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -509,7 +509,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -550,7 +550,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "回转窑";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "水泥磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -632,7 +632,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "水泥磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -673,7 +673,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "水泥磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -685,6 +685,9 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<td class="numCell">{{ item[0] }}</td>
|
||||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td rowspan="8" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==8||index==9" class="numCell">{{ item[0] }}</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
|
@ -59,9 +60,9 @@
|
|||
>
|
||||
{{ item[4] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[5].toFixed(2) }}</td>
|
||||
<td class="numCell">{{ item[5] }}</td>
|
||||
<td class="numCell">{{ item[6] }}</td>
|
||||
<td class="numCell">{{ item[7].toFixed(2) }}</td>
|
||||
<td class="numCell">{{ item[7] }}</td>
|
||||
<td class="numCell">{{ item[8] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
@ -326,8 +327,18 @@ export default {
|
|||
mgroup: "",
|
||||
},
|
||||
tableDatas: [
|
||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["出厂水泥", "P.O42.5R 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O42.5R 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
],
|
||||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
|
|
@ -360,6 +371,54 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O52.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
|
@ -384,12 +443,60 @@ export default {
|
|||
},
|
||||
yAxis: yAxis,
|
||||
series: [
|
||||
{
|
||||
{
|
||||
name: "总产量",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O52.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
|
@ -440,43 +547,69 @@ export default {
|
|||
params1.year_s = year;
|
||||
params1.type = "year_s";
|
||||
params1.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
|
||||
if (res1.length > 0) {
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][4] = data1.total_production;
|
||||
that.tableDatas[1][4] = data1.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
//月
|
||||
res1.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][4] = item.val;
|
||||
}
|
||||
}
|
||||
)}
|
||||
}).then(()=>{
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
params2.year_s = year;
|
||||
params2.month_s = month;
|
||||
params2.type = "month_s";
|
||||
params2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
|
||||
if (res2.length > 0) {
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][3] = data2.total_production;
|
||||
that.tableDatas[1][3] = data2.elec_consume_unit;
|
||||
res2.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][3] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][3] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
//昨日
|
||||
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 = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][2] = data3.total_production;
|
||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
}).then(() => {
|
||||
//月年目标
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
|
|
@ -488,63 +621,121 @@ export default {
|
|||
data5.forEach((item5) => {
|
||||
let str = "goal_val_" + that.month;
|
||||
if (item5.goal_cate_name == "总产量(t)") {
|
||||
that.tableDatas[0][5] = item5[str];
|
||||
that.tableDatas[0][7] = item5.goal_val;
|
||||
that.tableDatas[7][5] = item5[str];
|
||||
that.tableDatas[7][7] = item5.goal_val;
|
||||
that.tableDatas[7][8] = precen(
|
||||
that.tableDatas[7][4],
|
||||
that.tableDatas[7][7]
|
||||
);//计算年完成度
|
||||
that.tableDatas[7][6] = precen(
|
||||
that.tableDatas[7][3],
|
||||
that.tableDatas[7][5]
|
||||
);// 计算月完成度
|
||||
|
||||
} else if (
|
||||
item5.goal_cate_name ==
|
||||
"单位产品分布电耗(KW·h/t)"
|
||||
) {
|
||||
that.tableDatas[1][5] = item5[str];
|
||||
that.tableDatas[1][7] = item5.goal_val;
|
||||
that.tableDatas[9][5] = item5[str];
|
||||
that.tableDatas[9][7] = item5.goal_val;
|
||||
//计算月目标值
|
||||
that.tableDatas[9][8] = precen(
|
||||
that.tableDatas[9][4],
|
||||
that.tableDatas[9][7]
|
||||
);//计算年完成度
|
||||
that.tableDatas[9][6] = precen(
|
||||
that.tableDatas[9][3],
|
||||
that.tableDatas[9][5]
|
||||
);// 计算月完成度
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.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][4] = data1.total_production;
|
||||
that.tableDatas[0][8] = precen(
|
||||
that.tableDatas[0][4],
|
||||
that.tableDatas[0][7]
|
||||
);
|
||||
that.tableDatas[1][4] = data1.elec_consume_unit;
|
||||
that.tableDatas[1][8] = precen(
|
||||
that.tableDatas[1][4],
|
||||
that.tableDatas[1][7]
|
||||
);
|
||||
}
|
||||
});
|
||||
//月
|
||||
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][3] = data2.total_production;
|
||||
that.tableDatas[0][6] = precen(
|
||||
that.tableDatas[0][3],
|
||||
that.tableDatas[0][5]
|
||||
);
|
||||
that.tableDatas[1][3] = data2.elec_consume_unit;
|
||||
that.tableDatas[1][6] = precen(
|
||||
that.tableDatas[1][3],
|
||||
that.tableDatas[1][5]
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
//昨日
|
||||
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 = that.query.mgroup;
|
||||
this.$API.enm.mpointstat.list.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
res3.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][2] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][2] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
// this.$API.mtm.goal.list
|
||||
// .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][4] = data1.total_production;
|
||||
// that.tableDatas[0][8] = precen(
|
||||
// that.tableDatas[0][4],
|
||||
// that.tableDatas[0][7]
|
||||
// );
|
||||
// that.tableDatas[1][4] = data1.elec_consume_unit;
|
||||
// that.tableDatas[1][8] = precen(
|
||||
// that.tableDatas[1][4],
|
||||
// that.tableDatas[1][7]
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// //月
|
||||
// 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][3] = data2.total_production;
|
||||
// that.tableDatas[0][6] = precen(
|
||||
// that.tableDatas[0][3],
|
||||
// that.tableDatas[0][5]
|
||||
// );
|
||||
// that.tableDatas[1][3] = data2.elec_consume_unit;
|
||||
// that.tableDatas[1][6] = precen(
|
||||
// that.tableDatas[1][3],
|
||||
// that.tableDatas[1][5]
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
that.getDayData(year, month);
|
||||
that.getMonthData(year);
|
||||
});
|
||||
|
|
@ -572,7 +763,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
//获取天数据
|
||||
//获取天数据-图表
|
||||
getDayData(year, month) {
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
|
|
@ -581,19 +772,53 @@ export default {
|
|||
query1.month_s = month;
|
||||
query1.type = "day_s";
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
this.$API.enm.mpointstat.list.req(query1).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [];
|
||||
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [],
|
||||
seriesData6 = [],
|
||||
seriesData7 = [],
|
||||
seriesData8 = [],
|
||||
seriesData9 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
seriesData5[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.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 = seriesData5;
|
||||
options.series[6].data = seriesData6;
|
||||
options.series[7].data = seriesData7;
|
||||
options.series[8].data = seriesData8;
|
||||
options.series[9].data = seriesData9;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i + "日";
|
||||
|
|
@ -603,7 +828,7 @@ export default {
|
|||
that.optionDay = options;
|
||||
});
|
||||
},
|
||||
//获取月数据
|
||||
//获取月数据-图表
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
|
|
@ -611,18 +836,53 @@ export default {
|
|||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
this.$API.enm.mpointstat.list.req(query2).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [];
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [],
|
||||
seriesData6 = [],
|
||||
seriesData7 = [],
|
||||
seriesData8 = [],
|
||||
seriesData9 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
seriesData5[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.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 = seriesData5;
|
||||
options.series[6].data = seriesData6;
|
||||
options.series[7].data = seriesData7;
|
||||
options.series[8].data = seriesData8;
|
||||
options.series[9].data = seriesData9;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
|
|
|
|||
|
|
@ -113,13 +113,12 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getData(goalData) {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
query0.page = 0;
|
||||
query0.type = "month_st";
|
||||
query0.year_s = that.query.year_s - 1;
|
||||
query0.mgroup = "3346520558031773696";
|
||||
let wrapArr = [],
|
||||
wrapArr0 = [],
|
||||
wrapArrs = [];
|
||||
|
|
@ -167,7 +166,7 @@ export default {
|
|||
arr[3] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[4] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
arr[5] = arr[3] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
arr[5] = arr[3] - arr[4]; //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
|
|
@ -183,14 +182,36 @@ export default {
|
|||
: "/"
|
||||
: "/";
|
||||
}
|
||||
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; //同比增长率(%)
|
||||
arr[6] = huanbi; //环期值(KW·h/t)上个月的值\
|
||||
let diff = 0;
|
||||
if (arr[6] == "/"){
|
||||
diff == "/";
|
||||
}else{
|
||||
diff = arr[3] - arr[6]; //当期与环期差值(KW·h/t)
|
||||
}
|
||||
arr[7] = diff;
|
||||
if (arr[7]=="/" || arr[6]=="/" || arr[6]==0){
|
||||
arr[8] == "/";
|
||||
}else{
|
||||
arr[8] = (arr[7]/arr[6])*100 //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
}
|
||||
let sameRate = 0;
|
||||
if (
|
||||
wrapArr0[ind] &&
|
||||
wrapArr0[ind].elec_consume_unit
|
||||
) {
|
||||
sameRate =
|
||||
((arrs[1] -
|
||||
wrapArr0[ind].elec_consume_unit) /
|
||||
wrapArr0[ind].elec_consume_unit) *
|
||||
100;
|
||||
} else {
|
||||
sameRate = "/";
|
||||
}
|
||||
arr[9] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||
// arr[10] = item.celec_consume_unit; //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr);
|
||||
that.tableDatas = wrapArr;
|
||||
} else {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ export default {
|
|||
//当期与目标差值(KW·h/t)
|
||||
let diff = 0;
|
||||
if (item[2] !== "/") {
|
||||
diff = item[1] - item[2];
|
||||
diff = (item[1] - item[2]).toFixed(2);
|
||||
} else {
|
||||
diff = "/";
|
||||
}
|
||||
|
|
@ -240,9 +240,9 @@ export default {
|
|||
let num = index - 1;
|
||||
if (
|
||||
wrapArr[num] &&
|
||||
wrapArr[num].elec_consume_unit
|
||||
wrapArr[num][1]
|
||||
) {
|
||||
lastNum = wrapArr[num].elec_consume_unit;
|
||||
lastNum = wrapArr[num][1];
|
||||
} else {
|
||||
lastNum = "/";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,17 +203,17 @@
|
|||
if(that.deptName=='原料车间'){
|
||||
that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}];
|
||||
that.header2 = ['辅料','干混生料'];//物料
|
||||
that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项
|
||||
// that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}];
|
||||
that.header2 = ['入窑生料','熟料'];//物料
|
||||
that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项
|
||||
// that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
}else{
|
||||
that.header2Obj=[{name:'出磨水泥',lengths:3}];
|
||||
that.header2 = ['出磨水泥'];//物料
|
||||
that.header3 = ['比表面积','SO3','掺量'];//检测项
|
||||
// that.header3 = ['比表面积','SO3','掺量'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
}
|
||||
let params = {page: 0};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
type="primary"
|
||||
@click.stop="addStlog"
|
||||
v-if="activeName == 'fourth'"
|
||||
v-auth="'sflogexp.create'"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
|
|
@ -129,7 +130,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit"
|
||||
@click="submit" v-auth="'sflog.update'"
|
||||
>保存</el-button
|
||||
>
|
||||
</el-footer>
|
||||
|
|
@ -168,7 +169,7 @@
|
|||
type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit5(item)"
|
||||
style="margin-left: 20px"
|
||||
style="margin-left: 20px" v-auth="'mpointstat.create'"
|
||||
>保存</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
|
@ -225,6 +226,7 @@
|
|||
size="small"
|
||||
@click="mpointStat_del(scope.row)"
|
||||
type="danger"
|
||||
v-auth="'mpointstat.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
@ -539,6 +541,7 @@
|
|||
@click="
|
||||
sflogexp_edit(scope.row)
|
||||
"
|
||||
v-auth="'sflogexp.update'"
|
||||
type="primary"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -611,7 +611,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -652,7 +652,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ export default {
|
|||
obj.day = days;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -500,7 +500,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -541,7 +541,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "原料磨";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
size="small"
|
||||
@click="sflog_edit(scope.row)"
|
||||
type="primary"
|
||||
>编辑</el-button
|
||||
>详情</el-button
|
||||
>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -227,11 +227,7 @@ export default {
|
|||
data: [],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: {
|
||||
name: "烘干破主电机",
|
||||
type: "bar",
|
||||
data: [],
|
||||
},
|
||||
series: [],
|
||||
},
|
||||
option3: {
|
||||
color: colors,
|
||||
|
|
@ -261,11 +257,7 @@ export default {
|
|||
],
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: {
|
||||
name: "烘干破主电机",
|
||||
type: "bar",
|
||||
data: [],
|
||||
},
|
||||
series: [],
|
||||
},
|
||||
mpoints: [],
|
||||
};
|
||||
|
|
@ -277,9 +269,6 @@ export default {
|
|||
that.month = myDate.getMonth() + 1;
|
||||
that.days = myDate.getDate();
|
||||
that.getMpoints();
|
||||
that.getTableHourData();
|
||||
that.getDayData(that.year, that.month);
|
||||
that.getMonthData(that.year);
|
||||
},
|
||||
methods: {
|
||||
getMpoints() {
|
||||
|
|
@ -299,6 +288,10 @@ export default {
|
|||
});
|
||||
console.log("arr", arr);
|
||||
that.mpoints = arr;
|
||||
|
||||
that.getTableHourData();
|
||||
that.getDayData(that.year, that.month);
|
||||
that.getMonthData(that.year);
|
||||
});
|
||||
},
|
||||
typeRadioChange() {
|
||||
|
|
@ -397,7 +390,7 @@ export default {
|
|||
obj.month_s = month;
|
||||
obj.mgroup__name = "电石渣";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -438,7 +431,7 @@ export default {
|
|||
obj.year_s = year;
|
||||
obj.mgroup__name = "电石渣";
|
||||
obj.mpoint__material__code__in = "elec,elec_0";
|
||||
obj.mpoint__ep_monitored__isnull = 0;
|
||||
// obj.mpoint__ep_monitored__isnull = 0;
|
||||
obj.mpoint__need_display = 1;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((response) => {
|
||||
|
|
@ -450,6 +443,9 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@
|
|||
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="right">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-radio-group v-model="addForm.type">
|
||||
<el-radio :label="10">模块</el-radio>
|
||||
<el-radio :label="20">页面</el-radio>
|
||||
<el-radio :label="30">接口</el-radio>
|
||||
<el-radio :value="10">模块</el-radio>
|
||||
<el-radio :value="20">页面</el-radio>
|
||||
<el-radio :value="30">接口</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
|
|
@ -86,6 +86,11 @@
|
|||
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const dForm = {
|
||||
codes: [],
|
||||
type: 10,
|
||||
sort: 1,
|
||||
};
|
||||
export default {
|
||||
name: "dept",
|
||||
data() {
|
||||
|
|
@ -109,14 +114,7 @@ export default {
|
|||
},
|
||||
|
||||
//表单数据
|
||||
addForm: {
|
||||
id: "",
|
||||
name: "",
|
||||
codes: [],
|
||||
type: 10,
|
||||
sort: 1,
|
||||
parent: null,
|
||||
},
|
||||
addForm: this.dForm,
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [{ required: true, message: "请输入名称" }],
|
||||
|
|
@ -154,7 +152,7 @@ export default {
|
|||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addForm.resetFields();
|
||||
this.addForm = Object.assign({}, dForm);
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
|
|
@ -182,7 +180,6 @@ export default {
|
|||
// debugger;
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
var res;
|
||||
if (this.type === "add") {
|
||||
this.$API.system.permission.create
|
||||
.req(that.addForm)
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ export default {
|
|||
getUserList() {
|
||||
let that = this;
|
||||
this.$API.system.user.list
|
||||
.req({ page: 0, posts__name: "检验" })
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
that.userList = res;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ export default {
|
|||
getUserList() {
|
||||
let that = this;
|
||||
this.$API.system.user.list
|
||||
.req({ page: 0, posts__name: "检验" })
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
that.userList = res.results;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ export default {
|
|||
query: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
type: 10,
|
||||
type: 'prod',
|
||||
type2: 10,
|
||||
},
|
||||
ftestWork:'',
|
||||
materialCate:'',
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
<el-descriptions-item label="抽检数">{{
|
||||
workObj.count_sampling
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="配棒管批次号" v-if=" workObj.mb_&&workObj.mb_.assemb">
|
||||
<span v-for="item in workObj.mb_.assemb" :key="item.id">{{item.batch}}、</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-button
|
||||
type="primary" @click="table_edit(workObj)">编辑</el-button>
|
||||
|
|
@ -336,8 +339,7 @@ export default {
|
|||
getUserList() {
|
||||
let that = this;
|
||||
this.$API.system.user.list
|
||||
// .req({ page: 0, posts__name: "检验" })
|
||||
.req({ page: 0 })
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
that.userList = res;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -81,7 +81,24 @@
|
|||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检验人" prop="test_user">
|
||||
<el-select
|
||||
v-model="form.test_user"
|
||||
placeholder="检验人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
|
|
@ -100,7 +117,10 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
form: {},
|
||||
form: {
|
||||
type:'prod',
|
||||
type2:10
|
||||
},
|
||||
rules: {
|
||||
test_date: [
|
||||
{
|
||||
|
|
@ -120,11 +140,13 @@ export default {
|
|||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
userList:[],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUsers();
|
||||
this.getMaterialBatch();
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -141,6 +163,15 @@ export default {
|
|||
this.form.count_ok = this.form.count - this.form.count_notok
|
||||
}
|
||||
},
|
||||
getUsers(){
|
||||
let that = this;
|
||||
let userList = [];
|
||||
that.$API.system.user.list
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
.then((res) => {
|
||||
that.userList = res;
|
||||
});
|
||||
},
|
||||
//获取物料批次
|
||||
getMaterialBatch() {
|
||||
let that = this;
|
||||
|
|
@ -158,6 +189,7 @@ export default {
|
|||
that.form.count = item.count;
|
||||
that.form.batch = item.batch;
|
||||
that.form.material = item.material;
|
||||
that.form.mb = item.id;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.start_date"
|
||||
type="date"
|
||||
placeholder="查询日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 160px"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||
</el-header>
|
||||
<el-main style="background: #ffffff">
|
||||
<scTable :data="tableData" id="exportDiv">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
||||
<el-table-column label="规格" prop="规格"> </el-table-column>
|
||||
<el-table-column label="型号" prop="型号"> </el-table-column>
|
||||
<el-table-column label="工序" prop="工序"> </el-table-column>
|
||||
<el-table-column label="检验时间">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数量"></el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "chart",
|
||||
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
fw_type:'prod'
|
||||
},
|
||||
currentDate: "",
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month < 10 ? "0" + month : month;
|
||||
day = day < 10 ? "0" + day : day;
|
||||
let queryDate = year + "-" + month + "-" + day;
|
||||
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.query = that.query;
|
||||
|
||||
that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => {
|
||||
that.tableData = res.data2.ds0;
|
||||
console.log(that.tableData);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
if(this.query.start_date){
|
||||
this.query.end_date = this.query.start_date;
|
||||
}else{
|
||||
this.query.start_date = this.query.end_date = this.currentDate;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
handleExport() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX("#exportDiv", "成品检验统计");
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tables {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 6px;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="query.mgroup_name"
|
||||
placeholder="请选择工段">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.start_date"
|
||||
type="date"
|
||||
placeholder="查询日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 160px"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart1"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport()"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
id="exportDiv"
|
||||
:height="300"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="物料名"
|
||||
prop="物料名"
|
||||
min-width="100"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="月份"
|
||||
prop="月"
|
||||
width="50"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="型号">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="规格">
|
||||
</el-table-column>
|
||||
<el-table-column label="任务数" prop="任务数">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产数" prop="生产数">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="不合格数"
|
||||
prop="不合格数"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import T from "@/components/scEcharts/echarts-theme-T.js";
|
||||
echarts.registerTheme("T", T);
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
function deepCopy(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
export default {
|
||||
name: "chart",
|
||||
components: {
|
||||
scEcharts,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
mgroup_name:'',
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
group_bys_material: "",
|
||||
order_bys_material: "",
|
||||
select_cols_material: ""
|
||||
},
|
||||
currentYear: "",
|
||||
currentMonth: "",
|
||||
xAxisData: [],
|
||||
basicOption: {
|
||||
backgroundColor: "transparent",
|
||||
title: {
|
||||
text: "",
|
||||
},
|
||||
grid: {
|
||||
top: "80px",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: [],
|
||||
},
|
||||
yAxis: {
|
||||
type: "value",
|
||||
},
|
||||
lenged: [],
|
||||
series: [
|
||||
{
|
||||
data: [],
|
||||
stack: "Ad",
|
||||
type: "bar",
|
||||
barWidth: "15px",
|
||||
},
|
||||
],
|
||||
},
|
||||
tableData: [],
|
||||
options:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
that.currentYear = year;
|
||||
that.currentMonth = month;
|
||||
month = month < 10 ? "0" + month : month;
|
||||
day = day < 10 ? "0" + day : day;
|
||||
that.query.start_date = that.query.end_date = year + "-" + month + "-" + day;
|
||||
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
let day = i + 1;
|
||||
let text = day + "日";
|
||||
}
|
||||
that.getMgroup();
|
||||
// that.getData();
|
||||
},
|
||||
methods: {
|
||||
setChart(name, option = null) {
|
||||
// 根据name 渲染数据, option需填写,否则option为模拟数据
|
||||
var myChart = echarts.getInstanceByDom(
|
||||
document.getElementById(name)
|
||||
);
|
||||
if (myChart == undefined) {
|
||||
myChart = echarts.init(document.getElementById(name), "T");
|
||||
}
|
||||
if (option == null) {
|
||||
option = Object.assign({}, this.basicOption);
|
||||
}
|
||||
setTimeout(() => {
|
||||
try {
|
||||
myChart.setOption(option);
|
||||
} catch (error) {}
|
||||
}, 500);
|
||||
},
|
||||
getMgroup(){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
||||
let arr = [];
|
||||
res.forEach(item=>{
|
||||
arr.push(item.name)
|
||||
})
|
||||
that.query.mgroup_name = arr[0];
|
||||
that.options = arr;
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
let option = deepCopy(that.basicOption);
|
||||
let obj = {};
|
||||
obj.query = that.query;
|
||||
that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => {
|
||||
let tableData = res.data2.ds0 ? res.data2.ds0 : [];
|
||||
that.tableData = tableData;
|
||||
if (tableData.length > 0) {
|
||||
let seriesData = [],
|
||||
nameList = [];
|
||||
tableData.forEach((ite) => {
|
||||
if (nameList.indexOf(ite.物料名) > -1) {
|
||||
} else {
|
||||
nameList.push(ite.物料名);
|
||||
seriesData.push(0);
|
||||
}
|
||||
});
|
||||
tableData.forEach((item) => {
|
||||
let indexX = nameList.indexOf(item.物料名);
|
||||
seriesData[indexX] += item.合格数;
|
||||
});
|
||||
ption.xAxis.data = nameList;
|
||||
ption.series[0].data = serisData;
|
||||
that.setChart("bachart1", option);
|
||||
} else {
|
||||
that.setChart("bachart1", option);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
let that = this;
|
||||
that.query.end_date = that.query.start_date ;
|
||||
that.getData();
|
||||
},
|
||||
handleExport(val) {
|
||||
this.exportLoading = true;
|
||||
let id = "#exportDiv" + val;
|
||||
let name =
|
||||
val == "AVG" ? val + "合格数统计" : val + "车间合格数统计";
|
||||
this.$XLSX(id, name);
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bachart1{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.tables {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 4px;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.start_date"
|
||||
type="date"
|
||||
placeholder="查询日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 160px"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
<el-button @click="handleExport" type="primary">导出</el-button>
|
||||
</el-header>
|
||||
<el-main style="background: #ffffff">
|
||||
<scTable :data="tableData" id="exportDiv">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名称" prop="物料名"></el-table-column>
|
||||
<el-table-column label="规格" prop="规格"> </el-table-column>
|
||||
<el-table-column label="型号" prop="型号"> </el-table-column>
|
||||
<el-table-column label="工序" prop="工序"> </el-table-column>
|
||||
<el-table-column label="检验时间">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验数" prop="检验数"></el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数量"></el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数"></el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "chart",
|
||||
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
fw_type:'process'
|
||||
},
|
||||
currentDate: "",
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month < 10 ? "0" + month : month;
|
||||
day = day < 10 ? "0" + day : day;
|
||||
let queryDate = year + "-" + month + "-" + day;
|
||||
that.query.start_date = that.query.end_date = that.currentDate = queryDate;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.query = that.query;
|
||||
|
||||
that.$API.bi.dataset.exec.req('ftestDay', obj).then((res) => {
|
||||
that.tableData = res.data2.ds0;
|
||||
console.log(that.tableData);
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
if(this.query.start_date){
|
||||
this.query.end_date = this.query.start_date;
|
||||
}else{
|
||||
this.query.start_date = this.query.end_date = this.currentDate;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
handleExport() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX("#exportDiv", "过程检验统计");
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tables {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 6px;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,252 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="material__name">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main id="elMain">
|
||||
<el-row :gutter="10" id="elCol">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart1"></div>
|
||||
<!-- <scEcharts height="500px" :option="option"></scEcharts> -->
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
id="exportDiv7"
|
||||
:height="tableHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="任务编号"
|
||||
prop="number"
|
||||
min-width="100px"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import T from "@/components/scEcharts/echarts-theme-T.js";
|
||||
echarts.registerTheme("T", T);
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
function deepCopy(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
export default {
|
||||
name: "chart",
|
||||
components: {
|
||||
scEcharts,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentYear:'',
|
||||
currentMonth:'',
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
queryDate:'',
|
||||
option:{},
|
||||
seriesData1:[],
|
||||
seriesData2:[],
|
||||
seriesData3:[],
|
||||
material__name:'',
|
||||
options:['白片','DDG片','一次抛','外协海富'],
|
||||
basicOption: {
|
||||
backgroundColor: "transparent",
|
||||
title: {
|
||||
text: "库存统计",
|
||||
},
|
||||
grid: {
|
||||
top: "80px",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
data: ['库房','扫边车间','黑化车间','减薄车间','精雕车间','倒角车间','磨抛车间'],
|
||||
},
|
||||
yAxis: {
|
||||
type: "value",
|
||||
},
|
||||
legend: {
|
||||
top: "3",
|
||||
right: "3%",
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0],
|
||||
type: "bar",
|
||||
name:'未处理',
|
||||
barWidth: "15px",
|
||||
},
|
||||
{
|
||||
data: [0,0,0,0,0,0,0],
|
||||
type: "bar",
|
||||
name:'处理中',
|
||||
barWidth: "15px",
|
||||
},
|
||||
{
|
||||
data: [0,0,0,0,0,0,0],
|
||||
type: "bar",
|
||||
name:'已处理',
|
||||
barWidth: "15px",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.getInmMaterial();
|
||||
},
|
||||
methods: {
|
||||
getInmMaterial(){
|
||||
let that = this;
|
||||
let obj = {
|
||||
name__contains:that.material__name,
|
||||
page:0
|
||||
};
|
||||
this.$API.mtm.material.list.req(obj).then(res=>{
|
||||
console.log('InmMaterial',res);
|
||||
that.getWmaterial();
|
||||
if(res.length>0){
|
||||
res.forEach(item => {
|
||||
that.seriesData3[0]+=item.count;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
getWmaterial(){
|
||||
let that = this;
|
||||
let obj = {
|
||||
material__name__contains:that.material__name,
|
||||
page:0
|
||||
};
|
||||
this.$API.wpm.wmaterial.list.req(obj).then(res=>{
|
||||
console.log('Wmaterial',res);
|
||||
if(res.length>0){
|
||||
res.forEach(item => {
|
||||
if(item.belong_dept_name=="扫边车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[1]+=item.count;
|
||||
}else{
|
||||
seriesData1[1]+=item.count;
|
||||
}
|
||||
}else if(item.belong_dept_name=="黑化车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[2]+=item.count;
|
||||
}else{
|
||||
seriesData1[2]+=item.count;
|
||||
}
|
||||
}else if(item.belong_dept_name=="减薄车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[3]+=item.count;
|
||||
}else{
|
||||
seriesData1[3]+=item.count;
|
||||
}
|
||||
}else if(item.belong_dept_name=="精雕车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[4]+=item.count;
|
||||
}else{
|
||||
seriesData1[4]+=item.count;
|
||||
}
|
||||
}else if(item.belong_dept_name=="倒角车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[5]+=item.count;
|
||||
}else{
|
||||
seriesData1[5]+=item.count;
|
||||
}
|
||||
}else if(item.belong_dept_name=="磨抛车间"){
|
||||
if(item.count_xtest==null){
|
||||
seriesData3[6]+=item.count;
|
||||
}else{
|
||||
seriesData1[6]+=item.count;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
let option = deepCopy(that.basicOption);
|
||||
that.setChart("bachart1", option);
|
||||
})
|
||||
},
|
||||
handleQuery(){
|
||||
this.getInmMaterial();
|
||||
},
|
||||
setChart(name, option = null) {
|
||||
// 根据name 渲染数据, option需填写,否则option为模拟数据
|
||||
var myChart = echarts.getInstanceByDom(
|
||||
document.getElementById(name)
|
||||
);
|
||||
if (myChart == undefined) {
|
||||
myChart = echarts.init(document.getElementById(name), "T");
|
||||
}
|
||||
if (option == null) {
|
||||
option = Object.assign({}, this.basicOption);
|
||||
}
|
||||
setTimeout(() => {
|
||||
try {
|
||||
myChart.setOption(option);
|
||||
} catch (error) {}
|
||||
}, 500);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bachart1{
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
.tables{
|
||||
width:
|
||||
}
|
||||
.tableHead {
|
||||
background:rgb(0,176,240);
|
||||
height:40px;
|
||||
}
|
||||
.tableTh{
|
||||
width:120px;
|
||||
height:36px;
|
||||
}
|
||||
.tableTd{
|
||||
width:120px;
|
||||
height:36px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,421 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="queryType" @change="queryTypeChange">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-if="queryType == '月'"
|
||||
v-model="queryDate"
|
||||
type="month"
|
||||
placeholder="查询月期"
|
||||
value-format="YYYY-MM"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-if="queryType == '年'"
|
||||
v-model="queryDate"
|
||||
type="year"
|
||||
placeholder="查询年份"
|
||||
value-format="YYYY"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main id="elMain">
|
||||
<el-row :gutter="15">
|
||||
<table class="tables" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th class="tableTh tableHead" colspan="15">库存统计</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tableTh">生产</th>
|
||||
<th class="tableTh" colspan="2">库房</th>
|
||||
<th class="tableTh" colspan="2">道边车间</th>
|
||||
<th class="tableTh" colspan="2">黑化车间</th>
|
||||
<th class="tableTh" colspan="2">减薄车间</th>
|
||||
<th class="tableTh" colspan="2">精雕车间</th>
|
||||
<th class="tableTh" colspan="2">倒角车间</th>
|
||||
<th class="tableTh" colspan="2">磨抛车间</th>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">原料片库存</td>
|
||||
<td class="tableTd">大白片</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">未处理大白片</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">2.5D白片待进炉</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">原料片库存</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">2.5D炉内黑化数</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">原料片库存</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">已处理白片</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">2.5D炉内退火+待投</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">DDG片</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">水纹片待进炉</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">精雕片已抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">精雕片未抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">外协百盛(一次抛黑料)</td>
|
||||
<td class="tableTd">外协抛光</td>
|
||||
<td class="tableTd">0</td>
|
||||
<td class="tableTd">外协待扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外协已抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外协已扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外协未抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">外协海富</td>
|
||||
<td class="tableTd">外协扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外扫已抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外扫未抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-row>
|
||||
<el-row :gutter="15">
|
||||
<table class="tables" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th class="tableTh tableHead" colspan="15">扫边车间数据汇总</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tableTh">扫边车间</th>
|
||||
<th class="tableTh"></th>
|
||||
<th class="tableTh"></th>
|
||||
<th class="tableTh" colspan="4">8.20白班</th>
|
||||
<th class="tableTh"></th>
|
||||
<th class="tableTh" colspan="4">8.20夜班</th>
|
||||
<th class="tableTh"></th>
|
||||
<th class="tableTh"></th>
|
||||
<th class="tableTh"></th>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">预处理片(扫边A)的产品</td>
|
||||
<td class="tableTd">机器号</td>
|
||||
<td class="tableTd">内置数</td>
|
||||
<td class="tableTd">加工数</td>
|
||||
<td class="tableTd">合格数</td>
|
||||
<td class="tableTd">破损数</td>
|
||||
<td class="tableTd">破损比</td>
|
||||
<td class="tableTd">操作人</td>
|
||||
<td class="tableTd">加工数</td>
|
||||
<td class="tableTd">合格数</td>
|
||||
<td class="tableTd">破损数</td>
|
||||
<td class="tableTd">破损比</td>
|
||||
<td class="tableTd">操作人</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">原料片库存</td>
|
||||
<td class="tableTd">2</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">3</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">DDG片</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">已加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
<td class="tableTd">未加工</td>
|
||||
<td class="tableTd">3</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">外协百盛(一次抛黑料)</td>
|
||||
<td class="tableTd">外协抛光</td>
|
||||
<td class="tableTd">0</td>
|
||||
<td class="tableTd">外协待扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外协已抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd">外协抛光</td>
|
||||
<td class="tableTd">0</td>
|
||||
<td class="tableTd">外协待扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外协未抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="tableTd" rowspan="2">外协海富</td>
|
||||
<td class="tableTd">外协扫边</td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外扫已抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd"></td>
|
||||
<td class="tableTd">外扫未抛光</td>
|
||||
<td class="tableTd"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
function deepCopy(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
export default {
|
||||
name: "chart",
|
||||
data() {
|
||||
return {
|
||||
currentYear:'',
|
||||
currentMonth:'',
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
queryDate:'',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
that.currentYear = year;
|
||||
that.currentMonth = month;
|
||||
that.start_date = year + "-" + month + "-01";
|
||||
that.end_date =
|
||||
year + "-" + month + "-" + new Date(year, month, 0).getDate();
|
||||
let month1 = month;
|
||||
if (month1 < 10) {
|
||||
month1 = "0" + month1;
|
||||
}
|
||||
that.queryDate = year + "-" + month1;
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tables{
|
||||
width:
|
||||
}
|
||||
.tableHead {
|
||||
background:rgb(0,176,240);
|
||||
height:40px;
|
||||
}
|
||||
.tableTh{
|
||||
width:120px;
|
||||
height:36px;
|
||||
}
|
||||
.tableTd{
|
||||
width:120px;
|
||||
height:36px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="mgroupId"
|
||||
placeholder="请选择工段"
|
||||
@change="mgroupChange">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="searchDate"
|
||||
type="month"
|
||||
placeholder="查询日期"
|
||||
value-format="YYYY-MM"
|
||||
style="width: 160px"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main id="elMain">
|
||||
<el-row :gutter="10" id="elCol">
|
||||
<el-col :lg="8">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="500px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="16">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport('7')"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
id="exportDiv7"
|
||||
:height="tableHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="任务编号"
|
||||
prop="number"
|
||||
min-width="100px"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
export default {
|
||||
name: "chart",
|
||||
components: {
|
||||
scEcharts,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
querys:[
|
||||
[{field:'start_date',compare:'gte',value:''},{field:'mgroup',compare:'',value:''}],
|
||||
[{field:'end_date',compare:'lte',value:''},{field:'mgroup',compare:'',value:''}]
|
||||
],
|
||||
page:0
|
||||
},
|
||||
mgroupId:'',
|
||||
start_date:'',
|
||||
end_date:'',
|
||||
currentDate: "",
|
||||
searchDate:'',
|
||||
options:[],
|
||||
tableData1: [],
|
||||
option: {
|
||||
title: {
|
||||
text: "",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
legend: {
|
||||
top: "3",
|
||||
right: "3%",
|
||||
},
|
||||
color: ["rgb(64,158,255)", "orange"],
|
||||
series: {
|
||||
name: "7车间完成率",
|
||||
type: "pie",
|
||||
radius: ["40%", "70%"],
|
||||
center: ["50%", "60%"],
|
||||
label: {
|
||||
show: true,
|
||||
position: "outside",
|
||||
formatter: "{b} : {c} ({d}%)",
|
||||
},
|
||||
data: [
|
||||
{ value: 0, name: "已完成" },
|
||||
{ value: 0, name: "未完成" },
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
month = month < 10 ? "0" + month : month;
|
||||
that.currentDate = that.searchDate = year + "-" + month;
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
let start_date = year + "-" + month + "-01";
|
||||
let end_date = year + "-" + month + "-"+days;
|
||||
that.start_date = that.query.querys[0][0].value = start_date;
|
||||
that.end_date = that.query.querys[1][0].value = end_date;
|
||||
let height = document.getElementById("elCol").clientHeight;
|
||||
let chartheight = height+'px';
|
||||
that.tableHeight = height-20;
|
||||
that.getMgroup();
|
||||
},
|
||||
methods: {
|
||||
getMgroup(){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
||||
that.options = res;
|
||||
});
|
||||
},
|
||||
getData7() {
|
||||
let that = this;
|
||||
that.tableData1 = [];
|
||||
that.option.series.data[0].value = 0;
|
||||
that.option.series.data[1].value = 0;
|
||||
that.$API.pm.mtask.cquery.req(that.query).then((res) => {
|
||||
let data = [];
|
||||
let count_ok1 = 0;
|
||||
let count_notok1 = 0;
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
let obj = item;
|
||||
obj.rate = Math.round((item.count_ok / item.count) * 100).toFixed(2) + "%";
|
||||
if (item.count_ok >= item.count) {
|
||||
count_ok1++;
|
||||
} else {
|
||||
count_notok1++;
|
||||
}
|
||||
data.push(obj);
|
||||
});
|
||||
that.tableData1 = data;
|
||||
// that.option.series.data[0].value = count_ok1;
|
||||
}
|
||||
that.option.series.data[0].value = count_ok1;
|
||||
that.option.series.data[1].value = count_notok1;
|
||||
});
|
||||
},
|
||||
mgroupChange(){
|
||||
let that = this;
|
||||
that.query.querys[0][1].value = that.mgroupId;
|
||||
that.query.querys[1][1].value = that.mgroupId;
|
||||
},
|
||||
handleQuery(){
|
||||
let that = this;
|
||||
if(this.searchDate!==''&&this.searchDate!==null){
|
||||
let dates = this.searchDate.split('-');
|
||||
let year = dates[0];
|
||||
let month = dates[1];
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
let start_date = year + "-" + month + "-01";
|
||||
let end_date = year + "-" + month + "-"+days;
|
||||
that.query.querys[0][0].value = start_date;
|
||||
that.query.querys[1][0].value = end_date;
|
||||
}else{
|
||||
that.query.querys[0][0].value = that.start_date;
|
||||
that.query.querys[1][0].value = that.end_date;
|
||||
}
|
||||
that.getData7();
|
||||
},
|
||||
handleExport(val) {
|
||||
this.exportLoading = true;
|
||||
let id = "#exportDiv" + val;
|
||||
let name = val + "车间完成率";
|
||||
this.$XLSX(id, name);
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#elCol{
|
||||
height:100%;
|
||||
}
|
||||
.tables {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 4px;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -248,6 +248,9 @@
|
|||
<el-form-item label="审批图片" v-if="audit_imgs_show" required>
|
||||
<sc-upload-multiple v-model="fileurl" @imagesDel="imagesDel" @imagesChange="imagesChange" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始图片" v-if="audit_work_show" required>
|
||||
<sc-upload-multiple v-model="fileurl2" @imagesDel="imagesDel2" @imagesChange="imagesChange2" draggable :limit="9" tip="最多上传9个文件,单个文件不要超过10M,请上传图像格式文件"></sc-upload-multiple>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理意见">
|
||||
<el-input
|
||||
v-model="form.suggestion"
|
||||
|
|
@ -514,12 +517,14 @@ export default {
|
|||
operationBtn: [],
|
||||
routepackes: [],
|
||||
fileurl:[],
|
||||
fileurl2:[],
|
||||
form: {
|
||||
suggestion: "",
|
||||
close_note: "",
|
||||
close_dos: [],
|
||||
},
|
||||
audit_imgs:[],
|
||||
work_imgs:[],
|
||||
addForm: {
|
||||
suggestion: "",
|
||||
toadd_user: "",
|
||||
|
|
@ -535,6 +540,7 @@ export default {
|
|||
limitedDeliver: false,
|
||||
limitedUserSelect: false,
|
||||
audit_imgs_show:false,
|
||||
audit_work_show:false,
|
||||
purpose_: {
|
||||
10: "参观",
|
||||
20: "拜访",
|
||||
|
|
@ -601,11 +607,17 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
imagesDel(index){
|
||||
this.audit_imgs.splice(index,1)
|
||||
},
|
||||
this.audit_imgs.splice(index,1)
|
||||
},
|
||||
imagesChange(data){
|
||||
this.audit_imgs = data;
|
||||
},
|
||||
imagesDel2(index){
|
||||
this.work_imgs.splice(index,1)
|
||||
},
|
||||
imagesChange2(data){
|
||||
this.work_imgs = data;
|
||||
},
|
||||
itemDetailEdtil() {
|
||||
let itemDetail = this.itemDetail;
|
||||
if (this.cateType === "opl") {
|
||||
|
|
@ -733,11 +745,15 @@ export default {
|
|||
.req(that.ticketId)
|
||||
.then((res) => {
|
||||
that.operationBtn = res;
|
||||
console.log("operationBtn", that.operationBtn);
|
||||
if(res.length>0){
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){
|
||||
that.audit_imgs_show = true;
|
||||
}
|
||||
if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){
|
||||
that.audit_work_show = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -763,7 +779,6 @@ export default {
|
|||
//入厂项目详情
|
||||
getRpj() {
|
||||
this.$API.rpm.rpj.item.req(this.projectId).then((res) => {
|
||||
// debugger;
|
||||
this.itemDetail = res;
|
||||
});
|
||||
},
|
||||
|
|
@ -771,8 +786,6 @@ export default {
|
|||
getOpl() {
|
||||
let that = this;
|
||||
that.$API.opm.opl.read.req(that.projectId).then((res) => {
|
||||
// debugger;
|
||||
// console.log(res);
|
||||
that.itemDetail = res;
|
||||
that.operationId = res.operation;
|
||||
if(res.audit_imgs.length>0){
|
||||
|
|
@ -783,8 +796,6 @@ export default {
|
|||
obj.url = item.file;
|
||||
that.fileurl.push(obj)
|
||||
});
|
||||
// console.log('that.audit_imgs',that.audit_imgs)
|
||||
// console.log('that.fileurl',that.fileurl)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -857,7 +868,13 @@ export default {
|
|||
params.ticket_data.close_dos = this.form.close_dos;
|
||||
}
|
||||
if(this.audit_imgs_show){
|
||||
params.ticket_data.audit_imgs = this.audit_imgs;
|
||||
if(this.audit_imgs.length>0){
|
||||
params.ticket_data.audit_imgs = this.audit_imgs;
|
||||
}else{
|
||||
this.$message.error("请上传审批照片");
|
||||
this.submitLoading = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.$API.wf.ticket.ticketHandle
|
||||
.req(this.ticketId, params)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<el-main>
|
||||
<el-card>
|
||||
<div id="main" style="width: 1000px; height: 500px"></div>
|
||||
<div id="main" style="width: 1200px; height: 500px"></div>
|
||||
<div
|
||||
id="mains"
|
||||
style="
|
||||
width: 1000px;
|
||||
width: 1200px;
|
||||
height: 500px;
|
||||
position: absolute;
|
||||
top: 185px;
|
||||
top: 155px;
|
||||
"
|
||||
></div>
|
||||
</el-card>
|
||||
|
|
@ -20,13 +20,14 @@ import * as echarts from "echarts";
|
|||
const updateFrequency = 2000;
|
||||
const dimension = 0;
|
||||
const countryColors = {
|
||||
低碳水泥碳减排: "rgb(244,192,0)",
|
||||
替代燃料碳减排: "rgb(242,119,36)",
|
||||
清洁能源电力碳减排: "rgb(103,169,59)",
|
||||
能效提升技术碳减排: "rgb(77,148,211)",
|
||||
CCUS碳减排: "rgb(159,159,159)",
|
||||
水泥碳排放: "rgb(244,192,0)",
|
||||
石膏板排放: "rgb(242,119,36)",
|
||||
建筑卫生陶瓷排放: "rgb(103,169,59)",
|
||||
玻璃排放: "rgb(77,148,211)",
|
||||
玻纤排放: "rgb(159,159,159)",
|
||||
墙体材料: "rgb(84,112,198)",
|
||||
};
|
||||
const years = [2021, 2025, 2030, 2040, 2050, 2060];
|
||||
const years = [2022, 2025, 2030, 2040, 2050, 2060];
|
||||
export default {
|
||||
name: "chart",
|
||||
data() {
|
||||
|
|
@ -40,41 +41,47 @@ export default {
|
|||
let startIndex = 0;
|
||||
let data = [
|
||||
["Income", "Life Expectancy", "Population", "Country", "Year"],
|
||||
[0, 34.05, 0, "低碳水泥碳减排", 2021],
|
||||
[0, 39, 0, "替代燃料碳减排", 2021],
|
||||
[0, 32, 0, "清洁能源电力碳减排", 2021],
|
||||
[0, 32.2, 0, "能效提升技术碳减排", 2021],
|
||||
[0, 36.57, 0, "CCUS碳减排", 2021],
|
||||
[12.09, 34.05, 0, "水泥碳排放", 2022],
|
||||
[1.31, 39, 0, "石膏板排放", 2022],
|
||||
[1.45, 32, 0, "建筑卫生陶瓷排放", 2022],
|
||||
[0.36, 32.2, 0, "玻璃排放", 2022],
|
||||
[0.12, 36.57, 0, "玻纤排放", 2022],
|
||||
[0.25, 36.57, 0, "墙体材料", 2022],
|
||||
|
||||
[6, 34.05, 6, "低碳水泥碳减排", 2025],
|
||||
[14, 39, 14, "替代燃料碳减排", 2025],
|
||||
[6, 32, 6, "清洁能源电力碳减排", 2025],
|
||||
[8, 32.2, 8, "能效提升技术碳减排", 2025],
|
||||
[3, 36.5, 4, "CCUS碳减排", 2025],
|
||||
[11.61, 34.05, 6, "水泥碳排放", 2025],
|
||||
[1.06, 39, 14, "石膏板排放", 2025],
|
||||
[1.16, 32, 6, "建筑卫生陶瓷排放", 2025],
|
||||
[0.31, 32.2, 8, "玻璃排放", 2025],
|
||||
[0.1, 36.5, 4, "玻纤排放", 2025],
|
||||
[0.23, 36.57, 0, "墙体材料", 2025],
|
||||
|
||||
[33, 34.05, 33, "低碳水泥碳减排", 2030],
|
||||
[26, 39, 26, "替代燃料碳减排", 2030],
|
||||
[10, 32, 10, "清洁能源电力碳减排", 2030],
|
||||
[18, 32.2, 18, "能效提升技术碳减排", 2030],
|
||||
[7, 36.57, 9, "CCUS碳减排", 2030],
|
||||
[9.32, 34.05, 33, "水泥碳排放", 2030],
|
||||
[0.88, 39, 26, "石膏板排放", 2030],
|
||||
[0.95, 32, 10, "建筑卫生陶瓷排放", 2030],
|
||||
[0.27, 32.2, 18, "玻璃排放", 2030],
|
||||
[0.08, 36.57, 9, "玻纤排放", 2030],
|
||||
[0.19, 36.57, 9, "墙体材料", 2030],
|
||||
|
||||
[118, 34.05, 78, "低碳水泥碳减排", 2040],
|
||||
[68, 39, 68, "替代燃料碳减排", 2040],
|
||||
[17, 32, 17, "清洁能源电力碳减排", 2040],
|
||||
[18, 32.2, 18, "能效提升技术碳减排", 2040],
|
||||
[14, 36.57, 19, "CCUS碳减排", 2040],
|
||||
[4.61, 34.05, 78, "水泥碳排放", 2040],
|
||||
[0.63, 39, 68, "石膏板排放", 2040],
|
||||
[0.68, 32, 17, "建筑卫生陶瓷排放", 2040],
|
||||
[0.22, 32.2, 18, "玻璃排放", 2040],
|
||||
[0.06, 36.57, 19, "玻纤排放", 2040],
|
||||
[0.10, 36.57, 19, "墙体材料", 2040],
|
||||
|
||||
[157, 34.05, 118, "低碳水泥碳减排", 2050],
|
||||
[111, 39, 111, "替代燃料碳减排", 2050],
|
||||
[23, 32, 23, "清洁能源电力碳减排", 2050],
|
||||
[16, 32.2, 16, "能效提升技术碳减排", 2050],
|
||||
[41, 36.57, 57, "CCUS碳减排", 2050],
|
||||
[2.65, 34.05, 118, "水泥碳排放", 2050],
|
||||
[0.26, 39, 111, "石膏板排放", 2050],
|
||||
[0.27, 32, 23, "建筑卫生陶瓷排放", 2050],
|
||||
[0.14, 32.2, 16, "玻璃排放", 2050],
|
||||
[0.035, 36.57, 57, "玻纤排放", 2050],
|
||||
[0.055, 36.57, 57, "墙体材料", 2050],
|
||||
|
||||
[196, 34.05, 118, "低碳水泥碳减排", 2060],
|
||||
[177, 39, 117, "替代燃料碳减排", 2060],
|
||||
[26, 32, 26, "清洁能源电力碳减排", 2060],
|
||||
[16, 32.2, 16, "能效提升技术碳减排", 2060],
|
||||
[184, 36.57, 254, "CCUS碳减排", 2060],
|
||||
[1.94, 34.05, 118, "水泥碳排放", 2060],
|
||||
[0.04, 39, 117, "石膏板排放", 2060],
|
||||
[0.0008, 32, 26, "建筑卫生陶瓷排放", 2060],
|
||||
[0.09, 32.2, 16, "玻璃排放", 2060],
|
||||
[0.022, 36.57, 254, "玻纤排放", 2060],
|
||||
[0.034, 36.57, 254, "墙体材料", 2060],
|
||||
];
|
||||
let startYear = years[startIndex];
|
||||
option = {
|
||||
|
|
@ -85,9 +92,11 @@ export default {
|
|||
right: 80,
|
||||
},
|
||||
xAxis: {
|
||||
max: "dataMax",
|
||||
max: "13",
|
||||
min: "0.0008",
|
||||
position: "top",
|
||||
axisLabel: {
|
||||
// show: false,
|
||||
formatter: function (n) {
|
||||
return Math.round(n) + "";
|
||||
},
|
||||
|
|
@ -177,38 +186,38 @@ export default {
|
|||
myChart.setOption(option);
|
||||
}
|
||||
//折线
|
||||
let countries = ["水泥碳排放"];
|
||||
let countries = ["建材行业碳排放总量"];
|
||||
let datasetWithFilters = [];
|
||||
let seriesList = [];
|
||||
let _rawData = [
|
||||
["Income", "Country", "Year"],
|
||||
[575, "水泥碳排放", 2021],
|
||||
[559, "水泥碳排放", 2025],
|
||||
[523, "水泥碳排放", 2030],
|
||||
[386, "水泥碳排放", 2040],
|
||||
[273, "水泥碳排放", 2050],
|
||||
[23, "水泥碳排放", 2060],
|
||||
[15.6, "建材行业碳排放总量", 2022],
|
||||
[14.2, "建材行业碳排放总量", 2025],
|
||||
[11.1, "建材行业碳排放总量", 2030],
|
||||
[5.7, "建材行业碳排放总量", 2040],
|
||||
[2.4, "建材行业碳排放总量", 2050],
|
||||
[0.1, "建材行业碳排放总量", 2060],
|
||||
];
|
||||
var chartDoms = document.getElementById("mains");
|
||||
var myCharts = echarts.init(chartDoms);
|
||||
datasetWithFilters.push({
|
||||
id: "dataset_水泥碳排放",
|
||||
id: "dataset_建材行业碳排放总量",
|
||||
fromDatasetId: "dataset_raw",
|
||||
transform: {
|
||||
type: "filter",
|
||||
config: {
|
||||
and: [
|
||||
{ dimension: "Year", gte: 1950 },
|
||||
{ dimension: "Country", "=": "水泥碳排放" },
|
||||
{ dimension: "Country", "=": "建材行业碳排放总量" },
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
seriesList.push({
|
||||
type: "line",
|
||||
datasetId: "dataset_水泥碳排放",
|
||||
datasetId: "dataset_建材行业碳排放总量",
|
||||
showSymbol: false,
|
||||
name: "水泥碳排放",
|
||||
name: "建材行业碳排放总量",
|
||||
endLabel: {
|
||||
show: true,
|
||||
formatter: function (params) {
|
||||
|
|
@ -257,7 +266,13 @@ export default {
|
|||
},
|
||||
},
|
||||
yAxis: {
|
||||
type:"value",
|
||||
position: "right",
|
||||
offset:10,
|
||||
// axisLabel:{
|
||||
// align:"left",
|
||||
|
||||
// },
|
||||
name: "",
|
||||
},
|
||||
grid: {
|
||||
|
|
|
|||
|
|
@ -111,6 +111,18 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="小崩边">
|
||||
<el-input-number
|
||||
v-model="form.count_n_xbb"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="countChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="麻点">
|
||||
<el-input-number
|
||||
|
|
@ -144,6 +156,17 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
<el-form-item label="棕圈">
|
||||
<el-input-number
|
||||
v-model="form.count_n_zq"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="countChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="其他">
|
||||
<el-input-number
|
||||
|
|
@ -156,6 +179,49 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前道不良">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="notok_add"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom:10px" v-for="(item, $index) in notokList" :key="item">
|
||||
<el-col :span="10">
|
||||
<el-select v-model="item.file"
|
||||
style="width:90%"
|
||||
placeholder="请选择不合格项">
|
||||
<el-option
|
||||
v-for="notok in notokOptions"
|
||||
:key="notok.value"
|
||||
:label="notok.name"
|
||||
:value="notok.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input-number
|
||||
style="width:90%"
|
||||
v-model="item.value"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
@change="countChange"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="notok_del( $index)"
|
||||
></el-button>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
|
|
@ -184,12 +250,27 @@ export default {
|
|||
count_n_qp: 0,
|
||||
count_n_swen: 0,
|
||||
count_n_bb: 0,
|
||||
count_n_xbb:0,
|
||||
count_n_md: 0,
|
||||
count_n_xh: 0,
|
||||
count_n_ps: 0,
|
||||
count_n_qt: 0,
|
||||
count_n_wm: 0,
|
||||
count_n_zq:0
|
||||
},
|
||||
notokOptions:[
|
||||
{name:"划伤",value:'count_n_hs'},
|
||||
{name:"气泡",value:'count_n_qp'},
|
||||
{name:"水纹",value:'count_n_swen'},
|
||||
{name:"崩边",value:'count_n_bb'},
|
||||
{name:"小崩边",value:'count_n_xbb'},
|
||||
{name:"麻点",value:'count_n_md'},
|
||||
{name:"划伤",value:'count_n_xh'},
|
||||
{name:"破损",value:'count_n_ps'},
|
||||
{name:"其他",value:'count_n_qt'},
|
||||
{name:"雾面",value:'count_n_wm'},
|
||||
{name:"棕圈",value:'count_n_zq'},
|
||||
],
|
||||
//验证规则
|
||||
rules: {
|
||||
batch: [
|
||||
|
|
@ -208,6 +289,7 @@ export default {
|
|||
],
|
||||
},
|
||||
options: [],
|
||||
notokList:[],
|
||||
materialOptions: [],
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
|
|
@ -225,15 +307,23 @@ export default {
|
|||
Object.assign(this.form, data);
|
||||
console.log(this.form);
|
||||
},
|
||||
notok_add(){
|
||||
this.notokList.push({file:'',value:0});
|
||||
},
|
||||
notok_del(index){
|
||||
this.notokList.splice(index, 1)
|
||||
},
|
||||
countChange() {
|
||||
this.form.count_notok =
|
||||
this.form.count_n_hs +
|
||||
this.form.count_n_qp +
|
||||
this.form.count_n_swen +
|
||||
this.form.count_n_bb +
|
||||
this.form.count_n_xbb +
|
||||
this.form.count_n_md +
|
||||
this.form.count_n_xh +
|
||||
this.form.count_n_ps +
|
||||
this.form.count_n_zq +
|
||||
this.form.count_n_qt +
|
||||
this.form.count_n_wm;
|
||||
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||
|
|
@ -250,9 +340,11 @@ export default {
|
|||
this.form.count_n_qp +
|
||||
this.form.count_n_swen +
|
||||
this.form.count_n_bb +
|
||||
this.form.count_n_xbb +
|
||||
this.form.count_n_md +
|
||||
this.form.count_n_xh +
|
||||
this.form.count_n_ps +
|
||||
this.form.count_n_zq +
|
||||
this.form.count_n_qt +
|
||||
this.form.count_n_wm;
|
||||
let sum = this.form.count_ok + this.form.count_notok;
|
||||
|
|
@ -269,9 +361,7 @@ export default {
|
|||
that.isSaveing = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error(
|
||||
"使用数量与合格数不合格数数量不对等"
|
||||
);
|
||||
this.$message.error("使用数量与合格数不合格数数量不对等");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue