getWBSCode
Description
返回任务的 WBS 代码(大纲号)
getWBSCode: (task: Task) => string
Parameters
task- (必填) Task - 任务对象
Returns
wbs_code- (string) - 甘特图中任务的 WBS 代码
Example
gantt.init("gantt_here");
gantt.parse({
"data":[
{"id":1, "text":"Project #1", "start_date":"28-03-2013", "duration":"11",
"parent":"0", "open": true},
{"id":2, "text":"Task #1", "start_date":"01-04-2013", "duration":"18", "parent":"1"},
{"id":3, "text":"Task #2", "start_date":"02-04-2013", "duration":"8", "parent":"1"}
],
"links":[]
});
const wbs_code = gantt.getWBSCode(gantt.getTask(3)) // -> returns "1.2"
Related samples
Details
在版本4.2中新增
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.