Przeglądaj źródła

调整云服务登录模式选择的位置从系统设置移到云服务登录

felix 1 rok temu
rodzic
commit
970e43b234

+ 5 - 6
Vinno.FIS.Sonopost/Assets/wwwroot/js/index.js

@@ -671,7 +671,11 @@ $(async function () {
                 name: "ServerNetworkCheck",
                 title: "PageTitle4ServerNetCheck",
                 path: "networkcheck"
-            },
+            }, {
+                name: "ServerLoginModeSelection",
+                title: "PageTitle4ServerLoginModeSelection",
+                path: "vcloudloginmode"
+            }
             ]
         }, {
             name: "LiveManager",
@@ -759,11 +763,6 @@ $(async function () {
             title: "MenuTitle4System",
             path: "system",
             children: [{
-                name: "VCloudLogin",
-                title: "PageTitle4VCloudLogin",
-                path: "vcloudlogin"
-            },
-            {
                 name: "SystemRestart",
                 title: "PageTitle4SystemReboot",
                 path: "restart"

+ 7 - 6
Vinno.FIS.Sonopost/Assets/wwwroot/lang/en-us.json

@@ -25,8 +25,9 @@
   "PageTitle4SystemLog": "System log",
   "PageTitle4SystemVersion": "Version info",
   "PageTitle4RainbowImage": "Rainbow Image Detect setting",
-  "PageTitle4VCloudLogin": "VCloud login setting",
-  "PageDesc4ServerLogin": "You need to select the vCloud server of sonopost to successfully log in the cloud service. After the QR code appears in sonopost, indicating that the cloud service has been logged in successfully",
+  "PageTitle4ServerLoginModeSelection": "Login Mode Selection",
+  "PageDesc4ServerLoginModeSelection": "Please select the vCloud service login mode.In default mode, you can login without the account and password.",
+  "PageDesc4ServerLogin": "You need to select the vCloud server of sonopost to successfully log in the vCloud service. After the QR code appears in sonopost, indicating that the vCloud service has been logged in successfully",
   "PageDesc4ServerRegister": "You need to create a new account for sonopost when the first time to install it",
   "PageDesc4ServerNetCheck": "When sonopost fails to log in due to various reasons, the network detection and troubleshooting can be carried out",
   "PageDesc4LiveSono": "Enable the live broadcast of the ultrasonic machine, select the appropriate resolution and save it, then you can watch the real-time live broadcast of the ultrasonic machine",
@@ -37,16 +38,16 @@
   "PageDesc4DicomFailList": "Time-sharing diagnosis may have transmission failure due to network fluctuations. Relevant cases can be selected from this list and retransmitted",
   "PageDesc4DicomStation": "Enabled the DICOM connection of vStation, then The image or video transmitted by the ultrasound machine can be forwarded to the vStation through sonopost",
   "PageDesc4NetworkWifi": "In a WIFI environment, the WIFI network can be searched and connected",
-  "PageDesc4NetworkAdvance": "If the Sonopost is connected to the external network and the internal network at the same time, the external network is connected to the cloud service, and the internal network is connected to the DICOM storage, this setting shall be enabled",
+  "PageDesc4NetworkAdvance": "If the Sonopost is connected to the external network and the internal network at the same time, the external network is connected to the vCloud service, and the internal network is connected to the DICOM storage, this setting shall be enabled",
   "DeviceBindingQrCodeGuide": "Use Flyinsono scan or manually enter a unique code to bind the device",
   "Testingsuccessfully": "Testing successfully",
   "VCloudTestTimeoutError": "Test Failed or Connection Time Out!",
   "NetworkStatusTestError1": "Please check network cabling or WIFI connection",
   "NetworkStatusTestError2": "Cannot get access to network, please check network speed and whether there is trust control in firewall setting.",
   "NetworkStatusTestError3": "Cannot resolve DNS, please check network speed and whether server address is correct. If problem remains, visit “General” tab to refresh DNS cache and check DNS setting in network.",
-  "vCloudServerConnectionTestError1": "Cannot get access to cloud service, please check network speed and confirm cloud server port can be visited in the network setting.",
+  "vCloudServerConnectionTestError1": "Cannot get access to vCloud service, please check network speed and confirm vCloud server port can be visited in the network setting.",
   "vCloudServerConnectionTestError2": "Sonopost OS version is too old, please check for updates and upgrade.",
-  "RemedicalServiceTestError1": "Image cloud storage service is disabled.",
+  "RemedicalServiceTestError1": "Image vCloud storage service is disabled.",
   "RemedicalServiceTestError2": "Cannot get image storage service port, please contact service engineer for trouble shooting.",
   "RemedicalServiceTestError3": "Cannot get access to image storage service, please check network speed and confirm image storage server port can be visited in the network setting.",
   "LiveUsServiceTestError1": "Live streaming service is disabled, if no need to use this feature, press closed to finish the test.",
@@ -192,7 +193,7 @@
   "AfterEnableIntervalTime": "The Interval Time After Enable The Driver(ms)",
   "NeedPositiveInt": "positive interger,the unit is ms.",
   "PositiveIntFormatError": "The format is wrong, please input positive interger, the unit is ms.",
-  "LoginWithAccountAndPassword": "Login With Account and Password",
+  "EnableLoginWithAccountAndPassword": "Enable login with account and password",
   "EthernetInterface1": "Ethernet Interface 1",
   "EthernetInterface2": "Ethernet Interface 2",
   "EthernetInterface3": "Ethernet Interface 3",

+ 3 - 2
Vinno.FIS.Sonopost/Assets/wwwroot/lang/zh-cn.json

@@ -25,7 +25,8 @@
   "PageTitle4SystemLog": "系统日志",
   "PageTitle4SystemVersion": "版本信息",
   "PageTitle4RainbowImage": "彩虹图监测设置",
-  "PageTitle4VCloudLogin": "云服务登录设置",
+  "PageTitle4ServerLoginModeSelection": "登录方式选择",
+  "PageDesc4ServerLoginModeSelection": "请选择云服务登录的方式。默认模式可直接登录,无需输入账号密码。",
   "PageDesc4ServerLogin": "请选择云服务器方可成功登录云服务,二维码出现后,意味着超声魔盒成功登录至云服务",
   "PageDesc4ServerRegister": "初次安装魔盒,需要为该魔盒创建新账号",
   "PageDesc4ServerNetCheck": "超声魔盒因各种原因登录失败时,可进行网络检测排查原因",
@@ -192,7 +193,7 @@
   "AfterEnableIntervalTime": "启用驱动后的等待时间(毫秒)",
   "NeedPositiveInt": "正整数,单位为毫秒。",
   "PositiveIntFormatError": "格式错误,请输入正整数,单位为毫秒。",
-  "LoginWithAccountAndPassword": "通过账号密码登录",
+  "EnableLoginWithAccountAndPassword": "启用账号密码方式登录",
   "EthernetInterface1": "网络端口1",
   "EthernetInterface2": "网络端口2",
   "EthernetInterface3": "网络端口3",

+ 1 - 1
Vinno.FIS.Sonopost/Assets/wwwroot/pages/server/login.html

@@ -359,7 +359,7 @@
                 );
                 if (!currentLoginMode.IsSuccess)
                     return layer.msg.error($t("GetCurrentVCloudLoginMode Error"));
-                let loginMode = await $api("system", "LoadVCloudLoginSetting");
+                let loginMode = await $api("server", "LoadVCloudLoginSetting");
                 if (!loginMode.IsSuccess)
                     return layer.msg.error($t("LoadVCloudLoginSetting Error"));
                 let account = form.find(formFilter, "Account");

+ 8 - 6
Vinno.FIS.Sonopost/Assets/wwwroot/pages/system/vcloudlogin.html → Vinno.FIS.Sonopost/Assets/wwwroot/pages/server/vcloudloginmode.html

@@ -1,5 +1,7 @@
-<div>
-    <div class="layui-form page-form" lay-filter="FormVCloudLogin">
+<div class="page-title" data-content="PageTitle4ServerLoginModeSelection"></div>
+<div class="page-desc" data-content="PageDesc4ServerLoginModeSelection"></div>
+<div>
+    <div class="layui-form page-form" lay-filter="FormLoginModeSelection">
         <div class="layui-form-item" style="padding-left: 20px">
             <div class="layui-inline">
                 <input type="checkbox"
@@ -9,7 +11,7 @@
                        lay-skin="switch" />
                 <label class="layui-form-label"
                        style="float: right; width: 300px"
-                       data-content="LoginWithAccountAndPassword"></label>
+                       data-content="EnableLoginWithAccountAndPassword"></label>
             </div>
         </div>
         <div class="layui-form-item">
@@ -24,7 +26,7 @@
     function Page(app, runtime) {
         const { $api, $t, $c } = runtime;
         const { form, layer } = layui;
-        const formFilter = "FormVCloudLogin";
+        const formFilter = "FormLoginModeSelection";
 
         this.onload = async function () {
             loadVCloudLoginSetting();
@@ -34,7 +36,7 @@
         };
 
         async function loadVCloudLoginSetting() {
-            let res = await $api("system", "LoadVCloudLoginSetting");
+            let res = await $api("server", "LoadVCloudLoginSetting");
             if (res.IsSuccess) {
                 let result = res.Data;
                 $("#vcloudloginwitch").prop(
@@ -50,7 +52,7 @@
         async function saveVCloudLoginSetting(data) {
             data.IsLoginWithAccountAndPassword =
                 data.IsLoginWithAccountAndPassword == "on";
-            let res = await $api("system", "SaveVCloudLoginSetting", data);
+            let res = await $api("server", "SaveVCloudLoginSetting", data);
             if (res.IsSuccess) {
                 layer.msg.success($t("SaveSuccess"));
             } else {

+ 1 - 1
Vinno.FIS.Sonopost/Vinno.FIS.Sonopost.csproj

@@ -309,7 +309,7 @@
     <EmbeddedResource Include="Assets\wwwroot\pages\system\rainbowimage.html" />
     <EmbeddedResource Include="Assets\wwwroot\pages\system\recover.html" />
     <EmbeddedResource Include="Assets\wwwroot\pages\system\restart.html" />
-    <EmbeddedResource Include="Assets\wwwroot\pages\system\vcloudlogin.html" />
+    <EmbeddedResource Include="Assets\wwwroot\pages\server\vcloudloginmode.html" />
     <EmbeddedResource Include="Assets\wwwroot\pages\system\version.html" />
     <EmbeddedResource Include="Resources\wifi_1.png" />
     <EmbeddedResource Include="Resources\wifi_2.png" />

+ 38 - 0
Vinno.FIS.Sonopost/WebApi/Controllers/ServerController.cs

@@ -275,6 +275,44 @@ namespace Vinno.FIS.Sonopost.WebApi.Controllers
             }
         }
 
+        /// <summary>
+        /// 读取云服务登录设置
+        /// </summary>
+        /// <returns></returns>
+        [WebApiAction]
+        public Result LoadVCloudLoginSetting()
+        {
+            try
+            {
+                return Result.Success(new VCloudLoginRequest { IsLoginWithAccountAndPassword = SonopostUserDefinedSettings.Instance.ServerSetting.IsLoginWithAccountAndPassword });
+            }
+            catch (Exception ex)
+            {
+                Logger.WriteLineError($"Load VCloud Login Setting Error:{ex}");
+                return Result.Fail();
+            }
+        }
+
+        /// <summary>
+        /// 保存云服务登录设置
+        /// </summary>
+        /// <returns></returns>
+        [WebApiAction]
+        public Result SaveVCloudLoginSetting(VCloudLoginRequest vCloudLoginRequest)
+        {
+            try
+            {
+                SonopostUserDefinedSettings.Instance.ServerSetting.IsLoginWithAccountAndPassword = vCloudLoginRequest.IsLoginWithAccountAndPassword;
+                ConfigManager.Save();
+                return Result.Success();
+            }
+            catch (Exception ex)
+            {
+                Logger.WriteLineError($"Save VCloud Login Setting Error:{ex}");
+                return Result.Fail();
+            }
+        }
+
         #region Private Methods
 
         private void UpdateAccount(string name, string password)

+ 0 - 38
Vinno.FIS.Sonopost/WebApi/Controllers/SystemController.cs

@@ -259,44 +259,6 @@ namespace Vinno.FIS.Sonopost.WebApi.Controllers
             }
         }
 
-        /// <summary>
-        /// 读取云服务登录设置
-        /// </summary>
-        /// <returns></returns>
-        [WebApiAction]
-        public Result LoadVCloudLoginSetting()
-        {
-            try
-            {
-                return Result.Success(new VCloudLoginRequest { IsLoginWithAccountAndPassword = SonopostUserDefinedSettings.Instance.ServerSetting.IsLoginWithAccountAndPassword });
-            }
-            catch (Exception ex)
-            {
-                Logger.WriteLineError($"Load VCloud Login Setting Error:{ex}");
-                return Result.Fail();
-            }
-        }
-
-        /// <summary>
-        /// 保存云服务登录设置
-        /// </summary>
-        /// <returns></returns>
-        [WebApiAction]
-        public Result SaveVCloudLoginSetting(VCloudLoginRequest vCloudLoginRequest)
-        {
-            try
-            {
-                SonopostUserDefinedSettings.Instance.ServerSetting.IsLoginWithAccountAndPassword = vCloudLoginRequest.IsLoginWithAccountAndPassword;
-                ConfigManager.Save();
-                return Result.Success();
-            }
-            catch (Exception ex)
-            {
-                Logger.WriteLineError($"Save VCloud Login Setting Error:{ex}");
-                return Result.Fail();
-            }
-        }
-
         /// <summary>
         /// 设置彩虹图监测开关
         /// </summary>