|
@@ -1030,6 +1030,28 @@ export class ProjectDetail implements OnInit, OnDestroy {
|
|
const currentSec = this.getSectionKeyForStage(currentStage);
|
|
const currentSec = this.getSectionKeyForStage(currentStage);
|
|
this.expandedSection = currentSec;
|
|
this.expandedSection = currentSec;
|
|
console.log('展开板块:', currentSec);
|
|
console.log('展开板块:', currentSec);
|
|
|
|
+
|
|
|
|
+ // 新增:如果当前阶段是建模、软装或渲染,自动展开对应的折叠面板
|
|
|
|
+ if (currentStage === '建模' || currentStage === '软装' || currentStage === '渲染') {
|
|
|
|
+ const processTypeMap = {
|
|
|
|
+ '建模': 'modeling',
|
|
|
|
+ '软装': 'softDecor',
|
|
|
|
+ '渲染': 'rendering'
|
|
|
|
+ };
|
|
|
|
+ const processType = processTypeMap[currentStage] as 'modeling' | 'softDecor' | 'rendering';
|
|
|
|
+ const targetProcess = this.deliveryProcesses.find(p => p.type === processType);
|
|
|
|
+ if (targetProcess) {
|
|
|
|
+ // 展开对应的流程面板
|
|
|
|
+ targetProcess.isExpanded = true;
|
|
|
|
+ // 展开第一个空间以便用户操作
|
|
|
|
+ if (targetProcess.spaces.length > 0) {
|
|
|
|
+ targetProcess.spaces[0].isExpanded = true;
|
|
|
|
+ // 关闭其他空间
|
|
|
|
+ targetProcess.spaces.slice(1).forEach(space => space.isExpanded = false);
|
|
|
|
+ }
|
|
|
|
+ console.log('自动展开折叠面板:', currentStage, processType);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 整理项目详情
|
|
// 整理项目详情
|
|
@@ -1142,6 +1164,23 @@ export class ProjectDetail implements OnInit, OnDestroy {
|
|
// 更新板块展开状态
|
|
// 更新板块展开状态
|
|
const nextSection = this.getSectionKeyForStage(next);
|
|
const nextSection = this.getSectionKeyForStage(next);
|
|
this.expandedSection = nextSection;
|
|
this.expandedSection = nextSection;
|
|
|
|
+
|
|
|
|
+ // 新增:自动展开对应阶段的折叠面板
|
|
|
|
+ if (next === '软装' || next === '渲染') {
|
|
|
|
+ const processType = next === '软装' ? 'softDecor' : 'rendering';
|
|
|
|
+ const targetProcess = this.deliveryProcesses.find(p => p.type === processType);
|
|
|
|
+ if (targetProcess) {
|
|
|
|
+ // 展开对应的流程面板
|
|
|
|
+ targetProcess.isExpanded = true;
|
|
|
|
+ // 展开第一个空间以便用户操作
|
|
|
|
+ if (targetProcess.spaces.length > 0) {
|
|
|
|
+ targetProcess.spaces[0].isExpanded = true;
|
|
|
|
+ // 关闭其他空间
|
|
|
|
+ targetProcess.spaces.slice(1).forEach(space => space.isExpanded = false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
// 触发变更检测以更新导航栏颜色
|
|
// 触发变更检测以更新导航栏颜色
|
|
this.cdr.detectChanges();
|
|
this.cdr.detectChanges();
|
|
}
|
|
}
|