Selaa lähdekoodia

初始化资料归集相关

MaiXinRong 1 vuosi sitten
vanhempi
commit
985de8fd79
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app/service/filing.js

+ 1 - 1
app/service/filing.js

@@ -54,7 +54,7 @@ module.exports = app => {
             const insertData = [];
             for (const f of templateFiling) {
                 f.newId = this.uuid.v4();
-                const parent = f.tree_pid === rootId ? templateFiling.find(x => { x.id === f.tree_pid; }) : null;
+                const parent = f.tree_pid !== rootId ? templateFiling.find(x => { return x.id === f.tree_pid; }) : null;
                 const newData = {
                     id: f.newId, tree_pid : parent ? parent.newId : rootId, tree_level: f.tree_level, tree_order: f.tree_order,
                     spid, add_user_id: this.ctx.session.sessionUser.accountId, is_fixed: f.tree_level === 1,