|
@@ -126,8 +126,9 @@ void GreyClusteringConfigWidget::initClusteringItems()
|
|
|
|
|
|
if (subNodes.size() == 0) { // 没有子节点,需要录入值
|
|
|
GreyClusteringValue *sg = new GreyClusteringValue;
|
|
|
- sg->units = "";
|
|
|
- sg->weiget = 0;
|
|
|
+
|
|
|
+ sg->units = n.dimension;
|
|
|
+ sg->weiget = 0;
|
|
|
for (const auto &gname : m_grayNames) {
|
|
|
sg->greyRanges << GreyRange { gname, true, 0, true, 0 };
|
|
|
}
|
|
@@ -145,7 +146,7 @@ void GreyClusteringConfigWidget::initClusteringItems()
|
|
|
// 因为已有父节点,所以在第2列
|
|
|
GreyClusteringItem childItem = { sub.name, subRow, 1, 1, 1, nullptr };
|
|
|
GreyClusteringValue *sg = new GreyClusteringValue;
|
|
|
- sg->units = "";
|
|
|
+ sg->units = sub.dimension;
|
|
|
sg->weiget = 0;
|
|
|
for (const auto &gname : m_grayNames) {
|
|
|
sg->greyRanges << GreyRange { gname, true, 0, true, 0 };
|
|
@@ -155,6 +156,7 @@ void GreyClusteringConfigWidget::initClusteringItems()
|
|
|
sg->oldValue = 0;
|
|
|
sg->newValue = 0;
|
|
|
childItem.value.reset(sg);
|
|
|
+ qDebug() << __FUNCTION__ << __LINE__ << childItem.indexName << childItem.value->units << endl;
|
|
|
m_greyClusterings.append(childItem);
|
|
|
subRow++;
|
|
|
}
|
|
@@ -203,7 +205,9 @@ void GreyClusteringConfigWidget::initClusteringItems()
|
|
|
|
|
|
for (const auto &effInfo : effectIndexInfoList) {
|
|
|
if (effInfo->effectIndexName == item.indexName) {
|
|
|
- item.value->units = effInfo->effectIndexUnit;
|
|
|
+ if (effInfo->effectIndexUnit.length() > 0) {
|
|
|
+ item.value->units = effInfo->effectIndexUnit;
|
|
|
+ }
|
|
|
item.value->leftExtension = effInfo->extendLeft.toDouble();
|
|
|
item.value->rightExtension = effInfo->extendRight.toDouble();
|
|
|
//[0:0],[0:0],[0:0]
|
|
@@ -342,7 +346,8 @@ void GreyClusteringConfigWidget::refreshTableView()
|
|
|
}
|
|
|
|
|
|
if (!item.value.isNull()) {
|
|
|
- m_model->item(item.row, nodeDepth)->setText(item.value->units); // 指标
|
|
|
+ m_model->item(item.row, nodeDepth)->setText(item.value->units); // 量纲
|
|
|
+ m_model->item(item.row, nodeDepth)->setEditable(false);
|
|
|
for (int r = 0; r < item.value->greyRanges.size(); r++) {
|
|
|
m_model->item(item.row, nodeDepth + r + 1)
|
|
|
->setText(QString("%1%2, %3%4")
|