@@ -220,8 +252,8 @@ export default {
},
data() {
return {
+ searchDate: "",
typeRadio: "day",
- chartShow: false,
myOption: null,
optionHour: {},
optionDay: {},
@@ -597,20 +629,38 @@ export default {
}
});
});
- that.getHourData();
- that.getDayData();
- that.getMonthData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
});
},
methods: {
+ typeRadioChange() {
+ this.searchDate = "";
+ },
+ dateChange(val) {
+ console.log(val);
+ 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);
+ }
+ },
//获取小时数据
- 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.year_s = year;
+ query.month_s = month;
+ query.day_s = days;
query.type = "hour_s";
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
@@ -632,7 +682,7 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
let hourXAxis = [];
- for (let i = 1; i <= that.hours; i++) {
+ for (let i = 0; i < 24; i++) {
let item = i + "时";
hourXAxis.push(item);
}
@@ -641,12 +691,12 @@ 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.year_s = year;
+ query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(query1).then((response) => {
@@ -668,7 +718,8 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
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);
}
@@ -677,11 +728,11 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
let query2 = {};
query2.page = 0;
- query2.year_s = that.year;
+ query2.year_s = year;
query2.type = "month_s";
query2.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query2).then((response) => {
@@ -704,7 +755,7 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
@@ -717,15 +768,6 @@ export default {
this.cate = item[1];
this.asynDialog = true;
},
- itemClick1(type, item) {
- this.chartShow = false;
- this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
- this.myOption = JSON.parse(res.echart_options);
- debugger;
- console.log(this.myOption);
- this.chartShow = true;
- });
- },
handlePrint() {
this.$PRINT("#myReport");
},
@@ -745,5 +787,6 @@ export default {
display: flex;
justify-content: center;
padding-top: 10px;
+ position: relative;
}
diff --git a/src/views/enm_cogeneration/report.vue b/src/views/enm_cogeneration/report.vue
index 57363328..69c03eb7 100644
--- a/src/views/enm_cogeneration/report.vue
+++ b/src/views/enm_cogeneration/report.vue
@@ -96,13 +96,45 @@
小时生产参数统计图
@@ -344,6 +376,7 @@ export default {
},
data() {
return {
+ searchDate: "",
typeRadio: "day",
timeStamp: null,
chartShow: false,
@@ -404,18 +437,18 @@ export default {
yAxisIndex: 0,
data: [],
},
- {
- name: "运转率",
- type: "line",
- yAxisIndex: 1,
- data: [],
- },
{
name: "运转时间",
type: "bar",
yAxisIndex: 2,
data: [],
},
+ {
+ name: "运转率",
+ type: "line",
+ yAxisIndex: 1,
+ data: [],
+ },
{
name: "用电量",
type: "bar",
@@ -466,18 +499,18 @@ export default {
yAxisIndex: 0,
data: [],
},
- {
- name: "运转率",
- type: "line",
- yAxisIndex: 1,
- data: [],
- },
{
name: "运转时间",
type: "bar",
yAxisIndex: 2,
data: [],
},
+ {
+ name: "运转率",
+ type: "line",
+ yAxisIndex: 1,
+ data: [],
+ },
{
name: "用电量",
type: "bar",
@@ -514,18 +547,18 @@ export default {
yAxisIndex: 0,
data: [],
},
- {
- name: "运转率",
- type: "line",
- yAxisIndex: 1,
- data: [],
- },
{
name: "运转时间",
type: "bar",
yAxisIndex: 2,
data: [],
},
+ {
+ name: "运转率",
+ type: "line",
+ yAxisIndex: 1,
+ data: [],
+ },
{
name: "用电量",
type: "bar",
@@ -612,7 +645,7 @@ export default {
if (res4.length > 0) {
let data4 = res4[0];
that.tableDatas[0][2] = data4.total_production;
- that.tableDatas[1][2] = data4.production_hour; //发电功率
+ that.tableDatas[1][2] = "/"; //发电功率
that.tableDatas[2][2] = data4.production_elec_unit; //吨熟料发电量
that.tableDatas[3][2] = "/";
that.tableDatas[4][2] = "/";
@@ -750,20 +783,38 @@ export default {
}
});
});
- that.getHourData();
- that.getDayData();
- that.getMonthData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
});
},
methods: {
+ typeRadioChange() {
+ this.searchDate = "";
+ },
+ dateChange(val) {
+ console.log(val);
+ 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);
+ }
+ },
//获取小时数据
- 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.year_s = year;
+ query.month_s = month;
+ query.day_s = days;
query.type = "hour_s";
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
@@ -788,7 +839,7 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
let hourXAxis = [];
- for (let i = 1; i <= that.hours; i++) {
+ for (let i = 0; i < 24; i++) {
let item = i + "时";
hourXAxis.push(item);
}
@@ -796,13 +847,14 @@ export default {
that.optionHour = options;
});
},
+
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
let query1 = {};
query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
+ query1.year_s = year;
+ query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(query1).then((response) => {
@@ -827,7 +879,8 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
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);
}
@@ -836,11 +889,11 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
let query2 = {};
query2.page = 0;
- query2.year_s = that.year;
+ query2.year_s = year;
query2.type = "month_s";
query2.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query2).then((response) => {
@@ -865,7 +918,7 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
@@ -906,5 +959,6 @@ export default {
display: flex;
justify-content: center;
padding-top: 10px;
+ position: relative;
}
diff --git a/src/views/enm_kilnbase/report.vue b/src/views/enm_kilnbase/report.vue
index 5682f846..5537e7c6 100644
--- a/src/views/enm_kilnbase/report.vue
+++ b/src/views/enm_kilnbase/report.vue
@@ -93,13 +93,45 @@
小时生产参数统计图
@@ -350,6 +382,7 @@ export default {
},
data() {
return {
+ searchDate: "",
typeRadio: "day",
exportLoading: false,
chartShow: false,
@@ -791,20 +824,38 @@ export default {
}
});
});
- that.getHourData();
- that.getDayData();
- that.getMonthData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
});
},
methods: {
+ typeRadioChange() {
+ this.searchDate = "";
+ },
+ dateChange(val) {
+ console.log(val);
+ 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);
+ }
+ },
//获取小时数据
- 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.year_s = year;
+ query.month_s = month;
+ query.day_s = days;
query.type = "hour_s";
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
@@ -829,7 +880,7 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
let hourXAxis = [];
- for (let i = 1; i <= that.hours; i++) {
+ for (let i = 0; i < 24; i++) {
let item = i + "时";
hourXAxis.push(item);
}
@@ -838,12 +889,12 @@ 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.year_s = year;
+ query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(query1).then((response) => {
@@ -868,7 +919,8 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
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);
}
@@ -877,11 +929,11 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
let query2 = {};
query2.page = 0;
- query2.year_s = that.year;
+ query2.year_s = year;
query2.type = "month_s";
query2.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query2).then((response) => {
@@ -906,7 +958,7 @@ export default {
options.series[3].data = seriesData3;
options.series[4].data = seriesData4;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
@@ -947,5 +999,6 @@ export default {
display: flex;
justify-content: center;
padding-top: 10px;
+ position: relative;
}
diff --git a/src/views/enm_limestone/report.vue b/src/views/enm_limestone/report.vue
index fe7bc7aa..73602c50 100644
--- a/src/views/enm_limestone/report.vue
+++ b/src/views/enm_limestone/report.vue
@@ -85,12 +85,35 @@
@@ -324,6 +347,7 @@ export default {
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
],
+ searchDate: "",
tableName: "生产报告",
modelValue: true,
type: "hours",
@@ -615,19 +639,32 @@ export default {
});
});
// that.getHourData();
- that.getDayData();
- that.getMonthData();
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
});
});
},
methods: {
+ typeRadioChange() {
+ this.searchDate = "";
+ },
+ dateChange(val) {
+ console.log(val);
+ if (this.typeRadio == "month") {
+ let year = val.split("-")[0];
+ let month = val.split("-")[1];
+ this.getDayData(year, month);
+ } else {
+ this.getMonthData(val);
+ }
+ },
//获取天数据
- getDayData() {
+ getDayData(year, month) {
let that = this;
let query1 = {};
query1.page = 0;
- query1.year_s = that.year;
- query1.month_s = that.month;
+ query1.year_s = year;
+ query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(query1).then((response) => {
@@ -644,7 +681,8 @@ export default {
options.series[0].data = seriesData0;
options.series[1].data = seriesData1;
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);
}
@@ -653,11 +691,11 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
let query2 = {};
query2.page = 0;
- query2.year_s = that.year;
+ query2.year_s = year;
query2.type = "month_s";
query2.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query2).then((response) => {
@@ -674,7 +712,7 @@ export default {
options.series[0].data = seriesData0;
options.series[1].data = seriesData1;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
@@ -716,5 +754,6 @@ export default {
display: flex;
justify-content: center;
padding-top: 10px;
+ position: relative;
}
diff --git a/src/views/enm_rmbase/power.vue b/src/views/enm_rmbase/power.vue
index 27d74385..73e1e1da 100644
--- a/src/views/enm_rmbase/power.vue
+++ b/src/views/enm_rmbase/power.vue
@@ -71,8 +71,11 @@
-
-
+
+
本日
本月
小时生产参数统计图
@@ -346,6 +378,7 @@ export default {
},
data() {
return {
+ searchDate: "",
typeRadio: "day",
exportLoading: false,
chartShow: false,
@@ -732,21 +765,39 @@ export default {
}
});
});
- that.getHourData();
- that.getDayData();
- that.getMonthData();
+ that.getHourData(that.year, that.month, that.days);
+ that.getDayData(that.year, that.month);
+ that.getMonthData(that.year);
});
});
},
methods: {
+ typeRadioChange() {
+ this.searchDate = "";
+ },
+ dateChange(val) {
+ console.log(val);
+ 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);
+ }
+ },
//获取小时数据
- 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.year_s = year;
+ query.month_s = month;
+ query.day_s = days;
query.type = "hour_s";
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
@@ -768,7 +819,7 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
let hourXAxis = [];
- for (let i = 1; i <= that.hours; i++) {
+ for (let i = 0; i < 24; i++) {
let item = i + "时";
hourXAxis.push(item);
}
@@ -777,12 +828,12 @@ 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.year_s = year;
+ query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(query1).then((response) => {
@@ -804,7 +855,8 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
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);
}
@@ -813,11 +865,11 @@ export default {
});
},
//获取月数据
- getMonthData() {
+ getMonthData(year) {
let that = this;
let query2 = {};
query2.page = 0;
- query2.year_s = that.year;
+ query2.year_s = year;
query2.type = "month_s";
query2.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query2).then((response) => {
@@ -839,7 +891,7 @@ export default {
options.series[2].data = seriesData2;
options.series[3].data = seriesData3;
let monthXAxis = [];
- for (let i = 1; i <= that.month; i++) {
+ for (let i = 1; i < 13; i++) {
let item = i + "月";
monthXAxis.push(item);
}
@@ -881,5 +933,6 @@ export default {
display: flex;
justify-content: center;
padding-top: 10px;
+ position: relative;
}