实现削峰套利策略的编辑页面

This commit is contained in:
lixiaoyuan
2025-08-26 18:36:25 +08:00
parent 7fe51ea362
commit 8f6c83147b
37 changed files with 1506 additions and 729 deletions

View File

@@ -158,16 +158,34 @@ private:
};
class PvPageTable :public PvObject
///////////////////////////////////////////////////////////////////////////////////////////////////
// === PageTable ===
class PvPopWidget;
class PageTable : public PvMask
{
public:
PvPageTable(PARAM* p, int parent, int x, int y, int w, int rows, PvTable::Options& opts);
PageTable(PARAM* p);
shared_ptr<PvTable> getTable();
void setPage(int pageIndex, int pageSize, int count) {}
private:
shared_ptr<PvTable> table_ = nullptr;
shared_ptr<PvPagination> page_ctrl_ = nullptr;
std::shared_ptr<PvPopWidget> addPop(int w, int h, int w0, std::string name, std::vector<std::string> primaryKeys);
void showPop(int index, std::string optr, Fields& fields);
void hidePop(int index);
void updateDataFromDB();
virtual void onQueryTable(PageInfo& pageInfo, std::vector<Fields>& result) {}
virtual void onOperate(int row, int col, std::string oper) {};
virtual std::string onValidation(std::shared_ptr<PvPopWidget> pop, Fields& fields) { return ""; };
virtual std::string onPopConfirm(std::shared_ptr<PvPopWidget> pop, Fields& fields) { return ""; };
int pageSize {15};
int pageIndex {0};
PvTable::Options option;
std::shared_ptr<PvTable> table;
std::shared_ptr<PvPagination> pagination;
std::vector<std::shared_ptr<PvPopWidget>> vecPop;
};
#endif // ! _PvTable_H_