From 7d7eee19af2f1aec0424d357fe79e6c45f949772 Mon Sep 17 00:00:00 2001 From: zty Date: Fri, 1 Nov 2024 17:11:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat=20:=20index=5Fenm=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_enm.vue | 2 +- src/views/em/mpoint_form.vue | 21 +++++++++--------- src/views/fac_cal/mpointstat.vue | 36 ++++++++++++++++++++++++------- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/views/bigScreen/index_enm.vue b/src/views/bigScreen/index_enm.vue index fda451ec..53e985d5 100644 --- a/src/views/bigScreen/index_enm.vue +++ b/src/views/bigScreen/index_enm.vue @@ -109,7 +109,7 @@
-
压缩空气、用水量
+
车间用水量
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; }, From 32547f26f1dc4e57f104978ac34712f095fc1e92 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 7 Nov 2024 08:25:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3overlay=20runtime?= =?UTF-8?q?=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index 3090250b..8275c803 100644 --- a/vue.config.js +++ b/vue.config.js @@ -26,7 +26,7 @@ module.exports = defineConfig({ }, client: { overlay: { - // runtimeErrors: false, + runtimeErrors: false, }, }, }, From be9da525717b0556efa237c96a6654661732b28b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 7 Nov 2024 08:32:45 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20testx=E4=B8=ADxtSelect=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/testx.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 @@