[WEB]1.修改首页场站图标显示颜色不正确的问题,2.修改运行监控页面储能系统的运行模式和预制舱参数在页面切换时数据不显示问题

This commit is contained in:
lixiaoyuan
2025-10-09 18:37:18 +08:00
parent 272154c06a
commit 0975ea52d4
25 changed files with 2377 additions and 135 deletions

View File

@@ -45,28 +45,16 @@ QWHome::QWHome(QWidget* parent) : MyWidget(parent)
this->addPair("db-h", pw, 20, 50, "主机地址: ", Config::option.database.host);
this->addPair("db-u", pw, 20, 80, "用 户 名: ", Config::option.database.user);
table = std::make_shared<QTableWidget>(this);
table->setGeometry(10, y += 130, 1190, 265);
table->setStyleSheet(QSS_TABLE.c_str());
table->horizontalHeader()->setStretchLastSection(true); // 最后一列占满
table->verticalHeader()->setVisible(false); // 不显示垂直表头
table->setEditTriggers(QAbstractItemView::NoEditTriggers); // 单元格不可编辑
table->setSelectionMode(QAbstractItemView::SingleSelection); // 设置为单选模式
table->setSelectionBehavior(QAbstractItemView::SelectRows); // 设置为整行选中
table->horizontalHeader()->setFixedHeight(50);
table->horizontalHeader()->setDefaultSectionSize(60);
QTableWidgetItem* headerItem;
QStringList headerText_Row, headerText_Col;
headerText_Row << "ID" << "站名" << "编号" << "状态" << "MQTT状态" << "召测(秒)"
QStringList headerTextList;
headerTextList << "ID" << "站名" << "编号" << "状态" << "MQTT状态" << "召测(秒)"
<< "日充电\n电量" << "日放电\n电量" << "总充电\n电量" << "总放电\n电量"
<< "日充电\n费用" << "日放电\n费用" << "总充电\n费用" << "总放电\n费用"
<< "日收益" << "总收益" << "--";
table = MyQUI::TableWidget(this, 10, y += 130, 1190, 265);
// 设置为水平表头
table->setColumnCount(headerText_Row.size());
table->setHorizontalHeaderLabels(headerText_Row);
table->setColumnCount(headerTextList.size());
table->setHorizontalHeaderLabels(headerTextList);
table->setColumnWidth(0, 50);
table->setColumnWidth(1, 120);
table->setColumnWidth(2, 50);