Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
cc1bc5c129
|
@ -52,7 +52,7 @@
|
|||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch"
|
||||
<el-button type="primary" class="searchBtnx" @click="dataSearch"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -73,7 +73,7 @@
|
|||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch"
|
||||
<el-button type="primary" class="searchBtnx" @click="dataSearch"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -94,7 +94,7 @@
|
|||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch"
|
||||
<el-button type="primary" class="searchBtnx" @click="dataSearch"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -115,7 +115,7 @@
|
|||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch"
|
||||
<el-button type="primary" class="searchBtnx" @click="dataSearch"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -306,7 +306,7 @@ export default {
|
|||
this.option.series[0].name = that.cate;
|
||||
console.log(that.mgroup)
|
||||
if (that.mgroup) {
|
||||
if (that.cate == "总产量(t)"|| that.cate =="熟料(t)" ||that.cate == "出厂水泥合计(t)") {
|
||||
if (that.cate == "总产量(t)" || that.cate == "出厂水泥合计(t)") {
|
||||
that.cateName = "total_production";
|
||||
} else if (
|
||||
that.cate == "单位产品分布电耗(KW·h/t)" ||
|
||||
|
@ -336,7 +336,7 @@ export default {
|
|||
that.cateName = "production_hour";
|
||||
} else if (that.cate == "吨熟料发电量(KW·h/t)") {
|
||||
that.cateName = "production_elec_unit";
|
||||
} else if (that.cate == "用电量(KW·h)") {
|
||||
} else if (that.cate == "总电耗(KW·h)") {
|
||||
that.cateName = "elec_consume";
|
||||
}
|
||||
} else {
|
||||
|
@ -447,7 +447,7 @@ export default {
|
|||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn {
|
||||
.searchBtnx {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.sc-dialog__headerbtn {
|
||||
|
|
|
@ -253,7 +253,7 @@ const routes = [
|
|||
name: "enm_slag",
|
||||
path: "/enm_slag",
|
||||
meta: {
|
||||
title: "电石渣",
|
||||
title: "电石渣工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_slag"],
|
||||
|
@ -359,7 +359,7 @@ const routes = [
|
|||
name: "enm_rm",
|
||||
path: "/enm_rm",
|
||||
meta: {
|
||||
title: "原料磨",
|
||||
title: "生料工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_rm"],
|
||||
|
@ -485,7 +485,7 @@ const routes = [
|
|||
name: "enm_coal",
|
||||
path: "/enm_coal",
|
||||
meta: {
|
||||
title: "煤磨",
|
||||
title: "煤磨工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_coal"],
|
||||
|
@ -611,7 +611,7 @@ const routes = [
|
|||
name: "enm_kiln",
|
||||
path: "/enm_kiln",
|
||||
meta: {
|
||||
title: "回转窑",
|
||||
title: "烧成工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_kiln"],
|
||||
|
@ -800,7 +800,7 @@ const routes = [
|
|||
name: "enm_mill",
|
||||
path: "/enm_mill",
|
||||
meta: {
|
||||
title: "水泥磨",
|
||||
title: "水泥粉磨工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_mill"],
|
||||
|
@ -863,7 +863,7 @@ const routes = [
|
|||
name: "enm_pack",
|
||||
path: "/enm_pack",
|
||||
meta: {
|
||||
title: "水泥包装",
|
||||
title: "水泥包装工序",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_pack"],
|
||||
|
@ -1009,32 +1009,32 @@ const routes = [
|
|||
name: "hourBase",
|
||||
path: "/enm_energy/hourBase",
|
||||
meta: {
|
||||
title: "电量消耗逐时报表",
|
||||
title: "电量消耗报表",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["hour_base"],
|
||||
},
|
||||
component: "enm_energy/hour_base",
|
||||
},
|
||||
{
|
||||
name: "dayBase",
|
||||
path: "/enm_energy/dayBase",
|
||||
meta: {
|
||||
title: "电量消耗日报表",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["day_base"],
|
||||
},
|
||||
component: "enm_energy/day_base",
|
||||
},
|
||||
{
|
||||
name: "monthBase",
|
||||
path: "/enm_energy/monthBase",
|
||||
meta: {
|
||||
title: "电量消耗月报表",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["month_base"],
|
||||
},
|
||||
component: "enm_energy/month_base",
|
||||
},
|
||||
// {
|
||||
// name: "dayBase",
|
||||
// path: "/enm_energy/dayBase",
|
||||
// meta: {
|
||||
// title: "电量消耗日报表",
|
||||
// // icon: "el-icon-grid",
|
||||
// perms: ["day_base"],
|
||||
// },
|
||||
// component: "enm_energy/day_base",
|
||||
// },
|
||||
// {
|
||||
// name: "monthBase",
|
||||
// path: "/enm_energy/monthBase",
|
||||
// meta: {
|
||||
// title: "电量消耗月报表",
|
||||
// // icon: "el-icon-grid",
|
||||
// perms: ["month_base"],
|
||||
// },
|
||||
// component: "enm_energy/month_base",
|
||||
// },
|
||||
{
|
||||
name: "energyPicture",
|
||||
path: "/enm_energy/energyPicture",
|
||||
|
@ -1523,12 +1523,22 @@ const routes = [
|
|||
name: "yicipao",
|
||||
path: "/wpm_gx/yicipao",
|
||||
meta: {
|
||||
title: "一次抛",
|
||||
title: "外协一次抛",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["wpm_ycp"],
|
||||
},
|
||||
component: "wpm_gx/yicipao",
|
||||
},
|
||||
{
|
||||
name: "yicipao2",
|
||||
path: "/wpm_gx/yicipao2",
|
||||
meta: {
|
||||
title: "磨抛一次抛",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["wpm_ycp"],
|
||||
},
|
||||
component: "wpm_gx/yicipao2",
|
||||
},
|
||||
{
|
||||
name: "saobianb",
|
||||
path: "/wpm_gx/saobianb",
|
||||
|
@ -2485,7 +2495,7 @@ const routes = [
|
|||
name: "equipment",
|
||||
path: "/em/equipment",
|
||||
meta: {
|
||||
title: "生产设备",
|
||||
title: "主要用能设备",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["equipment"],
|
||||
},
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
<div class="flexItem">
|
||||
<div class="itemTitle">
|
||||
<div class="itemTitleIcon"></div>
|
||||
<div>主机设备电耗电耗</div>
|
||||
<div>主机设备电耗</div>
|
||||
</div>
|
||||
<div class="itemBody itemBodyFlex">
|
||||
<div id="radar" style="height: 100%"></div>
|
||||
|
@ -340,9 +340,9 @@ export default {
|
|||
SMData: [],
|
||||
IMData: [],
|
||||
factoryName: "",
|
||||
initialAlpha: -Math.PI / 4.5,
|
||||
initialBeta: Math.PI / 2,
|
||||
initialRadius: 2.5,
|
||||
initialAlpha: 2.73,
|
||||
initialBeta: 1.24,
|
||||
initialRadius: 8,
|
||||
initialTarget: null,
|
||||
resizeTimeout: null,
|
||||
loadedPercent: 0,
|
||||
|
@ -378,11 +378,11 @@ export default {
|
|||
new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(128, 255, 165)",
|
||||
color: "rgb(255, 255, 0)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "rgb(1, 191, 236)",
|
||||
color: "rgb(255, 255, 0)",
|
||||
},
|
||||
]),
|
||||
|
||||
|
@ -399,7 +399,7 @@ export default {
|
|||
new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgb(55, 162, 255)",
|
||||
color: "rgb(255, 162, 255)",
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
|
@ -467,7 +467,7 @@ export default {
|
|||
tableData: [],
|
||||
tezhongData: [],
|
||||
option: {
|
||||
color: ["#80FFA5", "#00DDFF", "#37A2FF", "#FF0087", "#FFBF00"],
|
||||
// color: ["#80FFA5", "#00DDFF", "#37A2FF", "#FF0087", "#FFBF00"],
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
|
@ -476,6 +476,10 @@ export default {
|
|||
backgroundColor: "#6a7985",
|
||||
},
|
||||
},
|
||||
textStyle: {
|
||||
color: "#02f5f2",
|
||||
},
|
||||
backgroundColor: "rgba(255,255,255,0.3)",
|
||||
},
|
||||
legend: {
|
||||
icon: "stack",
|
||||
|
@ -758,11 +762,14 @@ export default {
|
|||
};
|
||||
return this.$API.enm.enstat.req(query);
|
||||
}).then((response) => {
|
||||
let maxId;
|
||||
response.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
maxId = ind;
|
||||
seriesData2[ind] = item.total_production || 0;
|
||||
});
|
||||
// 更新图表数据
|
||||
option1.color = ['#FFFF00','#CC00FF', '#FFBF00']
|
||||
option1.legend.data = [
|
||||
{
|
||||
name: "熟料",
|
||||
|
@ -781,7 +788,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[1],
|
||||
color: that.linearGradientColors[2],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -791,7 +798,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[2],
|
||||
color: that.linearGradientColors[4],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -801,7 +808,7 @@ export default {
|
|||
type: "line",
|
||||
smooth: true,
|
||||
lineStyle: {
|
||||
width: 0,
|
||||
width: 0,
|
||||
},
|
||||
showSymbol: false,
|
||||
areaStyle: {
|
||||
|
@ -823,7 +830,7 @@ export default {
|
|||
showSymbol: false,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: that.linearGradientColors[1],
|
||||
color: that.linearGradientColors[2],
|
||||
},
|
||||
emphasis: {
|
||||
focus: "series",
|
||||
|
@ -840,7 +847,7 @@ export default {
|
|||
showSymbol: false,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: that.linearGradientColors[2],
|
||||
color: that.linearGradientColors[4],
|
||||
},
|
||||
emphasis: {
|
||||
focus: "series",
|
||||
|
@ -849,8 +856,31 @@ export default {
|
|||
},
|
||||
];
|
||||
myChart.setOption(option1);
|
||||
let index2 = 0;
|
||||
intervalId = setInterval(function () {
|
||||
if (index2 <= maxId) {
|
||||
myChart.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
myChart.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
myChart.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index2,
|
||||
});
|
||||
index2++;
|
||||
} else {
|
||||
index2 = 0;
|
||||
clearInterval(intervalId);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
},
|
||||
},
|
||||
getMonthData() {
|
||||
// 获取回转窑数据
|
||||
let that = this;
|
||||
|
@ -969,6 +999,7 @@ export default {
|
|||
}
|
||||
});
|
||||
// 更新图表数据
|
||||
option3.color = ['#FFBF00','#6495ED', '#CC00FF']
|
||||
option3.legend.data = [
|
||||
{
|
||||
name: "原料车间用水",
|
||||
|
@ -1005,18 +1036,27 @@ export default {
|
|||
{
|
||||
name: '原料车间用水',
|
||||
type: 'line',
|
||||
data: seriesData1
|
||||
data: seriesData1,
|
||||
lineStyle: {
|
||||
color: that.linearGradientColors[0],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '烧成车间用水',
|
||||
type: 'line',
|
||||
data: seriesData3
|
||||
data: seriesData3,
|
||||
lineStyle: {
|
||||
color: that.linearGradientColors[1],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '水泥车间用水',
|
||||
type: 'line',
|
||||
data: seriesData5
|
||||
}
|
||||
data: seriesData5,
|
||||
lineStyle: {
|
||||
color: that.linearGradientColors[2]
|
||||
},
|
||||
},
|
||||
]
|
||||
myChart.setOption(option3); // 设置更新后的图表
|
||||
});
|
||||
|
@ -1061,7 +1101,7 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
//余热发电&环保数据
|
||||
//&环保数据
|
||||
generation() {
|
||||
let that = this;
|
||||
this.$API.mtm.mgroup.list
|
||||
|
@ -1191,7 +1231,7 @@ export default {
|
|||
radarChart.setOption(that.radarOption);
|
||||
});
|
||||
},
|
||||
//质量分析---待定
|
||||
//质量分析
|
||||
qualAnalys() {
|
||||
let that = this;
|
||||
// 初始化option2和图表
|
||||
|
@ -1238,6 +1278,7 @@ export default {
|
|||
}
|
||||
});
|
||||
// 更新图表数据
|
||||
option5.color = ["#80FFA5", "#00DDFF", "#37A2FF", "#FF0087", "#FFBF00"],
|
||||
option5.legend.data = [
|
||||
{
|
||||
name: "f-CaO",
|
||||
|
@ -1246,7 +1287,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[0],
|
||||
color: "#80FFA5",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1256,7 +1297,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[1],
|
||||
color: "#00DDFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1266,7 +1307,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[2],
|
||||
color: "#37A2FF",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1276,7 +1317,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[3],
|
||||
color: "#FF0087",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1286,7 +1327,7 @@ export default {
|
|||
},
|
||||
borderRadius: 2,
|
||||
itemStyle: {
|
||||
color: that.linearGradientColors[4],
|
||||
color: "#FFBF00",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -1527,7 +1568,7 @@ export default {
|
|||
that.initialAlpha,
|
||||
that.initialBeta,
|
||||
that.initialRadius,
|
||||
new BABYLON.Vector3(0, 0, 1.2)
|
||||
new BABYLON.Vector3(-0.45, 1.588, 1.93)
|
||||
);
|
||||
that.camera = camera;
|
||||
that.initialTarget = camera.getTarget();
|
||||
|
@ -1692,6 +1733,10 @@ export default {
|
|||
dataView.isVisible = false;
|
||||
}
|
||||
}
|
||||
console.log("Camera Alpha:", camera.alpha);
|
||||
console.log("Camera Beta:", camera.beta);
|
||||
console.log("Camera Radius:", camera.radius);
|
||||
console.log("Camera Radius:", camera.target);
|
||||
});
|
||||
control_main.addControl(checkbox1);
|
||||
var header1 = new BABYLON_GUI.TextBlock();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||
@change="handleQuery"></el-option>
|
||||
</el-select> -->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="query.is_deleted"
|
||||
placeholder="筛选"
|
||||
@change="handleQuery"
|
||||
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<el-option label="在用" :value="false"></el-option>
|
||||
<el-option label="已删" :value="true"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
@ -36,13 +36,13 @@
|
|||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="设备名称" prop="name" width="200" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" prop="number">
|
||||
<el-table-column label="设备位号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="model">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产厂" prop="factory" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" prop="production_date">
|
||||
<el-table-column label="设备重要性" prop="importance">
|
||||
</el-table-column>
|
||||
<el-table-column label="购置日期" prop="buy_date">
|
||||
</el-table-column>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<el-table-column label="存放位置" show-overflow-tooltip>
|
||||
<template #default="scope">{{ scope.row.place }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" show-overflow-tooltip>
|
||||
<el-table-column label="维修记录" show-overflow-tooltip>
|
||||
<template #default="scope">{{ scope.row.description }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="180">
|
||||
|
@ -103,8 +103,9 @@
|
|||
</el-container>
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" :eqtype="10"
|
||||
@closed="dialog.save = false"></save-dialog>
|
||||
|
||||
<check-dialog v-if="dialog.check" ref="checkDialog" :eqms="selectiones" @success="handleCheckSuccess"
|
||||
@closed="dialog.save = false"></check-dialog>
|
||||
@closed="dialog.check = false"></check-dialog>
|
||||
<el-drawer title="巡检记录" v-model="visibleRecord" :size="1000" destroy-on-close @closed="visibleRecord = false">
|
||||
<el-container v-loading="loading">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="record_create" v-auth="'einspect.create'"
|
||||
|
@ -193,8 +194,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.note" placeholder="备注" />
|
||||
<el-form-item label="维修记录">
|
||||
<el-input v-model="form.note" placeholder="维修记录" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<el-input v-model="form.model" placeholder="规格型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="设备状态">
|
||||
<el-select style="width: 100%" v-model="form.state" placeholder="请选择">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
||||
|
@ -61,18 +61,18 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="设备分类">
|
||||
<el-select v-model="form.cate" placeholder="所属大类" clearable style="width: 100%">
|
||||
<el-option v-for="item in cateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24">
|
||||
<!-- <el-col :md="8" :sm="24">
|
||||
<el-form-item label="是否删除">
|
||||
<el-switch v-model="form.is_deleted" style="--el-switch-on-color: #FF0000;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-divider v-if="form.type == 50"/>
|
||||
<el-row v-if="form.type == 50">
|
||||
|
@ -105,10 +105,11 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="生产日期">
|
||||
<el-date-picker v-model="form.production_date" type="date" placeholder="选择日期" value-format="YYYY-MM-DD"
|
||||
style="width:100%">
|
||||
</el-date-picker>
|
||||
<el-form-item label="设备重要性">
|
||||
<el-select style="width: 100%" v-model="form.importance" placeholder="请选择">
|
||||
<el-option v-for="item in importace" :key="item.label" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
|
@ -158,8 +159,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" :rows="3" v-model="form.description" placeholder="备注" />
|
||||
<el-form-item label="维修记录">
|
||||
<el-input type="textarea" :rows="3" v-model="form.description" placeholder="维修记录" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -268,6 +269,18 @@ export default {
|
|||
value: 40,
|
||||
label: '禁用'
|
||||
}],
|
||||
importace: [
|
||||
{
|
||||
value: 10,
|
||||
label: 'A'
|
||||
},{
|
||||
value: 20,
|
||||
label: 'B'
|
||||
},{
|
||||
value: 30,
|
||||
label: 'C'
|
||||
},
|
||||
],
|
||||
parameter_json: [
|
||||
{ key: '', value: '' }
|
||||
],
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||
@change="handleQuery"></el-option>
|
||||
</el-select> -->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="query.is_deleted"
|
||||
placeholder="筛选"
|
||||
@change="handleQuery"
|
||||
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<el-option label="在用" :value="false"></el-option>
|
||||
<el-option label="已删" :value="true"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||
@change="handleQuery"></el-option>
|
||||
</el-select> -->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="query.is_deleted"
|
||||
placeholder="筛选"
|
||||
@change="handleQuery"
|
||||
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<el-option label="在用" :value="false"></el-option>
|
||||
<el-option label="已删" :value="true"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="query.is_deleted"
|
||||
placeholder="筛选"
|
||||
@change="handleQuery"
|
||||
|
@ -14,7 +14,7 @@
|
|||
>
|
||||
<el-option label="在用" :value="false"></el-option>
|
||||
<el-option label="已删" :value="true"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="margin-right: 5px;"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||
@change="handleQuery"></el-option>
|
||||
</el-select> -->
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="query.is_deleted"
|
||||
placeholder="筛选"
|
||||
@change="handleQuery"
|
||||
|
@ -26,7 +26,7 @@
|
|||
>
|
||||
<el-option label="在用" :value="false"></el-option>
|
||||
<el-option label="已删" :value="true"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<td>{{ item.elec_consume_unit }}</td>
|
||||
<td>{{ item.celec_consume_unit }}</td>
|
||||
<td>{{ item.coal_consume_unit }}</td>
|
||||
<td>{{ item.en_consume_unit }}</td>
|
||||
<td>{{ item.cen_consume_unit }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<td>{{ item.elec_consume_unit }}</td>
|
||||
<td>{{ item.celec_consume_unit }}</td>
|
||||
<td>{{ item.coal_consume_unit }}</td>
|
||||
<td>{{ item.en_consume_unit }}</td>
|
||||
<td>{{ item.cen_consume_unit }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -152,6 +152,18 @@
|
|||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="mgDataName"
|
||||
placeholder="指标"
|
||||
@change="mgroupChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in mgData"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<div id="myChart" style="width: 1200px; height: 400px"></div>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
|
@ -165,11 +177,13 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
mgroupName: "",
|
||||
mgDataName:"",
|
||||
timeStamp: 0,
|
||||
mockData: mockData,
|
||||
mockData2: mockData2,
|
||||
query: {
|
||||
searchData: "",
|
||||
searchData2: "",
|
||||
page: 0,
|
||||
type: "month_st",
|
||||
mgroup: "",
|
||||
|
@ -179,6 +193,15 @@ export default {
|
|||
chartData1: {},
|
||||
chartData2: {},
|
||||
mgroups: [],
|
||||
mgData: [ "总产量",
|
||||
"台时产量",
|
||||
"运转时间",
|
||||
"运转率",
|
||||
"单位产品电耗",
|
||||
"单位产品综合电耗",
|
||||
"单位产品标煤耗",
|
||||
"单位产品综合能耗",
|
||||
],
|
||||
searchData: [],
|
||||
searchData2: [],
|
||||
exportLoading: false,
|
||||
|
@ -211,21 +234,13 @@ export default {
|
|||
inside: true,
|
||||
},
|
||||
data: [
|
||||
"总产量",
|
||||
"台时产量",
|
||||
"运转时间",
|
||||
"运转率",
|
||||
"单位产品电耗",
|
||||
"单位产品综合电耗",
|
||||
"单位产品标煤耗",
|
||||
"单位产品综合能耗",
|
||||
"吨熟料发电量",
|
||||
|
||||
],
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: "value",
|
||||
name: "电量 (KW·h)",
|
||||
name: "",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
|
@ -244,61 +259,64 @@ export default {
|
|||
name: "时段一",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "时段二",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
myChart: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.useMock();
|
||||
},
|
||||
// mounted() {
|
||||
// this.useMock();
|
||||
// },
|
||||
methods: {
|
||||
useMock() {
|
||||
let that = this;
|
||||
// that.tableDatas1 = that.mockData;
|
||||
// useMock() {
|
||||
// let that = this;
|
||||
// // that.tableDatas1 = that.mockData;
|
||||
|
||||
that.mockData.forEach((item) => {
|
||||
that.mgroups.push(item.mgroup_name);
|
||||
that.chartData1[item.mgroup_name] = [];
|
||||
let arr = [];
|
||||
arr[0] = item.total_production;
|
||||
arr[1] = item.production_hour;
|
||||
arr[2] = item.run_hour;
|
||||
arr[3] = item.run_rate;
|
||||
arr[4] = item.elec_consume_unit;
|
||||
arr[5] = item.celec_consume_unit;
|
||||
arr[6] = item.coal_consume_unit;
|
||||
arr[7] = item.cen_consume_unit;
|
||||
arr[8] = item.production_elec_unit;
|
||||
that.chartData1[item.mgroup_name] = arr;
|
||||
});
|
||||
// that.mockData.forEach((item) => {
|
||||
// that.mgroups.push(item.mgroup_name);
|
||||
// that.chartData1[item.mgroup_name] = [];
|
||||
// let arr = [];
|
||||
// arr[0] = item.total_production;
|
||||
// arr[1] = item.production_hour;
|
||||
// arr[2] = item.run_hour;
|
||||
// arr[3] = item.run_rate;
|
||||
// arr[4] = item.elec_consume_unit;
|
||||
// arr[5] = item.celec_consume_unit;
|
||||
// arr[6] = item.coal_consume_unit;
|
||||
// arr[7] = item.cccen_consume_unit;
|
||||
// arr[8] = item.production_elec_unit;
|
||||
// that.chartData1[item.mgroup_name] = arr;
|
||||
// });
|
||||
|
||||
that.tableDatas2 = that.mockData2;
|
||||
that.mockData2.forEach((item) => {
|
||||
that.chartData2[item.mgroup_name] = [];
|
||||
let arr = [];
|
||||
arr[0] = item.total_production;
|
||||
arr[1] = item.production_hour;
|
||||
arr[2] = item.run_hour;
|
||||
arr[3] = item.run_rate;
|
||||
arr[4] = item.elec_consume_unit;
|
||||
arr[5] = item.celec_consume_unit;
|
||||
arr[6] = item.coal_consume_unit;
|
||||
arr[7] = item.cen_consume_unit;
|
||||
arr[8] = item.production_elec_unit;
|
||||
that.chartData2[item.mgroup_name] = arr;
|
||||
});
|
||||
},
|
||||
// that.tableDatas2 = that.mockData2;
|
||||
// that.mockData2.forEach((item) => {
|
||||
// that.chartData2[item.mgroup_name] = [];
|
||||
// let arr = [];
|
||||
// arr[0] = item.total_production;
|
||||
// arr[1] = item.production_hour;
|
||||
// arr[2] = item.run_hour;
|
||||
// arr[3] = item.run_rate;
|
||||
// arr[4] = item.elec_consume_unit;
|
||||
// arr[5] = item.celec_consume_unit;
|
||||
// arr[6] = item.coal_consume_unit;
|
||||
// arr[7] = item.cccen_consume_unit;
|
||||
// arr[8] = item.production_elec_unit;
|
||||
// that.chartData2[item.mgroup_name] = arr;
|
||||
// });
|
||||
// },
|
||||
getList1(val) {
|
||||
let that = this;
|
||||
if (!val || val.length == 0) {
|
||||
return;
|
||||
}
|
||||
let start_date = val[0];
|
||||
let end_date = val[1];
|
||||
this.$API.enm.analyze
|
||||
|
@ -320,13 +338,15 @@ export default {
|
|||
arr[5] = item.celec_consume_unit;
|
||||
arr[6] = item.coal_consume_unit;
|
||||
arr[7] = item.cen_consume_unit;
|
||||
arr[8] = item.production_elec_unit;
|
||||
that.chartData1[item.mgroup_name] = arr;
|
||||
});
|
||||
});
|
||||
},
|
||||
getList2(val) {
|
||||
let that = this;
|
||||
if (!val || val.length == 0) {
|
||||
return;
|
||||
}
|
||||
let start_date = val[0];
|
||||
let end_date = val[1];
|
||||
this.$API.enm.analyze
|
||||
|
@ -347,7 +367,6 @@ export default {
|
|||
arr[5] = item.celec_consume_unit;
|
||||
arr[6] = item.coal_consume_unit;
|
||||
arr[7] = item.cen_consume_unit;
|
||||
arr[8] = item.production_elec_unit;
|
||||
that.chartData2[item.mgroup_name] = arr;
|
||||
});
|
||||
});
|
||||
|
@ -368,10 +387,56 @@ export default {
|
|||
}, 100);
|
||||
() => {};
|
||||
},
|
||||
mgroupChange(val) {
|
||||
mgroupChange() {
|
||||
let that = this;
|
||||
that.options.series[0].data = this.chartData1[val];
|
||||
that.options.series[1].data = this.chartData2[val];
|
||||
let val = that.mgroupName;
|
||||
let mgData = that.mgDataName;
|
||||
console.log("---------",val, mgData)
|
||||
if(!val){
|
||||
return;
|
||||
}
|
||||
if(mgData == "总产量"){
|
||||
that.options.xAxis.data = ["总产量"]
|
||||
that.options.yAxis[0].name = "(t)"
|
||||
that.options.series[0].data = [this.chartData1[val][0]];
|
||||
that.options.series[1].data = [this.chartData2[val][0]];
|
||||
} else if(mgData == "台时产量"){
|
||||
that.options.xAxis.data = ["台时产量"]
|
||||
that.options.yAxis[0].name = "(t/h)"
|
||||
that.options.series[0].data = [this.chartData1[val][1]];
|
||||
that.options.series[1].data = [this.chartData2[val][1]];
|
||||
} else if(mgData == "运转时间"){
|
||||
that.options.xAxis.data = ["运转时间"]
|
||||
that.options.yAxis[0].name = "(h)"
|
||||
that.options.series[0].data = [this.chartData1[val][2]];
|
||||
that.options.series[1].data = [this.chartData2[val][2]];
|
||||
} else if(mgData == "运转率"){
|
||||
that.options.xAxis.data = ["运转率"]
|
||||
that.options.yAxis[0].name = "(%)"
|
||||
that.options.series[0].data = [this.chartData1[val][3]];
|
||||
that.options.series[1].data = [this.chartData2[val][3]];
|
||||
} else if(mgData == "单位产品电耗"){
|
||||
that.options.xAxis.data = ["单位产品电耗"]
|
||||
that.options.yAxis[0].name = "(kW/h)"
|
||||
that.options.series[0].data = [this.chartData1[val][4]];
|
||||
that.options.series[1].data = [this.chartData2[val][4]];
|
||||
} else if(mgData == "单位产品综合电耗"){
|
||||
that.options.xAxis.data = ["单位产品综合电耗"]
|
||||
that.options.yAxis[0].name = "(kW/h)"
|
||||
that.options.series[0].data = [this.chartData1[val][5]];
|
||||
that.options.series[1].data = [this.chartData2[val][5]];
|
||||
} else if(mgData == "单位产品标煤耗"){
|
||||
that.options.xAxis.data = ["单位产品标煤耗"]
|
||||
that.options.yAxis[0].name = "(t)"
|
||||
that.options.series[0].data = [this.chartData1[val][6]];
|
||||
that.options.series[1].data = [this.chartData2[val][6]];
|
||||
} else if(mgData == "单位产品综合能耗"){
|
||||
console.log(this.chartData1[val][7])
|
||||
that.options.xAxis.data = ["单位产品综合能耗"]
|
||||
that.options.yAxis[0].name = "(kW/h)"
|
||||
that.options.series[0].data = [this.chartData1[val][7]];
|
||||
that.options.series[1].data = [this.chartData2[val][7]];
|
||||
}
|
||||
that.myChart.clear();
|
||||
that.myChart.setOption(that.options);
|
||||
},
|
||||
|
|
|
@ -158,12 +158,12 @@
|
|||
</template>
|
||||
<script>
|
||||
const colors = [
|
||||
"#647bfe",
|
||||
"#8698fe",
|
||||
"#a9b6fe",
|
||||
"#cbd3fe",
|
||||
"#91CC75",
|
||||
"#EE6666",
|
||||
"#647bfe",
|
||||
];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
|
@ -374,12 +374,7 @@ export default {
|
|||
obj.ordering = "report_sortstr";
|
||||
obj.material__code__in = "elec,elec_0";
|
||||
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
||||
console.log("mpoints", res);
|
||||
let arr = [];
|
||||
res.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
});
|
||||
console.log("arr", arr);
|
||||
const arr = res.filter(item => item.name !== "烧成车间合计").map(item => item.name)
|
||||
that.mpoints = arr;
|
||||
});
|
||||
},
|
||||
|
@ -429,6 +424,9 @@ export default {
|
|||
.then((res) => {
|
||||
that.tableData = res;
|
||||
res.forEach((item) => {
|
||||
if (item.mpoint_name === "烧成车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
|
@ -529,6 +527,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "烧成车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
|
@ -573,6 +574,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "烧成车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
|
@ -617,6 +621,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "烧成车间合计") {
|
||||
return;
|
||||
}
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
|
|
|
@ -42,14 +42,12 @@
|
|||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td
|
||||
class="numCell"
|
||||
v-if="index == 0 || index == 2"
|
||||
v-if="index == 0 || index == 2 || index == 4"
|
||||
rowspan="2"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell" v-else-if="index == 4">
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
@ -242,6 +240,7 @@ let yAxis = [
|
|||
},
|
||||
];
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { th } from "element-plus/es/locales.mjs";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
export default {
|
||||
components: {
|
||||
|
@ -272,6 +271,7 @@ export default {
|
|||
["运转时间", "运转时间(h)", "/", 0, 0, 0, 0, 0, 0, 0],
|
||||
["运转时间", "运转率(%)", "/", 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "煤磨分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
],
|
||||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
|
@ -495,6 +495,7 @@ export default {
|
|||
that.tableDatas[2][3] = data3.run_hour;
|
||||
that.tableDatas[3][3] = data3.run_rate;
|
||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||
that.tableDatas[5][3] = data3.elec_consume;
|
||||
}
|
||||
});
|
||||
//上小时
|
||||
|
@ -511,6 +512,7 @@ export default {
|
|||
let data4 = res4[0];
|
||||
that.tableDatas[0][2] = data4.total_production;
|
||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[5][2] = data4.elec_consume;
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
|
@ -583,6 +585,7 @@ export default {
|
|||
that.tableDatas[3][8]
|
||||
);
|
||||
that.tableDatas[4][5] = data1.elec_consume_unit;
|
||||
that.tableDatas[5][5] = data1.elec_consume;
|
||||
that.tableDatas[4][9] = precen(
|
||||
(that.tableDatas[4][5]-that.tableDatas[4][8]),
|
||||
that.tableDatas[4][8]
|
||||
|
@ -621,6 +624,7 @@ export default {
|
|||
that.tableDatas[3][6]
|
||||
);
|
||||
that.tableDatas[4][4] = data2.elec_consume_unit;
|
||||
that.tableDatas[5][4] = data2.elec_consume;
|
||||
that.tableDatas[4][7] = precen(
|
||||
(that.tableDatas[4][4]-that.tableDatas[4][6]),
|
||||
that.tableDatas[4][6]
|
||||
|
@ -728,7 +732,7 @@ export default {
|
|||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
for (let i = 1; i <= data.length; i++) {
|
||||
let item = i + "日";
|
||||
dayXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
|||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "煤磨" })
|
||||
.req({ page: 0, name: "煤磨" })
|
||||
.then((res) => {
|
||||
console.log("煤磨", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -118,7 +118,7 @@ export default {
|
|||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "煤磨" })
|
||||
.req({ page: 0, name: "煤磨" })
|
||||
.then((res) => {
|
||||
console.log("煤磨", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -306,7 +306,7 @@ export default {
|
|||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.req({ page: 0, name: "余热发电" })
|
||||
.then((res) => {
|
||||
console.log("余热发电", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -90,19 +90,19 @@
|
|||
<th colspan="4">电石渣</th>
|
||||
<th colspan="4">原料磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
<th rowspan="2">单位压缩空气(m3/t)</th>
|
||||
</tr>
|
||||
<tr v-if="deptName=='烧成车间'">
|
||||
<th colspan="10">回转窑</th>
|
||||
<th colspan="4">煤磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
<th rowspan="2">单位压缩空气(m3/t)</th>
|
||||
</tr>
|
||||
<tr v-if="deptName=='水泥车间'">
|
||||
<th colspan="4">水泥磨</th>
|
||||
<th colspan="4">包装</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
<th rowspan="2">单位压缩空气(m3/t)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
|
@ -238,7 +238,6 @@
|
|||
wrapArr[ind][1]=item
|
||||
}else if(item.mgroup_name=='原料压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}else if(item.mgroup_name=='原料车间用水'){
|
||||
wrapArr[ind][3]=item
|
||||
}
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
|
@ -246,9 +245,7 @@
|
|||
wrapArr[ind][0]=item
|
||||
}else if (item.mgroup_name=='烧成压缩空气') {
|
||||
wrapArr[ind][2]=item
|
||||
}
|
||||
else if (item.mgroup_name=='烧成车间用水') {
|
||||
wrapArr[ind][3]=item
|
||||
wrapArr[ind][3]=item
|
||||
}else{
|
||||
wrapArr[ind][1]=item
|
||||
}
|
||||
|
@ -257,8 +254,7 @@
|
|||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='水泥压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}else if(item.mgroup_name=='水泥车间用水'){
|
||||
wrapArr[ind][3]=item
|
||||
wrapArr[ind][3]=item
|
||||
}else if(item.mgroup_name=='水泥包装'){
|
||||
wrapArr[ind][1]=item
|
||||
}
|
||||
|
@ -318,13 +314,23 @@
|
|||
}else{
|
||||
itemArr.push( 0)
|
||||
}
|
||||
if(item1 &&item1[3]){
|
||||
itemArr.push(item1[3].water_consume)//水
|
||||
if(item1[0].mgroup_name == '水泥磨' || item1[0].mgroup_name == '回转窑'){
|
||||
if (item1[0].total_production !=0 && item1[3]){
|
||||
|
||||
itemArr.push((item1[3].cair_consume/item1[0].total_production).toFixed(2))//单位产品压缩空气
|
||||
}else{
|
||||
itemArr.push(0)
|
||||
}
|
||||
}else{
|
||||
itemArr.push(0)
|
||||
}
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
if(parseFloat(item1[1].total_production) != 0 && item1[3]){
|
||||
|
||||
itemArr.push((item1[3].cair_consume/item1[1].total_production).toFixed(2))//单位产品压缩空气
|
||||
}else{
|
||||
itemArr.push(0)
|
||||
}
|
||||
}
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
that.tableDatas3 = innerArr;
|
||||
});
|
||||
|
|
|
@ -3,15 +3,47 @@
|
|||
<div class="app-container" id="app-container" style="height: 100%">
|
||||
<el-header id="app-header">
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
clearable
|
||||
class="headerSearch"
|
||||
@change="typeCange"
|
||||
>
|
||||
<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="search_date"
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="天"
|
||||
v-if="query.type==0"
|
||||
style="margin-right: 6px"
|
||||
@change="dateChange"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="查询月份"
|
||||
v-if="query.type==1"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="查询年份"
|
||||
v-if="query.type==2"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
@ -29,95 +61,9 @@
|
|||
<el-main>
|
||||
<el-card>
|
||||
<div>
|
||||
<!-- <div ref="print" id="myReport" class="printContainer"> -->
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<!-- <table
|
||||
border="1"
|
||||
width="2700"
|
||||
cellspacing="0"
|
||||
:key="timeStamp"
|
||||
id="myTable"
|
||||
class="myTable"
|
||||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="28">电量消耗小时报表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>工段</th>
|
||||
<th>设备</th>
|
||||
<th>单位</th>
|
||||
<th v-for="item in 24" :key="item">
|
||||
{{ item - 1 }}时
|
||||
</th>
|
||||
<th>本日合计</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item, index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-if="index == 0" rowspan="4">
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 4"
|
||||
rowspan="5"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 9"
|
||||
rowspan="5"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 14"
|
||||
rowspan="4"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 18"
|
||||
rowspan="3"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 21"
|
||||
rowspan="5"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-else-if="
|
||||
index == 26 ||
|
||||
index == 27 ||
|
||||
index == 28 ||
|
||||
index == 29
|
||||
"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td class="numCell">{{ item[2] }}</td>
|
||||
|
||||
<td
|
||||
class="numCell"
|
||||
v-for="hour_item in hours"
|
||||
:key="hour_item"
|
||||
@click="itemClick(item, index)"
|
||||
>
|
||||
{{ item[2 + hour_item] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[27] }}</td>
|
||||
</tr>
|
||||
</table> -->
|
||||
<el-table
|
||||
v-if="query.type==0"
|
||||
id="hourBaseTable"
|
||||
:data="tableDatas2"
|
||||
style="width: 100%"
|
||||
|
@ -158,6 +104,90 @@
|
|||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-if="query.type==1"
|
||||
id="hourBaseTable"
|
||||
:data="tableDatas_day"
|
||||
style="width: 100%"
|
||||
border
|
||||
:height="tableHeight"
|
||||
:span-method="objectSpanMethod"
|
||||
@cell-click="handleCellClick1"
|
||||
>
|
||||
<el-table-column
|
||||
label="工段"
|
||||
prop="mgroupName"
|
||||
width="100"
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="设备"
|
||||
prop="nickname"
|
||||
width="110"
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="unit" fixed>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="item in xAxisData_day"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:prop="item"
|
||||
width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合计"
|
||||
prop="sum"
|
||||
width="130"
|
||||
fixed="right"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-if="query.type==2"
|
||||
id="hourBaseTable"
|
||||
:data="tableDatas_month"
|
||||
style="width: 100%"
|
||||
border
|
||||
:height="tableHeight"
|
||||
:span-method="objectSpanMethod"
|
||||
@cell-click="handleCellClick_month"
|
||||
>
|
||||
<el-table-column
|
||||
label="工段"
|
||||
prop="mgroupName"
|
||||
width="100"
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="设备"
|
||||
prop="nickname"
|
||||
width="110"
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="unit" fixed>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="item in months"
|
||||
:key="item"
|
||||
:label="item + '月'"
|
||||
:prop="item + '月'"
|
||||
width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合计"
|
||||
prop="sum"
|
||||
width="130"
|
||||
fixed="right"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -182,15 +212,31 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
days: 30,
|
||||
day: "",
|
||||
year: "",
|
||||
month: "",
|
||||
search_date: "",
|
||||
query:{
|
||||
type:0,
|
||||
day:'',
|
||||
year:'',
|
||||
month:'',
|
||||
yearStart:'',
|
||||
},
|
||||
mgroupObj: {},
|
||||
indexList: [],
|
||||
mpointList: [],
|
||||
tableDatas: [],
|
||||
options: [
|
||||
{id:0,name:'日统计'},
|
||||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
],
|
||||
tableDatas2: [],
|
||||
tableDatas_day:[],
|
||||
tableDatas_month:[],
|
||||
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
hours: [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
||||
19, 20, 21, 22, 23, 24,
|
||||
|
@ -304,6 +350,8 @@ export default {
|
|||
],
|
||||
},
|
||||
xAxisData: [],
|
||||
xAxisData_day: [],
|
||||
xAxisData_month: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -313,22 +361,22 @@ export default {
|
|||
let month = nowDate.getMonth() + 1;
|
||||
let day = nowDate.getDate();
|
||||
that.timeStamp = nowDate.getTime();
|
||||
let month_s = month > 9 ? month : "0" + month;
|
||||
let day_s = day > 9 ? day : "0" + day;
|
||||
that.days = new Date(year, month, 0).getDate();
|
||||
that.day = day;
|
||||
that.year = year;
|
||||
that.month = month;
|
||||
that.search_date = year + "-" + month_s + "-" + day_s;
|
||||
// for (let i = 0; i < that.tableDatas.length; i++) {
|
||||
// for (let j = 0; j < 24; j++) {
|
||||
// let k = 3 + j;
|
||||
// that.tableDatas[i][k] = 0;
|
||||
// this.$forceUpdate();
|
||||
// }
|
||||
// }
|
||||
for (let n = 0; n < 24; n++) {
|
||||
that.xAxisData.push(n + "时");
|
||||
}
|
||||
that.timeStamp = nowDate.getTime();
|
||||
that.headerLength = that.days + 4;
|
||||
that.tableWidth = that.headerLength * 100 + "";
|
||||
for (let n = 1; n <= that.days; n++) {
|
||||
that.xAxisData_day.push(n + "日");
|
||||
}
|
||||
for (let n = 1; n < 13; n++) {
|
||||
that.xAxisData_month.push(n + "月");
|
||||
}
|
||||
this.getMPoints();
|
||||
let heightContainer =
|
||||
document.getElementById("app-container").clientHeight;
|
||||
|
@ -354,24 +402,28 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
dateChange(e) {
|
||||
dateChange() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
let arr = that.search_date.split("-");
|
||||
that.year = Number(arr[0]);
|
||||
that.month = Number(arr[1]);
|
||||
that.day = Number(arr[2]);
|
||||
// for (let i = 0; i < that.tableDatas.length; i++) {
|
||||
// for (let j = 0; j < 25; j++) {
|
||||
// let k = 3 + j;
|
||||
// that.tableDatas[i][k] = 0;
|
||||
// this.$forceUpdate();
|
||||
// }
|
||||
// }
|
||||
let arr = [];
|
||||
if(that.query.type==0){//日
|
||||
arr = that.query.day.split('-');
|
||||
that.year = Number(arr[0]);
|
||||
that.month = Number(arr[1]);
|
||||
that.day = Number(arr[2]);
|
||||
that.dataLoop();
|
||||
}else if(that.query.type==1){//月
|
||||
let arr = that.query.month.split('-');
|
||||
that.year = Number(arr[0]);
|
||||
that.month = Number(arr[1]);
|
||||
that.dataLoop1();
|
||||
}else if (that.query.type==2){
|
||||
that.year = that.query.year;
|
||||
that.dataLoop_month();
|
||||
}
|
||||
let nowDate = new Date();
|
||||
that.timeStamp = nowDate.getTime();
|
||||
// that.getLengthData();
|
||||
that.dataLoop();
|
||||
},
|
||||
getMPoints() {
|
||||
let that = this;
|
||||
|
@ -472,32 +524,152 @@ export default {
|
|||
that.$forceUpdate();
|
||||
});
|
||||
},
|
||||
getHourData() {
|
||||
dataLoop1() {
|
||||
let that = this;
|
||||
let m = 0;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
let hour = date.getHours();
|
||||
let minute = date.getMinutes();
|
||||
let second = date.getSeconds();
|
||||
},
|
||||
getTableData() {
|
||||
for (let i = 0; i < this.tableDatas.length; i++) {
|
||||
let k = 0;
|
||||
if (i == 0 || i == 2 || i == 9 || i == 23 || i == 27) {
|
||||
k = 3;
|
||||
} else if (i == 49) {
|
||||
k = 1;
|
||||
that.tableDatas = [];
|
||||
that.tableDatas_day = [];
|
||||
let _mgroup = [],
|
||||
_nameLength = [],
|
||||
indexList = [];
|
||||
let mgroupObj = {};
|
||||
that.mpointList.forEach((item, index) => {
|
||||
let indexs = _mgroup.indexOf(item.mgroup_name);
|
||||
if (indexs > -1) {
|
||||
_nameLength[indexs] += 1;
|
||||
} else {
|
||||
k = 2;
|
||||
_mgroup.push(item.mgroup_name);
|
||||
_nameLength.push(1);
|
||||
indexList.push(index);
|
||||
}
|
||||
for (let j = k; j < this.tableDatas[i].length; j++) {
|
||||
this.tableDatas[i][j] = 0;
|
||||
|
||||
for (let i = 0; i < _mgroup.length; i++) {
|
||||
mgroupObj[_mgroup[i]] = _nameLength[i];
|
||||
}
|
||||
}
|
||||
let arr = [];
|
||||
arr[0] =
|
||||
item.mgroup_name != null
|
||||
? item.mgroup_name
|
||||
: item.nickname != null
|
||||
? item.nickname
|
||||
: item.name;
|
||||
arr[1] = item.nickname != null ? item.nickname : item.name;
|
||||
arr[2] = item.unit;
|
||||
for (let i = 0; i < that.days; i++) {
|
||||
arr[i + 3] = 0;
|
||||
}
|
||||
that.tableDatas.push(arr);
|
||||
let obj = {};
|
||||
obj.mgroupName =
|
||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||
obj.nickname =
|
||||
item.nickname != null && item.nickname != ""
|
||||
? item.nickname
|
||||
: item.name;
|
||||
obj.unit = item.unit;
|
||||
|
||||
that.tableDatas_day.push(obj);
|
||||
that.getData1(item.id, index);
|
||||
});
|
||||
that.mgroupObj = mgroupObj;
|
||||
that.indexList = indexList;
|
||||
},
|
||||
getData1(id, index) {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.type = "day";
|
||||
obj.year = that.year;
|
||||
obj.month = that.month;
|
||||
obj.mpoint = id;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
||||
let sum = 0;
|
||||
res.forEach((item) => {
|
||||
let ind = item.day + 2;
|
||||
that.tableDatas[index][ind] = item.val;
|
||||
sum += Number(item.val);
|
||||
let keyName = item.day + "日";
|
||||
that.tableDatas_day[index][keyName] = item.val;
|
||||
});
|
||||
sum = sum * 100;
|
||||
sum = Math.round(sum);
|
||||
sum = sum / 100;
|
||||
let dayss = 0;
|
||||
dayss = this.days + 3;
|
||||
that.tableDatas[index][dayss] = sum.toFixed(2);
|
||||
that.tableDatas_day[index].sum = sum.toFixed(2);
|
||||
that.$forceUpdate();
|
||||
});
|
||||
},
|
||||
dataLoop_month() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
that.tableDatas_month = [];
|
||||
let _mgroup = [],
|
||||
_nameLength = [],
|
||||
indexList = [];
|
||||
let mgroupObj = {};
|
||||
that.mpointList.forEach((item, index) => {
|
||||
let indexs = _mgroup.indexOf(item.mgroup_name);
|
||||
if (indexs > -1) {
|
||||
_nameLength[indexs] += 1;
|
||||
} else {
|
||||
_mgroup.push(item.mgroup_name);
|
||||
_nameLength.push(1);
|
||||
indexList.push(index);
|
||||
}
|
||||
|
||||
for (let i = 0; i < _mgroup.length; i++) {
|
||||
mgroupObj[_mgroup[i]] = _nameLength[i];
|
||||
}
|
||||
let arr = [];
|
||||
arr[0] =
|
||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||
arr[1] = item.nickname != null ? item.nickname : item.name;
|
||||
arr[2] = item.unit;
|
||||
for (let i = 0; i < 12; i++) {
|
||||
arr[i + 3] = 0;
|
||||
}
|
||||
that.tableDatas.push(arr);
|
||||
let obj = {};
|
||||
obj.mgroupName =
|
||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||
obj.nickname =
|
||||
item.nickname != null && item.nickname != ""
|
||||
? item.nickname
|
||||
: item.name;
|
||||
obj.unit = item.unit;
|
||||
that.tableDatas_month.push(obj);
|
||||
that.getData_month(item.id, index);
|
||||
});
|
||||
that.mgroupObj = mgroupObj;
|
||||
that.indexList = indexList;
|
||||
},
|
||||
getData_month(id, index) {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.type = "month";
|
||||
obj.year = that.year;
|
||||
obj.mpoint = id;
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
||||
console.log(res);
|
||||
let sum = 0;
|
||||
res.forEach((item) => {
|
||||
let ind = item.month + 2;
|
||||
that.tableDatas[index][ind] = item.val;
|
||||
sum += Number(item.val);
|
||||
let keyName = item.month + "月";
|
||||
that.tableDatas_month[index][keyName] = item.val;
|
||||
});
|
||||
sum = sum * 100;
|
||||
sum = Math.round(sum);
|
||||
sum = sum / 100;
|
||||
that.tableDatas[index][15] = sum.toFixed(2);
|
||||
that.tableDatas_month[index].sum = sum.toFixed(2);
|
||||
that.$forceUpdate();
|
||||
});
|
||||
},
|
||||
|
||||
handleCellClick(row, column, cell, event) {
|
||||
let that = this;
|
||||
console.log("row", row);
|
||||
|
@ -510,11 +682,23 @@ export default {
|
|||
that.option.series[0].data = lineData;
|
||||
this.itemVisible = true;
|
||||
},
|
||||
itemClick(item, index) {
|
||||
handleCellClick1(row, column, cell, event) {
|
||||
let that = this;
|
||||
let index = that.tableDatas_day.indexOf(row);
|
||||
console.log('row', row)
|
||||
that.tableName = `${row.nickname}-电量日统计`
|
||||
let lineData = that.tableDatas[index].slice(3, that.headerLength);
|
||||
that.option.xAxis.data = that.xAxisData;
|
||||
let lineData = that.tableDatas[index].slice(3, that.days + 3);
|
||||
that.option.xAxis.data = that.xAxisData_day;
|
||||
that.option.series[0].data = lineData;
|
||||
this.itemVisible = true;
|
||||
},
|
||||
handleCellClick_month(row, column, cell, event) {
|
||||
let that = this;
|
||||
let index = that.tableDatas_month.indexOf(row);
|
||||
that.tableName = `${row.nickname}-电量日统计`
|
||||
//获取图数据
|
||||
let lineData = that.tableDatas[index].slice(3, 14);
|
||||
that.option.xAxis.data = that.xAxisData_month;
|
||||
that.option.series[0].data = lineData;
|
||||
this.itemVisible = true;
|
||||
},
|
||||
|
|
|
@ -53,11 +53,11 @@
|
|||
<td
|
||||
class="numCell"
|
||||
v-else-if="index == 4"
|
||||
rowspan="4"
|
||||
rowspan="5"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell" v-else-if="index == 8">
|
||||
<td class="numCell" v-else-if="index == 9">
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
|
@ -437,6 +437,7 @@ export default {
|
|||
["能耗", "单位产品综合电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品标煤耗(kgce/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品综合能耗(kgce/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["成本", "单位产品成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
tableName: "生产报告",
|
||||
|
@ -664,7 +665,7 @@ export default {
|
|||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "回转窑" })
|
||||
.req({ page: 0, name: "回转窑" })
|
||||
.then((res) => {
|
||||
console.log("回转窑", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
@ -687,7 +688,8 @@ export default {
|
|||
that.tableDatas[5][3] = data3.celec_consume_unit;
|
||||
that.tableDatas[6][3] = data3.coal_consume_unit;
|
||||
that.tableDatas[7][3] = data3.cen_consume_unit;
|
||||
that.tableDatas[8][3] = data3.production_cost_unit;
|
||||
that.tableDatas[8][3] = data3.elec_consume;
|
||||
that.tableDatas[9][3] = data3.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//上小时
|
||||
|
@ -707,7 +709,8 @@ export default {
|
|||
that.tableDatas[5][2] = data4.celec_consume_unit;
|
||||
that.tableDatas[6][2] = data4.coal_consume_unit;
|
||||
that.tableDatas[7][2] = data4.cen_consume_unit;
|
||||
that.tableDatas[8][2] = data4.production_cost_unit;
|
||||
that.tableDatas[8][2] = data4.elec_consume;
|
||||
that.tableDatas[9][2] = data4.production_cost_unit;
|
||||
}
|
||||
});
|
||||
let params5 = {};
|
||||
|
@ -766,8 +769,8 @@ export default {
|
|||
item5.goal_cate_name ==
|
||||
"单位产品成本(元/吨)"
|
||||
) {
|
||||
that.tableDatas[8][6] = item5[str];
|
||||
that.tableDatas[8][8] = item5.goal_val;
|
||||
that.tableDatas[9][6] = item5[str];
|
||||
that.tableDatas[9][8] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -823,11 +826,12 @@ export default {
|
|||
(that.tableDatas[7][5]-that.tableDatas[7][8]),
|
||||
that.tableDatas[7][8]
|
||||
);
|
||||
that.tableDatas[8][5] =
|
||||
that.tableDatas[8][5] = data1.elec_consume;
|
||||
that.tableDatas[9][5] =
|
||||
data1.production_cost_unit;
|
||||
that.tableDatas[8][9] = precen(
|
||||
(that.tableDatas[8][5]-that.tableDatas[8][8]),
|
||||
that.tableDatas[8][8]
|
||||
that.tableDatas[9][9] = precen(
|
||||
(that.tableDatas[9][5]-that.tableDatas[9][8]),
|
||||
that.tableDatas[9][9]
|
||||
);
|
||||
} else {
|
||||
}
|
||||
|
@ -883,11 +887,12 @@ export default {
|
|||
that.tableDatas[7][4]-that.tableDatas[7][6],
|
||||
that.tableDatas[7][6]
|
||||
);
|
||||
that.tableDatas[8][4] =
|
||||
that.tableDatas[8][4] = data2.elec_consume;
|
||||
that.tableDatas[9][4] =
|
||||
data2.production_cost_unit;
|
||||
that.tableDatas[8][7] = precen(
|
||||
that.tableDatas[8][4]-that.tableDatas[8][6],
|
||||
that.tableDatas[8][6]
|
||||
that.tableDatas[9][7] = precen(
|
||||
that.tableDatas[9][4]-that.tableDatas[9][6],
|
||||
that.tableDatas[9][6]
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -1004,7 +1009,7 @@ export default {
|
|||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
for (let i = 1; i <= data.length; i++) {
|
||||
let item = i + "日";
|
||||
dayXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -655,7 +655,7 @@ export default {
|
|||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "回转窑" })
|
||||
.req({ page: 0, name: "回转窑" })
|
||||
.then((res) => {
|
||||
console.log("回转窑", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -308,7 +308,7 @@ export default {
|
|||
that.query.year_s = year;
|
||||
that.timeStamp = myDate.getTime();
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "回转窑" })
|
||||
.req({ page: 0, name: "回转窑" })
|
||||
.then((res) => {
|
||||
console.log("回转窑", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -43,13 +43,16 @@
|
|||
<td
|
||||
class="numCell"
|
||||
v-if="
|
||||
index == 0 || index == 2 || index == 4
|
||||
index == 0 || index == 2
|
||||
"
|
||||
rowspan="2"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell" v-else-if="index == 6">
|
||||
<td class="numCell" v-else-if="index == 4"
|
||||
rowspan="3"
|
||||
>{{ item[0] }}</td>
|
||||
<td class="numCell" v-else-if="index == 7">
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
|
@ -404,6 +407,7 @@ export default {
|
|||
["运转时间", "运转率(%)", "/", 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品综合能耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["成本", "单位产品成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
tableName: "生产报告",
|
||||
|
@ -633,7 +637,8 @@ export default {
|
|||
that.tableDatas[3][3] = data3.run_rate;
|
||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||
that.tableDatas[5][3] = data3.cen_consume_unit;
|
||||
that.tableDatas[6][3] = data3.production_cost_unit;
|
||||
that.tableDatas[6][3] = data3.elec_consume;
|
||||
that.tableDatas[7][3] = data3.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//上小时
|
||||
|
@ -651,7 +656,8 @@ export default {
|
|||
that.tableDatas[0][2] = data4.total_production;
|
||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[5][2] = data4.cen_consume_unit;
|
||||
that.tableDatas[6][2] = data4.production_cost_unit;
|
||||
that.tableDatas[6][2] = data4.elec_consume;
|
||||
that.tableDatas[7][2] = data4.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
|
@ -699,8 +705,8 @@ export default {
|
|||
item5.goal_cate_name ==
|
||||
"单位产品成本(元/吨)"
|
||||
) {
|
||||
that.tableDatas[6][6] = item5[str];
|
||||
that.tableDatas[6][8] = item5.goal_val;
|
||||
that.tableDatas[7][6] = item5[str];
|
||||
that.tableDatas[7][8] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -745,11 +751,12 @@ export default {
|
|||
that.tableDatas[5][5]-that.tableDatas[5][8],
|
||||
that.tableDatas[5][8]
|
||||
);
|
||||
that.tableDatas[6][5] =
|
||||
that.tableDatas[6][5] = data1.elec_consume;
|
||||
that.tableDatas[7][5] =
|
||||
data1.production_cost_unit;
|
||||
that.tableDatas[6][9] = precen(
|
||||
that.tableDatas[6][5]-that.tableDatas[6][8],
|
||||
that.tableDatas[6][8]
|
||||
that.tableDatas[7][9] = precen(
|
||||
that.tableDatas[7][5]-that.tableDatas[7][8],
|
||||
that.tableDatas[7][8]
|
||||
);
|
||||
} else {
|
||||
}
|
||||
|
@ -794,11 +801,12 @@ export default {
|
|||
that.tableDatas[5][4]-that.tableDatas[5][6],
|
||||
that.tableDatas[5][6]
|
||||
);
|
||||
that.tableDatas[6][4] =
|
||||
that.tableDatas[7][4] =
|
||||
data2.production_cost_unit;
|
||||
that.tableDatas[6][7] = precen(
|
||||
that.tableDatas[6][4]-that.tableDatas[6][6],
|
||||
that.tableDatas[6][6]
|
||||
that.tableDatas[6][4] = data2.elec_consume;
|
||||
that.tableDatas[7][7] = precen(
|
||||
that.tableDatas[7][4]-that.tableDatas[7][6],
|
||||
that.tableDatas[7][6]
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -909,7 +917,7 @@ export default {
|
|||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
for (let i = 1; i <= data.length; i++) {
|
||||
let item = i + "日";
|
||||
dayXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,10 @@
|
|||
<tbody>
|
||||
<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 v-else-if="index==8" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==9" class="numCell"
|
||||
rowspan="2"
|
||||
>{{ item[0] }}</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
@ -337,6 +340,7 @@ export default {
|
|||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
],
|
||||
tableName: "生产报告",
|
||||
|
@ -568,7 +572,8 @@ export default {
|
|||
that.tableDatas[8][4] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][4] = item.elec_consume_unit;
|
||||
}
|
||||
that.tableDatas[10][4] = item.val;
|
||||
}
|
||||
}
|
||||
)}
|
||||
}).then(()=>{
|
||||
|
@ -602,6 +607,7 @@ export default {
|
|||
that.tableDatas[8][3] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][3] = item.elec_consume_unit;
|
||||
that.tableDatas[10][3] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -683,6 +689,7 @@ export default {
|
|||
that.tableDatas[8][2] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][2] = item.elec_consume_unit;
|
||||
that.tableDatas[10][2] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -40,36 +40,25 @@
|
|||
<th rowspan="3">实际产量(t)</th>
|
||||
<!-- <th rowspan="3">总成本(元)</th> -->
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th :colspan="materialList.length">直接材料</th>
|
||||
<th colspan="10">制造费用</th>
|
||||
<!-- <th :colspan="materialList.length">直接材料</th> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="data1 > 0" :colspan="data1">原材料</th>
|
||||
<th v-if="data3 > 0" :colspan="data3">辅助材料</th>
|
||||
<th v-if="data2 > 0" :colspan="data2">电/水</th>
|
||||
<th>摊销</th>
|
||||
<th colspan="7">制造费用</th>
|
||||
<th rowspan="2">直接人工</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="(item, index) in materialList" :key="index">{{ item }}</th>
|
||||
<th>无形资产摊销</th>
|
||||
<th>职工薪酬</th>
|
||||
<th>其他费用</th>
|
||||
<th>折旧</th>
|
||||
<th>固定资产折旧</th>
|
||||
<th>差旅费</th>
|
||||
<th>装卸费</th>
|
||||
<th>修理费</th>
|
||||
<th>材料出库</th>
|
||||
<th>倒运费用</th>
|
||||
<th>直接人工</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="(item, index) in materialList" :key="index">{{ item }}</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item, index) in tableData1" :key="index">
|
||||
|
@ -303,6 +292,9 @@ export default {
|
|||
}
|
||||
let otherdata = itemData.other_cost_data;
|
||||
for (let j = 0; j < otherdata.length; j++) {
|
||||
if (otherdata[j].cate == '其他费用' ||otherdata[j].cate == '倒运费用') {
|
||||
continue;
|
||||
}
|
||||
dataArr.push((otherdata[j].cost_unit).toFixed(2))
|
||||
}
|
||||
that.tableData1.push(dataArr)
|
||||
|
|
|
@ -142,6 +142,7 @@
|
|||
],
|
||||
year:'',
|
||||
month:'',
|
||||
tableName:'',
|
||||
day:'',
|
||||
hours:'',
|
||||
timeDate:'',
|
||||
|
@ -196,6 +197,7 @@
|
|||
params.month_s = that.month;
|
||||
params.day_s = that.day;
|
||||
params.type = 'day_s';
|
||||
that.tableName = that.year+'-'+that.month+'-'+that.day+'-生产日报表';
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let dataList = {};
|
||||
if(res.length <= 0){
|
||||
|
@ -318,6 +320,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myReport', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
month_t:'',
|
||||
dataList:{},
|
||||
nowData:[],
|
||||
tableName:'',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -157,6 +158,7 @@
|
|||
params.page = 0;
|
||||
params.year_s = that.year;
|
||||
params.month_s = that.month;
|
||||
that.tableName = that.year + '_' + that.month+'-生产月报表';
|
||||
params.type = 'month_s';
|
||||
let m_goal_val = "goal_val_" + that.month
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
|
@ -463,6 +465,11 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myReport', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -158,12 +158,13 @@
|
|||
</template>
|
||||
<script>
|
||||
const colors = [
|
||||
"#647bfe",
|
||||
"#cbd3fe",
|
||||
"#8698fe",
|
||||
"#EE6666",
|
||||
"#a9b6fe",
|
||||
"#cbd3fe",
|
||||
"#91CC75",
|
||||
"#EE6666",
|
||||
"#91CC75",
|
||||
"#647bfe",
|
||||
];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
|
@ -423,10 +424,7 @@ export default {
|
|||
obj.ordering = "report_sortstr";
|
||||
obj.material__code__in = "elec,elec_0";
|
||||
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
||||
let arr = [];
|
||||
res.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
});
|
||||
const arr = res.filter(item => item.name !== "原料车间合计").map(item => item.name)
|
||||
console.log("arr", arr);
|
||||
that.mpoints = arr;
|
||||
});
|
||||
|
@ -478,6 +476,9 @@ export default {
|
|||
that.tableData = res;
|
||||
console.log("getTableHourData", res);
|
||||
res.forEach((item) => {
|
||||
if (item.mpoint_name === "原料车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
|
@ -538,6 +539,9 @@ export default {
|
|||
this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
|
||||
console.log("getTableHourData", res);
|
||||
res.forEach((item, index) => {
|
||||
if (item.mpoint_name === "原料车间合计"){
|
||||
return;
|
||||
}
|
||||
let index_m = that.mpoints.indexOf(
|
||||
item.mpoint_name
|
||||
);
|
||||
|
@ -579,6 +583,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "原料车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
|
@ -623,6 +630,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "原料车间合计") {
|
||||
return;
|
||||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
|
@ -669,6 +679,9 @@ export default {
|
|||
}
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mpoint_name === "原料车间合计") {
|
||||
return;
|
||||
}
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td
|
||||
class="numCell"
|
||||
v-if="index == 0 || index == 2"
|
||||
v-if="index == 0 || index == 2 || index == 4"
|
||||
rowspan="2"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-if="index == 4 || index == 5"
|
||||
v-else-if="index == 6"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
|
@ -407,6 +407,7 @@ export default {
|
|||
["运转时间", "运转时间(h)", "/", 0, 0, 0, 0, 0, 0, 0],
|
||||
["运转时间", "运转率(%)", "/", 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "生料分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["成本", "生料成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
tableName: "生产报告",
|
||||
|
@ -830,7 +831,8 @@ export default {
|
|||
that.tableDatas[2][3] = data3.run_hour;
|
||||
that.tableDatas[3][3] = data3.run_rate;
|
||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||
that.tableDatas[5][3] = data3.production_cost_unit;
|
||||
that.tableDatas[5][3] = data3.elec_consume;
|
||||
that.tableDatas[6][3] = data3.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//上小时
|
||||
|
@ -847,7 +849,8 @@ export default {
|
|||
let data4 = res4[0];
|
||||
that.tableDatas[0][2] = data4.total_production < 1 ? 0 : data4.total_production;
|
||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[5][2] = data4.production_cost_unit;
|
||||
that.tableDatas[5][2] = data4.elec_consume;
|
||||
that.tableDatas[6][2] = data4.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
|
@ -893,8 +896,8 @@ export default {
|
|||
item5.goal_cate_name ==
|
||||
"单位产品成本(元/吨)"
|
||||
) {
|
||||
that.tableDatas[5][6] = item5[str];
|
||||
that.tableDatas[5][8] = item5.goal_val;
|
||||
that.tableDatas[6][6] = item5[str];
|
||||
that.tableDatas[6][8] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -937,11 +940,12 @@ export default {
|
|||
(that.tableDatas[4][5]-that.tableDatas[4][8]),
|
||||
that.tableDatas[4][8]
|
||||
);
|
||||
that.tableDatas[5][5] =
|
||||
that.tableDatas[5][5] = data1.elec_consume;
|
||||
that.tableDatas[6][5] =
|
||||
data1.production_cost_unit;
|
||||
that.tableDatas[5][9] = precen(
|
||||
(that.tableDatas[5][5]-that.tableDatas[5][8]),
|
||||
that.tableDatas[5][8]
|
||||
that.tableDatas[6][9] = precen(
|
||||
(that.tableDatas[6][5]-that.tableDatas[6][8]),
|
||||
that.tableDatas[6][8]
|
||||
);
|
||||
} else {
|
||||
}
|
||||
|
@ -990,11 +994,12 @@ export default {
|
|||
(that.tableDatas[4][4]-that.tableDatas[4][6]),
|
||||
that.tableDatas[4][6]
|
||||
);
|
||||
that.tableDatas[5][4] =
|
||||
that.tableDatas[5][4] = data2.elec_consume;
|
||||
that.tableDatas[6][4] =
|
||||
data2.production_cost_unit;
|
||||
that.tableDatas[5][7] = precen(
|
||||
(that.tableDatas[5][4]-that.tableDatas[5][6]),
|
||||
that.tableDatas[5][6]
|
||||
that.tableDatas[6][7] = precen(
|
||||
(that.tableDatas[6][4]-that.tableDatas[6][6]),
|
||||
that.tableDatas[6][6]
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -1107,7 +1112,7 @@ export default {
|
|||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
for (let i = 1; i <= data.length; i++) {
|
||||
let item = i + "日";
|
||||
dayXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ export default {
|
|||
that.query.year_s = year;
|
||||
that.timeStamp = myDate.getTime();
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "原料磨" })
|
||||
.req({ page: 0, name: "原料磨" })
|
||||
.then((res) => {
|
||||
console.log("原料磨", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -120,7 +120,7 @@ export default {
|
|||
that.query.year_s = year;
|
||||
that.timeStamp = myDate.getTime();
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "原料磨" })
|
||||
.req({ page: 0, name: "原料磨" })
|
||||
.then((res) => {
|
||||
console.log("原料磨", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
|
|
|
@ -38,11 +38,18 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td class="numCell"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
v-if="index == 1 ||index == 4"
|
||||
rowspan="2"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell"
|
||||
v-else-if="index == 0 ||index == 3"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
@ -390,7 +397,7 @@ export default {
|
|||
tableDatas: [
|
||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
|
@ -561,7 +568,6 @@ export default {
|
|||
let data3 = res3[0];
|
||||
that.tableDatas[0][2] = data3.total_production;
|
||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||
console.log(data3.elec_consume);
|
||||
that.tableDatas[2][2] = data3.elec_consume;
|
||||
that.tableDatas[3][2] = data3.production_cost_unit;
|
||||
if (data3.imaterial_data.length > 0) {
|
||||
|
@ -751,7 +757,7 @@ export default {
|
|||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
for (let i = 1; i <= data.length; i++) {
|
||||
let item = i + "日";
|
||||
dayXAxis.push(item);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="类型"
|
||||
style="margin: 0 6px; width: 120px"
|
||||
style="margin: 0 6px; width: 160px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
|
@ -57,27 +57,28 @@
|
|||
@row-click="rowClick"
|
||||
@dataChange="dataChange"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="测点" prop="mpoint_name">
|
||||
<el-table-column label="测点" prop="mpoint_name" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属集合" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="type" width="80"> </el-table-column>
|
||||
<el-table-column label="年" prop="year" width="80"> </el-table-column>
|
||||
<el-table-column label="班年" prop="year_s" width="80"> </el-table-column>
|
||||
<el-table-column label="类型" prop="type" width="70"> </el-table-column>
|
||||
<el-table-column label="年" prop="year" width="60"> </el-table-column>
|
||||
<el-table-column label="班年" prop="year_s" width="60"> </el-table-column>
|
||||
<el-table-column label="月" prop="month" width="50"> </el-table-column>
|
||||
<el-table-column label="班月" prop="month_s" width="50"> </el-table-column>
|
||||
<el-table-column label="日" prop="day" width="50"> </el-table-column>
|
||||
<el-table-column label="班日" prop="day_s" width="50"> </el-table-column>
|
||||
<el-table-column label="时" prop="hour" width="50"> </el-table-column>
|
||||
<el-table-column label="当前值" prop="val"></el-table-column>
|
||||
<el-table-column label="当前值" prop="val" min-width="100"></el-table-column>
|
||||
<el-table-column
|
||||
label="校正值"
|
||||
prop="val_correct"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="原始计算值"
|
||||
prop="val_origin"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
|
@ -161,16 +162,18 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
params: {},
|
||||
params: {
|
||||
type: "day_s",
|
||||
},
|
||||
query: {
|
||||
mpoint: null,
|
||||
type: "hour",
|
||||
type: "day_s",
|
||||
start_time: null,
|
||||
end_time: null
|
||||
},
|
||||
chartOption: {
|
||||
title: {
|
||||
text: 'Stacked Line'
|
||||
text: '趋势图'
|
||||
},
|
||||
color: ["#191970"],
|
||||
tooltip: {
|
||||
|
@ -212,11 +215,11 @@ export default {
|
|||
series: [],
|
||||
},
|
||||
options: [
|
||||
{ label: "小时", value: "hour"},
|
||||
{ label: "天校正", value: "day_s" },
|
||||
{ label: "月校正", value: "month_s" },
|
||||
{ label: "小时", value: "hour"},
|
||||
{ label: "天", value: "day" },
|
||||
{ label: "月", value: "month"},
|
||||
{ label: "班天", value: "day_s" },
|
||||
{ label: "班月", value: "month_s" },
|
||||
],
|
||||
form: {
|
||||
id: "",
|
||||
|
|
|
@ -283,7 +283,7 @@ export default {
|
|||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||
that.process = res[0].process;
|
||||
that.params.mgroupx = res[0].id;
|
||||
// that.params.belong_dept = res[0].belong_dept;
|
||||
that.params.belong_dept = res[0].belong_dept;
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
|||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存","入库记录"],
|
||||
values: "日志",
|
||||
mgroupName: "一次抛",
|
||||
mgroupName: "外协一次抛",
|
||||
mgroupId: "",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 日志 -->
|
||||
<mlogs
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 60%"
|
||||
></mlogs>
|
||||
<mtask
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 40%"
|
||||
></mtask>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else-if="values == '库存'" :mgroupName="mgroupName"></inm>
|
||||
<record v-else :mgroupName="mgroupName"></record>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inm from "./inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import mtask from "./mtask.vue";
|
||||
import handover from "./handover.vue";
|
||||
import record from "./inmrecord.vue";
|
||||
export default {
|
||||
components: { inm, mlogs, mtask, handover,record },
|
||||
data() {
|
||||
return {
|
||||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存","入库记录"],
|
||||
values: "日志",
|
||||
mgroupName: "磨抛一次抛",
|
||||
mgroupId: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue