Browse Source

复制整块相关

MaiXinRong 5 years ago
parent
commit
6d90fd522e
2 changed files with 5 additions and 3 deletions
  1. 1 1
      app/public/js/ledger.js
  2. 4 2
      app/public/js/revise.js

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

@@ -1194,7 +1194,7 @@ $(document).ready(function() {
                 copyBlockList.push(sheet.zh_tree.getDefaultData(posterity));
             }
             for (const cbl of copyBlockList) {
-                for (b of cbl) {
+                for (const b of cbl) {
                     const posRange = pos.getLedgerPos(b.id);
                     if (posRange && posRange.length > 0) b.pos = posRange;
                 }

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

@@ -1032,8 +1032,10 @@ $(document).ready(() => {
                 copyBlockList.push(sheet.zh_tree.getDefaultData(posterity));
             }
             for (const cbl of copyBlockList) {
-                const posRange = pos.getLedgerPos(cbl.id);
-                if (posRange && posRange.length > 0) cbl.pos = posRange;
+                for (const b of cbl) {
+                    const posRange = pos.getLedgerPos(b.id);
+                    if (posRange && posRange.length > 0) b.pos = posRange;
+                }
             }
             setLocalCache(copyBlockTag, JSON.stringify({ block: copyBlockList }));
         },