ソースを参照

部位台账复制数据调整

MaiXinRong 2 年 前
コミット
275a58e159

+ 4 - 4
app/public/js/ledger.js

@@ -1070,16 +1070,16 @@ $(document).ready(function() {
     ledgerSpread.bind(spreadNS.Events.SelectionChanged, treeOperationObj.selectionChanged);
     ledgerSpread.bind(spreadNS.Events.TopRowChanged, treeOperationObj.topRowChanged);
 
+    ledgerSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
+        const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
+        SpreadJsObj.Clipboard.setCopyData(copyText);
+    });
     if (!ledgerSpreadSetting.readOnly) {
         ledgerSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
             treeOperationObj.refreshOperationValid(info.sheet, info.newSelections);
         });
         ledgerSpread.bind(spreadNS.Events.EditEnded, treeOperationObj.editEnded);
         SpreadJsObj.addDeleteBind(ledgerSpread, treeOperationObj.deletePress);
-        ledgerSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
-            const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
-            SpreadJsObj.Clipboard.setCopyData(copyText);
-        });
         ledgerSpread.bind(spreadNS.Events.ClipboardPasting, treeOperationObj.clipboardPasting);
         ledgerSpread.bind(spreadNS.Events.EditStarting, treeOperationObj.editStarting);
         SpreadJsObj.addCutEvents(ledgerSpread, treeOperationObj.cut);

+ 4 - 4
app/public/js/revise.js

@@ -1027,13 +1027,13 @@ $(document).ready(() => {
         billsSpread.bind(spreadNS.Events.EditStarting, billsTreeSpreadObj.editStarting);
         billsSpread.bind(spreadNS.Events.EditEnded, billsTreeSpreadObj.editEnded);
         billsSpread.bind(spreadNS.Events.ClipboardPasting, billsTreeSpreadObj.clipboardPasting);
-        billsSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
-            const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
-            SpreadJsObj.Clipboard.setCopyData(copyText);
-        });
         SpreadJsObj.addDeleteBind(billsSpread, billsTreeSpreadObj.deletePress);
         SpreadJsObj.addCutEvents(billsSpread, billsTreeSpreadObj.cut);
     }
+    billsSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
+        const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
+        SpreadJsObj.Clipboard.setCopyData(copyText);
+    });
     // 右键菜单
     let batchInsertObj;
     $.contextMenu.types.batchInsert = function (item, opt, root) {

+ 7 - 0
app/public/js/stage.js

@@ -1503,6 +1503,13 @@ $(document).ready(() => {
             return target.hitTestType === spreadNS.SheetArea.viewport || target.hitTestType === spreadNS.SheetArea.rowHeader;
         },
         items: {
+            copyDisplay: {
+                name: '仅复制可见数据',
+                callback: function (key, opt) {
+
+                }
+            },
+            copySpr: '----',
             'locateZjjl': {
                 name: '定位至中间计量',
                 icon: 'fa-sign-in',

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

@@ -93,6 +93,14 @@ $(document).ready(() => {
     unitSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
         console.log(SpreadJsObj.getSelectObject(info.sheet));
     });
+    xmjSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
+        const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
+        SpreadJsObj.Clipboard.setCopyData(copyText);
+    });
+    unitSpread.bind(spreadNS.Events.ClipboardChanging, function (e, info) {
+        const copyText = SpreadJsObj.getFilterCopyText(info.sheet);
+        SpreadJsObj.Clipboard.setCopyData(copyText);
+    });
     const loadData = function (dataType) {
         postData(window.location.pathname + '/load', {filter: dataType}, function (result) {
             const setting = {