EvalReportWidget.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #ifndef EVALREPORTWIDGET_H
  2. # define EVALREPORTWIDGET_H
  3. # include <QWidget>
  4. # include "SchemePlanManager.h"
  5. class ProjectInfo;
  6. class ExportReportManager;
  7. class CMind;
  8. class PlotView;
  9. class CustomPieChart;
  10. class QPushButton;
  11. class QVBoxLayout;
  12. class QGridLayout;
  13. class QTabWidget;
  14. class QTableView;
  15. class QComboBox;
  16. class QLabel;
  17. class EvalReportWidget : public QWidget
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit EvalReportWidget(ProjectInfo *proj, int indexType, QWidget *parent = nullptr);
  22. ~EvalReportWidget();
  23. void exportReport();
  24. private:
  25. void initWidgets();
  26. void initLayouts();
  27. void loadAlgs();
  28. void loadData();
  29. bool checkDataComplete();
  30. void showIndexWeight();
  31. void showIndexWeightPlot();
  32. void showTechScore();
  33. void showTechScorePlot();
  34. /// 项目演示-方案优选-层次加权法得分
  35. /// [10.136319544500001, 11.961457030999998, 17.516247966, 11.692445301]
  36. /// 及对分析发得分
  37. /// (0.889003, 0.662887, 0.951992, 0.565267)
  38. void showSchemeScore();
  39. void showSchemeScorePlot();
  40. void showEffiResult();
  41. void makePlotClear(PlotView *plotView);
  42. void showEffiResultLev();
  43. private slots:
  44. void slotSelectIndexPlotType(int type);
  45. void slotSelectTechPlotType(int type);
  46. void slotSelectSchemePlotType(int type);
  47. void slotIndexTabIndexChanged(int index);
  48. void slotEffiTabIndexChanged(int index);
  49. void slotLastSchemeLev();
  50. void slotNextSchemeLev();
  51. private:
  52. ProjectInfo *m_proj = nullptr; // 项目
  53. SchemePlanManager::Algorithm m_weightAlg;
  54. SchemePlanManager::Algorithm m_evalAlg;
  55. int m_indexType; // 指标类型
  56. CMind *m_mind = nullptr;
  57. QWidget *m_view = nullptr;
  58. QVBoxLayout *m_layout = nullptr;
  59. QGridLayout *m_gridLayout = nullptr;
  60. /// 指标权重
  61. QLabel *m_indexTitle = nullptr; // 指标权重标题
  62. QTabWidget *m_indexTab = nullptr; // 指标权重表
  63. PlotView *m_indexPlot = nullptr; // 指标权重图
  64. CustomPieChart *m_indexPie = nullptr; // 指标权重饼图
  65. QComboBox *m_indexCombo = nullptr; // 切换指标权重图类型
  66. /// 指标得分
  67. QLabel *m_techTitle = nullptr; // 指标得分标题
  68. QTableView *m_techTable = nullptr; // 指标得分表
  69. PlotView *m_techPlot = nullptr; // 指标得分图
  70. CustomPieChart *m_techPie = nullptr; // 指标得分饼图
  71. QComboBox *m_techCombo = nullptr; // 切换指标得分图类型
  72. /// 方案得分和效能评估
  73. QLabel *m_schemeTitle = nullptr; // 方案得分标题
  74. QTableView *m_schemeTable = nullptr; // 方案得分表
  75. QTabWidget *m_EffiTab = nullptr; // 指标权重表
  76. PlotView *m_schemePlot = nullptr; // 方案得分图
  77. CustomPieChart *m_schemePie = nullptr; // 方案得分饼图
  78. QComboBox *m_schemeCombo = nullptr; // 切换方案得分类型
  79. QPushButton *m_lastSchemeLev = nullptr;
  80. QPushButton *m_nextSchemeLev = nullptr;
  81. int m_curSchemeLev = 2; // 默认显示第二级指标
  82. ExportReportManager *m_exportMngr = nullptr;
  83. };
  84. #endif // EVALREPORTWIDGET_H
  85. /*
  86. 样例数据
  87. 项目演示-方案优选-指标权重(层次分析法)
  88. { 0.0399746, 0.08573655, 0.1867215, 0.517877, 0.1696905 };
  89. { 0.03164655, 0.00832805, 0.06787475, 0.0178618, 0.15171122,
  90. 0.03501028, 0.43156399, 0.08631301, 0.04242262, 0.12726788 };
  91. 项目演示-效能评估-指标权重(层次分析法)
  92. { 0.280833, 0.584156, 0.13501 };
  93. { 0.07020825, 0.21062475, 0.48679647, 0.09735953, 0.10688289, 0.02812711 };
  94. { 0.05558152, 0.01462673, 0.12860136, 0.0567758, 0.02524748, 0.05098171, 0.31008254,
  95. 0.12573223, 0.01327194, 0.01461917, 0.01931854, 0.05014989, 0.06026197, 0.01258931,
  96. 0.0281506, 0.00588096, 0.01585843, 0.00331298, 0.00740806, 0.00154762 };
  97. 项目演示-效能评估-效能分析(灰色聚类)-建设前
  98. { 0.228928, 0.715073, 0.394897, 0.00254005,0, 0.666667, 0, 0,
  99. 0.111111,0.75, 0.6, 0,0, 0.666667, 0.666667, 0,
  100. 0.833333, 0.210526, 0, 0,0.010101, 1, 0.333333, 0,
  101. 0.428571, 0.875, 0.142857, 0,0.2, 1, 0.363636, 0,
  102. 0, 0, 0.992366, 0.020202,0.428571, 0.875, 0.333333, 0,
  103. 1, 0.428571, 0, 0,0.020202, 0.992366, 0, 0,
  104. 0.2, 1, 0.363636, 0,0.714286, 0.625, 0, 0,
  105. 0.4, 1, 0.333333, 0,0.142857, 0.888889, 0.444444, 0,
  106. 0.666667, 0.666667, 0, 0,0.142857, 0.875, 0.428571, 0,
  107. 0.266667, 0.96, 0.3, 0,0.666667, 0.666667, 0, 0,
  108. 0.666667, 0.666667, 0, 0 }
  109. 项目演示-效能评估-效能分析(灰色聚类)-建设后
  110. {0.0406435, 0.311878, 0.735938, 0.316491,0, 0, 0.666667, 0,
  111. 0, 0, 0.8, 0.5,0, 0, 0.994872, 0.020202,
  112. 0, 0.444444, 0.888889, 0.166667,0, 0, 0.333333, 1,
  113. 0, 0.625, 0.714286, 0.125,0, 0.2, 0.8, 0.571429,
  114. 0.3, 0.96, 0.266667, 0,0, 0.625, 0.777778, 0.125,
  115. 0.2, 1, 0.363636, 0,0, 0.266667, 0.96, 0.3,
  116. 0, 0.2, 0.8, 0.571429,0, 0.5, 0.857143, 0.25,
  117. 0, 0, 0.979167, 0.0606061,0, 0, 0.533333, 0.833333,
  118. 0, 0, 0.994872, 0.020202,0, 0.125, 0.714286, 0.625,
  119. 0, 0, 0.882353, 0.3,0, 0.25, 1, 0.25,
  120. 0, 0, 0.994872, 0.020202}
  121. 项目演示-效能评估-效能分析(物元分析)-方案一
  122. {0.228397, 0.174062, -0.139881, -0.192361, -0.333333, 0, -0.333333, -0.6,
  123. 0.214286, -0.26087, 0.0625, 0.214286, -0.333333, 0, 0, -0.333333,
  124. -0.1, 0.5, 1, 2, 0.00364964, -0.00362319, 0.00364964, 0.0110294,
  125. -0.125, 0.166667, -0.3, -0.5625, -0.25, 0.5, -0.25, -0.454545,
  126. -0.375, -0.285714, -0.166667, 0.25, -0.125, 0.166667, -0.3, -0.5625,
  127. 29, -0.5, -0.625, -0.684211, 0.25, -0.166667, -0.285714, -0.375,
  128. -0.25, 0.5, -0.25, -0.454545, 0.25, -0.166667, -0.5, -0.6875,
  129. -0.333333, 1, -0.333333, -0.6, 0.125, -0.0526316, 0.0588235, 0.285714,
  130. 0, 0, -0.5, -0.666667, -0.25, 0.125, -0.1, -0.4375,
  131. -0.272727, 0.333333, -0.2, -0.6, -0.111111, 0.142857, 0.6, 1,
  132. 0, 0, -0.5, -0.666667}
  133. 项目演示-效能评估-效能分析(物元分析)-方案二
  134. { -0.406858, -0.219394, 0.364666, -0.228834, -0.428571, -0.2, 0, -0.2,
  135. 0.428571, -0.130435, 0, 0, -0.4, -0.25, 0, 0,
  136. 0.25, 0.0526316, -0.047619, 0.111111, 0.0182482, 0.0108696, 0.00359712, -0.00357143,
  137. -0.357143, -0.1, 0.125, -0.357143, -0.75, -0.5, 1, -0.333333,
  138. -0.142857, 0.2, -0.2, -0.4, -0.357143, -0.1, 0.125, -0.357143,
  139. -0.25, 0.5, -0.25, -0.454545, -0.4, -0.2, 0.2, -0.142857,
  140. -0.75, -0.5, 1, -0.333333, -0.428571, -0.2, 0.333333, -0.333333,
  141. -0.454545, -0.333333, -0.142857, 0.2, 0.5, 0.263158, 0.0909091, -0.0769231,
  142. -0.4, -0.25, 0, 0, -0.642857, -0.5, 0.25, -0.166667,
  143. -0.444444, -0.375, -0.166667, 0.25, 0.277778, 0.0454545, -0.0416667, 0.0454545,
  144. -0.4, -0.25, 0, 0 }
  145. */