Prechádzať zdrojové kódy

资料归集,管理页面,移动问题

MaiXinRong 3 mesiacov pred
rodič
commit
4072b6b97c
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/service/filing.js

+ 1 - 1
app/service/filing.js

@@ -242,7 +242,7 @@ module.exports = app => {
             if (!filing) throw '移动的分类不存在,请刷新页面后重试';
             if (!filing) throw '移动的分类不存在,请刷新页面后重试';
             const parent = await this.getDataById(data.tree_pid);
             const parent = await this.getDataById(data.tree_pid);
             if (!parent && filing.tree_pid !== data.tree_pid) throw '移动后的分类不存在,请刷新页面后重试';
             if (!parent && filing.tree_pid !== data.tree_pid) throw '移动后的分类不存在,请刷新页面后重试';
-            const sibling = await this.getAllDataByCondition({ where: { tree_pid: data.tree_pid, is_deleted: 0 } });
+            const sibling = await this.getAllDataByCondition({ where: { spid: filing.spid, tree_pid: data.tree_pid, is_deleted: 0 } });
             const posterity = await this.getPosterityData(filing.id);
             const posterity = await this.getPosterityData(filing.id);
             const updateData = { id: filing.id, tree_order: data.tree_order, tree_pid: data.tree_pid, tree_level: (parent ? parent.tree_level : 0) + 1 };
             const updateData = { id: filing.id, tree_order: data.tree_order, tree_pid: data.tree_pid, tree_level: (parent ? parent.tree_level : 0) + 1 };
             const posterityUpdateData = posterity.map(x => {
             const posterityUpdateData = posterity.map(x => {