Browse Source

专家客户端:
去除方案优选-评估数据收集页;
需求分析评估-多文件导出;

chengxr 1 year ago
parent
commit
a86e3edde0
3 changed files with 17 additions and 52 deletions
  1. 2 8
      ExpertClient/EXDataTableView.cpp
  2. 1 1
      ExpertClient/EXDataTableView.h
  3. 14 43
      ExpertClient/EXDataView.cpp

+ 2 - 8
ExpertClient/EXDataTableView.cpp

@@ -228,15 +228,9 @@ CMind *EXDataTableView::mind2() const
     return m_mind2;
 }
 
-void EXDataTableView::exportData()
+void EXDataTableView::exportData(const QString &path)
 {
-    //文件夹路径
-    QFileDialog::Options options;
-    options |= QFileDialog::DontUseNativeDialog;
-    QString filePath = QFileDialog::getExistingDirectory(nullptr, "导出资源包", "/", options);
-    if (filePath.isEmpty()) {
-        return;
-    }
+    QString filePath = path;
     QString fileName = m_user->userName + "-"
             + ProjectManager::nameOfIndexType((ProjectManager::IndexType)m_process.indexType) + "-"
             + m_proj->projectName;

+ 1 - 1
ExpertClient/EXDataTableView.h

@@ -71,7 +71,7 @@ public:
     CMind *mind1() const;
     CMind *mind2() const;
 
-    void exportData();
+    void exportData(const QString &path);
 
 private:
     void editItemData(const QModelIndex &index, const QString &val);

+ 14 - 43
ExpertClient/EXDataView.cpp

@@ -14,6 +14,7 @@
 #include <QTabWidget>
 #include <QBoxLayout>
 #include <QMap>
+#include <QFileDialog>
 
 #include <QDebug>
 
@@ -58,42 +59,12 @@ void EXDataView::setupTabWidget()
         ProjectManager::IndexType t = (ProjectManager::IndexType)i;
         QString indexName           = ProjectManager::nameOfIndexType(t);
 
-        // 效能评估方案中导入评估数据的步骤, 选择物元分析法时使用
-        SchemePlanManager::SchemeProcessInfo importEffiEvalDataProcess;
-
         for (SchemePlanManager::SchemeProcessInfo process : processList) {
-            //            // 综合效能评估 - 灰色聚类法: 效能等级配置页面, 导入评估数据页面
-            //            if (process.algorithm == SchemePlanManager::GCE && process.indexType ==
-            //            ProjectManager::EfficiencyIndex) {
-            //                GreyClusteringConfigWidget *gc = new GreyClusteringConfigWidget(process.efficiencyGrades);
-            //                m_tab->addTab(gc, indexName + " - " + "灰色聚类法效能等级配置");
-
-            //                QVector<GreyClusteringItem> items;
-            //                GreyClusteringSampleTable *gs = new GreyClusteringSampleTable(items, 2, 10);
-            //                m_tab->addTab(gs, indexName + " - " + "收集效能评估数据");
-            //            }
-
-            //            // 综合效能评估 - 物元分析法: 效能等级配置页面, 导入评估数据页面
-            //            if (process.algorithm == SchemePlanManager::MEA && process.indexType ==
-            //            ProjectManager::EfficiencyIndex) {
-            //                QList<MEConfigItem> items;
-            //                CMind *mind = new CMind();
-            //                mind->setNodeList(nodeListMap[i]);
-            //                MatterElementConfigWidget *mec = new MatterElementConfigWidget(mind,
-            //                process.efficiencyGrades); m_tab->addTab(mec, indexName + "-" + "物元分析法效能等级配置");
-
-            //                DataTableWidget *table = new DataTableWidget(importEffiEvalDataProcess, this);
-            //                table->mind1()->setNodeList(nodeListMap[i]);
-            //                table->setCurrentPage(1);
-            //                m_tab->addTab(table, indexName + " - " + "收集效能评估数据");
-            //            }
-
             // 导入效能评估的权重分析数据
             // 导入其他评估的权重分析数据和评估数据
             if (process.dSource == SchemePlanManager::FromExpert) {
                 if (process.type == SchemePlanManager::ImportEvalData
-                    && process.indexType == ProjectManager::EfficiencyIndex) {
-                    importEffiEvalDataProcess = process;
+                    && process.indexType != ProjectManager::TechIndex) {
                     continue;
                 }
 
@@ -103,7 +74,6 @@ void EXDataView::setupTabWidget()
                 if (i == ProjectManager::TechIndex) {
                     table->mind2()->setNodeList(nodeListMap[ProjectManager::AbilityIndex]);
                 }
-                //                table->setCurrentPage(1);
                 table->setupModels();
 
                 QString processName = SchemePlanManager::processName(process);
@@ -117,18 +87,19 @@ void EXDataView::slotTabCurrentChanged(int index) { }
 
 void EXDataView::slotExportData()
 {
-    EXDataTableView *table = dynamic_cast<EXDataTableView *>(m_tab->currentWidget());
-    if (table == nullptr) {
+    //文件夹路径
+    QFileDialog::Options options;
+    options |= QFileDialog::DontUseNativeDialog;
+    QString filePath = QFileDialog::getExistingDirectory(nullptr, "导出资源包", "/", options);
+    if (filePath.isEmpty()) {
         return;
     }
 
-    table->exportData();
-
-    SchemePlanManager::SchemeProcessInfo process = table->process();
-    qDebug() << __FUNCTION__ << __LINE__
-             << ProjectManager::nameOfIndexType((ProjectManager::IndexType)process.indexType) << endl;
-
-    QList<NodeMatrixInfo *> values;
-    NodeMatrixService().QueryNodeMatrixListByExpertIdAndEngineerId2(&values, 62, 110,
-                                                                    QString("%1").arg(process.indexType));
+    for (int i = 0; i < m_tab->count(); i++) {
+        EXDataTableView *table                       = (EXDataTableView *)m_tab->widget(i);
+        SchemePlanManager::SchemeProcessInfo process = table->process();
+        qDebug() << __FUNCTION__ << __LINE__ << "导出"
+                 << ProjectManager::nameOfIndexType((ProjectManager::IndexType)process.indexType) << endl;
+        table->exportData(filePath);
+    }
 }