|
@@ -29,6 +29,7 @@ static std::shared_ptr<NodeDelegateModelRegistry> registerDataModels()
|
|
|
ret->registerModel<FlowEffiLevDataModel>();
|
|
|
ret->registerModel<FlowSchemeDataModel>();
|
|
|
ret->registerModel<FlowEffiDataModel>();
|
|
|
+ ret->registerModel<FlowCommonDataModel>();
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
@@ -133,42 +134,70 @@ void SchemeFlowWidget::refresh()
|
|
|
{
|
|
|
clearAllNodes();
|
|
|
|
|
|
- qreal h = 120;
|
|
|
+ qreal h = 200;
|
|
|
|
|
|
switch (m_indexType) {
|
|
|
case ProjectManager::AbilityIndex:
|
|
|
+ break;
|
|
|
case ProjectManager::TechIndex: {
|
|
|
- NodeId id1 = m_graphModel->addNode(FlowIndexData().type().id);
|
|
|
+ NodeId id11 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
+ m_graphModel->setNodeData(id11, NodeRole::Position, QPointF(0, h * 0));
|
|
|
+ FlowGraphCommonNodeWidget *w11 = new FlowGraphCommonNodeWidget();
|
|
|
+ SchemePlanManager::SchemeProcessInfo process11;
|
|
|
+ process11.indexType = m_indexType;
|
|
|
+ process11.type = SchemePlanManager::IndexSystem;
|
|
|
+ w11->setProcess(process11);
|
|
|
+ m_graphModel->setNodeData(id11, NodeRole::Widget, QVariant::fromValue(w11));
|
|
|
+
|
|
|
+ NodeId id12 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
+ m_graphModel->setNodeData(id12, NodeRole::Position, QPointF(0, h * 1));
|
|
|
+ FlowGraphCommonNodeWidget *w12 = new FlowGraphCommonNodeWidget();
|
|
|
+ SchemePlanManager::SchemeProcessInfo process12;
|
|
|
+ process12.indexType = m_indexType;
|
|
|
+ process12.type = SchemePlanManager::ImportEvalData;
|
|
|
+ process12.dSource = SchemePlanManager::FromExpert;
|
|
|
+ w12->setProcess(process12);
|
|
|
+ if (w12->isTitleHidden()) {
|
|
|
+ m_graphModel->setNodeData(id12, NodeRole::Caption, SchemePlanManager::processName(process12));
|
|
|
+ }
|
|
|
+ m_graphModel->setNodeData(id12, NodeRole::Widget, QVariant::fromValue(w12));
|
|
|
+
|
|
|
+ m_graphModel->addConnection(ConnectionId { id11, 0, id12, 0 });
|
|
|
+
|
|
|
+ break;
|
|
|
+
|
|
|
+ NodeId id1 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id1, NodeRole::Position, QPointF(0, h * 0));
|
|
|
- FlowGraphPlainNodeWidget *w = new FlowGraphPlainNodeWidget();
|
|
|
- w->setText("构建权重分析指标体系");
|
|
|
- m_graphModel->setNodeData(id1, NodeRole::Widget, QVariant::fromValue(w));
|
|
|
+ FlowGraphPlainNodeWidget *w1 = new FlowGraphPlainNodeWidget();
|
|
|
+ w1->setText("构建权重分析指标体系");
|
|
|
+ m_graphModel->setNodeData(id1, NodeRole::Widget, QVariant::fromValue(w1));
|
|
|
|
|
|
- NodeId id2 = m_graphModel->addNode(FlowSampleData().type().id);
|
|
|
+ NodeId id2 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id2, NodeRole::Position, QPointF(0, h * 1));
|
|
|
m_graphModel->setNodeData(id2, NodeRole::Caption, QString("收集权重分析数据"));
|
|
|
m_graphModel->addConnection(ConnectionId { id1, 0, id2, 0 });
|
|
|
|
|
|
- NodeId id3 = m_graphModel->addNode(FlowPCAData().type().id);
|
|
|
+ NodeId id3 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id3, NodeRole::Position, QPointF(0, h * 2));
|
|
|
m_graphModel->setNodeData(id3, NodeRole::Caption, QString("指标体系优化"));
|
|
|
m_graphModel->addConnection(ConnectionId { id2, 0, id3, 0 });
|
|
|
|
|
|
- NodeId id4 = m_graphModel->addNode(FlowWeightData().type().id);
|
|
|
+ NodeId id4 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id4, NodeRole::Position, QPointF(0, h * 3));
|
|
|
m_graphModel->setNodeData(id4, NodeRole::Caption, QString("指标权重计算"));
|
|
|
m_graphModel->addConnection(ConnectionId { id3, 0, id4, 0 });
|
|
|
|
|
|
- NodeId id5 = m_graphModel->addNode(FlowResultData().type().id);
|
|
|
+ NodeId id5 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id5, NodeRole::Position, QPointF(0, h * 4));
|
|
|
- m_graphModel->setNodeData(id5, NodeRole::Caption, QString("分析结果展示"));
|
|
|
+ FlowGraphPlainNodeWidget *w5 = new FlowGraphPlainNodeWidget();
|
|
|
+ w5->setText("分析结果展示");
|
|
|
+ m_graphModel->setNodeData(id5, NodeRole::Widget, QVariant::fromValue(w5));
|
|
|
m_graphModel->addConnection(ConnectionId { id4, 0, id5, 0 });
|
|
|
|
|
|
- NodeId id6 = m_graphModel->addNode(FlowReportData().type().id);
|
|
|
+ NodeId id6 = m_graphModel->addNode(FlowCommonData().type().id);
|
|
|
m_graphModel->setNodeData(id6, NodeRole::Position, QPointF(0, h * 5));
|
|
|
m_graphModel->setNodeData(id6, NodeRole::Caption, QString("生成分析评估报告"));
|
|
|
m_graphModel->addConnection(ConnectionId { id5, 0, id6, 0 });
|
|
|
- qDebug() << __FUNCTION__ << __LINE__ << id1 << id2 << id3 << id4 << id5 << id6 << endl;
|
|
|
break;
|
|
|
}
|
|
|
case ProjectManager::OptimalIndex: {
|
|
@@ -191,7 +220,6 @@ void SchemeFlowWidget::refresh()
|
|
|
m_graphModel->setNodeData(id6, NodeRole::Position, QPointF(0, h * 4));
|
|
|
m_graphModel->addConnection(ConnectionId { id5, 0, id6, 0 });
|
|
|
|
|
|
- qDebug() << __FUNCTION__ << __LINE__ << id1 << id2 << id8 << id5 << id6 << endl;
|
|
|
break;
|
|
|
}
|
|
|
case ProjectManager::EfficiencyIndex: {
|
|
@@ -213,13 +241,10 @@ void SchemeFlowWidget::refresh()
|
|
|
NodeId id6 = m_graphModel->addNode(FlowReportData().type().id);
|
|
|
m_graphModel->setNodeData(id6, NodeRole::Position, QPointF(0, h * 4));
|
|
|
m_graphModel->addConnection(ConnectionId { id5, 0, id6, 0 });
|
|
|
- qDebug() << __FUNCTION__ << __LINE__ << id1 << id7 << id9 << id5 << id6 << endl;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- std::unordered_set<NodeId> set = m_graphModel->allNodeIds();
|
|
|
- for (auto iter = set.begin(); iter != set.end(); ++iter) {
|
|
|
- qDebug() << __FUNCTION__ << __LINE__ << *iter << endl;
|
|
|
- }
|
|
|
+ // std::unordered_set<NodeId> set = m_graphModel->allNodeIds();
|
|
|
+ // for (auto iter = set.begin(); iter != set.end(); ++iter) { }
|
|
|
}
|