chengxr vor 1 Jahr
Ursprung
Commit
a63c387a13

+ 2 - 0
QFD/common/QFDIcon.cpp

@@ -21,6 +21,8 @@ QString QFDIcon::iconName(QFDIcon::IconType type)
         return "Open";
     case Project:
         return "Project";
+    case Project1:
+        return "Project1";
     case Schecme:
         return "Scheme";
     case User:

+ 1 - 0
QFD/common/QFDIcon.h

@@ -18,6 +18,7 @@ public:
         Minus,
         Open,
         Project,
+        Project1,
         Schecme,
         User,
     };

+ 2 - 0
QFD/resource.qrc

@@ -382,5 +382,7 @@
         <file>resource/svg/Filter_white.svg</file>
         <file>resource/svg/Open_black.svg</file>
         <file>resource/svg/Open_white.svg</file>
+        <file>resource/svg/Project1_black.svg</file>
+        <file>resource/svg/Project1_white.svg</file>
     </qresource>
 </RCC>

+ 1 - 0
QFD/resource/svg/Project1_black.svg

@@ -0,0 +1 @@
+<svg t="1699440957053" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4475" width="16" height="16"><path d="M951.9 323.4c-6.8-7.2-16.5-11.4-26.4-11.4h-56.6v-69.8c0-24.4-19.9-44.3-44.3-44.3H562.8l-18.7-59.5-0.6-1.4c-6.9-16.6-22.9-27.3-40.9-27.3H198.7c-24.4 0-44.3 19.9-44.3 44.3v158H100c-10 0-19.6 4.2-26.4 11.4-6.8 7.2-10.4 17.1-9.8 27.1l30.8 523.8c1.1 19.2 17.1 34.2 36.3 34.2H896c19.2 0 35.2-15.1 36.3-34.3L962 350.4c0.4-10-3.2-19.8-10.1-27zM224.4 179.6h259.3l18.7 59.5 0.6 1.4c6.9 16.6 22.9 27.3 40.9 27.3h255V312H224.4V179.6z m639.7 658.8H162.5L135.7 382h754.2l-25.8 456.4z" p-id="4476" fill="#000000"></path><path d="M353.8 537.3h312.1c19.3 0 35-15.7 35-35s-15.7-35-35-35H353.8c-19.3 0-35 15.7-35 35s15.7 35 35 35z" p-id="4477" fill="#000000"></path></svg>

+ 1 - 0
QFD/resource/svg/Project1_white.svg

@@ -0,0 +1 @@
+<svg t="1699440823412" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4272" width="16" height="16"><path d="M951.9 323.4c-6.8-7.2-16.5-11.4-26.4-11.4h-56.6v-69.8c0-24.4-19.9-44.3-44.3-44.3H562.8l-18.7-59.5-0.6-1.4c-6.9-16.6-22.9-27.3-40.9-27.3H198.7c-24.4 0-44.3 19.9-44.3 44.3v158H100c-10 0-19.6 4.2-26.4 11.4-6.8 7.2-10.4 17.1-9.8 27.1l30.8 523.8c1.1 19.2 17.1 34.2 36.3 34.2H896c19.2 0 35.2-15.1 36.3-34.3L962 350.4c0.4-10-3.2-19.8-10.1-27zM224.4 179.6h259.3l18.7 59.5 0.6 1.4c6.9 16.6 22.9 27.3 40.9 27.3h255V312H224.4V179.6z m639.7 658.8H162.5L135.7 382h754.2l-25.8 456.4z" p-id="4273" fill="#ffffff"></path><path d="M353.8 537.3h312.1c19.3 0 35-15.7 35-35s-15.7-35-35-35H353.8c-19.3 0-35 15.7-35 35s15.7 35 35 35z" p-id="4274" fill="#ffffff"></path></svg>

+ 1 - 1
QFD/view/MainWindow.cpp

@@ -259,7 +259,7 @@ void MainWindow::slotOpenProject(ProjectInfo *proj)
         m_stackWidget->addWidget(p);
 
         QString t = QString("打开项目-%1").arg(proj->projectName);
-        m_naviInterface->addItem(p->objectName(), NEWFLICON(QFDIcon, Project), t, this, SLOT(slotNaviItemClicked()),
+        m_naviInterface->addItem(p->objectName(), NEWFLICON(QFDIcon, Project1), t, this, SLOT(slotNaviItemClicked()),
                                  true, NavigationItemPosition::SCROLL);
         m_stackWidget->setCurrentWidget(p);
 

+ 5 - 0
QFD/widgets/DataCollectionWidget.cpp

@@ -135,4 +135,9 @@ void DataCollectionWidget::slotTabCurrentChanged(int index)
         }
         m_configMeasure->setVisible(meaure);
     }
+
+    if (table == nullptr) {
+        m_configExpert->setHidden(true);
+        m_configMeasure->setHidden(true);
+    }
 }

+ 6 - 10
QFD/widgets/DataTableWidget.cpp

@@ -103,7 +103,8 @@ void DataTableWidget::setCurrentPage(int p)
         return;
     }
     m_currentPage = p;
-
+    m_previous->setEnabled(p > 1);
+    m_next->setEnabled(p < m_mind1->levels() - 1);
     setupTabWidget();
 
     m_pageLab->setText(QString("共 %1 页, 当前第 %2 页").arg(m_mind1->levels() - 1).arg(p));
@@ -122,12 +123,10 @@ void DataTableWidget::updateCurrentTable()
     QStandardItemModel *model = (QStandardItemModel *)table->model();
 
     /// 设置顶部水平方向标题
-    int hIndex = -1;
-    //  导入评估数据时, 增加一列指标权重
-    if (m_process.type == SchemePlanManager::ImportEvalData) {
-        QStandardItem *item = new QStandardItem("指标权重");
-        model->setHorizontalHeaderItem(++hIndex, item);
-    }
+    int hIndex         = -1;
+    int dimensionIndex = -1;  // 量纲所在列
+    int typeIndex      = -1;  // 指标类型所在列
+
     // 指标
     CNodeData n            = m_mind1->nodesInLevel(m_currentPage)[c];
     QList<CNodeData> hList = m_mind1->subNodes(n);
@@ -142,7 +141,6 @@ void DataTableWidget::updateCurrentTable()
         }
     }
     // 导入方案优选评估或效能评估的评估数据时, 需要显示量纲
-    int dimensionIndex = -1;
     if (m_process.type == SchemePlanManager::ImportEvalData
         && (m_process.indexType == ProjectManager::OptimalIndex
             || m_process.indexType == ProjectManager::EfficiencyIndex)) {
@@ -151,8 +149,6 @@ void DataTableWidget::updateCurrentTable()
         dimensionIndex = hIndex;
     }
     // 导入方案优选评估的评估数据时, 需要显示指标类型
-
-    int typeIndex = -1;
     if (m_process.type == SchemePlanManager::ImportEvalData && m_process.indexType == ProjectManager::OptimalIndex) {
         QStandardItem *item = new QStandardItem("指标类型");
         model->setHorizontalHeaderItem(++hIndex, item);

+ 6 - 0
QFD/widgets/SchemePlanWidget.cpp

@@ -12,6 +12,7 @@
 
 #include <QTabWidget>
 #include <QLayout>
+//#include <QTextEdit>
 
 #include <QDebug>
 
@@ -36,6 +37,11 @@ void SchemePlanWidget::setupUI()
     m_topLayout->addSpacing(10);
     m_export->setHidden(true);
 
+    //    m_description = new QTextEdit(this);
+    //    m_description->setPlainText("方案说明");
+    //    m_description->setFixedWidth(240);
+    //    m_contentLayout->addWidget(m_description);
+
     connect(m_export, &PushButton::clicked, this, &SchemePlanWidget::slotExportClicked);
 }
 

+ 4 - 0
QFD/widgets/SchemePlanWidget.h

@@ -7,6 +7,8 @@
 
 class PushButton;
 
+// class QTextEdit;
+
 /**
  * @brief The SchemePlanWidget class
  * 方案规划页面
@@ -35,6 +37,8 @@ private slots:
 
 private:
     PushButton *m_export = nullptr;
+
+    //    QTextEdit *m_description = nullptr;
 };
 
 #endif  // SCHEMEPLANWIDGET_H