From febdf3b4775ce990fc80f671513d0c56ab9a42b6 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 07 七月 2025 16:12:23 +0800
Subject: [PATCH] no message
---
zy-asrs-flow/src/utils/common-util.js | 46 +++++++++++++++++++++++-----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/zy-asrs-flow/src/utils/common-util.js b/zy-asrs-flow/src/utils/common-util.js
index b8939ba..c15c0cc 100644
--- a/zy-asrs-flow/src/utils/common-util.js
+++ b/zy-asrs-flow/src/utils/common-util.js
@@ -1,24 +1,24 @@
-export const generateColumnsState = (cols) => cols.reduce((acc, { dataIndex, show = true }) => ({ ...acc, [dataIndex]: { show: show } }), {});
-
-
-export const repairBug = (tabKey, key, val) => {
- const stateStr = localStorage.getItem(tabKey);
- if (stateStr) {
- const state = JSON.parse(stateStr);
- const oldVal = state[key]?.show;
- let hasVal = false;
- if (oldVal === true) {
- hasVal = true;
- }
- if (oldVal === false) {
- hasVal = true;
- }
- if (hasVal) {
- return oldVal;
- } else {
- return val;
- }
- } else {
- return val;
- }
+export const generateColumnsState = (cols) => cols.reduce((acc, { dataIndex, show = true }) => ({ ...acc, [dataIndex]: { show: show } }), {});
+
+
+export const repairBug = (tabKey, key, val) => {
+ const stateStr = localStorage.getItem(tabKey);
+ if (stateStr) {
+ const state = JSON.parse(stateStr);
+ const oldVal = state[key]?.show;
+ let hasVal = false;
+ if (oldVal === true) {
+ hasVal = true;
+ }
+ if (oldVal === false) {
+ hasVal = true;
+ }
+ if (hasVal) {
+ return oldVal;
+ } else {
+ return val;
+ }
+ } else {
+ return val;
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1