Sfoglia il codice sorgente

报告程序更新优化大分类饼图的显示效果,没有分类的时候无显示

zhangjiaxin 1 anno fa
parent
commit
2597a17c23

+ 4 - 4
Bin/x64/Debug/Config/ReportTemplate/Inca_Template/ReportTemplateConfig.xml

@@ -1,8 +1,9 @@
 <XmlConfig>
   <M_SY>
     <str_tb_ZBT>夹杂物报告</str_tb_ZBT>
-    <str_tb_FBT>北京首钢吉泰安新材料有限公司</str_tb_FBT>
-    <str_tb_YPBH>20804164 4.0  2</str_tb_YPBH>
+    <str_tb_FBT>XXX有限公司</str_tb_FBT>
+    <str_tb_YPBH>
+    </str_tb_YPBH>
     <str_tb_CKBZ>
     </str_tb_CKBZ>
     <b_ck_ypsm>True</b_ck_ypsm>
@@ -119,10 +120,9 @@
       <YS0>C</YS0>
     </list_str_kllb_qcys>
     <str_kllb_qcys>C</str_kllb_qcys>
-    <str_kllb_DeleteClass>misc,Other Particles</str_kllb_DeleteClass>
+    <str_kllb_DeleteClass>misc</str_kllb_DeleteClass>
     <list_str_kllb_DeleteClass>
       <YS0>misc</YS0>
-      <YS1>Other Particles</YS1>
     </list_str_kllb_DeleteClass>
     <list_int_kllb_number>18</list_int_kllb_number>
   </M_KLLBXX>

+ 14 - 10
OTSIncAReportApp/1-UI/Control_ECharts/EChart_ParticlesComposition.cs

@@ -297,7 +297,8 @@ namespace OTSIncAReportApp.Control_ECharts
             //ListName
             for (int i = 0; i < dt.Rows.Count; i++)
             {
-                listName.Add(dt.Rows[i]["e1"].ToString());
+                if (dt.Rows[i]["e1"].ToString() != "")
+                    listName.Add(dt.Rows[i]["e1"].ToString());
             }
             chart.ListName = listName;
             //DataTable dt 
@@ -306,16 +307,19 @@ namespace OTSIncAReportApp.Control_ECharts
             //ListData
             for (int k = 0; k < dt.Rows.Count; k++)
             {
-                string str = dt.Rows[k]["Cunt"].ToString();
-                string name = dt.Rows[k]["e1"].ToString();
-                
-
-                Item item = new Item()
+                if (dt.Rows[k]["e1"].ToString() != "")
                 {
-                    value = decimal.Round(decimal.Parse(dt.Rows[k]["Cunt"].ToString()), 2).ToString(),
-                    name = name
-                };
-                listData.Add(item);
+                    string str = dt.Rows[k]["Cunt"].ToString();
+                    string name = dt.Rows[k]["e1"].ToString();
+
+
+                    Item item = new Item()
+                    {
+                        value = decimal.Round(decimal.Parse(dt.Rows[k]["Cunt"].ToString()), 2).ToString(),
+                        name = name
+                    };
+                    listData.Add(item);
+                }
 
             }
             chart.ListData = listData;

+ 6 - 5
OTSIncAReportApp/1-UI/Control_Graph/Controls/ImageExporter.cs

@@ -58,8 +58,9 @@ namespace OTSIncAReportApp._3_ServiceCenter
             imageProcessParam.TryGetValue("OverlapParam", out strOverlapParam);
             if (strOverlapParam == null)
             {
-                NLog.LogManager.GetCurrentClassLogger().Info("There are no overlapping dimensions");
-                return;
+                strOverlapParam = "0";
+                //NLog.LogManager.GetCurrentClassLogger().Info("There are no overlapping dimensions");
+                //return;
             }
             //获取图像重叠参数(微米需要转换成像素)
             int OverlapParam = int.Parse(strOverlapParam.ToString());
@@ -222,10 +223,10 @@ namespace OTSIncAReportApp._3_ServiceCenter
                 {
                     totalWidth = img.Width;
                 }
-                totalHeight += img.Height - (img != images[images.Count - 1] ? overlap : 0); // 最后一张图片不减去重叠  
+                //totalHeight += img.Height - (img != images[images.Count - 1] ? overlap : 0); // 最后一张图片不减去重叠  
             }
-            //int imgHeight = (int)OverlapParamPX * (images.Count - 1);
-            //totalHeight = images[images.Count-1].Height * images.Count- imgHeight;
+            int imgHeight = (int)OverlapParamPX * (images.Count - 1);
+            totalHeight = images[0].Height * (images.Count-1) - imgHeight;
             // 为最后一张图片添加完整的高度  
             if (images.Count > 1)
             {