|
|
@ -68,6 +68,7 @@ export function useCustomCellBuilder() { |
|
|
|
id: string, |
|
|
|
id: string, |
|
|
|
type: string, |
|
|
|
type: string, |
|
|
|
taskName: string, |
|
|
|
taskName: string, |
|
|
|
|
|
|
|
flag: string, |
|
|
|
coordinate: Coordinate = { x: 100, y: 100 } |
|
|
|
coordinate: Coordinate = { x: 100, y: 100 } |
|
|
|
): Node.Metadata { |
|
|
|
): Node.Metadata { |
|
|
|
const truncation = taskName ? utils.truncateText(taskName, 18) : id |
|
|
|
const truncation = taskName ? utils.truncateText(taskName, 18) : id |
|
|
@ -78,7 +79,8 @@ export function useCustomCellBuilder() { |
|
|
|
y: coordinate.y, |
|
|
|
y: coordinate.y, |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
taskType: type, |
|
|
|
taskType: type, |
|
|
|
taskName: taskName || id |
|
|
|
taskName: taskName || id, |
|
|
|
|
|
|
|
flag: flag |
|
|
|
}, |
|
|
|
}, |
|
|
|
attrs: { |
|
|
|
attrs: { |
|
|
|
image: { |
|
|
|
image: { |
|
|
@ -87,6 +89,9 @@ export function useCustomCellBuilder() { |
|
|
|
}, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
text: truncation |
|
|
|
text: truncation |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
rect: { |
|
|
|
|
|
|
|
fill: flag === 'NO' ? '#f3f3f5' : '#ffffff' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -108,10 +113,16 @@ export function useCustomCellBuilder() { |
|
|
|
|
|
|
|
|
|
|
|
tasks.forEach((task) => { |
|
|
|
tasks.forEach((task) => { |
|
|
|
const location = locations.find((l) => l.taskCode === task.code) || {} |
|
|
|
const location = locations.find((l) => l.taskCode === task.code) || {} |
|
|
|
const node = buildNode(task.code + '', task.taskType, task.name, { |
|
|
|
const node = buildNode( |
|
|
|
|
|
|
|
task.code + '', |
|
|
|
|
|
|
|
task.taskType, |
|
|
|
|
|
|
|
task.name, |
|
|
|
|
|
|
|
task.flag, |
|
|
|
|
|
|
|
{ |
|
|
|
x: location.x, |
|
|
|
x: location.x, |
|
|
|
y: location.y |
|
|
|
y: location.y |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
nodes.push(node) |
|
|
|
nodes.push(node) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|