-
吨熟料发电量
+
发电量
{{ hotData.production_elec_unit }}
kwh
@@ -630,7 +630,8 @@ export default {
},
mounted() {
let that = this;
- that.factoryName = that.$TOOL.data.get("BASE_INFO").base.base_name;
+ that.bigScreenName =
+ that.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
that.showTime();
that.addListener();
//一天的毫秒数
@@ -744,30 +745,30 @@ export default {
let chartDom = document.getElementById("line1");
let myChart = echarts.init(chartDom);
option1.legend.data = [
- {
- name: "熟料",
- textStyle: {
- color: "#fff",
- },
- borderRadius: 2,
- itemStyle: {
- color: that.linearGradientColors[0],
- },
- },
- {
- name: "特种熟料",
- textStyle: {
- color: "#fff",
- },
- borderRadius: 2,
- itemStyle: {
- color: that.linearGradientColors[1],
- },
- },
+ // {
+ // name: "熟料",
+ // textStyle: {
+ // color: "#fff",
+ // },
+ // borderRadius: 2,
+ // itemStyle: {
+ // color: that.linearGradientColors[0],
+ // },
+ // },
+ // {
+ // name: "特种熟料",
+ // textStyle: {
+ // color: "#fff",
+ // },
+ // borderRadius: 2,
+ // itemStyle: {
+ // color: that.linearGradientColors[1],
+ // },
+ // },
];
option1.series = [
{
- name: "熟料",
+ name: "",
type: "line",
stack: "Total",
smooth: true,
@@ -785,7 +786,7 @@ export default {
data: seriesData,
},
{
- name: "特种熟料",
+ name: "",
type: "line",
stack: "Total",
smooth: true,
@@ -1484,7 +1485,7 @@ export default {
value: res[0].run_rate,
},
{
- label: "吨熟料发电量(kwh/t)",
+ label: "发电量(kwh/t)",
field: "production_elec_unit",
value: res[0].production_elec_unit
? res[0].production_elec_unit
diff --git a/src/views/bigScreen/index_enp.vue b/src/views/bigScreen/index_enp.vue
deleted file mode 100644
index c4f76504..00000000
--- a/src/views/bigScreen/index_enp.vue
+++ /dev/null
@@ -1,937 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ percentage }}%
- 工厂模型加载中
-
-
-
-
-
-
-
-
-

-
-
-
-
-

-
-
-
-
-

-
-
-
-
-
-
-

-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
智能环保一体化管控平台
-

-

-

-

-

-

-

-

-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/bigScreen/index_old.vue b/src/views/bigScreen/index_old.vue
deleted file mode 100644
index 4ed83d90..00000000
--- a/src/views/bigScreen/index_old.vue
+++ /dev/null
@@ -1,4048 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 全部
-
-
-
- 监控
-
-
-
- 喇叭
-
-
-
- 作业
-
-
-
- 区域
-
-
-
- 人员
-
-
-
-
-
- 查看
-
-
-
-
-
-
-
-
-
-
- 取消跟踪
-
-
-
- 取消轨迹
-
-
-
-
-
-
-
-
-
-
-
-
-
-
正式员工
-
- {{ userCount.count_employee }} 人
-
-
-
-
-
-
-
访客
-
{{ userCount.count_visitor }} 人
-
-
-
-
-
-
-
相关方
-
- {{ userCount.count_remployee }} 人
-
-
-
-
-
-
-
司机
-
- {{ userCount.count_driver }} 人
-
-
-
-
-
-
-
-
-
报警实时展示
-
- {{ wStatistics.total_count }} 报警
-
-
-
-
-
-
-
-
- {{item1.voice_msg}}
-
-
-
-
-
-
-
- {{ item.cate__name }}
- {{ item.count }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 全部
-
-
-
- {{ typeItem.name }}
-
-
-
-
-
-
-
-
-
-
-
未处理
-
-
{{ item.create_time }}待处理
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{scope.row.dept_ter_.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 跟踪
-
-
-
- 跟踪
-
-
-
- 取消跟踪
-
-
-
- 轨迹
-
-
-
- 轨迹
-
-
-
- 取消轨迹
-
-
-
-
-
-
- {{ scope.row.my_info.employee_.name }}
-
-
-
-
- {{ scope.row.my_info.employee_.belong_dept_name
- }}
-
-
-
-
- {{ scope.row.my_info.employee_.post_name
- }}
-
-
-
-
-
-
-
-
-
-
-
-
- 姓名:
- {{ screenUserItemDetail.name }}
-
-
- 姓别:
- {{ screenUserItemDetail.gender }}
-
-
-
- 定位卡号:
- 202106180008
-
-
- 部门:
- {{
- screenUserItemDetail.belong_dept_.name
- }}
-
-
- 岗位:
- {{
- screenUserItemDetail.post_.name
- }}
-
-
- 证件类型:
- 中华人民共和国居民身份证
-
-
- 证件号码:
- {{ screenUserItemDetail.id_number }}
-
-
- 联系电话:
- {{ screenUserItemDetail.phone }}
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{scope.row.dept_ter_.name}}
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 作业名称:
- {{screenJobItem.name}}
-
-
- 作业编号:
- {{screenJobItem.number}}
-
-
- 生产状态:
- {{screenJobItem.state_work}}
-
-
- 作业区域:
- {{screenJobItem.area_.name}}
-
-
- 部门协调员:
- {{screenJobItem.coordinator_name}}
-
-
- 开始时间:
- {{screenJobItem.start_time}}
-
-
- 结束时间:
- {{screenJobItem.end_time}}
-
-
- 属地部门:
- {{screenJobItem.dept_ter_.name}}
-
-
- 业务部门:
- {{screenJobItem.dept_bus_.name}}
-
-
-
-
-
- {{ item.cate_name }}
-
-
-
-
-
-
-
-
-
-
风险区域名称:{{areaItemDetail.name}}
-
-
风险等级:{{levelOption[areaItemDetail.level]}}
-
-
区域编号:{{areaItemDetail.number}}
-
-
-
-
-
-
-
-
-
-
- {{ screenWarningItem.voice_msg }}
-
-
-
-
-
-
-
- 报警区域:
- {{ screenWarningItem.area_.name
- }}
-
-
- 触发人:
- {{
- screenWarningItem.employee_.name
- }}
-
-
- 触发人部门:
- {{
- screenWarningItem.employee_.belong_dept_.name
- }}
-
-
- 触发事件:
- {{ ite.name
- }}
-
-
- 触发时间:
- {{ screenWarningItem.create_time }}
-
-
- 事件截图:
-
-
-
-
-
-
-
-
-
-
-
-
- 处理描述:
-
-
-
- 事件类型:
-
- 正常
- 误报
-
-
-
-
-
-
- 处理
-
-
-
-
-
-
-
- 关闭
-
-
-
-
-
- 关闭
-
-
-
-
-
-
-
-
diff --git a/src/views/enm_coal/power.vue b/src/views/enm_coal/power.vue
index 2101e727..2dbd55ce 100644
--- a/src/views/enm_coal/power.vue
+++ b/src/views/enm_coal/power.vue
@@ -238,6 +238,7 @@ export default {
["煤磨排风机主电机", "", "KW·h/t", "", "", ""],
["煤磨主电机", "", "KW·h/t", "", "", ""],
],
+ tableData: [],
modelValue: true,
type: "hour_s",
title: "煤磨工段",
@@ -346,148 +347,42 @@ export default {
},
],
},
+ mpoints: [],
};
},
mounted() {
let that = this;
var myDate = new Date();
- let year = myDate.getFullYear();
- let month = myDate.getMonth() + 1;
- let days = myDate.getDate();
- let hours = myDate.getHours();
- let timeDate = myDate.getTime();
- let dayTime = 24 * 60 * 60 * 1000;
- //昨天的计算
- let year_d = year,
- month_d = month,
- days_d = days;
- if (hours < 21) {
- //21点前,查找昨日数据为前一天数据
- let newDate = timeDate - dayTime;
- let lastDate = new Date(newDate);
- year_d = lastDate.getFullYear();
- month_d = lastDate.getMonth() + 1;
- days_d = lastDate.getDate();
- }
- //上一小时的计算
- let hourTime = timeDate - 3600000;
- let hourDate = new Date(hourTime);
- let year_h = hourDate.getFullYear();
- let month_h = hourDate.getMonth() + 1;
- let days_h = hourDate.getDate();
- let hours_h = hourDate.getHours();
- this.$API.mtm.mgroup.list
- .req({ page: 0, search: "煤磨" })
- .then((res) => {
- console.log("煤磨", res);
- that.query.mgroup = res[0].id;
- //本月
- let params2 = {};
- params2.page = 0;
- params2.year_s = year;
- params2.month_s = month;
- params2.type = "month_s";
- params2.mgroup = that.query.mgroup;
- that.$API.enm.enstat
- .req(params2)
- .then((res2) => {
- if (res2.length > 0) {
- let hourProduct = (that.allValMonth =
- res2[0].total_production); //当前条件下的总产量
- params2.mpoint__ep_monitored__power_kw__gte = 100;
- that.$API.enm.mpoint.stat
- .req(params2)
- .then((res) => {
- let data2 = res;
- for (let i = 0; i < data2.length; i++) {
- that.tableDatas[i] = [];
- that.tableDatas[i][0] =
- data2[i].ep_monitored_name;
- that.tableDatas[i][1] =
- data2[i].ep_monitored_number;
- that.tableDatas[i][2] = "KW·h/t";
- let val =
- hourProduct == 0
- ? "/"
- : (
- data2[i].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[i][5] = val;
- that.tableDatas[i][6] = data2[i].mpoint;
- }
- });
- }
- })
- .then((res2) => {
- //昨日
- let params3 = {};
- params3.page = 0;
- params3.year_s = year_d;
- params3.month_s = month_d;
- params3.day_s = days_d;
- params3.type = "day_s";
- params3.mgroup = that.query.mgroup;
- that.$API.enm.enstat.req(params3).then((res3) => {
- if (res3.length > 0) {
- let hourProduct = (that.allValDays =
- res3[0].total_production);
- params3.mpoint__ep_monitored__power_kw__gte = 100;
- that.$API.enm.mpoint.stat
- .req(params3)
- .then((res) => {
- let data3 = res3;
- for (let j = 0; j < data3.length; j++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data3[j].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[j][4] = val;
- }
- });
- }
- });
- //上小时
- let params4 = {};
- params4.page = 0;
- params4.year = year_h;
- params4.month = month_h;
- params4.day = days_h;
- params4.hour = hours_h;
- params4.type = "hour_s";
- params4.mgroup = that.query.mgroup;
- that.$API.enm.enstat.req(params4).then((res4) => {
- if (res4.length > 0) {
- let hourProduct = (that.allValHour =
- res4[0].total_production);
- params4.mpoint__ep_monitored__power_kw__gte = 100;
- that.$API.enm.mpoint.stat
- .req(params4)
- .then((res) => {
- let data4 = res4;
- for (let k = 0; k < data4.length; k++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data4[k].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[k][3] = val;
- }
- });
- }
- });
- });
- that.getHourData();
- that.getDayData();
- that.getMonthData();
- });
+ that.year = myDate.getFullYear();
+ that.month = myDate.getMonth() + 1;
+ that.days = myDate.getDate();
+ that.hours = myDate.getHours();
+ that.getMpoints();
+ that.getTableHourData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
},
methods: {
+ getMpoints() {
+ let that = this;
+ let obj = {};
+ obj.mgroup__name = "煤磨";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
+ });
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
+ },
typeRadioChange() {
this.searchDate = "";
},
@@ -505,39 +400,154 @@ export default {
} else {
this.getMonthData(val);
}
+ this.searchDate;
+ },
+ getTableHourData() {
+ let that = this;
+ that.tableDatas = [];
+ let timeDate = new Date().getTime();
+ let hourTime = timeDate - 3600000;
+ let hourDate = new Date(hourTime);
+ let year_h = hourDate.getFullYear();
+ let month_h = hourDate.getMonth() + 1;
+ let days_h = hourDate.getDate();
+ let hours_h = hourDate.getHours();
+ let minutes = hourDate.getMinutes();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ if (hours_h > 5) {
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ } else {
+ hours_h = hours_h - 1;
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ }
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year = year_h;
+ obj.month = month_h;
+ obj.day = days_h;
+ obj.hour = hours_h;
+ obj.mgroup__name = "煤磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat
+ .req(obj)
+ .then((res) => {
+ that.tableData = res;
+ console.log("getTableHourData", res);
+ res.forEach((item) => {
+ let index = that.mpoints.indexOf(item.mpoint_nickname);
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[3] = item.elec_consume_unit;
+ obj[4] = 0;
+ obj[5] = 0;
+ obj[6] = item.mpoint;
+ that.tableDatas[index] = obj;
+ });
+ let yetTime = timeDate - 3600000 * 24;
+ let ystDate = new Date(yetTime);
+ let year_h = ystDate.getFullYear();
+ let month_h = ystDate.getMonth() + 1;
+ let days_h = ystDate.getDate();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ let obj_d = {};
+ obj_d.type = "day_s";
+ obj_d.year_s = year_h;
+ obj_d.month_s = month_h;
+ obj_d.day_s = days_h;
+ obj_d.mgroup__name = "煤磨";
+ obj_d.mpoint__material__code__in = "elec,elec_0";
+ obj_d.mpoint__need_display = 1;
+ obj_d.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_d).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_d = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_d]) {
+ that.tableDatas[index_d][3] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[4] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_d] = obj;
+ }
+ });
+ let obj_m = {};
+ obj_m.type = "month_s";
+ obj_m.year_s = that.year;
+ obj_m.month_s = that.month;
+ obj_m.mgroup__name = "煤磨";
+ obj_m.mpoint__material__code__in = "elec,elec_0";
+ obj_m.mpoint__need_display = 1;
+ obj_m.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_m = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_m]) {
+ that.tableDatas[index_m][4] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[5] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_m] = obj;
+ }
+ });
+ });
+ });
+ })
+ .then(() => {});
},
//获取小时数据
- getHourData() {
+ getHourData(year, month, days) {
let that = this;
- let query = {};
- query.page = 0;
- query.year_s = that.year;
- query.month_s = that.month;
- query.day_s = that.days;
- query.type = "hour_s";
- query.mgroup = that.query.mgroup;
- query.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat.req(query).then((response) => {
- let seriesData0 = [],
- seriesData1 = [];
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.day_s = days;
+ obj.mgroup__name = "煤磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.hour;
- let val = 0;
- if (that.allValHour == 0) {
- val = "";
- } else {
- val = (item.val / that.allValHour).toFixed(2);
- }
- if (item.equip_name == "煤磨排风机主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "煤磨主电机") {
- seriesData1[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.hour; //xAxis
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option1 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let hourXAxis = [];
for (let i = 0; i < 24; i++) {
let item = i + "时";
@@ -548,39 +558,40 @@ export default {
});
},
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
- let query1 = {};
- query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
- query1.type = "day_s";
- query1.mgroup = this.query.mgroup;
- query1.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query1).then((response) => {
- let seriesData0 = [],
- seriesData1 = [];
+ let obj = {};
+ obj.type = "day_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.mgroup__name = "煤磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- // debugger;
- let ind = item.day_s;
- let val = 0;
- if (that.allValDays == 0) {
- val = "";
- } else {
- val = (item.val / that.allValDays).toFixed(2);
- }
- if (item.equip_name == "煤磨排风机主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "煤磨主电机") {
- seriesData1[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.day_s - 1;
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option2 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let dayXAxis = [];
- for (let i = 1; i <= that.days; i++) {
+ let dayss = new Date(year, month, 0).getDate();
+ for (let i = 1; i <= dayss; i++) {
let item = i + "日";
dayXAxis.push(item);
}
@@ -589,37 +600,38 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
- let query2 = {};
- query2.page = 0;
- query2.year_s = that.year;
- query2.type = "month_s";
- query2.mgroup = that.query.mgroup;
- query2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query2).then((response) => {
- let seriesData0 = [],
- seriesData1 = [];
+ let obj = {};
+ obj.type = "month_s";
+ obj.year_s = year;
+ obj.mgroup__name = "煤磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.month_s;
- let val = 0;
- if (that.allValMonth == 0) {
- val = "";
- } else {
- val = (item.val / that.allValMonth).toFixed(2);
- }
- if (item.equip_name == "煤磨排风机主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "煤磨主电机") {
- seriesData1[ind] = val;
- }
+ let ind = item.month_s - 1;
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option3 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
diff --git a/src/views/enm_kiln/power.vue b/src/views/enm_kiln/power.vue
index 06bad0f3..4f0e48e2 100644
--- a/src/views/enm_kiln/power.vue
+++ b/src/views/enm_kiln/power.vue
@@ -249,6 +249,7 @@ export default {
["高温风机", "", "KW·h/t", "", "", ""],
["窑主电机", "", "KW·h/t", "", "", ""],
],
+ tableData: [],
modelValue: true,
type: "hour_s",
title: "回转窑工段",
@@ -460,148 +461,43 @@ export default {
},
],
},
+ mpoints: [],
};
},
mounted() {
+ //回转窑
let that = this;
var myDate = new Date();
- let year = myDate.getFullYear();
- let month = myDate.getMonth() + 1;
- let days = myDate.getDate();
- let hours = myDate.getHours();
- let timeDate = myDate.getTime();
- let dayTime = 24 * 60 * 60 * 1000;
- //昨天的计算
- let year_d = year,
- month_d = month,
- days_d = days;
- if (hours < 21) {
- //21点前,查找昨日数据为前一天数据
- let newDate = timeDate - dayTime;
- let lastDate = new Date(newDate);
- year_d = lastDate.getFullYear();
- month_d = lastDate.getMonth() + 1;
- days_d = lastDate.getDate();
- }
- //上一小时的计算
- let hourTime = timeDate - 3600000;
- let hourDate = new Date(hourTime);
- let year_h = hourDate.getFullYear();
- let month_h = hourDate.getMonth() + 1;
- let days_h = hourDate.getDate();
- let hours_h = hourDate.getHours();
- that.$API.mtm.mgroup.list
- .req({ page: 0, search: "回转窑" })
- .then((res) => {
- console.log("回转窑", res);
- that.query.mgroup = res[0].id;
- //本月
- let params2 = {};
- params2.page = 0;
- params2.year_s = year;
- params2.month_s = month;
- params2.type = "month_s";
- params2.mgroup = this.query.mgroup;
- this.$API.enm.enstat
- .req(params2)
- .then((res2) => {
- if (res2.length > 0) {
- let allValMonth = (that.allValMonth =
- res2[0].total_production); //当前条件下的总产量
- params2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params2)
- .then((res) => {
- let data2 = res;
- for (let i = 0; i < data2.length; i++) {
- that.tableDatas[i] = [];
- that.tableDatas[i][0] =
- data2[i].ep_monitored_name;
- that.tableDatas[i][1] =
- data2[i].ep_monitored_number;
- that.tableDatas[i][2] = "KW·h/t";
- let val =
- allValMonth == 0
- ? "/"
- : (
- data2[i].val /
- allValMonth
- ).toFixed(2);
- that.tableDatas[i][5] = val;
- that.tableDatas[i][6] = data2[i].mpoint;
- }
- });
- }
- })
- .then((res2) => {
- //昨日
- let params3 = {};
- params3.page = 0;
- params3.year_s = year_d;
- params3.month_s = month_d;
- params3.day_s = days_d;
- params3.type = "day_s";
- params3.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params3).then((res3) => {
- if (res3.length > 0) {
- let allValDays = (that.allValDays =
- res3[0].total_production);
- params3.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params3)
- .then((res) => {
- let data3 = res3;
- for (let j = 0; j < data3.length; j++) {
- let val =
- allValDays == 0
- ? "/"
- : (
- data3[j].val /
- allValDays
- ).toFixed(2);
- that.tableDatas[j][4] = val;
- }
- });
- }
- });
- //上小时
- let params4 = {};
- params4.page = 0;
- params4.year = year_h;
- params4.month = month_h;
- params4.day = days_h;
- params4.hour = hours_h;
- params4.type = "hour_s";
- params4.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params4).then((res4) => {
- if (res4.length > 0) {
- let hourProduct = (that.allValHour =
- res4[0].total_production);
- params4.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params4)
- .then((res) => {
- let data4 = res4;
- for (let k = 0; k < data4.length; k++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data4[k].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[k][3] = val;
- }
- });
- }
- });
- });
- that.getHourData();
- that.getDayData();
- that.getMonthData();
- });
+ that.year = myDate.getFullYear();
+ that.month = myDate.getMonth() + 1;
+ that.days = myDate.getDate();
+ that.hours = myDate.getHours();
+ that.getMpoints();
+ that.getTableHourData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
},
methods: {
+ getMpoints() {
+ let that = this;
+ let obj = {};
+ obj.mgroup__name = "回转窑";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
+ });
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
+ },
typeRadioChange() {
this.searchDate = "";
},
@@ -621,66 +517,152 @@ export default {
}
this.searchDate;
},
- //获取小时数据
- getHourData() {
+ getTableHourData() {
let that = this;
- let query = {};
- query.page = 0;
- query.year_s = that.year;
- query.month_s = that.month;
- query.day_s = that.days;
- query.type = "hour_s";
- query.mgroup = that.query.mgroup;
- query.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat.req(query).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [],
- seriesData7 = [];
+ that.tableDatas = [];
+ let timeDate = new Date().getTime();
+ let hourTime = timeDate - 3600000;
+ let hourDate = new Date(hourTime);
+ let year_h = hourDate.getFullYear();
+ let month_h = hourDate.getMonth() + 1;
+ let days_h = hourDate.getDate();
+ let hours_h = hourDate.getHours();
+ let minutes = hourDate.getMinutes();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ if (hours_h > 5) {
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ } else {
+ hours_h = hours_h - 1;
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ }
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year = year_h;
+ obj.month = month_h;
+ obj.day = days_h;
+ obj.hour = hours_h;
+ obj.mgroup__name = "回转窑";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat
+ .req(obj)
+ .then((res) => {
+ that.tableData = res;
+ console.log("getTableHourData", res);
+ res.forEach((item) => {
+ let index = that.mpoints.indexOf(item.mpoint_nickname);
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[3] = item.elec_consume_unit;
+ obj[4] = 0;
+ obj[5] = 0;
+ obj[6] = item.mpoint;
+ that.tableDatas[index] = obj;
+ });
+ let yetTime = timeDate - 3600000 * 24;
+ let ystDate = new Date(yetTime);
+ let year_h = ystDate.getFullYear();
+ let month_h = ystDate.getMonth() + 1;
+ let days_h = ystDate.getDate();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ let obj_d = {};
+ obj_d.type = "day_s";
+ obj_d.year_s = year_h;
+ obj_d.month_s = month_h;
+ obj_d.day_s = days_h;
+ obj_d.mgroup__name = "回转窑";
+ obj_d.mpoint__material__code__in = "elec,elec_0";
+ obj_d.mpoint__need_display = 1;
+ obj_d.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_d).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_d = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_d]) {
+ that.tableDatas[index_d][3] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[4] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_d] = obj;
+ }
+ });
+ let obj_m = {};
+ obj_m.type = "month_s";
+ obj_m.year_s = that.year;
+ obj_m.month_s = that.month;
+ obj_m.mgroup__name = "回转窑";
+ obj_m.mpoint__material__code__in = "elec,elec_0";
+ obj_m.mpoint__need_display = 1;
+ obj_m.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_m = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_m]) {
+ that.tableDatas[index_m][4] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[5] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_m] = obj;
+ }
+ });
+ });
+ });
+ })
+ .then(() => {});
+ },
+ //获取小时数据
+ getHourData(year, month, days) {
+ let that = this;
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.day_s = days;
+ obj.mgroup__name = "回转窑";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.hour;
- let val = 0;
- if (that.allValHour == 0) {
- val = "";
- } else {
- val = (item.val / that.allValHour).toFixed(2);
- }
- if (item.equip_name == "高温风机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "窑主电机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "篦冷机一室风机电机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "篦冷机二室风机电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "篦冷机三室风机电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "窑头排风机主电机") {
- seriesData5[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(左)电机"
- ) {
- seriesData6[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(右)电机"
- ) {
- seriesData7[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.hour; //xAxis
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option1 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
- options.series[7].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let hourXAxis = [];
for (let i = 0; i < 24; i++) {
let item = i + "时";
@@ -691,67 +673,40 @@ export default {
});
},
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
- let query1 = {};
- query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
- query1.type = "day_s";
- query1.mgroup = this.query.mgroup;
- query1.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query1).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [],
- seriesData7 = [];
+ let obj = {};
+ obj.type = "day_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.mgroup__name = "回转窑";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- // debugger;
- let ind = item.day_s;
- let val = 0;
- if (that.allValDays == 0) {
- val = "";
- } else {
- val = (item.val / that.allValDays).toFixed(2);
- }
- if (item.equip_name == "高温风机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "窑主电机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "篦冷机一室风机电机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "篦冷机二室风机电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "篦冷机三室风机电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "窑头排风机主电机") {
- seriesData5[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(左)电机"
- ) {
- seriesData6[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(右)电机"
- ) {
- seriesData7[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.day_s - 1;
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option2 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
- options.series[7].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let dayXAxis = [];
- for (let i = 1; i <= that.days; i++) {
+ let dayss = new Date(year, month, 0).getDate();
+ for (let i = 1; i <= dayss; i++) {
let item = i + "日";
dayXAxis.push(item);
}
@@ -760,65 +715,38 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
- let query2 = {};
- query2.page = 0;
- query2.year_s = that.year;
- query2.type = "month_s";
- query2.mgroup = that.query.mgroup;
- query2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query2).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [],
- seriesData7 = [];
+ let obj = {};
+ obj.type = "month_s";
+ obj.year_s = year;
+ obj.mgroup__name = "回转窑";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.month_s;
- let val = 0;
- if (that.allValMonth == 0) {
- val = "";
- } else {
- val = (item.val / that.allValMonth).toFixed(2);
- }
- if (item.equip_name == "高温风机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "窑主电机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "篦冷机一室风机电机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "篦冷机二室风机电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "篦冷机三室风机电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "窑头排风机主电机") {
- seriesData5[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(左)电机"
- ) {
- seriesData6[ind] = val;
- } else if (
- item.equip_name == "篦冷机一室充气梁风机(右)电机"
- ) {
- seriesData7[ind] = val;
- }
+ let ind = item.month_s - 1;
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option3 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
- options.series[7].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
diff --git a/src/views/enm_mill/power.vue b/src/views/enm_mill/power.vue
index d39ddc38..732f4eca 100644
--- a/src/views/enm_mill/power.vue
+++ b/src/views/enm_mill/power.vue
@@ -247,6 +247,7 @@ export default {
["循环风机1906", "", "KW·h/t", "", "", ""],
["系统风机", "", "KW·h/t", "", "", ""],
],
+ tableData: [],
modelValue: true,
type: "hour_s",
title: "水泥磨工段",
@@ -258,6 +259,7 @@ export default {
allValHour: 0,
allValDays: 0,
allValMonth: 0,
+ mpoints: [],
option1: {
color: colors,
tooltip: tooltip,
@@ -420,148 +422,39 @@ export default {
};
},
mounted() {
+ //水泥磨
let that = this;
var myDate = new Date();
- let year = myDate.getFullYear();
- let month = myDate.getMonth() + 1;
- let days = myDate.getDate();
- let hours = myDate.getHours();
- let timeDate = myDate.getTime();
- that.timeStamp = timeDate;
- let dayTime = 24 * 60 * 60 * 1000;
- //昨天的计算
- let year_d = year,
- month_d = month,
- days_d = days;
- if (hours < 21) {
- //21点前,查找昨日数据为前一天数据
- let newDate = timeDate - dayTime;
- let lastDate = new Date(newDate);
- year_d = lastDate.getFullYear();
- month_d = lastDate.getMonth() + 1;
- days_d = lastDate.getDate();
- }
- //上一小时的计算
- let hourTime = timeDate - 3600000;
- let hourDate = new Date(hourTime);
- let year_h = hourDate.getFullYear();
- let month_h = hourDate.getMonth() + 1;
- let days_h = hourDate.getDate();
- let hours_h = hourDate.getHours();
- this.$API.mtm.mgroup.list
- .req({ page: 0, search: "水泥磨" })
- .then((res) => {
- console.log("水泥磨", res);
- that.query.mgroup = res[0].id;
- //本月
- let params2 = {};
- params2.page = 0;
- params2.year_s = year;
- params2.month_s = month;
- params2.type = "month_s";
- params2.mgroup = this.query.mgroup;
- this.$API.enm.enstat
- .req(params2)
- .then((res2) => {
- if (res2.length > 0) {
- let allValMonth = (that.allValMonth =
- res2[0].total_production); //当前条件下的总产量
- params2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params2)
- .then((res) => {
- let data2 = res;
- for (let i = 0; i < data2.length; i++) {
- that.tableDatas[i] = [];
- that.tableDatas[i][0] =
- data2[i].ep_monitored_name;
- that.tableDatas[i][1] =
- data2[i].ep_monitored_number;
- that.tableDatas[i][2] = "KW·h/t";
- let val =
- allValMonth == 0
- ? "/"
- : (
- data2[i].val /
- allValMonth
- ).toFixed(2);
- that.tableDatas[i][5] = val;
- that.tableDatas[i][6] = data2[i].mpoint;
- }
- debugger;
- console.log(that.tableDatas);
- });
- }
- })
- .then((res2) => {
- //昨日
- let params3 = {};
- params3.page = 0;
- params3.year_s = year_d;
- params3.month_s = month_d;
- params3.day_s = days_d;
- params3.type = "day_s";
- params3.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params3).then((res3) => {
- if (res3.length > 0) {
- let allValDays = (that.allValDays =
- res3[0].total_production);
- params3.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params3)
- .then((res) => {
- let data3 = res3;
- for (let j = 0; j < data3.length; j++) {
- let val =
- allValDays == 0
- ? "/"
- : (
- data3[j].val /
- allValDays
- ).toFixed(2);
- that.tableDatas[j][4] = val;
- }
- });
- }
- });
- //上小时
- let params4 = {};
- params4.page = 0;
- params4.year = year_h;
- params4.month = month_h;
- params4.day = days_h;
- params4.hour = hours_h;
- params4.type = "hour_s";
- params4.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params4).then((res4) => {
- if (res4.length > 0) {
- let hourProduct = (that.allValHour =
- res4[0].total_production);
- params4.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params4)
- .then((res) => {
- let data4 = res4;
- for (let k = 0; k < data4.length; k++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data4[k].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[k][3] = val;
- }
- });
- }
- });
- });
- that.getHourData();
- that.getDayData();
- that.getMonthData();
- });
+ that.year = myDate.getFullYear();
+ that.month = myDate.getMonth() + 1;
+ that.days = myDate.getDate();
+ that.hours = myDate.getHours();
+ that.getMpoints();
+ that.getTableHourData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
},
methods: {
+ getMpoints() {
+ let that = this;
+ let obj = {};
+ obj.mgroup__name = "水泥磨";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
+ });
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
+ },
typeRadioChange() {
this.searchDate = "";
},
@@ -581,58 +474,152 @@ export default {
}
this.searchDate;
},
- //获取小时数据
- getHourData() {
+ getTableHourData() {
let that = this;
- let query = {};
- query.page = 0;
- query.year_s = that.year;
- query.month_s = that.month;
- query.day_s = that.days;
- query.type = "hour_s";
- query.mgroup = that.query.mgroup;
- query.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat.req(query).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [];
+ that.tableDatas = [];
+ let timeDate = new Date().getTime();
+ let hourTime = timeDate - 3600000;
+ let hourDate = new Date(hourTime);
+ let year_h = hourDate.getFullYear();
+ let month_h = hourDate.getMonth() + 1;
+ let days_h = hourDate.getDate();
+ let hours_h = hourDate.getHours();
+ let minutes = hourDate.getMinutes();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ if (hours_h > 5) {
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ } else {
+ hours_h = hours_h - 1;
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ }
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year = year_h;
+ obj.month = month_h;
+ obj.day = days_h;
+ obj.hour = hours_h;
+ obj.mgroup__name = "水泥磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat
+ .req(obj)
+ .then((res) => {
+ that.tableData = res;
+ console.log("getTableHourData", res);
+ res.forEach((item) => {
+ let index = that.mpoints.indexOf(item.mpoint_nickname);
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[3] = item.elec_consume_unit;
+ obj[4] = 0;
+ obj[5] = 0;
+ obj[6] = item.mpoint;
+ that.tableDatas[index] = obj;
+ });
+ let yetTime = timeDate - 3600000 * 24;
+ let ystDate = new Date(yetTime);
+ let year_h = ystDate.getFullYear();
+ let month_h = ystDate.getMonth() + 1;
+ let days_h = ystDate.getDate();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ let obj_d = {};
+ obj_d.type = "day_s";
+ obj_d.year_s = year_h;
+ obj_d.month_s = month_h;
+ obj_d.day_s = days_h;
+ obj_d.mgroup__name = "水泥磨";
+ obj_d.mpoint__material__code__in = "elec,elec_0";
+ obj_d.mpoint__need_display = 1;
+ obj_d.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_d).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_d = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_d]) {
+ that.tableDatas[index_d][3] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[4] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_d] = obj;
+ }
+ });
+ let obj_m = {};
+ obj_m.type = "month_s";
+ obj_m.year_s = that.year;
+ obj_m.month_s = that.month;
+ obj_m.mgroup__name = "水泥磨";
+ obj_m.mpoint__material__code__in = "elec,elec_0";
+ obj_m.mpoint__need_display = 1;
+ obj_m.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_m = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_m]) {
+ that.tableDatas[index_m][4] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[5] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_m] = obj;
+ }
+ });
+ });
+ });
+ })
+ .then(() => {});
+ },
+ //获取小时数据
+ getHourData(year, month, days) {
+ let that = this;
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.day_s = days;
+ obj.mgroup__name = "水泥磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.hour;
- let val = 0;
- if (that.allValHour == 0) {
- val = "";
- } else {
- val = (item.val / that.allValHour).toFixed(2);
- }
- if (item.equip_name == "循环风机1906") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "系统风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "水平涡流选粉机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "水泥磨主电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "辊压机动辊电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "辊压机定辊电机") {
- seriesData5[ind] = val;
- } else if (item.equip_name == "新增磨尾风机") {
- seriesData6[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.hour; //xAxis
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option1 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let hourXAxis = [];
for (let i = 0; i < 24; i++) {
let item = i + "时";
@@ -643,59 +630,40 @@ export default {
});
},
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
- let query1 = {};
- query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
- query1.type = "day_s";
- query1.mgroup = this.query.mgroup;
- query1.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query1).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [];
+ let obj = {};
+ obj.type = "day_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.mgroup__name = "水泥磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- // debugger;
- let ind = item.day_s;
- let val = 0;
- if (that.allValDays == 0) {
- val = "";
- } else {
- val = (item.val / that.allValDays).toFixed(2);
- }
- if (item.equip_name == "循环风机1906") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "系统风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "水平涡流选粉机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "水泥磨主电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "辊压机动辊电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "辊压机定辊电机") {
- seriesData5[ind] = val;
- } else if (item.equip_name == "新增磨尾风机") {
- seriesData6[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.day_s - 1;
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option2 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let dayXAxis = [];
- for (let i = 1; i <= that.days; i++) {
+ let dayss = new Date(year, month, 0).getDate();
+ for (let i = 1; i <= dayss; i++) {
let item = i + "日";
dayXAxis.push(item);
}
@@ -704,57 +672,38 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
- let query2 = {};
- query2.page = 0;
- query2.year_s = that.year;
- query2.type = "month_s";
- query2.mgroup = that.query.mgroup;
- query2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query2).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [],
- seriesData5 = [],
- seriesData6 = [];
+ let obj = {};
+ obj.type = "month_s";
+ obj.year_s = year;
+ obj.mgroup__name = "水泥磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.month_s;
- let val = 0;
- if (that.allValMonth == 0) {
- val = "";
- } else {
- val = (item.val / that.allValMonth).toFixed(2);
- }
- if (item.equip_name == "循环风机1906") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "系统风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "水平涡流选粉机") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "水泥磨主电机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "辊压机动辊电机") {
- seriesData4[ind] = val;
- } else if (item.equip_name == "辊压机定辊电机") {
- seriesData5[ind] = val;
- } else if (item.equip_name == "新增磨尾风机") {
- seriesData6[ind] = val;
- }
+ let ind = item.month_s - 1;
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option3 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
- options.series[5].data = seriesData4;
- options.series[6].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
diff --git a/src/views/enm_rm/logDetail.vue b/src/views/enm_rm/logDetail.vue
index b4fee9d3..070ee9f7 100644
--- a/src/views/enm_rm/logDetail.vue
+++ b/src/views/enm_rm/logDetail.vue
@@ -1,7 +1,7 @@
-
-
+
+
{{ form.mgroup_name }}
@@ -31,6 +31,7 @@
>新增异常
@@ -392,7 +393,19 @@
-
+
-
+
-
@@ -529,7 +543,7 @@
>
-
+
@@ -745,6 +759,7 @@ export default {
mpoint__type: 30,
has_create_by: 1,
},
+ querystlog: { mgroup: "" },
sflogExpVisiable: false,
checkList: [],
stlogList: [],
@@ -753,22 +768,32 @@ export default {
sflogexpList: [],
mpointOptions: [],
apiObj: null,
+ apiObjStlog: null,
+ heightTable: null,
};
},
mounted() {
this.deptId = this.$route.query.deptId;
this.mgroupId = this.$route.query.mgroupId;
this.querymplogX.mgroup = this.mgroupId;
+ this.querystlog.mgroup = this.mgroupId;
this.apiObj = this.$API.enm.mpoint.stat;
+ this.apiObjStlog = this.$API.wpm.stlog.list;
let form = this.$TOOL.data.get("sflogItem");
this.form = JSON.parse(form);
if (this.form.mgroup_name == "石灰石破碎") {
this.getMpoint();
this.getMpointStat();
}
- console.log(this.form);
this.getTeam();
this.getStlog();
+ let height = document.getElementById("elMain").clientHeight;
+ let heightdetail = document.getElementById("logDetail").clientHeight;
+ let heightTabs = height - heightdetail - 40;
+ this.heightTable = heightTabs - 45 + "px";
+ this.$nextTick(() => {
+ this.$refs.infoTabd.$el.style.height = heightTabs + "px";
+ });
},
methods: {
handleClick(e) {
diff --git a/src/views/enm_rm/power.vue b/src/views/enm_rm/power.vue
index 07c5f200..858c6b61 100644
--- a/src/views/enm_rm/power.vue
+++ b/src/views/enm_rm/power.vue
@@ -241,7 +241,7 @@ export default {
// ['废气风机','','KW·h/t','','',''],
// ['尾排风机','','KW·h/t','','',''],
],
-
+ tableData: [],
modelValue: true,
type: "hour_s",
title: "原料磨工段",
@@ -395,148 +395,43 @@ export default {
},
],
},
+ mpoints: [],
};
},
mounted() {
+ // 原料磨
let that = this;
var myDate = new Date();
- let year = (that.year = myDate.getFullYear());
- let month = (that.month = myDate.getMonth() + 1);
- let days = (that.days = myDate.getDate());
- let hours = (that.hours = myDate.getHours());
- let timeDate = myDate.getTime();
- let dayTime = 24 * 60 * 60 * 1000;
- //昨天的计算
- let year_d = year,
- month_d = month,
- days_d = days;
- if (hours < 21) {
- //21点前,查找昨日数据为前一天数据
- let newDate = timeDate - dayTime;
- let lastDate = new Date(newDate);
- year_d = lastDate.getFullYear();
- month_d = lastDate.getMonth() + 1;
- days_d = lastDate.getDate();
- }
- //上一小时的计算
- let hourTime = timeDate - 3600000;
- let hourDate = new Date(hourTime);
- let year_h = hourDate.getFullYear();
- let month_h = hourDate.getMonth() + 1;
- let days_h = hourDate.getDate();
- let hours_h = hourDate.getHours();
- this.$API.mtm.mgroup.list
- .req({ page: 0, search: "原料磨" })
- .then((res) => {
- console.log("原料磨", res);
- that.query.mgroup = res[0].id;
- //本月
- let params2 = {};
- params2.page = 0;
- params2.year_s = year;
- params2.month_s = month;
- params2.type = "month_s";
- params2.mgroup = this.query.mgroup;
- this.$API.enm.enstat
- .req(params2)
- .then((res2) => {
- if (res2.length > 0) {
- let hourProduct = (that.allValMonth =
- res2[0].total_production); //当前条件下的总产量
- params2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params2)
- .then((res) => {
- let data2 = res;
- for (let i = 0; i < data2.length; i++) {
- that.tableDatas[i] = [];
- that.tableDatas[i][0] =
- data2[i].ep_monitored_name;
- that.tableDatas[i][1] =
- data2[i].ep_monitored_number;
- that.tableDatas[i][2] = "KW·h/t";
- let val =
- hourProduct == 0
- ? "/"
- : (
- data2[i].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[i][5] = val;
- that.tableDatas[i][6] = data2[i].mpoint;
- }
- });
- }
- })
- .then((res2) => {
- //昨日
- let params3 = {};
- params3.page = 0;
- params3.year_s = year_d;
- params3.month_s = month_d;
- params3.day_s = days_d;
- params3.type = "day_s";
- params3.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params3).then((res3) => {
- if (res3.length > 0) {
- let hourProduct = (that.allValDays =
- res3[0].total_production);
- params3.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params3)
- .then((res) => {
- let data3 = res3;
- for (let j = 0; j < data3.length; j++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data3[j].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[j][4] = val;
- }
- });
- }
- });
- //上小时
- let params4 = {};
- params4.page = 0;
- params4.year_s = year_h;
- params4.month_s = month_h;
- params4.day_s = days_h;
- params4.hour_s = hours_h;
- params4.type = "hour_s";
- params4.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params4).then((res4) => {
- if (res4.length > 0) {
- let hourProduct = (that.allValHour =
- res4[0].total_production);
- params4.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params4)
- .then((res) => {
- let data4 = res4;
- for (let k = 0; k < data4.length; k++) {
- let val =
- hourProduct == 0
- ? "/"
- : (
- data4[k].val /
- hourProduct
- ).toFixed(2);
- that.tableDatas[k][3] = val;
- }
- });
- }
- });
- });
- that.getHourData();
- that.getDayData();
- that.getMonthData();
- });
+ that.year = myDate.getFullYear();
+ that.month = myDate.getMonth() + 1;
+ that.days = myDate.getDate();
+ that.hours = myDate.getHours();
+ that.getMpoints();
+ that.getTableHourData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
},
methods: {
+ getMpoints() {
+ let that = this;
+ let obj = {};
+ obj.mgroup__name = "原料磨";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
+ });
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
+ },
typeRadioChange() {
this.searchDate = "";
},
@@ -554,51 +449,154 @@ export default {
} else {
this.getMonthData(val);
}
+ this.searchDate;
+ },
+ getTableHourData() {
+ let that = this;
+ that.tableDatas = [];
+ let timeDate = new Date().getTime();
+ let hourTime = timeDate - 3600000;
+ let hourDate = new Date(hourTime);
+ let year_h = hourDate.getFullYear();
+ let month_h = hourDate.getMonth() + 1;
+ let days_h = hourDate.getDate();
+ let hours_h = hourDate.getHours();
+ let minutes = hourDate.getMinutes();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ if (hours_h > 5) {
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ } else {
+ hours_h = hours_h - 1;
+ hours_h = hours_h > 9 ? hours_h : "0" + hours_h;
+ }
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year = year_h;
+ obj.month = month_h;
+ obj.day = days_h;
+ obj.hour = hours_h;
+ obj.mgroup__name = "原料磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat
+ .req(obj)
+ .then((res) => {
+ that.tableData = res;
+ console.log("getTableHourData", res);
+ res.forEach((item) => {
+ let index = that.mpoints.indexOf(item.mpoint_nickname);
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[3] = item.elec_consume_unit;
+ obj[4] = 0;
+ obj[5] = 0;
+ obj[6] = item.mpoint;
+ that.tableDatas[index] = obj;
+ });
+ let yetTime = timeDate - 3600000 * 24;
+ let ystDate = new Date(yetTime);
+ let year_h = ystDate.getFullYear();
+ let month_h = ystDate.getMonth() + 1;
+ let days_h = ystDate.getDate();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ let obj_d = {};
+ obj_d.type = "day_s";
+ obj_d.year_s = year_h;
+ obj_d.month_s = month_h;
+ obj_d.day_s = days_h;
+ obj_d.mgroup__name = "原料磨";
+ obj_d.mpoint__material__code__in = "elec,elec_0";
+ obj_d.mpoint__need_display = 1;
+ obj_d.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_d).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_d = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_d]) {
+ that.tableDatas[index_d][3] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[4] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_d] = obj;
+ }
+ });
+ let obj_m = {};
+ obj_m.type = "month_s";
+ obj_m.year_s = that.year;
+ obj_m.month_s = that.month;
+ obj_m.mgroup__name = "原料磨";
+ obj_m.mpoint__material__code__in = "elec,elec_0";
+ obj_m.mpoint__need_display = 1;
+ obj_m.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_m = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_m]) {
+ that.tableDatas[index_m][4] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[5] = item.elec_consume_unit;
+ obj[6] = item.mpoint;
+ that.tableDatas[index_m] = obj;
+ }
+ });
+ });
+ });
+ })
+ .then(() => {});
},
//获取小时数据
- getHourData() {
+ getHourData(year, month, days) {
let that = this;
- let query = {};
- query.page = 0;
- query.year_s = that.year;
- query.month_s = that.month;
- query.day_s = that.days;
- query.type = "hour_s";
- query.mgroup = that.query.mgroup;
- query.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat.req(query).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [];
+ let obj = {};
+ obj.type = "hour_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.day_s = days;
+ obj.mgroup__name = "原料磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.hour;
- let val = 0;
- if (that.allValHour == 0) {
- val = "";
- } else {
- val = (item.val / that.allValHour).toFixed(2);
- }
- if (item.equip_name == "立磨主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "循环风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "烘干破主") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "废气风机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "尾排风机") {
- seriesData4[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.hour; //xAxis
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option1 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let hourXAxis = [];
for (let i = 0; i < 24; i++) {
let item = i + "时";
@@ -609,50 +607,40 @@ export default {
});
},
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
- let query1 = {};
- query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
- query1.type = "day_s";
- query1.mgroup = this.query.mgroup;
- query1.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query1).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [];
+ let obj = {};
+ obj.type = "day_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.mgroup__name = "原料磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.day_s;
- let val = 0;
- if (that.allValDays == 0) {
- val = "";
- } else {
- val = (item.val / that.allValDays).toFixed(2);
- }
- if (item.equip_name == "立磨主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "循环风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "烘干破主") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "废气风机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "尾排风机") {
- seriesData4[ind] = val;
- }
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.day_s - 1;
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option2 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let dayXAxis = [];
- for (let i = 1; i <= that.days; i++) {
+ let dayss = new Date(year, month, 0).getDate();
+ for (let i = 1; i <= dayss; i++) {
let item = i + "日";
dayXAxis.push(item);
}
@@ -661,49 +649,38 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
- let query2 = {};
- query2.page = 0;
- query2.year_s = that.year;
- query2.type = "month_s";
- query2.mgroup = that.query.mgroup;
- query2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query2).then((response) => {
- let seriesData0 = [],
- seriesData1 = [],
- seriesData2 = [],
- seriesData3 = [],
- seriesData4 = [];
+ let obj = {};
+ obj.type = "month_s";
+ obj.year_s = year;
+ obj.mgroup__name = "原料磨";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.month_s;
- let val = 0;
- if (that.allValMonth == 0) {
- val = "";
- } else {
- val = (item.val / that.allValMonth).toFixed(2);
- }
- if (item.equip_name == "立磨主电机") {
- seriesData0[ind] = val;
- } else if (item.equip_name == "循环风机") {
- seriesData1[ind] = val;
- } else if (item.equip_name == "烘干破主") {
- seriesData2[ind] = val;
- } else if (item.equip_name == "废气风机") {
- seriesData3[ind] = val;
- } else if (item.equip_name == "尾排风机") {
- seriesData4[ind] = val;
- }
+ let ind = item.month_s - 1;
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ seriesData[index][ind] = item.elec_consume_unit;
});
let options = { ...that.option3 };
- options.series[0].data = seriesData0;
- options.series[1].data = seriesData1;
- options.series[2].data = seriesData2;
- options.series[3].data = seriesData3;
- options.series[4].data = seriesData4;
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
diff --git a/src/views/enm_slag/power.vue b/src/views/enm_slag/power.vue
index fce6b413..56ced2de 100644
--- a/src/views/enm_slag/power.vue
+++ b/src/views/enm_slag/power.vue
@@ -189,18 +189,21 @@ export default {
exportLoading: false,
chartShow: false,
myOption: null,
+ timeStamp: null,
optionDay: {},
optionMonth: {},
year: 2023,
month: 1,
+ days: 1,
query: {
mgroup: "",
},
mpoint: "",
tableName: "主要设备(100KW以上)单位产品电耗数据表",
tableDatas: [["烘干破主电机", "", "kw.h/t", "", "", ""]],
+ tableData: [],
modelValue: true,
- type: "hour_s",
+ type: "day_s",
title: "电石渣工段",
cate: "",
apiObj: this.$API.enm.mpoint.stat,
@@ -209,7 +212,7 @@ export default {
asynDialog: false,
allValDays: 0,
allValMonth: 0,
- option1: {
+ option2: {
color: colors,
tooltip: tooltip,
grid: grid,
@@ -230,7 +233,7 @@ export default {
data: [],
},
},
- option2: {
+ option3: {
color: colors,
tooltip: tooltip,
grid: grid,
@@ -264,156 +267,176 @@ export default {
data: [],
},
},
+ mpoints: [],
};
},
mounted() {
let that = this;
var myDate = new Date();
- let year = myDate.getFullYear();
- let month = myDate.getMonth() + 1;
- let days = myDate.getDate();
- let hours = myDate.getHours();
- let timeDate = myDate.getTime();
- this.timeStamp = timeDate;
- this.year = year;
- this.month = month;
- this.days = days;
-
- let dayTime = 24 * 60 * 60 * 1000;
- //昨天的计算
- let year_d = year,
- month_d = month,
- days_d = days;
- if (hours < 21) {
- //21点前,查找昨日数据为前一天数据
- let newDate = timeDate - dayTime;
- let lastDate = new Date(newDate);
- year_d = lastDate.getFullYear();
- month_d = lastDate.getMonth() + 1;
- days_d = lastDate.getDate();
- }
- this.$API.mtm.mgroup.list
- .req({ page: 0, search: "电石渣" })
- .then((res) => {
- console.log("电石渣", res);
- that.query.mgroup = res[0].id;
- //本月
- let params2 = {};
- params2.page = 0;
- params2.year_s = year;
- params2.month_s = month;
- params2.type = "month_s";
- params2.mgroup = this.query.mgroup;
- this.$API.enm.enstat
- .req(params2)
- .then((res2) => {
- if (res2.length > 0) {
- let allValMonth = (that.allValMonth =
- res2[0].total_production); //当前条件下的总产量
- params2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params2)
- .then((res) => {
- let data2 = res;
- for (let i = 0; i < data2.length; i++) {
- that.tableDatas[i] = [];
- that.tableDatas[i][0] =
- data2[i].ep_monitored_name;
- that.tableDatas[i][1] =
- data2[i].ep_monitored_number;
- that.tableDatas[i][2] = "KW·h/t";
- let val =
- allValMonth == 0
- ? "/"
- : (
- data2[i].val /
- allValMonth
- ).toFixed(2);
- that.tableDatas[i][4] = val;
- that.tableDatas[i][5] = data2[i].mpoint;
- }
- });
- }
- })
- .then((res2) => {
- //昨日
- let params3 = {};
- params3.page = 0;
- params3.year_s = year_d;
- params3.month_s = month_d;
- params3.day_s = days_d;
- params3.type = "day_s";
- params3.mgroup = this.query.mgroup;
- this.$API.enm.enstat.req(params3).then((res3) => {
- if (res3.length > 0) {
- let allValDays = (that.allValDays =
- res3[0].total_production);
- params3.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.mpoint.stat
- .req(params3)
- .then((res) => {
- let data3 = res3;
- for (let j = 0; j < data3.length; j++) {
- let val =
- allValDays == 0
- ? "/"
- : (
- data3[j].val /
- allValDays
- ).toFixed(2);
- that.tableDatas[j][3] = val;
- }
- });
- }
- });
- });
- that.getDayData();
- that.getMonthData();
+ that.year = myDate.getFullYear();
+ that.month = myDate.getMonth() + 1;
+ that.days = myDate.getDate();
+ that.getMpoints();
+ that.getTableHourData();
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
+ let obj = {};
+ obj.mgroup__name = "电石渣";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
});
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
},
methods: {
+ getMpoints() {
+ let that = this;
+ let obj = {};
+ obj.mgroup__name = "电石渣";
+ obj.page = 0;
+ obj.enabled = 1;
+ obj.need_display = 1;
+ 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.nickname);
+ });
+ console.log("arr", arr);
+ that.mpoints = arr;
+ });
+ },
typeRadioChange() {
this.searchDate = "";
},
dateChange(val) {
console.log(val);
- if (this.typeRadio == "month") {
+ if (this.typeRadio == "day") {
+ let year = val.split("-")[0];
+ let month = val.split("-")[1];
+ let days = val.split("-")[2];
+ this.getHourData(year, month, days);
+ } else if (this.typeRadio == "month") {
let year = val.split("-")[0];
let month = val.split("-")[1];
this.getDayData(year, month);
} else {
this.getMonthData(val);
}
+ this.searchDate;
},
- //获取天数据
- getDayData() {
+ getTableHourData() {
let that = this;
- let query1 = {};
- query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
- query1.type = "day_s";
- query1.mgroup = this.query.mgroup;
- query1.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query1).then((response) => {
- let seriesData0 = [];
- let data = response;
- data.forEach((item) => {
- let ind = item.day_s;
- let val = 0;
- if (that.allValDays == 0) {
- val = "";
+ that.tableDatas = [];
+ let timeDate = new Date().getTime();
+ let yetTime = timeDate - 3600000 * 24;
+ let ystDate = new Date(yetTime);
+ let year_h = ystDate.getFullYear();
+ let month_h = ystDate.getMonth() + 1;
+ let days_h = ystDate.getDate();
+ month_h = month_h > 9 ? month_h : "0" + month_h;
+ days_h = days_h > 9 ? days_h : "0" + days_h;
+ let obj_d = {};
+ obj_d.type = "day_s";
+ obj_d.year_s = year_h;
+ obj_d.month_s = month_h;
+ obj_d.day_s = days_h;
+ obj_d.mgroup__name = "电石渣";
+ obj_d.mpoint__material__code__in = "elec,elec_0";
+ obj_d.mpoint__need_display = 1;
+ obj_d.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_d).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_d = that.mpoints.indexOf(item.mpoint_nickname);
+ if (that.tableDatas[index_d]) {
+ that.tableDatas[index_d][3] = item.elec_consume_unit;
} else {
- val = (item.val / that.allValDays).toFixed(2);
- }
- if (item.equip_name == "烘干破主电机") {
- seriesData0[ind] = val;
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[3] = item.elec_consume_unit;
+ obj[5] = item.mpoint;
+ that.tableDatas[index_d] = obj;
}
});
- let options = { ...that.option1 };
- options.series.data = seriesData0;
+ let obj_m = {};
+ obj_m.type = "month_s";
+ obj_m.year_s = that.year;
+ obj_m.month_s = that.month;
+ obj_m.mgroup__name = "电石渣";
+ obj_m.mpoint__material__code__in = "elec,elec_0";
+ obj_m.mpoint__need_display = 1;
+ obj_m.page = 0;
+ this.$API.enm.mpoint.stat.req(obj_m).then((res) => {
+ console.log("getTableHourData", res);
+ res.forEach((item, index) => {
+ let index_m = that.mpoints.indexOf(
+ item.mpoint_nickname
+ );
+ if (that.tableDatas[index_m]) {
+ that.tableDatas[index_m][4] =
+ item.elec_consume_unit;
+ } else {
+ let obj = [];
+ obj[0] = item.mpoint_nickname;
+ obj[1] = item.ep_monitored_number;
+ obj[2] = "KW·h/t";
+ obj[4] = item.elec_consume_unit;
+ obj[5] = item.mpoint;
+ that.tableDatas[index_m] = obj;
+ }
+ });
+ });
+ });
+ },
+ //获取天数据
+ getDayData(year, month) {
+ let that = this;
+ let obj = {};
+ obj.type = "day_s";
+ obj.year_s = year;
+ obj.month_s = month;
+ obj.mgroup__name = "电石渣";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
+ let data = response;
+ data.forEach((item) => {
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ let ind = item.day_s - 1;
+ seriesData[index][ind] = item.elec_consume_unit;
+ });
+ let options = { ...that.option2 };
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
let dayXAxis = [];
- for (let i = 1; i <= that.days; i++) {
+ let dayss = new Date(year, month, 0).getDate();
+ for (let i = 1; i <= dayss; i++) {
let item = i + "日";
dayXAxis.push(item);
}
@@ -422,31 +445,42 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
- let query2 = {};
- query2.page = 0;
- query2.year_s = that.year;
- query2.type = "month_s";
- query2.mgroup = that.query.mgroup;
- query2.mpoint__ep_monitored__power_kw__gte = 100;
- this.$API.enm.enstat.req(query2).then((response) => {
- let seriesData0 = [];
+ let obj = {};
+ obj.type = "month_s";
+ obj.year_s = year;
+ obj.mgroup__name = "电石渣";
+ obj.mpoint__material__code__in = "elec,elec_0";
+ obj.mpoint__ep_monitored__isnull = 0;
+ obj.mpoint__need_display = 1;
+ obj.page = 0;
+ this.$API.enm.mpoint.stat.req(obj).then((response) => {
+ let seriesData = [];
+ for (let i = 0; i < that.mpoints.length; i++) {
+ seriesData.push([]);
+ }
let data = response;
data.forEach((item) => {
- let ind = item.month_s;
- let val = 0;
- if (that.allValMonth == 0) {
- val = "";
- } else {
- val = (item.val / that.allValMonth).toFixed(2);
- }
- if (item.equip_name == "烘干破主电机") {
- seriesData0[ind] = val;
- }
+ let ind = item.month_s - 1;
+ let index = that.mpoints.indexOf(item.mpoint_nickname); //第几个mpoint
+ seriesData[index][ind] = item.elec_consume_unit;
});
- let options = { ...that.option2 };
- options.series.data = seriesData0;
+ let options = { ...that.option3 };
+ for (let j = 0; j < that.mpoints.length; j++) {
+ let chartItem = {};
+ chartItem.name = that.mpoints[j];
+ chartItem.type = "bar";
+ chartItem.data = seriesData[j];
+ options.series.push(chartItem);
+ }
+ options.legend.data = that.mpoints;
+ let monthXAxis = [];
+ for (let i = 1; i < 13; i++) {
+ let item = i + "月";
+ monthXAxis.push(item);
+ }
+ options.xAxis.data = monthXAxis;
that.optionMonth = options;
});
},
diff --git a/src/views/enp/pfk.vue b/src/views/enp/pfk.vue
index 2bf968ab..e5987d79 100644
--- a/src/views/enp/pfk.vue
+++ b/src/views/enp/pfk.vue
@@ -30,6 +30,7 @@
row-key="id"
:params="query"
hidePagination
+ @row-click="rowClick"
>
设备编辑
- 删除
-
- 删除
-
-
@@ -183,6 +178,15 @@
+
+
+
diff --git a/src/views/enp/pfk_detail.vue b/src/views/enp/pfk_detail.vue
new file mode 100644
index 00000000..d948e44d
--- /dev/null
+++ b/src/views/enp/pfk_detail.vue
@@ -0,0 +1,709 @@
+
+
+
+
+
+
+
+
排放口及关联设备静态信息
+
+
+
+ {{ eqs.name }}
+
+
+
+
+ 设备类型:主要生产设备
+
+
+
+
+ 电机功率:
+ {{ eqs.power_kw }}kw
+
+
+
+
+ 生产能力:
+ {{ eqs.parameter_json.生产能力 }}
+
+
+
+
+
+
+ {{ eqz.name }}
+
+
+
+
+ 风量:
+ {{ eqz.parameter_json.风量 }}m³/h
+
+
+
+
+ 过滤面积:
+ {{
+ eqz.parameter_json.过滤面积
+ }}
+ m²
+
+
+
+
+ 布袋材质:
+ {{ eqz.parameter_json.布袋材质 }}
+
+
+
+
+
+ 过滤风速:
+ {{
+ eqz.parameter_json.过滤风速
+ }} m/min
+
+
+
+
+ 额定功率:
+ {{ eqz.parameter_json.额定功率 }}
+
+ Kw
+
+
+
+
+
+
+ {{ detailItem.name }}
+
+
+
+
+ 排气筒高度:{{ detailItem.height }} m
+
+
+
+
+ 废气处理量:
+ {{ detailItem.treatment_capacity }} m³/h
+
+
+
+
+ PM超低排放限值:
+
+ {{ detailItem.pm_limit }} mg/Nm³
+
+
+
+
+ 治理措施: {{ detailItem.measure }}
+
+
+
+
+
+
+ {{ eqc.name }}
+
+
+
+
+ 颗粒物:(实测值)0.218 mg/m³
+ (折算值)0.208 mg/m³
+
+
+
+
+ SO2:(实测值)1.018 mg/m³
+ (折算值)1.118 mg/m³
+
+
+
+
+ NOX:(实测值)1.523 mg/m³
+ (折算值)1.503 mg/m³
+
+
+
+
+ 流量:
+ 0.000 m³/h
+
+
+
+
+ 温度:
+ 0.000 ℃
+
+
+
+
+ 湿度:
+ 0.000 %
+
+
+
+
+ 压力:
+ 0.000 MPa
+
+
+
+
+ 含氧量:
+ 0.000 %
+
+
+
+
+
+
+
+
+
+
+
+ 排放口及关联设备动态信息
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inm/mio_form.vue b/src/views/inm/mio_form.vue
index 2c647c4c..7781bdfc 100644
--- a/src/views/inm/mio_form.vue
+++ b/src/views/inm/mio_form.vue
@@ -240,7 +240,7 @@ export default {
},
getOrderOptions() {
this.$API.sam.order.list
- .req({ page: 0, type__in: "20,30" })
+ .req({ page: 0, state__in: "20,30" })
.then((res) => {
this.orderOptions = res;
});
diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue
index d38782c3..bee8528b 100644
--- a/src/views/inm/mioitem.vue
+++ b/src/views/inm/mioitem.vue
@@ -31,7 +31,7 @@
{{ mioObj.order_number }}{{ mioObj.pu_order_number }}
{{ mioObj.pu_order_number }}{{ mioObj.order_number }}
-
+ > -->
@@ -58,6 +58,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -174,6 +179,7 @@ const defaultForm = {
process: null,
sort: 1,
out_rate: 100,
+ batch_bind: true,
is_autotask: true,
is_count_utask: false,
};
diff --git a/src/views/mtm/routepack.vue b/src/views/mtm/routepack.vue
index 3afd5664..b5f089f7 100644
--- a/src/views/mtm/routepack.vue
+++ b/src/views/mtm/routepack.vue
@@ -128,7 +128,7 @@
v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
- @closed="dialog.save = false"
+ @closed="saveClose"
>
{
this.$message.success("删除成功");
diff --git a/src/views/mtm/routepack_form.vue b/src/views/mtm/routepack_form.vue
index f9da551e..ae72997c 100644
--- a/src/views/mtm/routepack_form.vue
+++ b/src/views/mtm/routepack_form.vue
@@ -48,11 +48,12 @@
@@ -311,10 +312,8 @@ export default {
.then((res) => {
that.tLoading = false;
that.$message.success("提交成功");
- that.$router.push({
- name: "",
- query: {},
- });
+ that.$emit("close");
+ that.visible = false;
})
.catch((e) => {
that.tLoading = false;
diff --git a/src/views/pum/supplier.vue b/src/views/pum/supplier.vue
index e571a1af..29f6984d 100644
--- a/src/views/pum/supplier.vue
+++ b/src/views/pum/supplier.vue
@@ -1,121 +1,175 @@
-
-
-
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
-
-
-
-
-
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/views/pum/supplier_form.vue b/src/views/pum/supplier_form.vue
index 9a8335e0..f4595fa1 100644
--- a/src/views/pum/supplier_form.vue
+++ b/src/views/pum/supplier_form.vue
@@ -49,6 +49,12 @@
/>
+
+
+
+
+
+
diff --git a/src/views/qm/inm.vue b/src/views/qm/inm.vue
index 1eef5afc..e1d72be0 100644
--- a/src/views/qm/inm.vue
+++ b/src/views/qm/inm.vue
@@ -1,98 +1,155 @@
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.count - scope.row.count_notok }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 合格
- 不合格
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 查询
+ 导出
+
+
+
+
+
+
+
+
+
+ '{{ scope.row.batch }}
+
+
+
+
+
+
+ {{ scope.row.count - scope.row.count_notok }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合格
+ 不合格
+
+
+
+
+
+
+
+
+ '{{ scope.row.material }}
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/views/sam/orderitem.vue b/src/views/sam/orderitem.vue
index 56a3b793..5a8ac221 100644
--- a/src/views/sam/orderitem.vue
+++ b/src/views/sam/orderitem.vue
@@ -52,7 +52,7 @@
>
- {{ scope.row.material_.name }}
@@ -81,14 +81,14 @@
width="100px"
>
-
编辑
-
-
+ -->
+
{
this.$message.success("删除成功");
+ this.$refs.table.refresh();
return res;
})
.catch((err) => {
diff --git a/src/views/sam/orderitem_form.vue b/src/views/sam/orderitem_form.vue
index b03fd19b..ed96b680 100644
--- a/src/views/sam/orderitem_form.vue
+++ b/src/views/sam/orderitem_form.vue
@@ -1,107 +1,137 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保存
- 取消
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
diff --git a/src/views/statistics/total_statistics.vue b/src/views/statistics/total_statistics.vue
index f7a61374..332214bc 100644
--- a/src/views/statistics/total_statistics.vue
+++ b/src/views/statistics/total_statistics.vue
@@ -78,16 +78,12 @@
+
-
-
@@ -287,7 +283,6 @@ export default {
规格: "",
合格数: 0,
仓库库存: 0,
- 未退火: 0,
退火: 0,
库存: 0,
开槽: 0,
@@ -311,7 +306,7 @@ export default {
item5.车间 == "8车间" &&
item5.工序 == "管料成型"
) {
- key = "未退火";
+ key = "仓库库存";
} else if (
item5.车间 == "8车间" &&
item5.工序 == "管料退火"
@@ -338,12 +333,11 @@ export default {
) {
key = "配棒";
}
- obj[key] = item5.数量;
+ obj[key] = obj[key] + item5.数量;
});
obj.合计 =
obj.合格数 +
obj.仓库库存 +
- obj.未退火 +
obj.退火 +
obj.库存 +
obj.开槽 +
diff --git a/src/views/wpm_gx/chaoxi.vue b/src/views/wpm_gx/chaoxi.vue
new file mode 100644
index 00000000..2d0cd26b
--- /dev/null
+++ b/src/views/wpm_gx/chaoxi.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/chart.vue b/src/views/wpm_gx/chart.vue
new file mode 100644
index 00000000..bab41f95
--- /dev/null
+++ b/src/views/wpm_gx/chart.vue
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/daojiao.vue b/src/views/wpm_gx/daojiao.vue
new file mode 100644
index 00000000..2fba2562
--- /dev/null
+++ b/src/views/wpm_gx/daojiao.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
new file mode 100644
index 00000000..1b111bf9
--- /dev/null
+++ b/src/views/wpm_gx/handover.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+ 新增
+ 返工
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
new file mode 100644
index 00000000..15056839
--- /dev/null
+++ b/src/views/wpm_gx/handover_form.vue
@@ -0,0 +1,333 @@
+
+
+
+
+
+
+
+
+ {{ item.batch }}
+ -{{ item.notok_sign }}
+ -[{{ item.count }}]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+ 取消
+
+
+
+
+
diff --git a/src/views/wpm_gx/heihua.vue b/src/views/wpm_gx/heihua.vue
new file mode 100644
index 00000000..a3863d3a
--- /dev/null
+++ b/src/views/wpm_gx/heihua.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/huohua.vue b/src/views/wpm_gx/huohua.vue
new file mode 100644
index 00000000..08738a61
--- /dev/null
+++ b/src/views/wpm_gx/huohua.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue
new file mode 100644
index 00000000..291279a4
--- /dev/null
+++ b/src/views/wpm_gx/inm.vue
@@ -0,0 +1,184 @@
+
+
+
+
+ 领料
+ 入库
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/jianbo.vue b/src/views/wpm_gx/jianbo.vue
new file mode 100644
index 00000000..cf785ed7
--- /dev/null
+++ b/src/views/wpm_gx/jianbo.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/jingdiao.vue b/src/views/wpm_gx/jingdiao.vue
new file mode 100644
index 00000000..dbd2c523
--- /dev/null
+++ b/src/views/wpm_gx/jingdiao.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue
new file mode 100644
index 00000000..5e5da294
--- /dev/null
+++ b/src/views/wpm_gx/mlog_detail.vue
@@ -0,0 +1,432 @@
+
+
+
+
+
+ {{
+ mlogItem.material_out_name
+ }}
+ {{
+ mlogItem.mgroup_name
+ }}
+ {{
+ mlogItem.equipment_name
+ }}
+ {{
+ mlogItem.hour_work
+ }}
+ {{
+ mlogItem.belong_dept_name
+ }}
+ {{
+ mlogItem.handle_user_name
+ }}
+ {{
+ mlogItem.work_start_time
+ }}
+ {{
+ mlogItem.create_time
+ }}
+
+
+
+ 编辑
+
+ 提交
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 检验
+
+
+
+ 撤回
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue
new file mode 100644
index 00000000..18dcb787
--- /dev/null
+++ b/src/views/wpm_gx/mlog_form.vue
@@ -0,0 +1,322 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.routepack_name }}-{{
+ item.process_name
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlogb_check.vue b/src/views/wpm_gx/mlogb_check.vue
new file mode 100644
index 00000000..522659f6
--- /dev/null
+++ b/src/views/wpm_gx/mlogb_check.vue
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue
new file mode 100644
index 00000000..c8713645
--- /dev/null
+++ b/src/views/wpm_gx/mlogb_form.vue
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.batch }}{{ item.count }}
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mlogs.vue b/src/views/wpm_gx/mlogs.vue
new file mode 100644
index 00000000..a6ef3802
--- /dev/null
+++ b/src/views/wpm_gx/mlogs.vue
@@ -0,0 +1,241 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+ 详情
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mopao.vue b/src/views/wpm_gx/mopao.vue
new file mode 100644
index 00000000..718254df
--- /dev/null
+++ b/src/views/wpm_gx/mopao.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue
new file mode 100644
index 00000000..fc4747c0
--- /dev/null
+++ b/src/views/wpm_gx/mtask.vue
@@ -0,0 +1,143 @@
+
+
+
+ 任务列表
+
+
+
+
+
+
+
+
+ {{ scope.row.material_out_.specification }}|{{
+ scope.row.material_out_.model
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ state_[scope.row.state] }}
+
+
+
+
+
+ 提交
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/print.vue b/src/views/wpm_gx/print.vue
new file mode 100644
index 00000000..62634aec
--- /dev/null
+++ b/src/views/wpm_gx/print.vue
@@ -0,0 +1,140 @@
+
+
+
+
+ 光芯科技
+ 交接单
+
+
+
物料:{{ name }}
+
批次号:{{ batch }}
+
数量:{{ count }}
+
+
打印
+
+
+
+
diff --git a/src/views/wpm_gx/qiepian.vue b/src/views/wpm_gx/qiepian.vue
new file mode 100644
index 00000000..4dd98842
--- /dev/null
+++ b/src/views/wpm_gx/qiepian.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/shaojie.vue b/src/views/wpm_gx/shaojie.vue
new file mode 100644
index 00000000..d2a0419a
--- /dev/null
+++ b/src/views/wpm_gx/shaojie.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+