Browse Source

所有通过spreadjs_zh.initSheet配置的sjs表格,默认复制时,跳过隐藏行

MaiXinRong 2 years ago
parent
commit
c95c327898
2 changed files with 6 additions and 6 deletions
  1. 6 0
      app/public/js/spreadjs_rela/spreadjs_zh.js
  2. 0 6
      app/public/js/stage_bwtz.js

+ 6 - 0
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -406,6 +406,7 @@ const SpreadJsObj = {
             SpreadJsObj.selChangedRefreshBackColor(sheet);
         }
         this.endMassOperation(sheet);
+        if (!setting.invalidCopyFilterHiddenRow) this.copyFilterHiddenRow(sheet);
     },
     reLoadSheetHeader: function (sheet) {
         if (sheet.zh_setting) {
@@ -993,6 +994,11 @@ const SpreadJsObj = {
         }
         return result;
     },
+    copyFilterHiddenRow: function (sheet) {
+        sheet.bind(spreadNS.Events.ClipboardChanged, function (e, info) {
+            SpreadJsObj.Clipboard.setSysClipboard(SpreadJsObj.getFilterCopyText(info.sheet));
+        });
+    },
     /**
      * 树表结构,定位至指定的节点
      * @param {GC.Spread.Sheets.Worksheet} sheet - 需要定位的sheet

+ 0 - 6
app/public/js/stage_bwtz.js

@@ -90,12 +90,6 @@ $(document).ready(() => {
     xmjSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
         unitTreeObj.loadCurUnitData();
     });
-    xmjSpread.bind(spreadNS.Events.ClipboardChanged, function (e, info) {
-        SpreadJsObj.Clipboard.setSysClipboard(SpreadJsObj.getFilterCopyText(info.sheet));
-    });
-    unitSpread.bind(spreadNS.Events.ClipboardChanged, function (e, info) {
-        SpreadJsObj.Clipboard.setSysClipboard(SpreadJsObj.getFilterCopyText(info.sheet));
-    });
     const loadData = function (dataType) {
         postData(window.location.pathname + '/load', {filter: dataType}, function (result) {
             const setting = {