Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
7400a6d02c
|
|
@ -153,6 +153,7 @@ export default {
|
|||
code: "",
|
||||
cateName: "",
|
||||
myChart: null,
|
||||
isMpoint:false,
|
||||
dictData: [],
|
||||
option: {
|
||||
title: {
|
||||
|
|
@ -323,6 +324,7 @@ export default {
|
|||
} else if (
|
||||
that.cate == "单位产品成本(元/吨)" ||
|
||||
that.cate == "电石渣成本(元/吨)" ||
|
||||
that.cate == "电石渣成本(元/吨)" ||
|
||||
that.cate == "生料成本(元/吨)"
|
||||
) {
|
||||
that.cateName = "production_cost_unit";
|
||||
|
|
@ -336,15 +338,59 @@ 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.cate =="总电量(KW·h)") {
|
||||
that.cateName = "elec_consume";
|
||||
}else if (that.cate == "消耗") {
|
||||
that.cateName = "amount_consume";
|
||||
}else if (that.cate == "进厂") {
|
||||
that.cateName = "amount_consume";
|
||||
}else if (that.cate == "氨水消耗量(t)") {
|
||||
that.cateName = "ammonia_consume";
|
||||
}else if (that.cate == "单位氨水消耗量(kg/t)") {
|
||||
that.cateName = "ammonia_consume_unit";
|
||||
}
|
||||
else if (that.cate == "P.O42.5R 散装(t)") {
|
||||
that.cateName = "x水泥+P.O42.5R 散装";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "P.O42.5R 袋装(t)") {
|
||||
that.cateName = "x水泥+P.O42.5R 袋装";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "P.O42.5 袋装(t)") {
|
||||
that.cateName = "x水泥+P.O42.5 袋装";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "P.O42.5 散装(t)") {
|
||||
that.cateName = "x水泥+P.O42.5 散装";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "复合硅酸盐水泥;42.5R;袋装水泥(t)") {
|
||||
that.cateName = "x复合硅酸盐水泥;42.5R;袋装水泥";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "复合硅酸盐水泥;42.5R;散装水泥(t)") {
|
||||
that.cateName = "x复合硅酸盐水泥;42.5R;散装水泥";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "普通硅酸盐水泥;52.5;散装水泥(t)") {
|
||||
that.cateName = "x普通硅酸盐水泥;52.5;散装水泥";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "散装水泥(t)") {
|
||||
that.cateName = "szsn_hj";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "袋装水泥(t)") {
|
||||
that.cateName = "dzsn_hj";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "出厂水泥合计(t)") {
|
||||
that.cateName = "ccsn_hj";
|
||||
that.isMpoint = true;
|
||||
}else if (that.cate == "熟料(t)") {
|
||||
that.cateName = "x通用水泥熟料";
|
||||
that.isMpoint = true;
|
||||
}
|
||||
} else {
|
||||
that.cateName = "elec_consume_unit";
|
||||
}
|
||||
this.$nextTick((res) => {
|
||||
this.getDict();
|
||||
console.log('that.isMpoint',that.isMpoint);
|
||||
this.getChartsData();
|
||||
this.getDict();
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -395,32 +441,73 @@ export default {
|
|||
} else {
|
||||
params.mpoint = that.mpoint;
|
||||
}
|
||||
that.apiObj.req(params).then((res) => {
|
||||
let xAxisData = [],
|
||||
lineData = [];
|
||||
res.forEach((item) => {
|
||||
let ind = 0;
|
||||
let values = Number(item[that.cateName]);
|
||||
if (type == "hour_s") {
|
||||
ind = item[type];
|
||||
xAxisData[ind] = item[type] + unit;
|
||||
lineData[ind] = values;
|
||||
} else {
|
||||
lineData.push(values);
|
||||
let xAxis = item[type] + unit;
|
||||
xAxisData.push(xAxis);
|
||||
|
||||
// ind = item[type] - 1;
|
||||
// xAxisData[ind] = item[type] + unit;
|
||||
// lineData[ind] = values;
|
||||
console.log(params);
|
||||
console.log(that.cateName);
|
||||
if(that.isMpoint){
|
||||
params.mpoint__code = that.cateName;
|
||||
that.$API.enm.mpointstat.list.req(params).then((res1) => {
|
||||
let xAxisData = [],
|
||||
lineData = [];
|
||||
if(res1.length>0){
|
||||
res1.reverse();
|
||||
res1.forEach((item) => {
|
||||
let ind = 0;
|
||||
if (type == "hour_s") {
|
||||
ind = item[type];
|
||||
xAxisData[ind] = item[type] + unit;
|
||||
lineData[ind] = item.val;
|
||||
} else {
|
||||
lineData.push(item.val);
|
||||
let xAxis = item[type] + unit;
|
||||
xAxisData.push(xAxis);
|
||||
}
|
||||
})
|
||||
let chartDom = document.getElementById("myChart");
|
||||
that.myChart = echarts.init(chartDom);
|
||||
that.option.xAxis.data = xAxisData;
|
||||
that.option.series[0].data = lineData;
|
||||
that.myChart.setOption(that.option);
|
||||
console.log(that.option);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.apiObj.req(params).then((res) => {
|
||||
let xAxisData = [],
|
||||
lineData = [];
|
||||
res.forEach((item) => {
|
||||
let ind = 0;
|
||||
let values = 0;
|
||||
if(that.cateName === "amount_consume"){
|
||||
if(that.cate == "消耗"){
|
||||
values = item.imaterial_data_dict.湿电石渣消耗.amount_consume;
|
||||
}else{
|
||||
values = item.imaterial_data_dict.湿电石渣进厂.amount_consume;
|
||||
}
|
||||
}else if(that.cateName ==="ammonia_consume_unit"){
|
||||
values = (item.ammonia_consume*1000/item.total_production).toFixed(2);
|
||||
}else{
|
||||
values = Number(item[that.cateName]);
|
||||
}
|
||||
if (type == "hour_s") {
|
||||
ind = item[type];
|
||||
xAxisData[ind] = item[type] + unit;
|
||||
lineData[ind] = values;
|
||||
} else {
|
||||
lineData.push(values);
|
||||
let xAxis = item[type] + unit;
|
||||
xAxisData.push(xAxis);
|
||||
}
|
||||
});
|
||||
let chartDom = document.getElementById("myChart");
|
||||
that.myChart = echarts.init(chartDom);
|
||||
that.option.xAxis.data = xAxisData;
|
||||
that.option.series[0].data = lineData;
|
||||
that.myChart.setOption(that.option);
|
||||
});
|
||||
let chartDom = document.getElementById("myChart");
|
||||
that.myChart = echarts.init(chartDom);
|
||||
that.option.xAxis.data = xAxisData;
|
||||
that.option.series[0].data = lineData;
|
||||
that.myChart.setOption(that.option);
|
||||
});
|
||||
}
|
||||
},
|
||||
getChartsData2(){
|
||||
|
||||
},
|
||||
dataSearch() {
|
||||
this.getChartsData();
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@
|
|||
>
|
||||
<!-- <el-radio-button label="day">本日</el-radio-button> -->
|
||||
<el-radio-button label="month"
|
||||
>本月</el-radio-button
|
||||
>日</el-radio-button
|
||||
>
|
||||
<el-radio-button label="year">本年</el-radio-button>
|
||||
<el-radio-button label="year">月</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="position: absolute; right: 20px">
|
||||
<el-date-picker
|
||||
|
|
@ -184,7 +184,7 @@ let tooltip = {
|
|||
let grid = {
|
||||
right: "10%",
|
||||
left: "4%",
|
||||
top: "15%",
|
||||
top: "20%",
|
||||
};
|
||||
let toolbox = {
|
||||
right: "2%",
|
||||
|
|
@ -204,6 +204,7 @@ let yAxis = [
|
|||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -221,6 +222,7 @@ let yAxis = [
|
|||
alignTicks: true,
|
||||
offset: 60,
|
||||
max: 100,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -233,9 +235,10 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(KW.h)",
|
||||
name: "分布电耗(KW.h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<el-container>
|
||||
<el-main style="background: #fff;">
|
||||
<div class="pictureContainer">
|
||||
<!-- <img src="/media/elec_flow.png" class="flowImg" > -->
|
||||
<img src="/img/energy.png" class="flowImg" />
|
||||
<img src="/media/elec_flow.png" class="flowImg" >
|
||||
<!-- <img src="/img/energy.png" class="flowImg" /> -->
|
||||
<div class="pictureHeader" style="top: 35px;">
|
||||
本日数据 时间段 00:00--24:00
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -104,11 +104,11 @@
|
|||
v-model="typeRadio"
|
||||
@change="typeRadioChange"
|
||||
>
|
||||
<el-radio-button label="day">本日</el-radio-button>
|
||||
<el-radio-button label="day">小时</el-radio-button>
|
||||
<el-radio-button label="month"
|
||||
>本月</el-radio-button
|
||||
>日</el-radio-button
|
||||
>
|
||||
<el-radio-button label="year">本年</el-radio-button>
|
||||
<el-radio-button label="year">月</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="position: absolute; right: 20px">
|
||||
<el-date-picker
|
||||
|
|
@ -308,7 +308,7 @@ let tooltip = {
|
|||
let grid = {
|
||||
right: "12%",
|
||||
left: "10%",
|
||||
top: "15%",
|
||||
top: "20%",
|
||||
};
|
||||
let toolbox = {
|
||||
right: "2%",
|
||||
|
|
@ -334,6 +334,7 @@ let yAxis = [
|
|||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -346,10 +347,12 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "运转率 ",
|
||||
name: "运转率(%) ",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 120,
|
||||
max:100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -362,10 +365,10 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗",
|
||||
name: "分布电耗(KW.h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 60,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -378,9 +381,11 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "标煤耗",
|
||||
name: "标煤耗(kgce/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 60,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -396,6 +401,7 @@ let yAxis = [
|
|||
name: "成本(元)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 60,
|
||||
axisLine: {
|
||||
show: true,
|
||||
|
|
|
|||
|
|
@ -93,11 +93,9 @@
|
|||
v-model="typeRadio"
|
||||
@change="typeRadioChange"
|
||||
>
|
||||
<el-radio-button label="day">本日</el-radio-button>
|
||||
<el-radio-button label="month"
|
||||
>本月</el-radio-button
|
||||
>
|
||||
<el-radio-button label="year">本年</el-radio-button>
|
||||
<el-radio-button label="day">小时</el-radio-button>
|
||||
<el-radio-button label="month">日</el-radio-button>
|
||||
<el-radio-button label="year">月</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="position: absolute; right: 20px">
|
||||
<el-date-picker
|
||||
|
|
@ -297,7 +295,7 @@ let tooltip = {
|
|||
let grid = {
|
||||
right: "10%",
|
||||
left: "10%",
|
||||
top: "15%",
|
||||
top: "20%",
|
||||
};
|
||||
let toolbox = {
|
||||
right: "2%",
|
||||
|
|
@ -316,6 +314,7 @@ let yAxis = [
|
|||
name: "产量 (t)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -328,10 +327,12 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "运转率",
|
||||
name: "运转率(%)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 80,
|
||||
max:100,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -344,9 +345,10 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(KW.h)",
|
||||
name: "分布电耗(KW.h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
|
|
@ -362,6 +364,7 @@ let yAxis = [
|
|||
name: "成本(元)",
|
||||
position: "left",
|
||||
alignTicks: true,
|
||||
nameRotate: 30,
|
||||
offset: 70,
|
||||
axisLine: {
|
||||
show: true,
|
||||
|
|
@ -407,7 +410,7 @@ export default {
|
|||
["运转时间", "运转时间(h)", "/", 0, 0, "/", 0, 0, "/", "/"],
|
||||
["运转时间", "运转率(%)", "/", 0, 0, "/", 0, 0, "/", "/"],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品综合能耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品综合能耗(kgce/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, "/", "/", "/", "/"],
|
||||
["成本", "单位产品成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -73,10 +73,8 @@
|
|||
v-model="typeRadio"
|
||||
@change="typeRadioChange"
|
||||
>
|
||||
<el-radio-button label="month"
|
||||
>本月</el-radio-button
|
||||
>
|
||||
<el-radio-button label="year">本年</el-radio-button>
|
||||
<el-radio-button label="month">日</el-radio-button>
|
||||
<el-radio-button label="year">月</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div style="position: absolute; right: 20px">
|
||||
<el-date-picker
|
||||
|
|
@ -291,7 +289,7 @@ let yAxis = [
|
|||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "分布电耗(KW.h)",
|
||||
name: "分布电耗(KW.h/t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
axisLine: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue