【发布时间】:2019-12-19 12:49:10
【问题描述】:
我正在构建 MS Project Web 插件。使用以下函数作为其他函数的基础,我可以检索task, id and resource name。
// Get the maximum task index, and then get the task GUIDs.
async getTasks(guids: string[]): Promise<any[]> {
return await Promise.all(
guids.map(async guid => await this.getTask(guid))
);
}
async getTaskGuids(maxIndex: number): Promise<string[]> {
const guids = [];
for (let i = 0; i <= maxIndex; i++) {
guids.push(await this.getTaskGuid(i));
}
return guids;
}
请看下面的缩进/子任务截图。
现在我需要确定任务是子任务还是缩进任务。识别这一点的最佳方法是什么。任何示例代码都非常有用。请帮忙
【问题讨论】:
标签: office-js office-addins ms-project