From 093120315d86e7c0d87f7566498d65941f802672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CCongG=E2=80=9D?= Date: Fri, 10 Jan 2025 09:01:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dwebgl=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataModel/AZBSData/DataNiuHandler.cs | 2 +- .../_Scripts/Application/UI/ScoreDataPanel.cs | 19 ++++++++++--------- .../Utilities/FolderBrowserHelper.cs | 12 ++++++------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Assets/_Scripts/Application/DataModel/AZBSData/DataNiuHandler.cs b/Assets/_Scripts/Application/DataModel/AZBSData/DataNiuHandler.cs index 70013b8..7692c97 100644 --- a/Assets/_Scripts/Application/DataModel/AZBSData/DataNiuHandler.cs +++ b/Assets/_Scripts/Application/DataModel/AZBSData/DataNiuHandler.cs @@ -109,7 +109,7 @@ namespace ZXK.LouDiXvMuNiu for (int i = 0; i < _niuDataArray.Count; i++) { - if (string.IsNullOrEmpty(_niuDataArray[i].TaskName)) continue; + if (string.IsNullOrEmpty(_niuDataArray[i].TaskName)|| _niuDataArray[i].ThreeTaskName==ConstCtrl.ThreeTaskName_PeoplePlan) continue; curstep = _niuDataArray[i]; if (i == _niuDataArray.Count - 1) { diff --git a/Assets/_Scripts/Application/UI/ScoreDataPanel.cs b/Assets/_Scripts/Application/UI/ScoreDataPanel.cs index 64b3dc9..7327348 100644 --- a/Assets/_Scripts/Application/UI/ScoreDataPanel.cs +++ b/Assets/_Scripts/Application/UI/ScoreDataPanel.cs @@ -61,15 +61,8 @@ namespace ZXK.LouDiXvMuNiu { if (!CheckInfo()) return; Queue scoreQueue = GameManager.Instance._DataNiuHandler.GetExamScore(); -#if UNITY_WEBGL - string systemTypeName = GameManager.Instance._CurModelType; - string fileName = "实训成绩单_牛的胚胎移植.pdf"; - PDFGreadeManager.Instance.GreatePDFWeb(fileName - , systemTypeName - , scoreQueue - , GameManager.Instance._StudentName - , GameManager.Instance._StudentNumber); -#else +#if UNITY_EDITOR || UNITY_STANDALONE + string savePath = CG.UTility.FolderBrowserHelper.GetPathFromWindowsExplorer(); if (!string.IsNullOrEmpty(savePath)) { @@ -87,6 +80,14 @@ namespace ZXK.LouDiXvMuNiu () => { FolderBrowserHelper.OpenFolder(filePath); }); }); } +#elif UNITY_WEBGL + string systemTypeName = GameManager.Instance._CurModelType; + string fileName = "实训成绩单_牛的胚胎移植.pdf"; + PDFGreadeManager.Instance.GreatePDFWeb(fileName + , systemTypeName + , scoreQueue + , GameManager.Instance._StudentName + , GameManager.Instance._StudentNumber); #endif }); ShowScore(GameManager.Instance._DataNiuHandler.GetExamScore()); diff --git a/Assets/_Scripts/Framework/Utilities/FolderBrowserHelper.cs b/Assets/_Scripts/Framework/Utilities/FolderBrowserHelper.cs index 739b31b..c189c31 100644 --- a/Assets/_Scripts/Framework/Utilities/FolderBrowserHelper.cs +++ b/Assets/_Scripts/Framework/Utilities/FolderBrowserHelper.cs @@ -148,10 +148,10 @@ namespace CG.UTility /// /// 打开对话框的标题 /// 所选文件夹路径 -#if UNITY_WEBGL +#if UNITY_EDITOR || UNITY_STANDALONE + public +#elif UNITY_WEBGL private -#else - public #endif static string GetPathFromWindowsExplorer(string dialogtitle = "请选择下载路径") { @@ -188,10 +188,10 @@ namespace CG.UTility /// 打开目录 /// /// 将要打开的文件目录 -#if UNITY_WEBGL +#if UNITY_EDITOR || UNITY_STANDALONE + public +#elif UNITY_WEBGL private -#else - public #endif static void OpenFolder(string path) {