|
@@ -1263,6 +1263,9 @@ void ExportReportManager::insertEffiSchemeData()
|
|
|
}
|
|
|
|
|
|
for (SchemaEval *scheme : schemeList) {
|
|
|
+ if (m_schemeType == 2 && scheme->name != "建设前" && scheme->name != "建设后") {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if (schemeData.keys().contains(scheme->id) == false) {
|
|
|
schemeData[scheme->id] = QMap<QString, double>();
|
|
|
}
|
|
@@ -1513,6 +1516,42 @@ void ExportReportManager::insertEffiResult()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 指标权重图:bmEvalPic
|
|
|
+ for (int i = schemeNames.size() - 1; i >= 0; --i) {
|
|
|
+ QString schemeName = schemeNames[schemeNames.keys()[i]];
|
|
|
+ QList<double> values = effData[schemeNames.keys()[i]]["综合"];
|
|
|
+
|
|
|
+ QVector<PlotView::Data> plotValues;
|
|
|
+ for (int j = 0; j < values.size(); ++j) {
|
|
|
+ PlotView::Data data { schemeName + "-" + gradeNames[j], values[j] };
|
|
|
+ plotValues.append(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ PlotView *plot = new PlotView(PlotView::HistogramHorizontal, plotValues, "");
|
|
|
+ plot->setFixedSize(QSize(600, 600));
|
|
|
+ plot->plot();
|
|
|
+ QPixmap pixmap = plot->grab();
|
|
|
+ plot->deleteLater();
|
|
|
+ if (pixmap.isNull()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ QString imgName = QString("%1_%2_%3_eval").arg(m_proj->id).arg(8).arg(schemeName);
|
|
|
+ QString path = saveImage(imgName, pixmap);
|
|
|
+
|
|
|
+ QAxObject *bmWeightPic = m_word->getDocument()->querySubObject("Bookmarks(QVariant)", "bmEvalPic");
|
|
|
+ if (bmWeightPic != nullptr) {
|
|
|
+ bmWeightPic->dynamicCall("Select(void)");
|
|
|
+ QAxObject *range = bmWeightPic->querySubObject("Range");
|
|
|
+ QAxObject *inlineShapes = range->querySubObject("InlineShapes");
|
|
|
+ QAxObject *shape = inlineShapes->querySubObject("AddPicture(const QString&)", path);
|
|
|
+ if (shape != nullptr) {
|
|
|
+ shape->setProperty("Width", 400);
|
|
|
+ shape->setProperty("Height", 400);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
QStringList retList;
|
|
|
int bestGrade = 0;
|
|
|
int bestSchemeIndex = 0;
|