|
@@ -102,12 +102,6 @@ var dbController = {
|
|
|
nextSectionInfo[nullNextSectionInfo] = lastSelNode.getID();
|
|
|
}
|
|
|
getNextSibling(lastSelNode);
|
|
|
- let updateC = {
|
|
|
- ID: nextSiblingIds,
|
|
|
- ParentID: node.getID(),
|
|
|
- sectionInfo: nextSectionInfo,
|
|
|
- type: 'nextSiblingNode'
|
|
|
- };
|
|
|
updateData.push({
|
|
|
ID: nextSiblingIds,
|
|
|
ParentID: lastSelNode.getID(),
|
|
@@ -147,20 +141,14 @@ var dbController = {
|
|
|
}
|
|
|
}
|
|
|
//更新选中节点
|
|
|
+ console.log(selNodes);
|
|
|
for(let i = 0; i < selNodes.length; i++){
|
|
|
let selNode = selNodes[i];
|
|
|
let oprSectionInfo = tools.getSectionInfo(firstParent);
|
|
|
- let updateA = {
|
|
|
- ID: node.getID(),
|
|
|
- ParentID: node.parent.getParentID(),
|
|
|
- NextSiblingID: node.parent.getNextSiblingID(),
|
|
|
- sectionInfo: oprSectionInfo,
|
|
|
- type: 'oprNode'
|
|
|
- };
|
|
|
updateData.push({
|
|
|
ID: selNode.getID(),
|
|
|
ParentID: firstParent.getParentID(),
|
|
|
- NextSiblingID: firstParent.getNextSiblingID(),
|
|
|
+ NextSiblingID: i === selNodes.length - 1 ? firstParent.getNextSiblingID() : selNode.getNextSiblingID(),
|
|
|
sectionInfo: oprSectionInfo,
|
|
|
type: 'oprNode'
|
|
|
});
|
|
@@ -186,7 +174,7 @@ var dbController = {
|
|
|
}
|
|
|
}
|
|
|
if(oprChildIds.length > 0){
|
|
|
- updateData.push({ID: oprChildIds, ParentID: node.getID(), sectionInfo: oprChildSectionInfo, type: 'nextSiblingNode'});
|
|
|
+ updateData.push({ID: oprChildIds, ParentID: selNode.getID(), sectionInfo: oprChildSectionInfo, type: 'nextSiblingNode'});
|
|
|
}
|
|
|
}
|
|
|
}
|