From b7148fcfc9028ad85515ed0ac4d94921e567c95c Mon Sep 17 00:00:00 2001 From: lvjunjie Date: Fri, 4 Sep 2026 18:05:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E8=87=AA=E5=8A=A8=E6=8B=9F?= =?UTF-8?q?=E5=90=88=E7=9B=AE=E6=A0=87=E4=BA=95=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 默认显示当前分析主井 - 仅显示“包含其他井”中已勾选的井 - 过滤缺少有效流量或压力数据的包含井 --- Src/nmNum/nmSubWxs/nmWxAutomaticFitting.cpp | 39 ++++++++++++--------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/Src/nmNum/nmSubWxs/nmWxAutomaticFitting.cpp b/Src/nmNum/nmSubWxs/nmWxAutomaticFitting.cpp index a1a145d..7fb61d6 100644 --- a/Src/nmNum/nmSubWxs/nmWxAutomaticFitting.cpp +++ b/Src/nmNum/nmSubWxs/nmWxAutomaticFitting.cpp @@ -926,24 +926,29 @@ void nmWxAutomaticFitting::setupControlPanel() QLabel* wellLabel = new QLabel(tr("Target Well:")); m_targetWellCombo = new QComboBox(); - // 添加垂直井 - for(int i = 0; i < m_verticalWells.size(); ++i) { - m_targetWellCombo->addItem(m_verticalWells[i].getWellName()); - } - - // 添加水平井 - for(int i = 0; i < m_horizontalWells.size(); ++i) { - m_targetWellCombo->addItem(m_horizontalWells[i].getWellName()); - } - - // 添加垂直压裂井 - for(int i = 0; i < m_verticalFracturedWells.size(); ++i) { - m_targetWellCombo->addItem(m_verticalFracturedWells[i].getWellName()); - } + // 目标井先加入当前分析主井,再加入已勾选且具备流量、压力数据的包含井。 + nmDataAnalyzeManager* pManager = nmDataAnalyzeManager::getCurrentInstance(); + if(pManager != nullptr) { + const QString sPrimaryWellCode = pManager->getPrimaryWellCode(); + nmDataWellBase* pPrimaryWell = pManager->findWellByCode(sPrimaryWellCode); + if(pPrimaryWell != nullptr) { + m_targetWellCombo->addItem(pPrimaryWell->getWellName()); + } - // 添加水平压裂井 - for(int i = 0; i < m_horizontalFracturedWells.size(); ++i) { - m_targetWellCombo->addItem(m_horizontalFracturedWells[i].getWellName()); + if(pManager->getIncludeOtherWells()) { + const QVector vecIncludedWells = + pManager->getIncludedCalculationWells(); + for(int nIndex = 0; nIndex < vecIncludedWells.size(); ++nIndex) { + const QString& sWellCode = vecIncludedWells[nIndex].m_sWellCode; + nmDataWellBase* pWellData = pManager->findWellByCode(sWellCode); + if(pWellData == nullptr || sWellCode == sPrimaryWellCode || + pWellData->getFlowSegmentCount() <= 0 || + pWellData->getPressurePoints().size() < 2) { + continue; + } + m_targetWellCombo->addItem(pWellData->getWellName()); + } + } } connect(m_targetWellCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onWellSelected(int)));