EvalReportWidget.h 7.0 KB

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