Compare commits

...

3 Commits

13 changed files with 1288 additions and 120 deletions

View File

@ -165,7 +165,15 @@ export default {
`${config.API_URL}/enm/mpoint/king_sync/`,
data);
}
}
},
showPicture: {
name: "箱线图",
req: async function(data){
return await http.post(
`${config.API_URL}/enm/mpoint/show_picture/`,
data);
}
},
},
mpointstat: {
list: {

View File

@ -354,25 +354,25 @@ export default {
that.cateName = "ammonia_consume_unit";
}
else if (that.cate == "P.O42.5R 散装t") {
that.cateName = "x水泥+P.O42.5R 散装";
that.cateName = "C90002056";
that.isMpoint = true;
}else if (that.cate == "P.O42.5R 袋装t") {
that.cateName = "x水泥+P.O42.5R 袋装";
that.cateName = "C90002055";
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.cateName = "C90001124";
that.isMpoint = true;
}else if (that.cate == "复合硅酸盐水泥;42.5R;袋装水泥(t)") {
that.cateName = "x复合硅酸盐水泥;42.5R;袋装水泥";
that.cateName = "C90001612";
that.isMpoint = true;
}else if (that.cate == "复合硅酸盐水泥;42.5R;散装水泥(t)") {
that.cateName = "x复合硅酸盐水泥;42.5R;散装水泥";
that.cateName = "C90001609";
that.isMpoint = true;
}else if (that.cate == "普通硅酸盐水泥;52.5;散装水泥(t)") {
that.cateName = "x普通硅酸盐水泥;52.5;散装水泥";
that.cateName = "C90001125";
that.isMpoint = true;
}else if (that.cate == "散装水泥(t)") {
that.cateName = "szsn_hj";

View File

@ -98,7 +98,7 @@ const routes = [
affix: true,
perms: ["dashboard_ly"],
},
component: "home/enm_home",
component: "home/enm_home_ly",
},
{
name: "dashboard_gx",
@ -2985,6 +2985,17 @@ const routes = [
},
component: "fac_cal/mpointstat_point",
},
{
name:'box_pic',
path: "/fac_cal/box_pic",
meta: {
title: "箱线图",
// icon: "el-icon-postcard",
type: "menu",
perms: ["mpointstat_point"],
},
component: "fac_cal/box_picture",
},
{
path: "/fac_cal/mpointstat",
meta: {

View File

@ -99,31 +99,26 @@
<!-- <td class="numCell">{{ item[1] }}</td> -->
<td
class="numCell hoursItem"
@click="itemClick('hour_s', item)"
>
{{ item[1] }}
</td>
<td
class="numCell hoursItem"
@click="itemClick('hour_s', item)"
>
{{ item[2] }}
</td>
<td
class="numCell daysItem"
@click="itemClick('day_s', item)"
>
{{ item[3] }}
</td>
<td
class="numCell monthItem"
@click="itemClick('month_s', item)"
>
{{ item[4] }}
</td>
<td
class="numCell yearItem"
@click="itemClick('year_s', item)"
>
{{ item[5] }}
</td>

View File

@ -110,25 +110,21 @@
<td class="numCell">{{ item[1] }}</td>
<td
class="numCell hoursItem"
@click="itemClick('hour_s', item)"
>
{{ item[2] }}
</td>
<td
class="numCell daysItem"
@click="itemClick('day_s', item)"
>
{{ item[3] }}
</td>
<td
class="numCell monthItem"
@click="itemClick('month_s', item)"
>
{{ item[4] }}
</td>
<td
class="numCell yearItem"
@click="itemClick('year_s', item)"
>
{{ item[5] }}
</td>
@ -451,7 +447,7 @@ export default {
["产量", "台时产量t/h", 0, 0, 0, 0, 0, 0, 0, 0],
["运转时间", "运转时间h", 0, 0, 0, 0, 0, 0, 0, 0],
["运转时间", "运转率(%", 0, 0, 0, 0, 0, 0, 0, 0],
["能耗", "单位产品煤耗t/t", 0, 0, 0, 0, 0, 0, 0, 0],
["能耗", "单位产品煤耗t/kg", 0, 0, 0, 0, 0, 0, 0, 0],
],
tableName: "生产报告",
modelValue: true,
@ -721,7 +717,8 @@ export default {
}).then((res4) => {
if (res4.length > 0) {
let data4 = res4[0];
that.tableDatas[4][3] = (data4.val/that.tableDatas[0][3]).toFixed(2);
let calculate = ((data4.val/that.tableDatas[0][3])*1000);
that.tableDatas[4][3] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
});
//
@ -744,8 +741,11 @@ export default {
return that.$API.enm.mpointstat.list.req(params4);
}).then((res5) => {
if (res5.length > 0) {
let data5 = res5[0];
that.tableDatas[4][2] = (data5.val/that.tableDatas[0][2]).toFixed(2);
// let data5 = res5[0];
// that.tableDatas[4][2] = (data5.val/that.tableDatas[0][2]).toFixed(2);
let data5 = res5[0];
let calculate = ((data5.val/that.tableDatas[0][2])*1000);
that.tableDatas[4][2] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
});
let params5 = {};
@ -840,7 +840,9 @@ export default {
}).then((res6) => {
if (res6.length > 0) {
let data6 = res6[0];
that.tableDatas[4][5] = (data6.val/that.tableDatas[0][5]).toFixed(2);
let calculate = ((data6.val/that.tableDatas[0][5])*1000);
that.tableDatas[4][5] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
});
//
@ -879,7 +881,8 @@ export default {
}).then((res7) => {
if (res7.length > 0) {
let data7 = res7[0];
that.tableDatas[4][4] = (data7.val/that.tableDatas[0][4]).toFixed(2);
let calculate = ((data7.val/that.tableDatas[0][4])*1000);
that.tableDatas[4][4] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
})
});
@ -963,7 +966,8 @@ export default {
}).then((res)=>{
if (res.length > 0) {
let data = res[0];
that.tableDatas[4][2] = (data.val/that.tableDatas[0][2]).toFixed(2);
let calculate = ((data.val/that.tableDatas[0][2])*1000);
that.tableDatas[4][2] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
})
},
@ -1048,7 +1052,8 @@ export default {
}).then((res)=>{
if (res.length > 0) {
let data = res[0];
that.tableDatas[4][4] = (data.val/that.tableDatas[0][4]).toFixed(2);
let calculate = ((data.val/that.tableDatas[0][2])*1000);
that.tableDatas[4][4] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
}
)
@ -1133,8 +1138,12 @@ export default {
return that.$API.enm.mpointstat.list.req(params1);
}).then((res)=>{
if (res.length > 0) {
// let data = res[0];
// that.tableDatas[4][5] = (data.val/that.tableDatas[0][4]).toFixed(2);
let data = res[0];
that.tableDatas[4][5] = (data.val/that.tableDatas[0][4]).toFixed(2);
let calculate = ((data.val/that.tableDatas[0][4])*1000);
that.tableDatas[4][5] = (calculate > 135 ? 135 : calculate).toFixed(2);
}
})
},

View File

@ -606,30 +606,30 @@ export default {
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
if (res1.length > 0) {
res1.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][5] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][5] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][5] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][5] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][5] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][5] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][5] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][5] = item.elec_consume_unit;
that.tableDatas[12][5] = item.val;
}
@ -646,30 +646,30 @@ export default {
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
if (res2.length > 0) {
res2.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][4] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][4] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][4] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][4] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][4] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][4] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][4] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][4] = item.elec_consume_unit;
that.tableDatas[12][4] = item.val;
}
@ -688,30 +688,30 @@ export default {
this.$API.enm.mpointstat.list.req(params3).then((res3) => {
if (res3.length > 0) {
res3.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][2] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][2] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][2] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][2] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][2] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][2] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][2] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][2] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][2] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][2] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][2] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][2] = item.elec_consume_unit;
that.tableDatas[12][2] = item.val;
}
@ -731,30 +731,30 @@ export default {
this.$API.enm.mpointstat.list.req(params4).then((res3) => {
if (res3.length > 0) {
res3.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][3] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][3] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][3] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][3] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][3] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][3] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][3] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][3] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][3] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][3] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][3] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][3] = item.elec_consume_unit;
that.tableDatas[12][3] = item.val;
}
@ -797,30 +797,30 @@ export default {
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
if (res1.length > 0) {
res1.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][5] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][5] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][5] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][5] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][5] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][5] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][5] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][5] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][5] = item.elec_consume_unit;
that.tableDatas[12][5] = item.val;
}
@ -839,30 +839,30 @@ export default {
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
if (res2.length > 0) {
res2.forEach((item) => {
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
if (item.nickname == "水泥+P.O42.5R 散装") {
that.tableDatas[0][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
that.tableDatas[1][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
}else if (item.nickname == "水泥+P.O42.5 袋装") {
that.tableDatas[2][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
}else if (item.nickname == "水泥+P.O42.5 散装") {
that.tableDatas[3][4] = item.val;
}else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
that.tableDatas[4][4] = item.val;
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
}else if (item.nickname == "水泥+P.C42.5 散装") {
that.tableDatas[5][4] = item.val;
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
}else if (item.nickname == "水泥+P.O52.5 散装") {
that.tableDatas[6][4] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
that.tableDatas[7][4] = item.val;
}else if (item.mpoint_name == "袋装水泥总和") {
}else if (item.nickname == "袋装水泥总和") {
that.tableDatas[8][4] = item.val;
}
else if (item.mpoint_name == "出厂水泥") {
else if (item.nickname == "出厂水泥") {
that.tableDatas[9][4] = item.val;
}else if (item.mpoint_name == "出厂熟料"){
}else if (item.nickname == "出厂熟料"){
that.tableDatas[10][4] = item.val;
}else if (item.mpoint_name == "包装进线") {
}else if (item.nickname == "水泥包装用电合计") {
that.tableDatas[11][4] = item.elec_consume_unit;
that.tableDatas[12][4] = item.val;
}
@ -890,17 +890,17 @@ export default {
let data = response;
data.forEach((item) => {
let ind = item.day_s - 1;
if (item.mpoint_name == "袋装水泥总和") {
if (item.nickname == "袋装水泥总和") {
seriesData1[ind] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
seriesData2[ind] = item.val;
}else if (item.mpoint_name == "出厂熟料") {
}else if (item.nickname == "出厂熟料") {
seriesData3[ind] = item.val;
}else if (item.mpoint_name == "出厂水泥") {
}else if (item.nickname == "出厂水泥") {
seriesData4[ind] = item.val;
}else if (item.mpoint_name == "复合水泥合计" || item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
}else if (item.nickname == "复合水泥合计" || item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
seriesData5[ind] = item.val;
}else if(item.mpoint_name == "包装进线"){
}else if(item.nickname == "水泥包装用电合计"){
seriesData6[ind] = item.elec_consume_unit;
}
@ -963,18 +963,18 @@ export default {
data.forEach((item) => {
let goal_index = 'goal_val_' + item.month_s;
let ind = item.month_s - 1;
if (item.mpoint_name == "袋装水泥总和") {
if (item.nickname == "袋装水泥总和") {
seriesData1[ind] = item.val;
}else if (item.mpoint_name == "散装水泥总和"){
}else if (item.nickname == "散装水泥总和"){
seriesData2[ind] = item.val;
}else if (item.mpoint_name == "出厂熟料") {
}else if (item.nickname == "出厂熟料") {
seriesData3[ind] = item.val;
}else if (item.mpoint_name == "出厂水泥") {
}else if (item.nickname == "出厂水泥") {
seriesData4[ind] = item.val;
}else if (item.mpoint_name == "复合水泥合计" || item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
console.log(item.mpoint_name, item.val);
}else if (item.nickname == "复合水泥合计" || item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
console.log(item.nickname, item.val);
seriesData5[ind] = item.val;
}else if(item.mpoint_name == "包装进线"){
}else if(item.nickname == "水泥包装用电合计"){
seriesData7[ind] = item.elec_consume_unit;
}
seriesData6[ind] = that.goal_list[0][goal_index];

View File

@ -292,7 +292,7 @@
<td class="numCell"></td>
<td class="numCell"></td>
</tr>
<tr v-if="sflogexpList.length > 0">
<tr v-if="sflogexpList && sflogexpList.length > 0">
<td
class="numCell"
:rowspan="sflogexpList.length + 1"
@ -424,7 +424,7 @@ export default {
that.$API.enm.enstat
.req({ type: "sflog", sflog: id, page: 0 })
.then((res) => {
if (res.length > 0) {
if (res) {
that.reportItem = res[0];
}
console.log(res[0]);

View File

@ -144,7 +144,7 @@
:rules="rules"
label-width="150px"
label-position="right"
v-if="mpointOptions.length > 0"
v-if="mpointOptions"
>
<template
v-for="item in mpointOptions"
@ -729,7 +729,7 @@ export default {
form.enabled = 1;
form.mgroup = that.mgroupId;
that.$API.enm.mpoint.list.req(form).then((res) => {
if (res.length > 0) {
if (res) {
that.mpointOptions = [];
res.forEach((item) => {
item.mpFormVal = null;
@ -738,7 +738,7 @@ export default {
});
that.mpointOptions.forEach((item) =>{
that.$API.enm.mpoint.stat.req({mpoint: item.id, sflog: this.form.id, page: 0}).then(res=>{
if(res.length>0){
if(res){
item.mpFormVal = res[0].val;
}else{
item.mpFormVal = 0;

View File

@ -144,7 +144,7 @@
:rules="rules"
label-width="150px"
label-position="right"
v-if="mpointOptions.length > 0"
v-if="mpointOptions"
>
<template
v-for="item in mpointOptions"
@ -730,7 +730,7 @@ export default {
form.enabled = 1;
form.mgroup = that.mgroupId;
that.$API.enm.mpoint.list.req(form).then((res) => {
if (res.length > 0) {
if (res) {
that.mpointOptions = [];
res.forEach((item) => {
item.mpFormVal = null;
@ -739,7 +739,7 @@ export default {
});
that.mpointOptions.forEach((item) =>{
that.$API.enm.mpoint.stat.req({mpoint: item.id, sflog: this.form.id, page: 0}).then(res=>{
if(res.length>0){
if(res){
item.mpFormVal = res[0].val;
}else{
item.mpFormVal = 0;

View File

@ -0,0 +1,144 @@
<template>
<el-container>
<el-main style="background: #fff;">
<div class="pictureContainer">
<div class="pictureHeader">
<div class="left-panel">
<div class="block">
<span class="demonstration">时间段一</span>
<el-date-picker
v-model="dateRange1"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
/>
</div>
<div class="block">
<span class="demonstration">时间段二</span>
<el-date-picker
v-model="dateRange2"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
/>
</div>
<el-button
type="primary"
icon="el-icon-search"
@click="dateChange"
class="search-button"
>
查询
</el-button>
</div>
</div>
<img :src="imgUrl" class="flowImg" v-if="imgUrl" />
</div>
</el-main>
</el-container>
</template>
<script>
export default {
data() {
return {
imgUrl:'',
dataObj:{ },
dateRange1: [],
dateRange2: [],
pickerOptions: {
disabeledDate(time) {
return time.getTime() > Date.now();
}
}
};
},
methods: {
dateChange() {
if (this.dateRange1.length !== 2 || this.dateRange2.length !== 2) {
this.$message.warning("请完整选择两个时间段!");
return;
}
let that = this;
const payload = {
startTime1: this.dateRange1[0],
endTime1: this.dateRange1[1],
startTime2: this.dateRange2[0],
endTime2: this.dateRange2[1]
}
try {
this.$API.enm.mpoint.showPicture.req(payload).then(res => {
if (res.rel_path){
this.imgUrl = res.rel_path;
}else{
this.$message.error("没有获取到图片地址");
}
})
}
catch (error) {
console.log(error);
}
}
}
};
</script>
<style scoped>
.pictureContainer {
max-width: 960px;
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
}
.pictureHeader {
position: sticky;
top: 0;
background: #fff;
z-index: 10;
padding: 10px 15px;
border-bottom: 1px solid #eee;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.left-panel {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 20px;
justify-content: flex-start;
}
.block {
display: flex;
align-items: center;
gap: 6px;
}
.block .demonstration {
margin-bottom: 4px;
font-size: 14px;
color: #666;
}
.search-button {
display: flex;
align-items: center;
}
.flowImg {
display: block;
width: 100%;
max-width: 800px;
height: auto;
margin: 30px auto 0;
object-fit: contain;
}
</style>

View File

@ -130,7 +130,7 @@ export default {
apiObjX: this.$API.enm.mplogx.list,
paramsX: {page: 0, timex__gte: null, timex__lte: null, mpoint: null},
apiObjM: this.$API.enm.mpoint.list,
paramsM: {material__isnull: 0},
paramsM: {},
apiObjM2: this.$API.mtm.mgroup.list,
paramsM2: {page: 0},
mpointId: null,

View File

@ -0,0 +1,41 @@
<template>
<div v-if="pageLoading">
<el-main>
<el-card shadow="never">
<el-skeleton :rows="1"></el-skeleton>
</el-card>
<el-card shadow="never" style="margin-top: 15px;">
<el-skeleton></el-skeleton>
</el-card>
</el-main>
</div>
<widgets @on-mounted="onMounted"></widgets>
</template>
<script>
import { defineAsyncComponent } from 'vue';
const widgets = defineAsyncComponent(() => import('./widgets/index_enm_ly.vue'));
export default {
name: "dashboard",
components: {
widgets
},
data(){
return {
pageLoading: true,
}
},
mounted(){
},
methods: {
onMounted(){
this.pageLoading = false
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,960 @@
<template>
<div class="widgets-home" ref="main">
<div class="widgets-content">
<div class="widgets" ref="widgets">
<div class="widgets-wrapper">
<!-- <div :class="bindClass()">XXXXXXXX超过预设值请及时处理</div> -->
<el-row :gutter="6" style="padding: 10px">
<el-col>
<el-card
header="产量及完成度"
style="border-radius: 5px; box-shadow: none"
>
<div class="itemsWrap">
<div class="items" v-if="monthData.电石渣">
<div class="item-number">
{{
monthData.电石渣
.total_production
}}
</div>
<div class="item-name">
月电石渣产量
</div>
<el-progress
:percentage="
monthData.电石渣.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.电石渣.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="monthData.石灰石破碎"
>
<div class="item-number">
{{
monthData.石灰石破碎
.total_production
}}
</div>
<div class="item-name">
月石灰石破碎量
</div>
<el-progress
:percentage="
monthData.石灰石破碎.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.石灰石破碎
.run_rate
}}%</span
>
</el-progress>
</div>
<div class="items" v-if="monthData.原料磨">
<div class="item-number">
{{
monthData.原料磨
.total_production
}}
</div>
<div class="item-name">月生料产量</div>
<el-progress
:percentage="
monthData.原料磨.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.原料磨.run_rate
}}%</span
>
</el-progress>
</div>
<div class="items" v-if="monthData.回转窑">
<div class="item-number">
{{
monthData.回转窑
.total_production
}}
</div>
<div class="item-name">月熟料产量</div>
<el-progress
:percentage="
monthData.回转窑.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.回转窑.run_rate
}}%</span
>
</el-progress>
</div>
<div class="items" v-if="monthData.水泥磨">
<div
class="item-number"
v-if="monthData.水泥磨"
>
{{
monthData.水泥磨
.total_production
}}
</div>
<div class="item-name">月水泥产量</div>
<el-progress
:percentage="
monthData.水泥磨.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.水泥磨.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="monthData.余热发电"
>
<div class="item-number">
{{
monthData.余热发电
.total_production
}}
</div>
<div class="item-name">
月余热发电量
</div>
<el-progress
:percentage="
monthData.余热发电.run_rate
"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
monthData.余热发电.run_rate
}}%</span
>
</el-progress>
</div>
<div style="display: inline-block">
<div
class="items"
v-if="yearData.电石渣"
>
<div class="item-number">
{{
yearData.电石渣
.total_production
}}
</div>
<div class="item-name">
本年累计电石渣产量
</div>
<el-progress
:percentage="
yearData.电石渣.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.电石渣
.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="yearData.石灰石破碎"
>
<div class="item-number">
{{
yearData.石灰石破碎
.total_production
}}
</div>
<div class="item-name">
本年累计石灰石破碎量
</div>
<el-progress
:percentage="
yearData.石灰石破碎.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.石灰石破碎
.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="yearData.原料磨"
>
<div class="item-number">
{{
yearData.原料磨
.total_production
}}
</div>
<div class="item-name">
本年累计生料产量
</div>
<el-progress
:percentage="
yearData.原料磨.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.原料磨
.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="yearData.回转窑"
>
<div class="item-number">
{{
yearData.回转窑
.total_production
}}
</div>
<div class="item-name">
本年累计熟料产量
</div>
<el-progress
:percentage="
yearData.回转窑.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.回转窑
.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="yearData.水泥磨"
>
<div class="item-number">
{{
yearData.水泥磨
.total_production
}}
</div>
<div class="item-name">
本年累计水泥产量
</div>
<el-progress
:percentage="
yearData.水泥磨.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.水泥磨
.run_rate
}}%</span
>
</el-progress>
</div>
<div
class="items"
v-if="yearData.余热发电"
>
<div class="item-number">
{{
yearData.余热发电
.total_production
}}
</div>
<div class="item-name">
本年累计余热发电量
</div>
<el-progress
:percentage="
yearData.余热发电.run_rate
"
status="success"
:text-inside="true"
:stroke-width="14"
>
<span class="item-percent"
>{{
yearData.余热发电
.run_rate
}}%</span
>
</el-progress>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col>
<el-card
header="能耗"
style="border-radius: 5px; box-shadow: none"
>
<div class="itemsWrap">
<div class="items" v-if="monthData.电石渣">
<div class="item-number">
{{
monthData.电石渣
.elec_consume_unit
}}
</div>
<div class="item-name">
月电石渣分布电耗
</div>
</div>
<div
class="items"
v-if="monthData.石灰石破碎"
>
<div class="item-number">
{{
monthData.石灰石破碎
.elec_consume_unit
}}
</div>
<div class="item-name">
月石灰石破碎分布电耗
</div>
</div>
<div class="items" v-if="monthData.原料磨">
<div class="item-number">
{{
monthData.原料磨
.elec_consume_unit
}}
</div>
<div class="item-name">
月生料分布电耗
</div>
</div>
<div class="items" v-if="monthData.回转窑">
<div class="item-number">
{{
monthData.回转窑
.elec_consume_unit
}}
</div>
<div class="item-name">
月熟料分布电耗
</div>
</div>
<div class="items" v-if="monthData.回转窑">
<div class="item-number">
{{
monthData.回转窑
.coal_consume_unit
}}
</div>
<div class="item-name">
月熟料单位标煤耗
</div>
</div>
<div style="display: inline-block">
<div
class="items"
v-if="monthData.回转窑"
>
<div class="item-number">
{{
monthData.回转窑
.celec_consume_unit
}}
</div>
<div class="item-name">
熟料月综合电耗
</div>
</div>
<div
class="items"
v-if="monthData.回转窑"
>
<div class="item-number">
{{
monthData.回转窑
.cen_consume_unit
}}
</div>
<div class="item-name">
熟料月综合能耗
</div>
</div>
<div
class="items"
v-if="monthData.水泥磨"
>
<div class="item-number">
{{
monthData.水泥磨
.elec_consume_unit
}}
</div>
<div class="item-name">
月水泥粉磨分布电耗
</div>
</div>
<div
class="items"
v-if="monthData.水泥磨"
>
<div class="item-number">
{{
monthData.水泥磨
.cen_consume_unit
}}
</div>
<div class="item-name">
水泥月综合能耗
</div>
</div>
<div
class="items"
v-if="monthData.余热发电"
>
<div class="item-number">
{{
monthData.余热发电
.elec_consume
}}
</div>
<div class="item-name">
月余热发电电耗
</div>
</div>
<div
class="items"
v-if="monthData.余热发电"
>
<div class="item-number">
{{
monthData.余热发电
.total_production
}}
</div>
<div class="item-name">
月余热发电电量
</div>
</div>
</div>
</div>
<div class="itemsWrap">
<div class="items" v-if="yearData.电石渣">
<div class="item-number">
{{
yearData.电石渣
.elec_consume_unit
}}
</div>
<div class="item-name">
本年度电石渣分布电耗
</div>
</div>
<div
class="items"
v-if="yearData.石灰石破碎"
>
<div class="item-number">
{{
yearData.石灰石破碎
.elec_consume_unit
}}
</div>
<div class="item-name">
本年度石灰石破碎分布电耗
</div>
</div>
<div class="items" v-if="yearData.原料磨">
<div class="item-number">
{{
yearData.原料磨
.elec_consume_unit
}}
</div>
<div class="item-name">
本年度生料分布电耗
</div>
</div>
<div class="items" v-if="yearData.回转窑">
<div class="item-number">
{{
yearData.回转窑
.elec_consume_unit
}}
</div>
<div class="item-name">
本年度熟料分布电耗
</div>
</div>
<div class="items" v-if="yearData.回转窑">
<div class="item-number">
{{
yearData.回转窑
.coal_consume_unit
}}
</div>
<div class="item-name">
本年度熟料单位标煤耗
</div>
</div>
<div style="display: inline-block">
<div
class="items"
v-if="yearData.回转窑"
>
<div class="item-number">
{{
yearData.回转窑
.celec_consume_unit
}}
</div>
<div class="item-name">
本年度熟料综合电耗
</div>
</div>
<div
class="items"
v-if="yearData.回转窑"
>
<div class="item-number">
{{
yearData.回转窑
.cen_consume_unit
}}
</div>
<div class="item-name">
本年度熟料综合能耗
</div>
</div>
<div
class="items"
v-if="yearData.水泥磨"
>
<div class="item-number">
{{
yearData.水泥磨
.elec_consume_unit
}}
</div>
<div class="item-name">
本年度水泥粉磨分布电耗
</div>
</div>
<div
class="items"
v-if="yearData.水泥磨"
>
<div class="item-number">
{{
yearData.水泥磨
.cen_consume_unit
}}
</div>
<div class="item-name">
本年度水泥综合能耗
</div>
</div>
<div
class="items"
v-if="yearData.余热发电"
>
<div class="item-number">
{{
yearData.余热发电
.elec_consume
}}
</div>
<div class="item-name">
本年度余热发电电耗
</div>
</div>
<div
class="items"
v-if="yearData.余热发电"
>
<div class="item-number">
{{
yearData.余热发电
.total_production
}}
</div>
<div class="item-name">
本年度余热发电电量
</div>
</div>
</div>
</div>
</el-card>
</el-col>
<el-col v-if="monthData.电石渣">
<el-card
header="成本统计"
style="border-radius: 5px; box-shadow: none"
>
<div class="itemsWrap">
<div class="items" v-if="monthData.电石渣">
<div class="item-number">
{{
monthData.电石渣
.production_cost_unit
}}
</div>
<div class="item-name">
月电石渣成本
</div>
</div>
<div class="items" v-if="monthData.原料磨">
<div class="item-number">
{{
monthData.原料磨
.production_cost_unit
}}
</div>
<div class="item-name">月生料成本</div>
</div>
<div class="items" v-if="monthData.回转窑">
<div class="item-number">
{{
monthData.回转窑
.production_cost_unit
}}
</div>
<div class="item-name">月熟料成本</div>
</div>
<div class="items" v-if="monthData.水泥磨">
<div class="item-number">
{{
monthData.水泥磨
.production_cost_unit
}}
</div>
<div class="item-name">月水泥成本</div>
</div>
</div>
</el-card>
</el-col>
<!-- <el-col>
<el-card
header="报警"
style="border-radius: 5px; box-shadow: none"
>
<el-badge
:value="warningNum"
:max="99"
style="margin: 10px"
>
<div
class="items"
style="margin: 0"
@click="interEvent"
>
<div class="item-number">
能耗超标报警
</div>
</div>
</el-badge>
<el-badge
:value="warningNum2"
:max="99"
style="margin: 10px"
>
<div
class="items"
style="margin: 0"
@click="interEquipment"
>
<div class="item-number">设备检验</div>
</div>
</el-badge>
</el-card>
</el-col> -->
</el-row>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
time: "",
day: "",
year_s: "",
month_s: "",
yearData: [],
monthData: [],
warningNum: 0,
warningNum2: 0,
};
},
mounted() {
this.$emit("on-mounted");
let that = this;
var myDate = new Date();
let year = myDate.getFullYear();
let month = myDate.getMonth() + 1;
that.year_s = year;
that.month_s = month;
that.getYearData();
that.getMonthData();
that.getWraningNum();
// this.showTime();
// setInterval(()=>{
// this.showTime()
// },1000)
},
methods: {
// Class
bindClass(type) {
let classInfo = {
socketDom: true,
redColor: false,
orangeColor: false,
yellowColor: false,
blueColor: true,
};
if (type == "") {
classInfo.redColor = true;
}
return classInfo;
},
init() {
var that = this;
if (typeof WebSocket === "undefined") {
alert("您的浏览器不支持socket");
} else {
this.ws = new WebSocket(this.path + tool.data.get("TOKEN"));
//
this.ws.onopen = () => {
// console.log("socket");
setTimeout(() => {
that.ws.send(JSON.stringify({ type: "event" }));
}, 500);
};
//
this.ws.onmessage = (msg) => {
let data = JSON.parse(msg.data);
console.log(data);
that.getWraningNum();
// if(data.type=='event'){
// that.bindClass();
// }if(data.type=='ticket'){
// }if(data.type=='remaind'){
// }
};
// error
this.ws.onerror = function (error) {
console.log("ws断开,尝试重连");
setTimeout(() => {
this.ws = null;
this.init();
}, 5000);
};
}
},
getMessage(msg) {
console.log(msg);
},
close() {
if (this.ws) {
this.ws.close();
this.ws = null;
console.log("socket已经关闭");
}
},
//
getWraningNum() {
let that = this;
that.$API.ecm.event.list
.req({
cates__code__in: "consume_exceed",
is_handled: 0,
page: 1,
})
.then((res) => {
that.warningNum = res.count;
});
that.$API.em.equipment.list
.req({ state_measure__in: "20,30", type: 20, page: 1 })
.then((res) => {
debugger;
that.warningNum2 = res.count;
});
},
getYearData() {
let that = this;
let obj = {};
obj.year_s = this.year_s;
obj.type = "year_s";
obj.page = 0;
this.$API.enm.enstat.req(obj).then((res) => {
let yearData = {};
res.forEach((item) => {
let label = item.mgroup_name;
yearData[label] = item;
});
that.yearData = yearData;
});
},
getMonthData() {
let that = this;
let obj = {};
obj.year_s = this.year_s;
obj.month_s = this.month_s;
obj.type = "month_s";
obj.page = 0;
that.$API.enm.enstat.req(obj).then((res) => {
let monthData = {};
res.forEach((item) => {
let label = item.mgroup_name;
monthData[label] = item;
});
console.log("monthData", monthData);
that.monthData = monthData;
});
},
showTime() {
this.time = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");
this.day = this.$TOOL.dateFormat(new Date(), "yyyy年MM月dd日");
},
interEvent() {
this.$router.replace({ path: "/events" });
},
interEquipment() {
this.$router.replace({ path: "/em/equipmentc" });
},
},
};
</script>
<style scoped lang="scss">
.items {
display: inline-block;
width: 200px;
padding: 20px;
margin: 10px;
box-sizing: border-box;
border: 1px solid #cccccc;
border-radius: 10px;
box-shadow: 0 0 10px 6px #eeeeee57;
}
.item-number {
font-weight: 600;
font-size: 24px;
color: #1e2126;
letter-spacing: 0.1px;
text-align: left;
line-height: 36px;
}
.item-name {
font-size: 14px;
color: #4e5b71;
letter-spacing: 0.1px;
text-align: left;
line-height: 20px;
}
.item-percent {
font-size: 12px;
color: #ffffff;
letter-spacing: 0.08px;
text-align: left;
line-height: 12px;
}
.socketDom {
position: absolute;
top: 10vh;
left: 50%;
font-size: 20px;
font-weight: bold;
transform: translateX(-50%);
z-index: 101;
color: #ffffff;
border: 1px solid #99fffe;
background: rgba(11, 101, 140, 0.451);
padding: 10px 20px;
border-radius: 5px;
}
.redColor {
color: red;
border: 1px solid red;
background: rgba(255, 0, 0, 0.2);
}
.orangeColor {
color: orange;
border: 1px solid orange;
background: rgba(255, 165, 0, 0.2);
}
.yellowColor {
color: yellow;
background: rgba(255, 255, 0, 0.2);
border: 1px solid yellow;
}
.blueColor {
color: #2378f7;
background: rgb(35, 120, 247, 0.2);
border: 1px solid #2378f7;
}
</style>