瀏覽代碼

台账修订,升级节点相关

MaiXinRong 1 年之前
父節點
當前提交
0aa418d2a5
共有 2 個文件被更改,包括 26 次插入16 次删除
  1. 15 15
      app/public/js/revise.js
  2. 11 1
      db_script/test_query.js

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

@@ -399,21 +399,21 @@ $(document).ready(() => {
                         return;
                     }
                 }
-            } else if (type === 'up-level') {
-                const parent = tree.getParent(node);
-                const children = parent ? parent.children : tree.children;
-                const index = children.indexOf(node);
-                for (let i = index; i < children.length; i++) {
-                    const child = children[index];
-                    if (tree.checkNodeUsed(child, pos)) {
-                        if (i >= index + count) {
-                            toastr.warning('其后节点已计量,选中的节点不可升级');
-                        } else {
-                            toastr.warning('选中的节点已计量,不可升级');
-                        }
-                        return;
-                    }
-                }
+            // } else if (type === 'up-level') {
+            //     const parent = tree.getParent(node);
+            //     const children = parent ? parent.children : tree.children;
+            //     const index = children.indexOf(node);
+            //     for (let i = index; i < children.length; i++) {
+            //         const child = children[index];
+            //         if (tree.checkNodeUsed(child, pos)) {
+            //             if (i >= index + count) {
+            //                 toastr.warning('其后节点已计量,选中的节点不可升级');
+            //             } else {
+            //                 toastr.warning('选中的节点已计量,不可升级');
+            //             }
+            //             return;
+            //         }
+            //     }
             } else if (type === 'down-level') {
                 const parent = tree.getParent(node);
                 const children = parent ? parent.children : tree.children;

+ 11 - 1
db_script/test_query.js

@@ -19,8 +19,18 @@ const loadReportArchiveData = async function() {
         ra.content = ra.content ? JSON.parse(ra.content) : [];
         console.log(BaseUtil.getFileName('rptArchive.json'));
         await saveJSON(ra, BaseUtil.getFileName('rptArchive.json'));
+
+        const roleContent = [];
+        for (const c of ra.content) {
+            console.log(c.rpt_id, stage[0].id);
+            const rptRole = await querySql('SELECT * FROM zh_role_rpt_rel WHERE sid = ? and rpt_id = ?', [stage[0].id, c.rpt_id]);
+            if (rptRole.length > 0) {
+                if (rptRole[0].rel_content) roleContent.push(JSON.stringify(rptRole[0].rel_content));
+            }
+        }
+        await saveJSON(roleContent, BaseUtil.getFileName('roleContent.json'));
     }
-    const rptSign = await querySql('SELECT* FROM zh_rpt_archive_encryption where stage_id = ?', [stage[0].id]);
+    const rptSign = await querySql('SELECT * FROM zh_rpt_archive_encryption where stage_id = ?', [stage[0].id]);
     for (const rs of rptSign) {
         rs.content = rs.content ? JSON.parse(rs.content) : [];
         console.log(BaseUtil.getFileName('rptSign.json'));