From 315a513c017bfd4d68672b6400adcca03a1ff055 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 8 May 2026 13:21:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=A6=85=E9=81=93351=E6=97=A5=E5=BF=97abl?= =?UTF-8?q?e=E6=98=BE=E7=A4=BA=E7=9A=84=E5=88=97=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=98=AF=E9=9A=90=E8=97=8F=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scTable/index.vue | 15 +++- src/views/wpm_bx/mlogs.vue | 113 +++++++++++++++++++++++++++---- 2 files changed, 114 insertions(+), 14 deletions(-) diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 614a536c..74b2bb79 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -53,14 +53,25 @@
2导出本页数据
3导出全部数据
- - + diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue index 37206920..abedf219 100644 --- a/src/views/wpm_bx/mlogs.vue +++ b/src/views/wpm_bx/mlogs.vue @@ -57,6 +57,19 @@ label="已提交" @change="hiddenChange" /> + + +
+
+ {{ col.label }} +
+
+
+ 重置 +
+
@@ -91,7 +104,7 @@ > --> - + - + - + - + - + - + - + - + - + @@ -169,8 +183,9 @@ - + @@ -178,12 +193,14 @@ - + @@ -191,6 +208,7 @@ col.show); + }, + }, watch: { mgroupName: { handler: function (newval,odlval) { @@ -356,6 +419,12 @@ export default { that.route_code = this.$route.path.split("/")[2]; that.params.mgroup =that.mgroupId; that.apiObj = that.$API.wpm.mlog.list; + const saved = localStorage.getItem('mlogs_columnVisibility'); + if (saved) { + try { + Object.assign(that.columnVisibility, JSON.parse(saved)); + } catch (e) {} + } this.getDeptUsers(); }, methods: { @@ -549,6 +618,20 @@ export default { } this.$refs.table.queryData(this.query); }, + onColumnVisibilityChange(key, val) { + this.columnVisibility[key] = val; + localStorage.setItem('mlogs_columnVisibility', JSON.stringify(this.columnVisibility)); + }, + resetColumnVisibility() { + const defaults = { + batch: true, rodNumber: true, plateNumber: true, rawRodNumber: true, + equipment: true, deptGroup: true, heatPreservation: true, temperature: true, + pressure: true, scale: true, pressTime: true, handler: true, + remainTime: true, startTime: true, endTime: true, submitter: true, submitTime: true, + }; + this.columnVisibility = { ...defaults }; + localStorage.setItem('mlogs_columnVisibility', JSON.stringify(this.columnVisibility)); + }, //表格选择后回调事件 selectionChange(selection) { this.selection = selection; @@ -578,3 +661,9 @@ export default { +