[ref]同步711 711更新
This commit is contained in:
parent
01f6a1ca4b
commit
789ca114a2
@ -1,4 +1,4 @@
|
||||
#include "CAccidentReviewDialog.h"
|
||||
#include "CAccidentReviewDialog.h"
|
||||
#include "public/pub_utility_api/FileUtil.h"
|
||||
#include "public/pub_logger_api/logger.h"
|
||||
#include <QTreeWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CACCIDENTREVIEWDIALOG_H
|
||||
#ifndef CACCIDENTREVIEWDIALOG_H
|
||||
#define CACCIDENTREVIEWDIALOG_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventDataCollect.h"
|
||||
#include "CEventDataCollect.h"
|
||||
#include <QDateTime>
|
||||
#include <QMutex>
|
||||
#include <QThread>
|
||||
@ -8,7 +8,18 @@
|
||||
#include "perm_mng_api/PermMngApi.h"
|
||||
#include "CEventMsgManage.h"
|
||||
|
||||
//< 屏蔽xml_parser编译告警
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
|
||||
#include "boost/property_tree/xml_parser.hpp"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include "boost/typeof/typeof.hpp"
|
||||
#include "boost/filesystem.hpp"
|
||||
#include "Common.h"
|
||||
@ -123,7 +134,6 @@ void CEventDataCollect::loadEventConfig()
|
||||
loadEventOtherStatusDescription();
|
||||
loadUserName();
|
||||
loadDeviceGroupDescription();
|
||||
loadSubSystemDescription();
|
||||
}
|
||||
|
||||
int CEventDataCollect::priorityId(const QString &description)
|
||||
@ -181,11 +191,6 @@ QString CEventDataCollect::deviceTypeDescription(const int &id)
|
||||
return m_deviceTypeDescriptionMap.value(id, QString());
|
||||
}
|
||||
|
||||
QString CEventDataCollect::deviceGroupDescription(const QString &id)
|
||||
{
|
||||
return m_deviceGroupDescriptionMap.value(id, QString());
|
||||
}
|
||||
|
||||
QString CEventDataCollect::alarmStatusDescription(const int &id)
|
||||
{
|
||||
return m_alarmStatusMap.value(id, QString());
|
||||
@ -201,11 +206,6 @@ QString CEventDataCollect::eventShowStatusDescription(const int &id)
|
||||
return m_eventShowStatusMap.value(id, QString());
|
||||
}
|
||||
|
||||
QString CEventDataCollect::subSystemDescription(const int &id)
|
||||
{
|
||||
return m_subSystemDescriptionMap.value(id, QString());
|
||||
}
|
||||
|
||||
QList<int> CEventDataCollect::priorityList()
|
||||
{
|
||||
return m_priorityDescriptionMap.keys();
|
||||
@ -307,35 +307,6 @@ void CEventDataCollect::loadPriorityDescription()
|
||||
}
|
||||
}
|
||||
|
||||
void CEventDataCollect::loadSubSystemDescription()
|
||||
{
|
||||
m_subSystemDescriptionMap.clear();
|
||||
if(m_rtdbAccess->open("base", "sys_model_sub_system_info"))
|
||||
{
|
||||
LOGERROR("open sys_model_sub_system_info success");
|
||||
iot_dbms::CTableLockGuard locker(*m_rtdbAccess);
|
||||
iot_dbms::CRdbQueryResult result;
|
||||
std::vector<std::string> columns;
|
||||
columns.push_back("sub_system_id");
|
||||
columns.push_back("description");
|
||||
|
||||
if(m_rtdbAccess->select(result, columns))
|
||||
{
|
||||
LOGERROR("select columns success");
|
||||
LOGERROR(QString::number( result.getRecordCount()).toStdString().c_str());
|
||||
for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++)
|
||||
{
|
||||
iot_dbms::CVarType key;
|
||||
iot_dbms::CVarType value;
|
||||
result.getColumnValue(nIndex, 0, key);
|
||||
result.getColumnValue(nIndex, 1, value);
|
||||
m_subSystemDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CEventDataCollect::loadLocationDescription()
|
||||
{
|
||||
m_areaInfoMap.clear();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEventDataCollect_H
|
||||
#ifndef CEventDataCollect_H
|
||||
#define CEventDataCollect_H
|
||||
|
||||
#include <QObject>
|
||||
@ -39,10 +39,9 @@ public:
|
||||
QString regionDescription(const int & id);
|
||||
QString alarmTypeDescription(const int & id);
|
||||
QString deviceTypeDescription(const int & id);
|
||||
QString deviceGroupDescription(const QString &id);
|
||||
QString alarmStatusDescription(const int & id);
|
||||
QString userNameDescription(const int & id);
|
||||
QString subSystemDescription(const int &id);
|
||||
|
||||
QString eventShowStatusDescription(const int & id);
|
||||
|
||||
QList<int> priorityList();
|
||||
@ -113,7 +112,7 @@ private:
|
||||
void loadDeviceTypeDescription();
|
||||
void loadAlarmStatusDescription();
|
||||
void loadUserName();
|
||||
void loadSubSystemDescription();
|
||||
|
||||
void loadEventShowStatusDescription();
|
||||
void loadEventOtherStatusDescription();
|
||||
|
||||
@ -137,7 +136,6 @@ private:
|
||||
QMap<int, QString> m_subSystemDescriptionMap;
|
||||
QMap<int, QString> m_alarmStatusMap;
|
||||
QMap<int, QString> m_userNameMap;
|
||||
QMap<int, QString> m_DescriptionMap;
|
||||
static CEventDataCollect * m_pInstance;
|
||||
|
||||
QMap<int, QString> m_eventShowStatusMap; //
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventDelegate.h"
|
||||
#include "CEventDelegate.h"
|
||||
#include <QDomDocument>
|
||||
#include <QFile>
|
||||
#include <QPainter>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTDELEGATE_H
|
||||
#ifndef CEVENTDELEGATE_H
|
||||
#define CEVENTDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#include "CEventDeviceTreeItem.h"
|
||||
#include "CEventDeviceTreeItem.h"
|
||||
|
||||
const int TypeRole = Qt::UserRole + 1;
|
||||
|
||||
CEventDeviceTreeItem::CEventDeviceTreeItem(const QString &data, CEventDeviceTreeItem *parent)
|
||||
: m_tag(QString()),
|
||||
@ -11,6 +13,7 @@ CEventDeviceTreeItem::CEventDeviceTreeItem(const QString &data, CEventDeviceTree
|
||||
|
||||
m_data = data;
|
||||
m_checkState = Qt::Checked;
|
||||
m_nType = 0;
|
||||
}
|
||||
|
||||
CEventDeviceTreeItem::~CEventDeviceTreeItem()
|
||||
@ -63,6 +66,11 @@ QVariant CEventDeviceTreeItem::data(Qt::ItemDataRole role) const
|
||||
{
|
||||
return m_checkState;
|
||||
}
|
||||
else if(Qt::ItemDataRole(TypeRole) == role)
|
||||
{
|
||||
return m_nType;
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
@ -83,6 +91,12 @@ bool CEventDeviceTreeItem::setData(const QVariant &value, Qt::ItemDataRole role)
|
||||
m_checkState = (Qt::CheckState)value.toInt();
|
||||
return true;
|
||||
}
|
||||
else if(TypeRole == role)
|
||||
{
|
||||
m_nType = value.toInt();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
@ -54,6 +54,8 @@
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
|
||||
extern const int TypeRole;
|
||||
|
||||
class CEventDeviceTreeItem
|
||||
{
|
||||
public:
|
||||
@ -75,6 +77,7 @@ private:
|
||||
QString m_data;
|
||||
QString m_tag;
|
||||
Qt::CheckState m_checkState;
|
||||
int m_nType;
|
||||
|
||||
QList<CEventDeviceTreeItem*> m_childItems;
|
||||
CEventDeviceTreeItem *m_parentItem;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventDeviceTreeItem.h"
|
||||
#include "CEventDeviceTreeItem.h"
|
||||
#include "CEventDeviceTreeModel.h"
|
||||
#include "CEventMsgManage.h"
|
||||
#include "CEventDataCollect.h"
|
||||
@ -22,14 +22,27 @@ void CEventDeviceTreeModel::setupModelData(const QMap<int, QVector<QPair<QString
|
||||
{
|
||||
const QString locDesc = CEventDataCollect::instance()->locationDescription(locationList[nLocIndex]);
|
||||
CEventDeviceTreeItem * location = new CEventDeviceTreeItem(locDesc, rootItem);
|
||||
location->setData(TYPE_LOCATION,Qt::ItemDataRole(TypeRole));
|
||||
|
||||
const QVector<QPair<QString, QString> > vec = locationInfos.value(locationList[nLocIndex]);
|
||||
for(int nDevIndex(0); nDevIndex < vec.size(); ++nDevIndex)
|
||||
{
|
||||
CEventDeviceTreeItem * device = new CEventDeviceTreeItem(vec.at(nDevIndex).second, location);
|
||||
device->setData(vec.at(nDevIndex).first, Qt::UserRole);
|
||||
device->setData(TYPE_DEVGROUP,Qt::ItemDataRole(TypeRole));
|
||||
QModelIndex modelIndex = createIndex(nDevIndex, 0, device);
|
||||
m_devTagIndex.insert(vec.at(nDevIndex).first, modelIndex);
|
||||
m_devNameIndex.insert(locDesc + "." + vec.at(nDevIndex).second, modelIndex);
|
||||
|
||||
if(nDevIndex == vec.size() - 1)
|
||||
{
|
||||
CEventDeviceTreeItem * sys_device = new CEventDeviceTreeItem(tr(".系统"), location);
|
||||
sys_device->setData("", Qt::UserRole);
|
||||
sys_device->setData(TYPE_DEVGROUP,Qt::ItemDataRole(TypeRole));
|
||||
QModelIndex sys_modelIndex = createIndex(nDevIndex+1, 0, sys_device);
|
||||
m_devTagIndex.insert("", sys_modelIndex);
|
||||
m_devNameIndex.insert("", sys_modelIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -153,7 +166,8 @@ QVariant CEventDeviceTreeModel::data(const QModelIndex &index, int role) const
|
||||
if (Qt::DisplayRole == role)
|
||||
{
|
||||
const QString &deviceGroup = item->data(Qt::UserRole).toString();
|
||||
if(deviceGroup.isEmpty())
|
||||
int nType = item->data(Qt::ItemDataRole(TypeRole)).toInt();
|
||||
if(deviceGroup.isEmpty() && nType == TYPE_LOCATION)
|
||||
{
|
||||
return item->data(Qt::DisplayRole).toString();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
@ -57,6 +57,11 @@
|
||||
#include <QHash>
|
||||
#include "CEventMsgInfo.h"
|
||||
|
||||
enum enTreeNodeType{
|
||||
TYPE_LOCATION = 0,
|
||||
TYPE_DEVGROUP
|
||||
};
|
||||
|
||||
typedef QHash< QString, QModelIndex > HashIndex; //< Device<tag-index>
|
||||
|
||||
class CEventDeviceTreeItem;
|
||||
|
||||
@ -1,7 +1,33 @@
|
||||
#include "CEventDeviceTreeView.h"
|
||||
#include "CEventDeviceTreeView.h"
|
||||
#include "CEventDeviceTreeModel.h"
|
||||
#include "CEventDeviceTreeItem.h"
|
||||
#include <QMenu>
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
CEventDeviceTreeView::CEventDeviceTreeView(QWidget *parent)
|
||||
: QTreeView(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CEventDeviceTreeView::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
CEventDeviceTreeModel * pModel = dynamic_cast<CEventDeviceTreeModel *>(model());
|
||||
if(Q_NULLPTR != pModel)
|
||||
{
|
||||
QMenu menu;
|
||||
CEventDeviceTreeItem * pItem = static_cast<CEventDeviceTreeItem*>(indexAt(event->pos()).internalPointer());
|
||||
if (Q_NULLPTR == pItem)
|
||||
{
|
||||
menu.addAction(tr("全选"), [=](){ pModel->setAllDeviceCheckState(Qt::Checked); });
|
||||
menu.addAction(tr("清空"), [=](){ pModel->setAllDeviceCheckState(Qt::Unchecked); });
|
||||
}
|
||||
else if (Q_NULLPTR != pItem && pItem->childCount() > 0)
|
||||
{
|
||||
menu.addAction(tr("选择"), [=](){ pModel->setDeviceCheckState(indexAt(event->pos()), Qt::Checked); });
|
||||
menu.addAction(tr("清除"), [=](){ pModel->setDeviceCheckState(indexAt(event->pos()), Qt::Unchecked); });
|
||||
}
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTDEVICETREEVIEW_H
|
||||
#ifndef CEVENTDEVICETREEVIEW_H
|
||||
#define CEVENTDEVICETREEVIEW_H
|
||||
|
||||
#include <QTreeView>
|
||||
@ -9,6 +9,8 @@ class CEventDeviceTreeView : public QTreeView
|
||||
public:
|
||||
CEventDeviceTreeView(QWidget *parent = Q_NULLPTR);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
};
|
||||
|
||||
#endif // CEVENTDEVICETREEVIEW_H
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventFilterDialog.h"
|
||||
#include "CEventFilterDialog.h"
|
||||
#include "ui_CEventFilterDialog.h"
|
||||
#include "CEventDataCollect.h"
|
||||
#include "public/pub_sysinfo_api/SysInfoApi.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTFILTERDIALOG_H
|
||||
#ifndef CEVENTFILTERDIALOG_H
|
||||
#define CEVENTFILTERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>570</width>
|
||||
<height>421</height>
|
||||
<width>1000</width>
|
||||
<height>469</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>530</width>
|
||||
<width>1000</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventForm.h"
|
||||
#include "CEventForm.h"
|
||||
#include "ui_CEventForm.h"
|
||||
#include "CEventMsgInfo.h"
|
||||
#include <QContextMenuEvent>
|
||||
@ -242,37 +242,31 @@ void CEventForm::initilize()
|
||||
{
|
||||
//< lingdaoyaoqiu
|
||||
{
|
||||
QSettings columFlags1("KBD_HMI", "eventReal config");
|
||||
QSettings columFlags1("IOT_HMI", "eventReal config");
|
||||
if(!columFlags1.contains(QString("eventReal/colum_0")))
|
||||
{
|
||||
columFlags1.setValue(QString("eventReal/colum_0"), false); //< 时间
|
||||
columFlags1.setValue(QString("eventReal/colum_1"), false); //< 优先级
|
||||
columFlags1.setValue(QString("eventReal/colum_2"), false); //< 位置
|
||||
columFlags1.setValue(QString("eventReal/colum_3"), true); //< 责任区
|
||||
columFlags1.setValue(QString("eventReal/colum_4"), true); //< 事件类型
|
||||
columFlags1.setValue(QString("eventReal/colum_5"), false); //< 事件状态
|
||||
columFlags1.setValue(QString("eventReal/colum_4"), false); //< 事件类型
|
||||
columFlags1.setValue(QString("eventReal/colum_5"), true); //< 事件状态
|
||||
columFlags1.setValue(QString("eventReal/colum_6"), false); //< 复归状态
|
||||
}
|
||||
}
|
||||
{
|
||||
QSettings columFlags2("KBD_HMI", "eventHis config");
|
||||
QSettings columFlags2("IOT_HMI", "eventHis config");
|
||||
if(!columFlags2.contains(QString("eventHis/colum_0")))
|
||||
{
|
||||
// tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("专业")<< tr("设备组")<< tr("确认人")<< tr("确认时间")<< tr("点标签")<< tr("事件内容") ;
|
||||
|
||||
columFlags2.setValue(QString("eventHis/colum_0"), false); //< 时间
|
||||
columFlags2.setValue(QString("eventHis/colum_1"), false); //< 优先级
|
||||
columFlags2.setValue(QString("eventHis/colum_2"), false); //< 位置
|
||||
columFlags2.setValue(QString("eventHis/colum_3"), true); //< 责任区
|
||||
columFlags2.setValue(QString("eventHis/colum_4"), true); //< 事件类型
|
||||
columFlags2.setValue(QString("eventHis/colum_5"), false); //< 事件状态
|
||||
columFlags2.setValue(QString("eventHis/colum_4"), false); //< 事件类型
|
||||
columFlags2.setValue(QString("eventHis/colum_5"), true); //< 事件状态
|
||||
columFlags2.setValue(QString("eventHis/colum_6"), false); //< 复归状态
|
||||
columFlags2.setValue(QString("eventHis/colum_7"), true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_8"), true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_9"), true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_10"),true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_11"),true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_12"),true); //
|
||||
columFlags2.setValue(QString("eventHis/colum_7"), true); //< 确认人
|
||||
columFlags2.setValue(QString("eventHis/colum_8"), true); //< 确认时间
|
||||
}
|
||||
}
|
||||
m_pListWidget1 = new CMyListWidget(this);
|
||||
@ -339,7 +333,7 @@ void CEventForm::initHisModel()
|
||||
ui->eventView_2->setModel(m_pHistoryModel);
|
||||
m_pHistoryDelegate->setHisEventModel(m_pHistoryModel);
|
||||
ui->eventView_2->setColumnWidth(8, 250);
|
||||
QSettings columFlags2("KBD_HMI", "eventHis config");
|
||||
QSettings columFlags2("IOT_HMI", "eventHis config");
|
||||
for(int nColumnIndex(0); nColumnIndex < m_pHistoryModel->columnCount() - 1; nColumnIndex++)
|
||||
{
|
||||
bool visible = columFlags2.value(QString("eventHis/colum_%1").arg(nColumnIndex)).toBool();
|
||||
@ -354,11 +348,6 @@ void CEventForm::initHisModel()
|
||||
ui->eventView_2->setColumnWidth(5, 150);
|
||||
ui->eventView_2->setColumnWidth(6, 150);
|
||||
ui->eventView_2->setColumnWidth(7, 150);
|
||||
ui->eventView_2->setColumnWidth(8, 150);
|
||||
ui->eventView_2->setColumnWidth(9, 150);
|
||||
ui->eventView_2->setColumnWidth(10, 150);
|
||||
ui->eventView_2->setColumnWidth(11, 250);
|
||||
ui->eventView_2->setColumnWidth(12, 350);
|
||||
slotUpdateHISTips();
|
||||
|
||||
if(m_pDeviceHisModel == NULL)
|
||||
@ -386,11 +375,11 @@ void CEventForm::initRealModel()
|
||||
{
|
||||
m_pRealTimeModel = new CEventItemModel(this);
|
||||
connect(ui->eventView->horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), m_pRealTimeModel, SLOT(sortColumn(int,Qt::SortOrder)));
|
||||
ui->eventView->horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder);
|
||||
ui->eventView->horizontalHeader()->setSortIndicator(0, Qt::DescendingOrder);
|
||||
}
|
||||
ui->eventView->setModel(m_pRealTimeModel);
|
||||
m_pRealDelegate->setEventModel(m_pRealTimeModel);
|
||||
QSettings columFlags1("KBD_HMI", "eventReal config");
|
||||
QSettings columFlags1("IOT_HMI", "eventReal config");
|
||||
for(int nColumnIndex(0); nColumnIndex < m_pRealTimeModel->columnCount() - 1; nColumnIndex++)
|
||||
{
|
||||
bool visible = columFlags1.value(QString("eventReal/colum_%1").arg(nColumnIndex)).toBool();
|
||||
@ -907,7 +896,7 @@ void CEventForm::slotUpdateRTTips()
|
||||
ui->typeLabel->setText(tr("实时事件总数:"));
|
||||
if(m_pRealTimeModel)
|
||||
{
|
||||
ui->eventCount->setText(QString::number(CEventMsgManage::instance()->getListEventCount()));
|
||||
ui->eventCount->setText(QString::number(m_pRealTimeModel->rowCount()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1025,6 +1014,9 @@ void CEventForm::stateChanged1(int state)
|
||||
isCheck = true;
|
||||
m_pRealTimeModel->setPriorityFilter(isCheck,m_priorityList);
|
||||
}
|
||||
|
||||
slotUpdateRTTips();
|
||||
updateDeviceGroupHiddenState();
|
||||
}
|
||||
else if(ui->hisEventButton->isChecked())
|
||||
{
|
||||
@ -1081,6 +1073,9 @@ void CEventForm::stateChanged2(int state)
|
||||
isCheck = true;
|
||||
m_pRealTimeModel->setLocationFilter(isCheck,m_locationList);
|
||||
}
|
||||
|
||||
slotUpdateRTTips();
|
||||
updateDeviceGroupHiddenState();
|
||||
}
|
||||
else if(ui->hisEventButton->isChecked())
|
||||
{
|
||||
@ -1142,6 +1137,9 @@ void CEventForm::stateChanged3(int state)
|
||||
isCheck = true;
|
||||
m_pRealTimeModel->setEventTypeFilter(isCheck,m_eventStatusList,other);
|
||||
}
|
||||
|
||||
slotUpdateRTTips();
|
||||
updateDeviceGroupHiddenState();
|
||||
}
|
||||
else if(ui->hisEventButton->isChecked())
|
||||
{
|
||||
@ -1312,7 +1310,7 @@ void CEventForm::contextMenuRealEvent(QContextMenuEvent *event)
|
||||
connect(action, &QAction::triggered, [=](){
|
||||
|
||||
ui->eventView->setColumnHidden(nColumnIndex, !action->isChecked());
|
||||
QSettings columFlags1("KBD_HMI", "eventReal config");
|
||||
QSettings columFlags1("IOT_HMI", "eventReal config");
|
||||
columFlags1.setValue(QString("eventReal/colum_%1").arg(nColumnIndex), !action->isChecked());
|
||||
});
|
||||
}
|
||||
@ -1368,7 +1366,7 @@ void CEventForm::contextMenuHisEvent(QContextMenuEvent *event)
|
||||
action->setChecked(!ui->eventView_2->isColumnHidden(nColumnIndex));
|
||||
connect(action, &QAction::triggered, [=](){
|
||||
ui->eventView_2->setColumnHidden(nColumnIndex, !action->isChecked());
|
||||
QSettings columFlags2("KBD_HMI", "eventHis config");
|
||||
QSettings columFlags2("IOT_HMI", "eventHis config");
|
||||
columFlags2.setValue(QString("eventHis/colum_%1").arg(nColumnIndex), !action->isChecked());
|
||||
});
|
||||
}
|
||||
@ -1459,6 +1457,8 @@ void CEventForm::loadDeviceGroupFilterWidget()
|
||||
|
||||
void CEventForm::updateDeviceGroupHiddenState()
|
||||
{
|
||||
m_pDeviceModel->slotHisDevTreeUpdate(m_pRealTimeModel->getListShowAlarmInfo());
|
||||
|
||||
QHash<QString, int> listDeviceStatisticalInfo = m_pDeviceModel->getDeviceStatisticalInfo();
|
||||
for(int nTopLevelRow(0); nTopLevelRow < m_pDeviceModel->rowCount(); nTopLevelRow++)
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEventForm_H
|
||||
#ifndef CEventForm_H
|
||||
#define CEventForm_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<layout class="QGridLayout" name="gridLayout_8" rowminimumheight="55,0">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
@ -124,135 +124,17 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>优先级:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>位置:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>事件状态:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>137</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -271,38 +153,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@ -312,11 +169,27 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="10">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="11">
|
||||
<widget class="QPushButton" name="clear">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<width>70</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -325,24 +198,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="filter">
|
||||
<property name="maximumSize">
|
||||
<item row="0" column="13">
|
||||
<widget class="QPushButton" name="print">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>26</height>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>过滤</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="print">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<width>70</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -351,11 +217,11 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="14">
|
||||
<widget class="QPushButton" name="closeBtn">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<width>70</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -364,6 +230,155 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="12">
|
||||
<widget class="QPushButton" name="filter">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>过滤</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>位置:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>优先级:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>事件状态:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="comboBox_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>125</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventHisThread.h"
|
||||
#include "CEventHisThread.h"
|
||||
#include "public/pub_sysinfo_api/SysInfoApi.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
#include <QList>
|
||||
@ -501,7 +501,7 @@ void CEventHisThread::doReturnFilterEnable()
|
||||
qint64 startStamp = m_stFilter.startTime.toMSecsSinceEpoch();
|
||||
qint64 endStamp = m_stFilter.endTime.toMSecsSinceEpoch();
|
||||
|
||||
sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag,SUB_SYSTEM from his_event");
|
||||
sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag from his_event");
|
||||
|
||||
|
||||
//先查询标签和时间 然后根据时间和标签再次查询
|
||||
@ -557,7 +557,7 @@ void CEventHisThread::doReturnFilterEnable()
|
||||
return ;
|
||||
}
|
||||
//第2次查询结果
|
||||
QString sqlBase = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag,SUB_SYSTEM from his_event");
|
||||
QString sqlBase = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag from his_event");
|
||||
int counter = 0;
|
||||
QString cond = QString();
|
||||
for(int index(0);index<keyList.count();index++)
|
||||
@ -598,7 +598,7 @@ void CEventHisThread::doReturnFilterDisenable()
|
||||
qint64 startStamp = m_stFilter.startTime.toMSecsSinceEpoch();
|
||||
qint64 endStamp = m_stFilter.endTime.toMSecsSinceEpoch();
|
||||
|
||||
sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag,SUB_SYSTEM from his_event");
|
||||
sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag from his_event");
|
||||
sql= QString("%1 where (time_stamp between %2 and %3) ").arg(sql).arg(startStamp).arg(endStamp);
|
||||
|
||||
QString locAndRegionFilter = buildLocAndRegion();
|
||||
@ -618,19 +618,7 @@ void CEventHisThread::doReturnFilterDisenable()
|
||||
sql = QString("%1 order by time_stamp desc limit %2").arg(sql).arg(LIMIT_HIS_RECORD);
|
||||
|
||||
LOGDEBUG("his sql:%s",sql.toStdString().c_str());
|
||||
if(m_pReadDb->isOpen())
|
||||
{
|
||||
QSqlQuery query;
|
||||
try
|
||||
{
|
||||
m_pReadDb->execute(sql,query);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
qDebug() << "Query Error!";
|
||||
}
|
||||
search(sql,historyEventList);
|
||||
}
|
||||
|
||||
emit sigUpdateHisEvent(historyEventList);
|
||||
}
|
||||
@ -679,9 +667,6 @@ void CEventHisThread::search(const QString &sql, QList<EventMsgPtr> &eventList)
|
||||
info->priorityOrder = queryPriorityOrder(info->priority);
|
||||
info->wave_file = query.value(12).toString();
|
||||
info->dev_group_tag = query.value(13).toString();
|
||||
info->sub_system = query.value(14).toInt();
|
||||
|
||||
|
||||
eventList.append(info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTHISTHREAD_H
|
||||
#ifndef CEVENTHISTHREAD_H
|
||||
#define CEVENTHISTHREAD_H
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventHistoryModel.h"
|
||||
#include "CEventHistoryModel.h"
|
||||
#include "CEventMsgInfo.h"
|
||||
#include <QModelIndex>
|
||||
#include <QMutexLocker>
|
||||
@ -18,7 +18,7 @@ CEventHistoryModel::CEventHistoryModel(QObject *parent)
|
||||
m_sortKey(E_SORT_TIME),
|
||||
m_order(Qt::DescendingOrder)
|
||||
{
|
||||
header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("专业")<< tr("设备组")<< tr("确认人")<< tr("确认时间")<< tr("点标签")<< tr("事件内容") ;
|
||||
header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("确认人")<< tr("确认时间") << tr("事件内容");
|
||||
initialize();
|
||||
}
|
||||
|
||||
@ -432,9 +432,15 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
if(Qt::TextAlignmentRole == role)
|
||||
{
|
||||
if(index.column() == 9)
|
||||
{
|
||||
return QVariant(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
}else
|
||||
{
|
||||
return QVariant(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
}
|
||||
}
|
||||
else if(Qt::DisplayRole == role)
|
||||
{
|
||||
|
||||
@ -477,29 +483,8 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const
|
||||
return QString("-");
|
||||
}
|
||||
}
|
||||
|
||||
case 7 :
|
||||
{
|
||||
return CEventDataCollect::instance()->subSystemDescription(m_listShowEventInfo.at(index.row())->sub_system);
|
||||
|
||||
|
||||
}
|
||||
case 8 :
|
||||
{
|
||||
QString dev_group_name = CEventDataCollect::instance()->deviceGroupDescription(m_listShowEventInfo.at(index.row())->dev_group_tag);
|
||||
if(dev_group_name.isEmpty())
|
||||
{
|
||||
return QString("-");
|
||||
}else
|
||||
{
|
||||
return dev_group_name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
case 9 :
|
||||
{
|
||||
|
||||
QString userName = CEventDataCollect::instance()->userNameDescription(m_listShowEventInfo.at(index.row())->cfm_user);
|
||||
if(userName.isEmpty())
|
||||
{
|
||||
@ -509,9 +494,8 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const
|
||||
return userName;
|
||||
}
|
||||
}
|
||||
case 10 :
|
||||
case 8 :
|
||||
{
|
||||
|
||||
if(m_listShowEventInfo.at(index.row())->cfm_time == 0)
|
||||
{
|
||||
return QString("-");
|
||||
@ -520,22 +504,10 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const
|
||||
return QDateTime::fromMSecsSinceEpoch(m_listShowEventInfo.at(index.row())->cfm_time).toString("yyyy-MM-dd hh:mm:ss.zzz");
|
||||
}
|
||||
}
|
||||
case 11 :
|
||||
case 9 :
|
||||
{
|
||||
if(m_listShowEventInfo.at(index.row())->key_id_tag =="")
|
||||
{
|
||||
return QString("-");
|
||||
}else
|
||||
{
|
||||
return m_listShowEventInfo.at(index.row())->key_id_tag;
|
||||
}
|
||||
} case 12 :
|
||||
{
|
||||
|
||||
return m_listShowEventInfo.at(index.row())->content;
|
||||
|
||||
}
|
||||
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@ -944,7 +916,7 @@ void CEventHistoryModel::updateShowEvents()
|
||||
QList<EventMsgPtr>::iterator it = m_listAllEventInfo.begin();
|
||||
while (it != m_listAllEventInfo.end()) {
|
||||
//< 设备组
|
||||
if((*it)->dev_group_tag.isEmpty() || m_deviceGroupFilter.contains((*it)->dev_group_tag))
|
||||
if(/*(*it)->dev_group_tag.isEmpty() ||*/ m_deviceGroupFilter.contains((*it)->dev_group_tag))
|
||||
{
|
||||
m_listShowEventInfo.append(*it);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTHISTORYMODEL_H
|
||||
#ifndef CEVENTHISTORYMODEL_H
|
||||
#define CEVENTHISTORYMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventItemModel.h"
|
||||
#include "CEventItemModel.h"
|
||||
#include "CEventMsgInfo.h"
|
||||
#include <QModelIndex>
|
||||
#include <QMutexLocker>
|
||||
@ -16,7 +16,7 @@ typedef QPair<int, QList<EventMsgPtr> > PAIRLISTALARMINFO;
|
||||
CEventItemModel::CEventItemModel(QObject *parent)
|
||||
:QAbstractTableModel(parent),
|
||||
m_sortKey(E_SORT_TIME),
|
||||
m_order(Qt::AscendingOrder)
|
||||
m_order(Qt::DescendingOrder)
|
||||
{
|
||||
header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型") << tr("事件状态") << tr("复归状态") << tr("事件内容");
|
||||
initialize();
|
||||
@ -232,17 +232,6 @@ Qt::ItemFlags CEventItemModel::flags(const QModelIndex &index) const
|
||||
}
|
||||
|
||||
void CEventItemModel::sortColumn(int column, Qt::SortOrder order)
|
||||
{
|
||||
if(order == Qt::AscendingOrder)
|
||||
{
|
||||
m_order = Qt::DescendingOrder;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_order = Qt::AscendingOrder;
|
||||
}
|
||||
|
||||
if(column ==E_SORT_PRIORITY)
|
||||
{
|
||||
if(order == Qt::AscendingOrder)
|
||||
{
|
||||
@ -252,9 +241,6 @@ void CEventItemModel::sortColumn(int column, Qt::SortOrder order)
|
||||
{
|
||||
m_order = Qt::DescendingOrder;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_sortKey = (E_ALARM_SORTKEY)column;
|
||||
|
||||
beginResetModel();
|
||||
@ -507,7 +493,8 @@ bool CEventItemModel::conditionFilter(EventMsgPtr info)
|
||||
}
|
||||
|
||||
//< 设备组
|
||||
if(!info->dev_group_tag.isEmpty() && !m_deviceGroupFilter.contains(info->dev_group_tag))
|
||||
//因为系统告警也就是非设备告警的设备组字段为空,所以把为空判断取消
|
||||
if(/*!info->dev_group_tag.isEmpty() &&*/ !m_deviceGroupFilter.contains(info->dev_group_tag))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTITEMMODEL_H
|
||||
#ifndef CEVENTITEMMODEL_H
|
||||
#define CEVENTITEMMODEL_H
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventMsgInfo.h"
|
||||
#include "CEventMsgInfo.h"
|
||||
#include <QDateTime>
|
||||
#include "CEventDataCollect.h"
|
||||
#include <QDebug>
|
||||
@ -15,7 +15,6 @@ CEventMsgInfo::CEventMsgInfo(): alm_status(0), cfm_user(0), cfm_time(0)
|
||||
priority = -1;
|
||||
dev_type = -1;
|
||||
region_id = -1;
|
||||
sub_system = -1;
|
||||
key_id_tag = QString();
|
||||
uuid_base64 = QString();
|
||||
priorityOrder = -1;
|
||||
@ -23,7 +22,6 @@ CEventMsgInfo::CEventMsgInfo(): alm_status(0), cfm_user(0), cfm_time(0)
|
||||
filterDelete = false;
|
||||
wave_file = QString();
|
||||
dev_group_tag = QString();
|
||||
dev_group_tag = QString();
|
||||
}
|
||||
|
||||
CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other): alm_status(0), cfm_user(0), cfm_time(0), priorityOrder(0)
|
||||
@ -44,7 +42,6 @@ CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other): alm_status(0), cfm_use
|
||||
filterDelete = other.filterDelete;
|
||||
wave_file = other.wave_file;
|
||||
dev_group_tag = other.dev_group_tag;
|
||||
dev_group_tag = other.dev_group_tag;
|
||||
}
|
||||
|
||||
void CEventMsgInfo::initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef ALARMMSGINFO_H
|
||||
#ifndef ALARMMSGINFO_H
|
||||
#define ALARMMSGINFO_H
|
||||
|
||||
#include <QMetaType>
|
||||
@ -156,7 +156,6 @@ public:
|
||||
uint cfm_user; //确认人
|
||||
uint64 cfm_time; //确认时间
|
||||
QString dev_group_tag; //< 设备组
|
||||
qint32 sub_system; //专业号
|
||||
//Extend
|
||||
qint32 priorityOrder;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CEventMsgManage.h"
|
||||
#include "CEventMsgManage.h"
|
||||
#include <QMutex>
|
||||
#include <QMutexLocker>
|
||||
CEventMsgManage * CEventMsgManage::m_pInstance = Q_NULLPTR;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEventMsgManage_H
|
||||
#ifndef CEventMsgManage_H
|
||||
#define CEventMsgManage_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <QWidget>
|
||||
#include <QWidget>
|
||||
#include "CEventPluginWidget.h"
|
||||
#include "CEventForm.h"
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEVENTPLUGINWIDGET_H
|
||||
#ifndef CEVENTPLUGINWIDGET_H
|
||||
#define CEVENTPLUGINWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
@ -7,7 +7,7 @@
|
||||
class CEventPluginWidget : public QObject, public CPluginWidgetInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0")
|
||||
Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID)
|
||||
Q_INTERFACES(CPluginWidgetInterface)
|
||||
|
||||
public:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <QHeaderView>
|
||||
#include <QHeaderView>
|
||||
#include "CEventView.h"
|
||||
|
||||
CEventView::CEventView(QWidget *parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEventView_H
|
||||
#ifndef CEventView_H
|
||||
#define CEventView_H
|
||||
|
||||
#include <QTableView>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CExcelPrinter.h"
|
||||
#include "CExcelPrinter.h"
|
||||
CExcelPrinter::CExcelPrinter(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CEXCELPRINTER_H
|
||||
#ifndef CEXCELPRINTER_H
|
||||
#define CEXCELPRINTER_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CMyCalendar.h"
|
||||
#include "CMyCalendar.h"
|
||||
#include "ui_CMyCalendar.h"
|
||||
#include <pub_logger_api/logger.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CMYCALENDAR_H
|
||||
#ifndef CMYCALENDAR_H
|
||||
#define CMYCALENDAR_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CMyCheckBox.h"
|
||||
#include "CMyCheckBox.h"
|
||||
#include <QMouseEvent>
|
||||
|
||||
CMyCheckBox::CMyCheckBox(QString text, QWidget *parent)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef MYCHECKBOX_H
|
||||
#ifndef MYCHECKBOX_H
|
||||
#define MYCHECKBOX_H
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CMyListWidget.h"
|
||||
#include "CMyListWidget.h"
|
||||
|
||||
CMyListWidget::CMyListWidget(QWidget *parent):QListWidget(parent)
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CMYLISTWIDGET_H
|
||||
#ifndef CMYLISTWIDGET_H
|
||||
#define CMYLISTWIDGET_H
|
||||
|
||||
#include <QListWidget>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "CTableViewPrinter.h"
|
||||
#include "CTableViewPrinter.h"
|
||||
#include <QPainter>
|
||||
#include <QPrinter>
|
||||
#include <QTableView>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#ifndef CTABLEVIEWPRINTER_H
|
||||
#ifndef CTABLEVIEWPRINTER_H
|
||||
#define CTABLEVIEWPRINTER_H
|
||||
|
||||
class QPointF;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <QApplication>
|
||||
#include <QApplication>
|
||||
//#include "CEventPlugin.h"
|
||||
#include "CEventForm.h"
|
||||
#include "pub_logger_api/logger.h"
|
||||
@ -17,7 +17,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base");
|
||||
permMngPtr->PermDllInit();
|
||||
if(permMngPtr->SysLogin("admin", "kbdct", 1, 12*60*60, "hmi") != 0)
|
||||
if(permMngPtr->SysLogin("admin", "admin", 1, 12*60*60, "hmi") != 0)
|
||||
{
|
||||
iot_net::releaseMsgBus();
|
||||
iot_public::StopLogSystem();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user