#include "EXIndexView.h" #include "dbService/ClassSet.h" #include "dbService/CNodeDataService.h" #include #include #include EXIndexView::EXIndexView(ProjectInfo *proj, QWidget *parent) : EXEvalView(proj, parent) { setTitle("指标体系"); } void EXIndexView::setType(int type) { EXEvalView::setType(type); setupTabWidget(); } void EXIndexView::setupTabWidget() { m_tab->clear(); for (int i : indexList()) { CMindView *m = new CMindView(this); m->setAllowEdit(false); ProjectManager::IndexType t = (ProjectManager::IndexType)i; QString s = ProjectManager::nameOfIndexType(t); m_tab->addTab(m, s); QList list; bool ret = CNodeDataService().QueryAll(list, proj()->id, t); if (ret) { m->setNodeList(list); } CMind *mind = m->mind(); for (int i = 1; i < mind->levels(); i++) { QList nodes = mind->nodesInLevel(i); for (CNodeData node : nodes) { qDebug() << __FUNCTION__ << __LINE__ << "第" << i << "级节点" << node.name << endl; qDebug() << __FUNCTION__ << __LINE__ << "子节点:" << endl; QList list = mind->subNodes(node); for (CNodeData subNode : list) { qDebug() << __FUNCTION__ << __LINE__ << subNode.name << endl; } } } } }