Browse Source

调整字体;
忽略不生效指标;

chengxr 1 year ago
parent
commit
8265a82cf3

+ 1 - 1
ExpertClient/EXDataView.cpp

@@ -42,7 +42,7 @@ void EXDataView::setupTabWidget()
     for (int i : indexList()) {
         // 获取指标体系数据
         QList<CNodeData> nodeList;
-        bool ret = CNodeDataService().QueryAll(nodeList, m_proj->id, i);
+        bool ret = CNodeDataService().QueryAllValid(nodeList, m_proj->id, i);
         if (ret) {
             nodeListMap[i] = nodeList;
         } else {

+ 1 - 1
ExpertClient/EXIndexView.cpp

@@ -31,7 +31,7 @@ void EXIndexView::setupTabWidget()
         m_tab->addTab(m, s);
 
         QList<CNodeData> list;
-        bool ret = CNodeDataService().QueryAll(list, proj()->id, t);
+        bool ret = CNodeDataService().QueryAllValid(list, proj()->id, t);
         if (ret) {
             m->setNodeList(list);
         }

+ 3 - 3
QFD/common/DataEvaluator.cpp

@@ -73,7 +73,7 @@ bool DataEvaluator::evaluateWeightFromExpert()
 
     /// 获取指标体系
     QList<CNodeData> nodeList;
-    bool mindRet = CNodeDataService().QueryAll(nodeList, m_process.projectId, m_process.indexType);
+    bool mindRet = CNodeDataService().QueryAllValid(nodeList, m_process.projectId, m_process.indexType);
     CMind *mind  = new CMind(this);
     mind->setNodeList(nodeList);
 
@@ -215,7 +215,7 @@ bool DataEvaluator::evaluateWeightFromMeasure()
 
     /// 获取指标体系
     QList<CNodeData> nodeList;
-    bool mindRet = CNodeDataService().QueryAll(nodeList, m_process.projectId, m_process.indexType);
+    bool mindRet = CNodeDataService().QueryAllValid(nodeList, m_process.projectId, m_process.indexType);
     CMind *mind  = new CMind(this);
     mind->setNodeList(nodeList);
 
@@ -336,7 +336,7 @@ bool DataEvaluator::evaluateTech()
 
     /// 获取指标体系
     QList<CNodeData> nodeList;
-    bool mindRet = CNodeDataService().QueryAll(nodeList, m_process.projectId, m_process.indexType);
+    bool mindRet = CNodeDataService().QueryAllValid(nodeList, m_process.projectId, m_process.indexType);
     CMind *mind  = new CMind(this);
     mind->setNodeList(nodeList);
 

+ 35 - 0
QFD/dbService/CNodeDataService.cpp

@@ -141,6 +141,41 @@ bool CNodeDataService::QueryAll(QList<CNodeData> &cNodeDataList, int projectId,
     return ret;
 }
 
+bool CNodeDataService::QueryAllValid(QList<CNodeData> &cNodeDataList, int projectId, int evalType)
+{
+    QSqlDatabase db = SqlDBHelper::getDatabase();
+    QSqlQuery query(db);
+    bool ret = false;
+    QString selectSql =
+            QString("SELECT id,project_id, eval_type,number,p_number,name,remark,dimension,type,is_effective FROM "
+                    "t_node_data WHERE "
+                    "project_id = %1 and eval_type= %2 and is_effective!=1 order by number")
+                    .arg(projectId)
+                    .arg(evalType);
+    if (query.exec(selectSql)) {
+        while (query.next()) {
+            if (query.isNull(0) == false) {
+                CNodeData cNodeData;
+                cNodeData.id          = query.value(0).toInt();
+                cNodeData.projectId   = query.value(1).toInt();
+                cNodeData.indexType   = query.value(2).toInt();
+                cNodeData.number      = query.value(3).toInt();
+                cNodeData.pNumber     = query.value(4).toInt();
+                cNodeData.name        = query.value(5).toString();
+                cNodeData.remark      = query.value(6).toString();
+                cNodeData.dimension   = query.value(7).toString();
+                cNodeData.type        = query.value(8).toInt();
+                cNodeData.isEffective = query.value(9).toInt();
+                cNodeDataList.append(cNodeData);
+            }
+        }
+        ret = true;
+    } else {
+        qDebug() << "QueryAll" << query.lastError();
+    }
+    return ret;
+}
+
 bool CNodeDataService::QueryAllByProjectId(QList<CNodeData> &cNodeDataList, int projectId)
 {
     QSqlDatabase db = SqlDBHelper::getDatabase();

+ 3 - 0
QFD/dbService/CNodeDataService.h

@@ -18,6 +18,9 @@ public:
     //查询所有
     bool QueryAll(QList<CNodeData> &cNodeDataList, int projectId, int evalType);
 
+    //查询所有生效节点
+    bool QueryAllValid(QList<CNodeData> &cNodeDataList, int projectId, int evalType);
+
     //根据工程id获取到节点信息
     bool QueryAllByProjectId(QList<CNodeData> &cNodeDataList, int projectId);
 

+ 1 - 1
QFD/widgets/DataCollectionWidget.cpp

@@ -99,7 +99,7 @@ void DataCollectionWidget::setupTabWidget()
     for (int i : indexList()) {
         // 获取指标体系数据
         QList<CNodeData> nodeList;
-        bool ret = CNodeDataService().QueryAll(nodeList, m_proj->id, i);
+        bool ret = CNodeDataService().QueryAllValid(nodeList, m_proj->id, i);
         if (ret) {
             nodeListMap[i] = nodeList;
         } else {

+ 1 - 1
QFD/widgets/EvalReportWidget.cpp

@@ -182,7 +182,7 @@ void EvalReportWidget::loadAlgs()
 void EvalReportWidget::loadData()
 {
     QList<CNodeData> nodeList;
-    CNodeDataService().QueryAll(nodeList, m_proj->id, m_indexType);
+    CNodeDataService().QueryAllValid(nodeList, m_proj->id, m_indexType);
     m_mind = new CMind(this);
     m_mind->setNodeList(nodeList);
 

+ 1 - 1
QFluentWidgets/Navigation/NavigationWidget.cpp

@@ -71,7 +71,7 @@ void NavigationWidget::leaveEvent(QEvent * /*event*/)
 NavigationPushButton::NavigationPushButton(FluentIconBase *ficon, const QString &text, bool selectable, QWidget *parent)
     : NavigationWidget(selectable, parent), m_ficon(ficon), m_text(text)
 {
-    setStyleSheet("NavigationPushButton{font: bold 15px }");
+    setStyleSheet("NavigationPushButton{font: bold 18px }");
 }
 
 QString NavigationPushButton::text() const

+ 3 - 3
QFluentWidgets/qss/light/tree_view.qss

@@ -1,10 +1,10 @@
-QTreeView {
+QTreeView {
     background-color: transparent;
     border: none;
     border-radius: 5px;
     outline: 0;
     padding-right: 5px;
-    font: 13px 'Segoe UI', 'Microsoft YaHei';
+    font: 16px 'Segoe UI', 'Microsoft YaHei';
     selection-background-color: transparent;
 }
 
@@ -113,4 +113,4 @@ QScrollBar::handle {
 QScrollBar::add-page:vertical,
 QScrollBar::sub-page:vertical {
     background: none;
-}
+}