diff --git a/src/components/scEnm/lineChartsdialog.vue b/src/components/scEnm/lineChartsdialog.vue index f83a5da2..d3ba9b8c 100644 --- a/src/components/scEnm/lineChartsdialog.vue +++ b/src/components/scEnm/lineChartsdialog.vue @@ -417,8 +417,8 @@ export default { }); let chartDom = document.getElementById("myChart"); that.myChart = echarts.init(chartDom); - that.option.xAxis.data = xAxisData.reverse(); - that.option.series[0].data = lineData.reverse(); + that.option.xAxis.data = xAxisData; + that.option.series[0].data = lineData; that.myChart.setOption(that.option); }); }, diff --git a/src/views/bigScreen/index_enm.vue b/src/views/bigScreen/index_enm.vue index fda451ec..9beb5d19 100644 --- a/src/views/bigScreen/index_enm.vue +++ b/src/views/bigScreen/index_enm.vue @@ -109,7 +109,7 @@
-
压缩空气、用水量
+
车间用水量
@@ -255,6 +255,15 @@

+
+
+ 水泥包装工序电耗 +

+ {{ hotData.bz_elec_consume_unit }} + kw.h/t +

+
+
@@ -453,6 +462,7 @@ export default { cen_consume_unit: "", //综合能耗 sn_cen_consume_unit: "", //水泥综合能耗 sn_elec_consume_unit: "",//水泥分布电耗 + bz_elec_consume_unit: "",//水泥包装分布电耗 }, tableData: [], tezhongData: [], @@ -1088,6 +1098,22 @@ export default { that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit; }); }); + this.$API.mtm.mgroup.list + .req({ page: 0, search: "水泥包装" }) + .then((res) => { + that.yurefadianId = res[0].id; + let params = {}; + params.page = 0; + params.year_s = that.currentYear; + params.month_s = that.currentMonth; + params.type = "month_s"; + params.mgroup = that.yurefadianId; + this.$API.enm.enstat.req(params).then((ress) => { + that.hotData.bz_elec_consume_unit = + ress[0].elec_consume_unit; + that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit; + }); + }); }, // this.$API.enm.mpoint.list // .req({ diff --git a/src/views/em/mpoint_form.vue b/src/views/em/mpoint_form.vue index ea23d0b3..ee5c7c30 100644 --- a/src/views/em/mpoint_form.vue +++ b/src/views/em/mpoint_form.vue @@ -220,6 +220,16 @@ + + + + + - - - - - + (index+1).toString()); - + // 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月 + if (that.query.type == "hour") { + option.title.text = "小时统计"; + option.xAxis.data = tableData.reverse().map((item) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString() + " " + item.hour.toString()); + }else if (that.query.type == "day") { + option.title.text = "天统计"; + option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString()); + }else if (that.query.type == "month") { + option.title.text = "月统计"; + option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString()); + }else if (that.query.type == "day_s") { + option.title.text = "班天统计"; + option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.day_s.toString()) : []; + }else if (that.query.type == "month_s") { + option.title.text = "班月统计"; + option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.month_s.toString()) : []; + } // 获取 y 轴的数据 - option.series = [ { - name: tableData[0].mpoint_name, + name: tableData.length > 0 ? tableData[0].mpoint_name : "", type: 'line', // 折线图类型 - data: tableData.map((item) => parseFloat(item.val)), // 将字符串转为数字 + data: tableData.length > 0 ? tableData.reverse().map((item) => parseFloat(item.val)) : [], // 将字符串转为数字 smooth: true, // 平滑曲线 } ]; - option.legend.data = [tableData[0].mpoint_name]; + option.legend.data = [tableData.length > 0 ? tableData[0].mpoint_name : ""]; // 更新图表选项 that.chartOption = option; }, diff --git a/src/views/home/testx.vue b/src/views/home/testx.vue index a302ec90..f524ef5b 100644 --- a/src/views/home/testx.vue +++ b/src/views/home/testx.vue @@ -25,9 +25,9 @@ :params="{ search: '生产' }" > -
+

基于input封装的远程表格select-单选分页

- - +
当前选择:

v-model: {{ x2 }}

@@ -44,7 +44,7 @@

v-model:obj: {{ x2_obj }}

基于input封装的远程表格select-多选不分页

- - +
当前选择:

v-model: {{ x2s }}

@@ -61,25 +61,25 @@

基于input封装的固定选项select-单选

- - +
当前选择:

v-model: {{ x2sf }}

基于input封装的固定选项select-多选

- - +
当前选择:

v-model: {{ x2sfs }}

@@ -117,7 +117,7 @@