fix monitorToolBox header
This commit is contained in:
parent
e8c8b79db6
commit
9616c7007f
|
|
@ -1097,8 +1097,9 @@ struct monitorItemAttributeInfo //单个监控item属性
|
|||
QString sGroup; //所属组别
|
||||
QString sTag; //索引名
|
||||
QString sName; //显示名
|
||||
int nConnectType = 0; //关联数据类别 0字段 1量测
|
||||
QString sConnectPara; //查询参数(参数服务使用)
|
||||
int nShowType; //显示类别 0字符 1图表
|
||||
int nShowType = 0; //显示类别 0字符 1图表
|
||||
bool bShowDiagram = false; //显示到组态中
|
||||
int nGraphType = 0; //图表类型 0折线1柱状
|
||||
QString sTimeRange; //时间范围(分)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MONITORTOOLBOX_H
|
||||
#define MONITORTOOLBOX_H
|
||||
|
||||
#include <QScrollArea >
|
||||
#include <QScrollArea>
|
||||
|
||||
class QVBoxLayout;
|
||||
class MonitorToolBox : public QScrollArea
|
||||
|
|
|
|||
|
|
@ -2680,13 +2680,14 @@ void FixedPortsModel::generateMonitorConfig(MonitorPanel* pPanel)
|
|||
auto itemData = DataManager::instance().modelData();
|
||||
auto itemState = DataManager::instance().modelState();
|
||||
for(auto& pItem:_nodeItem){
|
||||
auto pPro = pItem->getProperty();
|
||||
auto pBasePro = pItem->getProperty();
|
||||
auto pPro = dynamic_cast<BaseProperty*>(pBasePro);
|
||||
if(pPro){
|
||||
QString sModel = pPro->modelName();
|
||||
QUuid uid = pPro->uuid();
|
||||
if(itemState.contains(sModel)){
|
||||
auto mapData = itemState.value(sModel).groupInfo;
|
||||
QList<monitorItemAttributeInfo> lstInfo;
|
||||
if(itemState.contains(sModel)){ //动态表字段数据使用modelState初始化(兼容无值情况)
|
||||
auto mapData = itemState.value(sModel).groupInfo;
|
||||
for(auto iter = mapData.begin();iter != mapData.end();++iter){
|
||||
if(iter.value().isPublic == true) //公共属性组暂不显示
|
||||
continue;
|
||||
|
|
@ -2695,41 +2696,29 @@ void FixedPortsModel::generateMonitorConfig(MonitorPanel* pPanel)
|
|||
info.sGroup = iter.key();
|
||||
info.sTag = attr.name; //***暂时使用相同 051121 by
|
||||
info.sName = attr.name;
|
||||
info.nConnectType = 0;
|
||||
lstInfo.append(info);
|
||||
}
|
||||
}
|
||||
/*for(auto iter = mapData.begin();iter != mapData.end();iter++){ //遍历所有属性组
|
||||
if(iter.value().mapInfo.contains(uid)){
|
||||
auto pGroupAttrLst = iter.value().mapInfo.value(uid); //获取该组属性值
|
||||
for(auto& attr: pGroupAttrLst){
|
||||
monitorItemAttributeInfo info;
|
||||
info.sGroup = iter.key();
|
||||
info.sTag = attr.tagName;
|
||||
info.sName = attr.name;
|
||||
lstInfo.append(info);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if(!pPanel->getModelController()->getMonitorPara().contains(uid)){
|
||||
pPanel->getModelController()->getMonitorPara().insert(uid,lstInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if(itemData.contains(sModel)){
|
||||
if(itemData.contains(sModel)){ //量测数据使用modelData初始化
|
||||
auto mapData = itemData.value(sModel).groupInfo;
|
||||
QList<monitorItemAttributeInfo> lstInfo;
|
||||
/*for(auto iter = mapData.begin();iter != mapData.end();iter++){ //遍历所有属性组
|
||||
if(iter.value().mapInfo.contains(uid)){
|
||||
auto pGroupAttrLst = iter.value().mapInfo.value(uid); //获取该组属性值
|
||||
for(auto& attr: pGroupAttrLst){
|
||||
for(auto iter = mapData.begin();iter != mapData.end();iter++){ //遍历所有属性组
|
||||
if(iter.key() == "bay"){ //量测数据放到间隔组
|
||||
auto mapMeasure = pPro->getMeasurement();
|
||||
for(auto it = mapMeasure.begin(); it != mapMeasure.end();++it){
|
||||
monitorItemAttributeInfo info;
|
||||
info.sGroup = iter.key();
|
||||
info.sTag = attr.tagName;
|
||||
info.sName = attr.name;
|
||||
info.sTag = it->tag;
|
||||
info.sName = it->name;
|
||||
info.nConnectType = 1;
|
||||
lstInfo.append(info);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
if(!lstInfo.isEmpty()){
|
||||
if(!pPanel->getModelController()->getMonitorPara().contains(uid)){
|
||||
pPanel->getModelController()->getMonitorPara().insert(uid,lstInfo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue