diff --git a/diagramCavas/source/ctExtraInfoDlg.cpp b/diagramCavas/source/ctExtraInfoDlg.cpp index beb576a..0c75b03 100644 --- a/diagramCavas/source/ctExtraInfoDlg.cpp +++ b/diagramCavas/source/ctExtraInfoDlg.cpp @@ -95,6 +95,7 @@ QMap CtExtraInfoDlg::getPropertyValue(BaseProperty* p } map.insert(pro.proName,info); } + pPro->setDataChanged(true); return map; } diff --git a/diagramCavas/source/propertyContentDlg.cpp b/diagramCavas/source/propertyContentDlg.cpp index f9efdba..9345639 100644 --- a/diagramCavas/source/propertyContentDlg.cpp +++ b/diagramCavas/source/propertyContentDlg.cpp @@ -1,4 +1,5 @@ #include "propertyContentDlg.h" +#include "baseProperty.h" #include #include #include @@ -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 PropertyContentDlg::getPropertyValue(BasePropert } } } + pPro->setDataChanged(true); return map; } diff --git a/diagramCavas/source/ptExtraInfoDlg.cpp b/diagramCavas/source/ptExtraInfoDlg.cpp index 7d4197f..09c458d 100644 --- a/diagramCavas/source/ptExtraInfoDlg.cpp +++ b/diagramCavas/source/ptExtraInfoDlg.cpp @@ -92,6 +92,7 @@ QMap PtExtraInfoDlg::getPropertyValue(BaseProperty* p } map.insert(pro.proName,info); } + pPro->setDataChanged(true); return map; } diff --git a/diagramUtils/source/projectModelManager.cpp b/diagramUtils/source/projectModelManager.cpp index 2f19514..8fe9044 100644 --- a/diagramUtils/source/projectModelManager.cpp +++ b/diagramUtils/source/projectModelManager.cpp @@ -683,6 +683,7 @@ int ProjectModelManager::createPropertyTable(const QString& sMeta,const QString& QPair pair = combinePropertySql(item); //拼接单句sql fields.append(pair.first); } + fields.append("FOREIGN KEY (global_uuid) REFERENCES PUBLIC.component (global_uuid)"); QJsonObject objState = getSelectedState(lstSelect,lstBase); diff --git a/source/topologyView.cpp b/source/topologyView.cpp index 0fd53b3..d52a8f4 100644 --- a/source/topologyView.cpp +++ b/source/topologyView.cpp @@ -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);