|
@@ -707,8 +707,8 @@ module.exports = app => {
|
|
|
}
|
|
|
const contractSelects = selects.filter(x => x.c_code);
|
|
|
const treeSelects = selects.filter(x => !x.c_code);
|
|
|
- updateData = updateData.concat(await this.getDataById(treeSelects.map(x => { return x.id; })));
|
|
|
- updateData = updateData.concat(await this.ctx.service.contract.getDataById(contractSelects.map(x => { return x.id; })));
|
|
|
+ if (treeSelects.length > 0) updateData = updateData.concat(await this.getDataById(treeSelects.map(x => { return x.id; })));
|
|
|
+ if (contractSelects.length > 0) updateData = updateData.concat(await this.ctx.service.contract.getDataById(contractSelects.map(x => { return x.id; })));
|
|
|
// 选中节点--原前兄弟节点&全部后兄弟节点
|
|
|
return { update: updateData };
|
|
|
}
|