Browse Source

切换tab显示附件信息隐藏

laiguoran 5 years ago
parent
commit
2eeec21d0c
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/public/js/stage.js

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

@@ -810,8 +810,11 @@ $(document).ready(() => {
             if (node) {
                 const posData = stagePos.ledgerPos[itemsPre + node.id] || [];
                 SpreadJsObj.loadSheetData(spSpread.getActiveSheet(), 'data', posData);
-                console.log(node.id);
                 getNodeList(node.id);
+                // 如果是附件是当前节点,隐藏
+                if ($('#dqjiedian').hasClass('active')) {
+                    $('#showAttachment').hide();
+                }
             } else {
                 SpreadJsObj.loadSheetData(spSpread.getActiveSheet(), 'data', []);
             }
@@ -1251,6 +1254,7 @@ $(document).ready(() => {
         } else {
             $('#showPage').show();
         }
+        $('#showAttachment').hide();
     });
     // 上传附件
     $('#upload-file-btn').click(function () {
@@ -1440,8 +1444,10 @@ $(document).ready(() => {
         const status = $(this).attr('content');
         if (status === 'pre' && lastPageNum > 1) {
             getAllList(parseInt(lastPageNum)-1);
+            $('#showAttachment').hide();
         } else if (status === 'next' && lastPageNum < totalPageNum) {
             getAllList(parseInt(lastPageNum)+1);
+            $('#showAttachment').hide();
         }
     });
     // 显示层次