feat(junction): expose stage1 structure and standards panel
This commit is contained in:
1 parent
0f804b71d1
commit
fc7fe81eff
15 files changed
+434
-17
No files matched your search
@@ -170,6 +170,8 @@ export function JunctionWorkspace({
|
||||
() => (state ? junctionFacilities(state, descriptor.nodeIds, roads) : []),
|
||||
[descriptor.nodeIds, roads, state],
|
||||
);
|
||||
const structure = state?.junctionStructure;
|
||||
const standardDiagnostics = state?.standardsDiagnostics || [];
|
||||
return (
|
||||
<section className="junction-workspace" aria-label="路口编辑工作区">
|
||||
<header className="junction-workspace__header">
|
||||
@@ -217,6 +219,39 @@ export function JunctionWorkspace({
|
||||
</dd>
|
||||
</dl>
|
||||
<section className="junction-workspace__validation" aria-label="路口验证">
|
||||
{structure ? (
|
||||
<section className="junction-workspace__standards" aria-label="结构与标准">
|
||||
<h3>结构与标准</h3>
|
||||
<p>
|
||||
{state?.standardsProfile?.label || '项目默认标准'} · {structure.shape.label} ·{' '}
|
||||
{structure.shape.effectiveArmCount} 条有效道路臂
|
||||
</p>
|
||||
<dl>
|
||||
<dt>道路臂</dt>
|
||||
<dd>{structure.arms.map((arm) => arm.label).join('、') || '无'}</dd>
|
||||
<dt>角部</dt>
|
||||
<dd>{structure.corners.length ? structure.corners.map((corner) => corner.label).join('、') : '无'}</dd>
|
||||
<dt>设施</dt>
|
||||
<dd>
|
||||
{structure.facilities.length
|
||||
? structure.facilities.map((facility) => facility.label).join('、')
|
||||
: '无'}
|
||||
</dd>
|
||||
</dl>
|
||||
{standardDiagnostics.length ? (
|
||||
<ul aria-label="标准诊断">
|
||||
{standardDiagnostics.map((item) => (
|
||||
<li key={item.id} className={item.severity === 'blocking' ? 'blocking' : undefined}>
|
||||
<strong>
|
||||
{item.severity === 'pass' ? '通过' : item.severity === 'warning' ? '警告' : '阻塞'}
|
||||
</strong>{' '}
|
||||
{item.message}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
</section>
|
||||
) : null}
|
||||
{candidate || complexEnabled ? (
|
||||
<div className="junction-workspace__candidate" aria-label="复杂路口候选信息">
|
||||
<strong>{complexEnabled ? '当前复杂路口组成' : '附近可合并节点'}</strong>
|
||||
|
||||
Reference in new issue
Block a user