diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 44a6262..252ed5f 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -3277,7 +3277,7 @@ //添加列头 QStringList head; head <<"项目-量程上限90%以下"<<"项目-量程上限90%以上"<<"示值误差允许值"<<"示值误差最大值"<<"轻敲位移允许值"<<"轻敲位移最大值" - <<"回程误差允许值"<<"回程误差最大值"<<"结果"<<"输出备注"; + <<"回程误差允许值"<<"回程误差最大值"; HeadMapList->insert(VerificationItem,head); //添加数据 QStringList Data; @@ -3289,8 +3289,8 @@ Data.append("");//轻敲位移最大值 Data.append(row[3]);//回程误差允许值 Data.append("");//回程误差最大值 - Data.append("");//结果 - Data.append("");//输出备注 +// Data.append("");//结果 +// Data.append("");//输出备注 IndicationErrorList.append(Data); } } diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 44a6262..252ed5f 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -3277,7 +3277,7 @@ //添加列头 QStringList head; head <<"项目-量程上限90%以下"<<"项目-量程上限90%以上"<<"示值误差允许值"<<"示值误差最大值"<<"轻敲位移允许值"<<"轻敲位移最大值" - <<"回程误差允许值"<<"回程误差最大值"<<"结果"<<"输出备注"; + <<"回程误差允许值"<<"回程误差最大值"; HeadMapList->insert(VerificationItem,head); //添加数据 QStringList Data; @@ -3289,8 +3289,8 @@ Data.append("");//轻敲位移最大值 Data.append(row[3]);//回程误差允许值 Data.append("");//回程误差最大值 - Data.append("");//结果 - Data.append("");//输出备注 +// Data.append("");//结果 +// Data.append("");//输出备注 IndicationErrorList.append(Data); } } diff --git a/softwareDirectory/AutoVerScheme/formgageresult.cpp b/softwareDirectory/AutoVerScheme/formgageresult.cpp index 5f54e97..79cbf3b 100644 --- a/softwareDirectory/AutoVerScheme/formgageresult.cpp +++ b/softwareDirectory/AutoVerScheme/formgageresult.cpp @@ -10,15 +10,35 @@ ui->setupUi(this); QMap headList; - QMap> dataList = BaseCommonApi::getDeviceMeasureCalibratorPistonGaugeGenerate("一般压力表",sDeviceId,&headList); + QMap> dataList = BaseCommonApi::Search_GenerateTableClass(sDeviceId,&headList); if(headList.count()>0){ - ui->tableWidget->setColumnCount(headList[0].count()); - ui->tableWidget->setHorizontalHeaderLabels(headList[0]); - for(int i=0;itableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); - } + qDebug()<tableWidget->setColumnCount(strHeadList.count()); + ui->tableWidget->setHorizontalHeaderLabels(strHeadList); + for (const auto& key : dataList.keys()) { + const QList& rowDataList = dataList[key]; + int numRows = rowDataList.count(); + ui->tableWidget->setRowCount( numRows); //ui->tableWidget->rowCount() + + // 填表格 + int currentRow = ui->tableWidget->rowCount() - numRows; + for (const QStringList& rowData : rowDataList) { + for (int col = 0; col < rowData.size() && col < strHeadList.count(); ++col) { + QTableWidgetItem* item = new QTableWidgetItem(rowData[col]); + ui->tableWidget->setItem(currentRow, col, item); + } + ++currentRow; + } + } + + + +// for(int i=0;itableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); +// } + } }