feat: 修改水泥包装 和生料辅料生产报告配色
This commit is contained in:
parent
59a991c49a
commit
e79c1b3519
|
@ -269,7 +269,7 @@ let toolbox = {
|
||||||
};
|
};
|
||||||
let legend = {
|
let legend = {
|
||||||
top: "2%",
|
top: "2%",
|
||||||
data: ["熟料", "分布电耗", "总产量"],}
|
data: ["袋装合计", "散装合计", "熟料出厂合计", "出厂水泥合计", "复合水泥合计"],}
|
||||||
|
|
||||||
let yAxis = [
|
let yAxis = [
|
||||||
{
|
{
|
||||||
|
@ -373,75 +373,59 @@ export default {
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
yAxis: yAxis,
|
yAxis: yAxis,
|
||||||
|
selector:[{
|
||||||
|
// 全选
|
||||||
|
type: 'all',
|
||||||
|
// 可以是任意你喜欢的标题
|
||||||
|
title: '全选'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 反选
|
||||||
|
type: 'inverse',
|
||||||
|
// 可以是任意你喜欢的标题
|
||||||
|
title: '反选'
|
||||||
|
}],
|
||||||
|
selector: true,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "总产量",
|
name: "袋装合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5R 散装",
|
name: "散装合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5R 袋装",
|
name: "熟料出厂合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5 袋装",
|
name: "出厂水泥合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5 散装",
|
name: "复合水泥合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
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",
|
|
||||||
yAxisIndex: 1,
|
|
||||||
data: [],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
option2: {
|
option2: {
|
||||||
color: colors,
|
color: colors,
|
||||||
tooltip: tooltip,
|
tooltip: tooltip,
|
||||||
|
legend: legend,
|
||||||
grid: grid,
|
grid: grid,
|
||||||
toolbox: toolbox,
|
toolbox: toolbox,
|
||||||
legend: legend,
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -450,68 +434,51 @@ export default {
|
||||||
},
|
},
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
selector:[{
|
||||||
|
// 全选
|
||||||
|
type: 'all',
|
||||||
|
// 可以是任意你喜欢的标题
|
||||||
|
title: '全选'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 反选
|
||||||
|
type: 'inverse',
|
||||||
|
// 可以是任意你喜欢的标题
|
||||||
|
title: '反选'
|
||||||
|
}],
|
||||||
|
selector: true,
|
||||||
yAxis: yAxis,
|
yAxis: yAxis,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "总产量",
|
name: "袋装合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5R 散装",
|
name: "散装合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5R 袋装",
|
name: "熟料出厂合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5 袋装",
|
name: "出厂水泥合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "P.O42.5 散装",
|
name: "复合水泥合计",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
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",
|
|
||||||
yAxisIndex: 1,
|
|
||||||
data: [],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -753,52 +720,33 @@ export default {
|
||||||
query1.type = "day_s";
|
query1.type = "day_s";
|
||||||
query1.mgroup = this.query.mgroup;
|
query1.mgroup = this.query.mgroup;
|
||||||
this.$API.enm.mpointstat.list.req(query1).then((response) => {
|
this.$API.enm.mpointstat.list.req(query1).then((response) => {
|
||||||
let seriesData0 = [],
|
let seriesData1 = [],
|
||||||
seriesData1 = [],
|
|
||||||
seriesData2 = [],
|
seriesData2 = [],
|
||||||
seriesData3 = [],
|
seriesData3 = [],
|
||||||
seriesData4 = [],
|
seriesData4 = [],
|
||||||
seriesData5 = [],
|
seriesData5 = [];
|
||||||
seriesData6 = [],
|
|
||||||
seriesData7 = [],
|
|
||||||
seriesData8 = [],
|
|
||||||
seriesData9 = [];
|
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
if (item.mpoint_name == "袋装水泥总和") {
|
||||||
seriesData1[ind] = item.val;
|
seriesData1[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
}else if (item.mpoint_name == "散装水泥总和"){
|
||||||
seriesData2[ind] = item.val;
|
seriesData2[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
}else if (item.mpoint_name == "出厂熟料") {
|
||||||
seriesData3[ind] = item.val;
|
seriesData3[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
|
||||||
seriesData4[ind] = item.val;
|
|
||||||
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
|
||||||
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 == "出厂水泥") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
seriesData0[ind] = item.val;
|
seriesData4[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "复合水泥合计" || item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||||
seriesData8[ind] = item.val;
|
seriesData5[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
|
||||||
seriesData9[ind] = item.elec_consume_unit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
let options = { ...that.option1 };
|
let options = { ...that.option1 };
|
||||||
options.series[0].data = seriesData0;
|
options.series[0].data = seriesData1;
|
||||||
options.series[1].data = seriesData1;
|
options.series[1].data = seriesData2;
|
||||||
options.series[2].data = seriesData2;
|
options.series[2].data = seriesData3;
|
||||||
options.series[3].data = seriesData3;
|
options.series[3].data = seriesData4;
|
||||||
options.series[4].data = seriesData4;
|
options.series[4].data = seriesData5;
|
||||||
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 = [];
|
let dayXAxis = [];
|
||||||
for (let i = 1; i <= that.days; i++) {
|
for (let i = 1; i <= that.days; i++) {
|
||||||
let item = i + "日";
|
let item = i + "日";
|
||||||
|
@ -817,52 +765,36 @@ export default {
|
||||||
query2.type = "month_s";
|
query2.type = "month_s";
|
||||||
query2.mgroup = that.query.mgroup;
|
query2.mgroup = that.query.mgroup;
|
||||||
this.$API.enm.mpointstat.list.req(query2).then((response) => {
|
this.$API.enm.mpointstat.list.req(query2).then((response) => {
|
||||||
let seriesData0 = [],
|
let
|
||||||
seriesData1 = [],
|
seriesData1 = [],
|
||||||
seriesData2 = [],
|
seriesData2 = [],
|
||||||
seriesData3 = [],
|
seriesData3 = [],
|
||||||
seriesData4 = [],
|
seriesData4 = [],
|
||||||
seriesData5 = [],
|
seriesData5 = [];
|
||||||
seriesData6 = [],
|
|
||||||
seriesData7 = [],
|
|
||||||
seriesData8 = [],
|
|
||||||
seriesData9 = [];
|
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.month_s - 1;
|
let ind = item.month_s - 1;
|
||||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
if (item.mpoint_name == "袋装水泥总和") {
|
||||||
seriesData1[ind] = item.val;
|
seriesData1[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
}else if (item.mpoint_name == "散装水泥总和"){
|
||||||
seriesData2[ind] = item.val;
|
seriesData2[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
}else if (item.mpoint_name == "出厂熟料") {
|
||||||
seriesData3[ind] = item.val;
|
seriesData3[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
|
||||||
seriesData4[ind] = item.val;
|
|
||||||
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
|
||||||
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 == "出厂水泥") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
seriesData0[ind] = item.val;
|
seriesData4[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "复合水泥合计" || item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||||
seriesData8[ind] = item.val;
|
console.log(item.mpoint_name, item.val);
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
seriesData5[ind] = item.val;
|
||||||
seriesData9[ind] = item.elec_consume_unit;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let options = { ...that.option2 };
|
let options = { ...that.option2 };
|
||||||
options.series[0].data = seriesData0;
|
options.series[0].data = seriesData1;
|
||||||
options.series[1].data = seriesData1;
|
options.series[1].data = seriesData2;
|
||||||
options.series[2].data = seriesData2;
|
options.series[2].data = seriesData3;
|
||||||
options.series[3].data = seriesData3;
|
options.series[3].data = seriesData4;
|
||||||
options.series[4].data = seriesData4;
|
options.series[4].data = seriesData5;
|
||||||
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 = [];
|
let monthXAxis = [];
|
||||||
for (let i = 1; i <= that.month; i++) {
|
for (let i = 1; i <= that.month; i++) {
|
||||||
let item = i + "月";
|
let item = i + "月";
|
||||||
|
|
|
@ -276,12 +276,12 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const colors = [
|
const colors = [
|
||||||
"#647bfe",
|
"#17E8EF",
|
||||||
"#8698fe",
|
"#FFECA1",
|
||||||
"#a9b6fe",
|
"#3F662F",
|
||||||
"#cbd3fe",
|
"#BC1012",
|
||||||
"#91CC75",
|
"#4AE20D",
|
||||||
"#EE6666",
|
"#EFC3CA",
|
||||||
];
|
];
|
||||||
let tooltip = {
|
let tooltip = {
|
||||||
show: true,
|
show: true,
|
||||||
|
|
Loading…
Reference in New Issue