Browse Source

Merge branch 'dev' of http://172.16.3.77:10080/gaoshipeng/OTS2_0 into dev

CXS 4 years ago
parent
commit
430c8398a5

+ 12 - 12
OTSIncAReportApp/FunctionClass/OTSDisplaySGridData/SampleGrid.cs

@@ -724,9 +724,9 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
                     switch (ChartType)
                     {
                         case 0:
-                            m_reportname = "常用夹杂物分类";
-                            m_str_AxisY = table["m_str_axisy2"].ToString();
-                            str_operatonmodule = table["str_operatonmodule2"].ToString();
+                            m_reportname = table["m_reportname1"].ToString();//常用夹杂物分类
+                            m_str_AxisY = table["m_str_axisy1"].ToString();
+                            str_operatonmodule = table["str_operatonmodule1"].ToString();
 
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition = new Control_ECharts.EChart_ParticlesComposition(m_RstProp.m_ReportApp, "CommonlyUsedClassify");
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition.Dock = DockStyle.Fill;
@@ -737,9 +737,9 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
                             m_RstProp.m_ReportApp.m_CChartsWindow.Activate();
                             break;
                         case 1:
-                            m_reportname = table["m_reportname2"].ToString();
-                            m_str_AxisY = table["m_str_axisy2"].ToString();
-                            str_operatonmodule = table["str_operatonmodule2"].ToString();
+                            m_reportname = table["m_reportname2"].ToString();//颗粒成分
+                            m_str_AxisY = table["m_str_axisy2"].ToString();//颗粒数
+                            str_operatonmodule = table["str_operatonmodule2"].ToString();//颗粒成分图
 
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition = new Control_ECharts.EChart_ParticlesComposition(m_RstProp.m_ReportApp, "PComponent");
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition.Dock = DockStyle.Fill;
@@ -750,9 +750,9 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
                             m_RstProp.m_ReportApp.m_CChartsWindow.Activate();
                             break;
                         case 2:
-                            m_reportname = table["m_reportname3"].ToString();
-                            m_str_AxisY = table["m_str_axisy3"].ToString();
-                            str_operatonmodule = table["str_operatonmodule3"].ToString();
+                            m_reportname = table["m_reportname3"].ToString();//元素成分
+                            m_str_AxisY = table["m_str_axisy3"].ToString();//元素含量
+                            str_operatonmodule = table["str_operatonmodule3"].ToString();//元素成分图
 
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition = new Control_ECharts.EChart_ParticlesComposition(m_RstProp.m_ReportApp, "EComponent");
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition.Dock = DockStyle.Fill;
@@ -763,9 +763,9 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
                             m_RstProp.m_ReportApp.m_CChartsWindow.Activate();
                             break;
                         case 3://颗粒尺寸分布图
-                            m_reportname = table["m_reportname4"].ToString();
-                            m_str_AxisY = table["m_str_axisy4"].ToString();
-                            str_operatonmodule = table["str_operatonmodule4"].ToString();
+                            m_reportname = table["m_reportname4"].ToString();//颗粒尺寸分布
+                            m_str_AxisY = table["m_str_axisy4"].ToString();//颗粒数
+                            str_operatonmodule = table["str_operatonmodule4"].ToString();//颗粒尺寸分布图
 
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition = new Control_ECharts.EChart_ParticlesComposition(m_RstProp.m_ReportApp, "PSize");
                             m_RstProp.m_ReportApp.im_EChart_ParticlesComposition.Dock = DockStyle.Fill;

+ 4 - 4
OTSIncAReportApp/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -850,7 +850,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// 向 模板设计器 中插入 颗粒成份图
         /// </summary>
         /// <returns></returns>
-        public bool InsertReportTemplateChart_ParticalesCompositionChart()
+        public bool InsertReportTemplateChart_ParticalesCompositionChart(string a_AnalyticGraphics)
         {
             try
             {
@@ -858,7 +858,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 //加载模块
                 m_otsreport_export.m_ReportApp.im_EChart_ParticlesComposition = new EChart_ParticlesComposition(m_otsreport_export.m_ReportApp, "PComponent");
                 m_otsreport_export.m_ReportApp.m_reportname = "InclusionClassification";
-                m_otsreport_export.m_ReportApp.type = "bar";
+                m_otsreport_export.m_ReportApp.type = a_AnalyticGraphics;
                 m_otsreport_export.m_ReportApp.timerKG = true;
                 m_otsreport_export.m_ReportApp.m_CChartsWindow.Controls.Add(m_otsreport_export.m_ReportApp.im_EChart_ParticlesComposition);
 
@@ -907,7 +907,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// 向 模板设计器 中插入 元素成份图
         /// </summary>
         /// <returns></returns>
-        public bool InsertReportTemplateChart_ElementCompositionChart()
+        public bool InsertReportTemplateChart_ElementCompositionChart(string a_AnalyticGraphics)
         {
             try
             {
@@ -915,7 +915,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 //加载模块
                 m_otsreport_export.m_ReportApp.im_EChart_ParticlesComposition = new EChart_ParticlesComposition(m_otsreport_export.m_ReportApp, "EComponent");
                 m_otsreport_export.m_ReportApp.m_reportname = "ElementComposition";
-                m_otsreport_export.m_ReportApp.type = "radius";
+                m_otsreport_export.m_ReportApp.type = a_AnalyticGraphics;
                 m_otsreport_export.m_ReportApp.timerKG = true;
                 m_otsreport_export.m_ReportApp.m_CChartsWindow.Controls.Add(m_otsreport_export.m_ReportApp.im_EChart_ParticlesComposition);
 

+ 17 - 4
OTSIncAReportApp/OTSTemplateDesigner/OTSReport_Export.cs

@@ -1891,17 +1891,30 @@ namespace OTSIncAReportApp
 
             #endregion 依将循环调用各功能模块结束-------------------------------------------------------
         }
+        private string AnalyticGraphics(int a_Indexes)
+        {
+            if (a_Indexes == 0)
+                return "pie";//饼图
+            else if (a_Indexes == 1)
+                return "radius";//圈图
+            else if (a_Indexes == 2)
+                return "bar";//柱状图
+            else if (a_Indexes == 3)
+                return "line";//线状图
+            else return "stack";//堆叠图
+        }
 
         private void backgroundWorker2_ProgressChanged(object sender, ProgressChangedEventArgs e)
         {
             BackgroundWorker worker = sender as BackgroundWorker;
-
+          
             //更新进度条的进度
             if (e.UserState != null)
             {
                 string ls_str = (string)e.UserState;
                 WriteRictBox((string)e.UserState);
-
+                
+             string s=  AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx);
                 if (ls_str.IndexOf("加载:") > -1)
                 {
                     if (ls_str.IndexOf("测量结果信息表") > -1)
@@ -1934,13 +1947,13 @@ namespace OTSIncAReportApp
 
                     if (ls_str.IndexOf("颗粒成份图") > -1)
                     {
-                        m_export_reporttemplate.InsertReportTemplateChart_ParticalesCompositionChart();
+                        m_export_reporttemplate.InsertReportTemplateChart_ParticalesCompositionChart(AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx));
                         lock (m_thread_flag)
                             m_thread_flag = "无";
                     }
                     if (ls_str.IndexOf("元素成份图") > -1)
                     {
-                        m_export_reporttemplate.InsertReportTemplateChart_ElementCompositionChart();
+                        m_export_reporttemplate.InsertReportTemplateChart_ElementCompositionChart(AnalyticGraphics(m_mbszclass.M_YSFXJG.index_cb_yscf_xstx));
                         lock (m_thread_flag)
                             m_thread_flag = "无";
                     }