Эх сурвалжийг харах

PC端打开独立窗口编辑报告

loki.wu 2 жил өмнө
parent
commit
0b81d7478e

+ 2 - 0
fis/App.axaml.cs

@@ -37,6 +37,8 @@ namespace fis
             {
                 var manager = AppManager.Get<ISecondaryScreenManager>();
                 await manager.ShowWindowByTypeAsync(WindowType.Measure, "http://" + ShellConfig.Instance.AppHost+ "/index.html?page=measure", new System.Collections.Generic.Dictionary<string, string>(),false);
+   
+                await manager.ShowWindowByTypeAsync(WindowType.ReportEdit, "http://" + ShellConfig.Instance.AppHost+ "/index.html?page=report", new System.Collections.Generic.Dictionary<string, string>(),false);
             }
             catch (Exception ex) {
                 

+ 10 - 0
fis/IPlatformService.cs

@@ -46,6 +46,16 @@ namespace fis
         /// <returns></returns>
         bool OpenImageMeasure(string token, string patientCode, string remedicalCode, string recordCode);
 
+        /// <summary>
+        /// 打开报告编辑页面
+        /// </summary>
+        /// <param name="token"></param>
+        /// <param name="patientCode"></param>
+        /// <param name="reportCode"></param>
+        /// <param name="recordCode"></param>
+        /// <returns></returns>
+        bool OpenReportEdit(string token, string patientCode, string reportCode, string recordCode);
+
         /// <summary>
         /// 打开报告模板设计器
         /// </summary>

+ 1 - 1
fis/Managers/SecondaryScreenManager.cs

@@ -23,7 +23,7 @@ namespace fis.Win.Dev.Managers
                 if (windows.Keys.Contains(windowType))
                 {
                     window = windows[windowType];
-                    window.ChangeContentView(host, keyValuePairs);
+                    window.ChangeContentView(host, keyValuePairs,windowType);
                 }
                 else
                 {

+ 19 - 0
fis/PlatformService.cs

@@ -48,6 +48,25 @@ namespace fis
             return true;
         }
 
+        /// <summary>
+        /// 打开报告编辑页面
+        /// </summary>
+        /// <param name="token"></param>
+        /// <param name="patientCode"></param>
+        /// <param name="reportCode"></param>
+        /// <param name="recordCode"></param>
+        /// <returns></returns>
+        public bool OpenReportEdit(string token, string patientCode, string reportCode, string recordCode) {
+            var dictionary = new Dictionary<string, string>();
+            dictionary.Add("token", token);
+            dictionary.Add("patientCode", patientCode);
+            dictionary.Add("reportCode", reportCode);
+            dictionary.Add("recordCode", recordCode);
+            var manager = AppManager.Get<ISecondaryScreenManager>();
+            manager.ShowWindowByTypeAsync(WindowType.ReportEdit, "http://" + ShellConfig.Instance.AppHost + "/#/remedical/report/report_edit", dictionary).GetAwaiter().GetResult();
+            return true;
+        }
+
         /// <summary>
         /// 打开报告设计器
         /// </summary>

+ 10 - 2
fis/SlaveWindow.axaml.cs

@@ -55,7 +55,7 @@ namespace fis
         /// </summary>
         /// <param name="host"></param>
         /// <param name="keyValuePairs"></param>
-        internal void ChangeContentView(string host, Dictionary<string, string> keyValuePairs)
+        internal void ChangeContentView(string host, Dictionary<string, string> keyValuePairs,WindowType windowType)
         {
             _host = host;
             _parameters = keyValuePairs;
@@ -71,7 +71,15 @@ namespace fis
                 ShowInTaskbar = true;
                 ShowActivated = true;
             }
-            ExecuteJS("externalNotification", TargetMethodName.OpenMeasurePage, arguments);
+            TargetMethodName targetMethodName;
+            if (windowType == WindowType.Measure)
+            {
+                targetMethodName = TargetMethodName.OpenMeasurePage;
+            }
+            else {
+                targetMethodName = TargetMethodName.OpenReportEditPage;
+            }
+            ExecuteJS("externalNotification", targetMethodName, arguments);
             Show();
         }
 

+ 1 - 0
fis/Utilities/TargetMethodName.cs

@@ -4,5 +4,6 @@
     {
         SaveReportTemplate,
         OpenMeasurePage,
+        OpenReportEditPage,
     }
 }