fix update dynamic table

This commit is contained in:
baiYue 2025-07-22 20:00:46 +08:00
parent 9e42cbb222
commit ece2debbad
5 changed files with 16 additions and 3 deletions

View File

@ -95,6 +95,7 @@ QMap<QString,propertyStateInfo> CtExtraInfoDlg::getPropertyValue(BaseProperty* p
}
map.insert(pro.proName,info);
}
pPro->setDataChanged(true);
return map;
}

View File

@ -1,4 +1,5 @@
#include "propertyContentDlg.h"
#include "baseProperty.h"
#include <QScrollArea>
#include <QFormLayout>
#include <QLabel>
@ -47,6 +48,8 @@ QWidget* PropertyContentDlg::createEditor(propertyStateInfo pro)
else if(pro.type.contains("INTEGER"))
{
QSpinBox* spin = new QSpinBox(this);
if(pro.lengthPrecision > 0)
spin->setRange(-pro.lengthPrecision,pro.lengthPrecision);
pWidget = spin;
}
else if(pro.type.contains("BIGINT"))
@ -67,6 +70,8 @@ QWidget* PropertyContentDlg::createEditor(propertyStateInfo pro)
{
QDoubleSpinBox* dbSpin = new QDoubleSpinBox(this);
dbSpin->setDecimals(15);
if(pro.lengthPrecision > 0)
dbSpin->setRange(-pro.lengthPrecision,pro.lengthPrecision);
pWidget = dbSpin;
}
else if(pro.type.contains("NUMERIC") || pro.type.contains("DECIMAL"))
@ -251,6 +256,7 @@ QMap<QString,propertyStateInfo> PropertyContentDlg::getPropertyValue(BasePropert
}
}
}
pPro->setDataChanged(true);
return map;
}

View File

@ -92,6 +92,7 @@ QMap<QString,propertyStateInfo> PtExtraInfoDlg::getPropertyValue(BaseProperty* p
}
map.insert(pro.proName,info);
}
pPro->setDataChanged(true);
return map;
}

View File

@ -683,6 +683,7 @@ int ProjectModelManager::createPropertyTable(const QString& sMeta,const QString&
QPair<QString,QString> pair = combinePropertySql(item); //拼接单句sql
fields.append(pair.first);
}
fields.append("FOREIGN KEY (global_uuid) REFERENCES PUBLIC.component (global_uuid)");
QJsonObject objState = getSelectedState(lstSelect,lstBase);

View File

@ -51,9 +51,13 @@ void TopologyView::initial()
QString nZ = info.zone;
QString nS= info.station;
QString sGrid = DataBase::GetInstance()->getGridNameById(nG.toInt());
QString sZone = DataBase::GetInstance()->getZoneNameById(nZ.toInt());
QString sStation = DataBase::GetInstance()->getStationNameById(nS.toInt());
//QString sGrid = DataBase::GetInstance()->getGridNameById(nG.toInt());
//QString sZone = DataBase::GetInstance()->getZoneNameById(nZ.toInt());
//QString sStation = DataBase::GetInstance()->getStationNameById(nS.toInt());
QString sGrid = nG; //暂时不使用id查找名称
QString sZone = nZ;
QString sStation = nS;
QStandardItem *pItem = new QStandardItem(info.tag);
pItem->setData(info.uuid.toString(),Qt::UserRole);