chengxr 1 year ago
parent
commit
a3ce9f238f

+ 1 - 1
QFD/widgets/ConfigMeasureDataWidget.cpp

@@ -71,5 +71,5 @@ void ConfigMeasureDataWidget::connectSignalsAndSlots()
 
 void ConfigMeasureDataWidget::slotAddDataClicked()
 {
-    qDebug() << __FUNCTION__ << __LINE__ << endl;
+    emit sigAddData();
 }

+ 2 - 0
QFD/widgets/ConfigMeasureDataWidget.h

@@ -22,6 +22,8 @@ public:
 
 signals:
 
+    void sigAddData();
+
 private:
     void initWidget();
     void initLayout();

+ 1 - 0
QFD/widgets/ConfigSchemeDataWidget.cpp

@@ -72,4 +72,5 @@ void ConfigSchemeDataWidget::connectSignalsAndSlots()
 void ConfigSchemeDataWidget::slotAddDataClicked()
 {
     qDebug() << __FUNCTION__ << __LINE__ << endl;
+    emit sigAddScheme();
 }

+ 2 - 0
QFD/widgets/ConfigSchemeDataWidget.h

@@ -21,6 +21,8 @@ public:
 
 signals:
 
+    void sigAddScheme();
+
 private:
     void initWidget();
     void initLayout();

+ 25 - 2
QFD/widgets/DataCollectionWidget.cpp

@@ -66,6 +66,8 @@ DataCollectionWidget::DataCollectionWidget(ProjectInfo *proj, QWidget *parent) :
     connect(m_configExpert, &ConfigExpertDataWidget::sigImportData, this, &DataCollectionWidget::slotImportData);
     connect(m_configExpert, &ConfigExpertDataWidget::sigConfigSelected, this,
             &DataCollectionWidget::slotConfigSelected);
+    connect(m_configScheme, &ConfigSchemeDataWidget::sigAddScheme, this, &DataCollectionWidget::slotAddScheme);
+    connect(m_configMeasure, &ConfigMeasureDataWidget::sigAddData, this, &DataCollectionWidget::slotAddData);
 }
 
 void DataCollectionWidget::setType(int type)
@@ -127,7 +129,7 @@ void DataCollectionWidget::setupTabWidget()
 
                 DataTableWidget *table = new DataTableWidget(importEffiEvalDataProcess, this);
                 table->mind1()->setNodeList(nodeListMap[i]);
-                //                table->setupModels();
+                table->setupModels();
                 m_tab->addTab(table, indexName + " - " + "收集效能评估数据");
             }
 
@@ -146,7 +148,7 @@ void DataCollectionWidget::setupTabWidget()
                 if (i == ProjectManager::TechIndex) {
                     table->mind2()->setNodeList(nodeListMap[ProjectManager::AbilityIndex]);
                 }
-                //                table->setupModels();
+                table->setupModels();
 
                 QString processName = SchemePlanManager::processName(process);
                 m_tab->addTab(table, indexName + " - " + processName);
@@ -191,6 +193,11 @@ void DataCollectionWidget::slotCalc()
     if (table == nullptr) {
         return;
     }
+
+    GreyClusteringConfigWidget *gc = dynamic_cast<GreyClusteringConfigWidget *>(m_tab->currentWidget());
+    if (gc != nullptr) {
+        qDebug() << __FUNCTION__ << __LINE__ << "gc" << endl;
+    }
 }
 
 void DataCollectionWidget::slotImportData(UserConfig *config)
@@ -343,3 +350,19 @@ void DataCollectionWidget::slotConfigSelected(UserConfig *config)
     qDebug() << __FUNCTION__ << __LINE__ << config->engineerId << config->userId << indexName << data.size() << endl;
     table->setData(data);
 }
+
+void DataCollectionWidget::slotAddScheme()
+{
+    DataTableWidget *table = (DataTableWidget *)m_tab->currentWidget();
+    QString indexName      = ProjectManager::nameOfIndexType((ProjectManager::IndexType)table->process().indexType);
+    QString processName    = SchemePlanManager::processName(table->process());
+    qDebug() << __FUNCTION__ << __LINE__ << indexName << processName << endl;
+}
+
+void DataCollectionWidget::slotAddData()
+{
+    DataTableWidget *table = (DataTableWidget *)m_tab->currentWidget();
+    QString indexName      = ProjectManager::nameOfIndexType((ProjectManager::IndexType)table->process().indexType);
+    QString processName    = SchemePlanManager::processName(table->process());
+    qDebug() << __FUNCTION__ << __LINE__ << indexName << processName << endl;
+}

+ 4 - 0
QFD/widgets/DataCollectionWidget.h

@@ -39,6 +39,10 @@ private slots:
 
     void slotConfigSelected(UserConfig *config);
 
+    void slotAddScheme();
+
+    void slotAddData();
+
 signals:
 
 private:

+ 5 - 0
QFD/widgets/DataTableWidget.cpp

@@ -146,6 +146,8 @@ void DataTableWidget::setupModels()
         }
         m_models[i] = modelList;
     }
+
+    setCurrentPage(1);
 }
 
 void DataTableWidget::setupTabWidget()
@@ -350,6 +352,9 @@ CMind *DataTableWidget::mind2() const
 void DataTableWidget::setData(QList<NodeMatrixInfo *> data)
 {
     m_data = data;
+    if (m_process.type == SchemePlanManager::ImportWeightData && m_process.dSource == SchemePlanManager::FromExpert) {
+        for (NodeMatrixInfo *info : data) { }
+    }
 }
 
 void DataTableWidget::updateModel(DataTableItemModel *model, QList<CNodeData> &hHeaders, QList<CNodeData> &vHeaders,