Procházet zdrojové kódy

psr的sheet页hide置为0,解决有个psr莫名被置为了0,导致所有sheet页都被隐藏,导出出错了

Renxy před 1 rokem
rodič
revize
70c92369fa
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      src/pages/PSRManage/detail.js

+ 4 - 2
src/pages/PSRManage/detail.js

@@ -368,13 +368,13 @@ const PSRDetail = () => {
         setExcelData({ ...data, name });
         setHistoryOpen(false);
         const jsonData = JSON.parse(data.json_data);
-        console.log(data);
 
         jsonData.map((item) => {
           if (item.celldata && typeof item.celldata == 'string')
             item.celldata = JSON.parse(item.celldata);
           if (item.config && typeof item.config == 'string')
             item.config = JSON.parse(item.config);
+          if (item?.name == 'PSR') item.hide = 0;
         });
         renderSheet(jsonData, data.is_edit, data.day);
       } else {
@@ -479,6 +479,7 @@ const PSRDetail = () => {
       }
 
       data.map((item) => {
+        if (item.name == 'PSR') item.hide = 0;
         if (data_type == 2) item.hide = 0;
         if (item.celldata && typeof item.celldata == 'string')
           item.celldata = JSON.parse(item.celldata);
@@ -557,7 +558,7 @@ const PSRDetail = () => {
       psr_json_data: JSON.stringify(allData),
       ver_type: excelData?.ver_type,
     };
-    console.log(params);
+    console.log(params, allData);
     runSave(params);
   };
 
@@ -850,6 +851,7 @@ const PSRDetail = () => {
       setNoData(true);
       return;
     }
+    console.log('------------currentData------', currentData);
     setNoData(false);
     if (!luckysheetRef.current) {
       setTimeout(() => {