From aa013c2f4e69e2ba4eb72081dc004d8334d59257 Mon Sep 17 00:00:00 2001 From: wumu <mayi@mayi.com> Date: 星期一, 28 十月 2024 23:15:27 +0800 Subject: [PATCH] 1028 --- internal_system_v1/converinfo2.cpp | 70 ++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 1 deletions(-) diff --git a/internal_system_v1/converinfo2.cpp b/internal_system_v1/converinfo2.cpp index b9930c3..466e8b9 100644 --- a/internal_system_v1/converinfo2.cpp +++ b/internal_system_v1/converinfo2.cpp @@ -17,6 +17,7 @@ //initUi(); //readInfo(); // 鍔犺浇琛ㄦ牸 addMenu(); // 澧炲姞鑿滃崟 + disableWheelEvent(); // 绂佺敤涓嬫媺妗嗙殑婊氳疆浜嬩欢 // 鑷�傚簲澶勭悊 ui->treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); @@ -106,13 +107,48 @@ { QString name = index.model()->data(index).toString(); qDebug()<<"鍙屽嚮"<<index<<name; + ComInfo curCominfo = m_nameAndComInfos[name]; if(name.contains("(鏈骇)")){ QStringList sps = name.split("(鏈骇)"); name = sps.at(0); + curCominfo = m_nameAndComInfos[name]; }else if(name.contains("(姹囨��)")){ name = name.split("(姹囨��)").at(0); + qDebug()<<"姹囨�诲鐞�:"; + // 鍋氫竴涓眹鎬荤殑澶勭悊锛屾妸鎵�鏈変笅绾х殑閮界疮鍔犺捣鏉� + ComInfo allCominfo = m_nameAndComInfos[name]; + for(QString cur:m_treeNodes[name]){ + if(name != cur){ + ComInfo &tmp = m_nameAndComInfos[cur]; + allCominfo.organazationNum += tmp.organazationNum; + allCominfo.realNum += tmp.realNum; + allCominfo.professionalNum += tmp.professionalNum; + allCominfo.CIANum += tmp.CIANum; + allCominfo.masterNum += tmp.masterNum; + allCominfo.undergraduatesNum += tmp.undergraduatesNum; + allCominfo.juniorNum += tmp.juniorNum; + allCominfo.seniorNum += tmp.seniorNum; + allCominfo.intermediateNum += tmp.intermediateNum; + allCominfo.primaryNum += tmp.primaryNum; + allCominfo.noTitleNum += tmp.noTitleNum; + allCominfo.upFiftyOldNum += tmp.upFiftyOldNum; + allCominfo.upThirtyOldNum += tmp.upThirtyOldNum; + allCominfo.downThirtyOldNum += tmp.downThirtyOldNum; + allCominfo.auditNum += tmp.auditNum; + allCominfo.accountingNum += tmp.accountingNum; + allCominfo.economyNum += tmp.economyNum; + allCominfo.lawNum += tmp.lawNum; + allCominfo.managerNum += tmp.managerNum; + allCominfo.itNum += tmp.itNum; + allCominfo.engineeringNum += tmp.engineeringNum; + allCominfo.otherNum += tmp.otherNum; + } + + } + curCominfo = allCominfo; + } - ComInfo curCominfo = m_nameAndComInfos[name]; + //ComInfo curCominfo = m_nameAndComInfos[name]; // 涓�銆佸崟浣嶅熀鏈儏鍐� ui->lineEdit_creditCode->setText(curCominfo.creditCode); ui->lineEdit_name->setText(QString::fromLocal8Bit( curCominfo.name)); @@ -1556,6 +1592,38 @@ } } } + +void ConverInfo2::disableWheelEvent() +{ + ui->comboBox_ChiefDesignerLevel->installEventFilter(this); + ui->comboBox_comType->installEventFilter(this); + ui->comboBox_employmentMode->installEventFilter(this); + ui->comboBox_hasChiefDesigner->installEventFilter(this); + ui->comboBox_hasSetIntervalAudit->installEventFilter(this); + ui->comboBox_hasSetSeparateIA->installEventFilter(this); + ui->comboBox_hasUpLegal->installEventFilter(this); + ui->comboBox_intavalAuditLeval->installEventFilter(this); + ui->comboBox_leadingOrganization->installEventFilter(this); + ui->comboBox_scale->installEventFilter(this); + ui->comboBox_standardType->installEventFilter(this); +} + +bool ConverInfo2::eventFilter(QObject *watched, QEvent *event) +{ + QString cls = watched->metaObject()->className(); + if(cls == "QComboBox"){ + //qDebug()<<"鍙戠幇涓嬫媺妗�"; + if(event->type() == QEvent::Wheel){ + //qDebug()<<"浣跨敤浜嗘粴杞�"; + return true; // 杩斿洖鐪熻〃绀虹鐢紝杩斿洖鍋囧垯鑳界敤 + } + }else{ + qDebug()<<"鍏朵粬绫诲瀷:"<<cls; + } + + return QMainWindow::eventFilter(watched,event); + +} void ConverInfo2::addTreeWidgetNode(QVariant upName,QVariant name){ // 娣诲姞宸﹁竟鏍戝舰鍥剧浉鍏� // 鑿滃崟鐩稿叧 褰撲笂绾у叕鍙镐负绌轰笂绾ф椂锛岃嚜宸卞綋鑷繁鐨勪笂绾э紝骞朵笖缃楀垪杩涘幓褰� 鏈骇 -- Gitblit v1.8.0