Przeglądaj źródła

2024 6 27 Bug修复

DGJ 2 miesięcy temu
rodzic
commit
352eb3a761

+ 183 - 0
Assets/FrameWork/LocalXunJian.txt

@@ -0,0 +1,183 @@
+{
+  "code": 200,
+  "message": "success",
+  "data": {
+    "tasks": [
+      {
+        "id": 28507,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "巡检准备",
+        "description": "准备巡检工具,并检查个人防护装备,如防静电手环、防静电鞋等。",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 1
+      },
+      {
+        "id": 28508,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "气体钢瓶检查",
+        "description": "钢瓶连接阀是连接正常",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [
+          {
+            "id": 2032,
+            "name": "2",
+            "path": "project/243/task/resources/e3109622-4f86-43be-a0b8-c8be1bb1ad3c.png",
+            "uuid": "e3109622-4f86-43be-a0b8-c8be1bb1ad3c",
+            "loadingMethod": 1
+          }
+        ],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 2
+      },
+      {
+        "id": 28509,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "控制设备检查",
+        "description": "液晶控制屏是否正常显示",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [
+          {
+            "id": 2034,
+            "name": "微信图片_20240416135230",
+            "path": "project/243/task/resources/124c80cf-cd02-4c26-a1a8-7d4cb1983d34.jpg",
+            "uuid": "124c80cf-cd02-4c26-a1a8-7d4cb1983d34",
+            "loadingMethod": 1
+          }
+        ],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 3
+      },
+      {
+        "id": 28510,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "气体核对",
+        "description": "核对铭牌标识、液晶控制屏、虚拟信息显示中,气体名称是否一致。",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [
+          {
+            "id": 2035,
+            "name": "微信图片编辑_20240624181812",
+            "path": "project/243/task/resources/8b514fce-c734-4a17-8896-88495b2c9f6d.jpg",
+            "uuid": "8b514fce-c734-4a17-8896-88495b2c9f6d",
+            "loadingMethod": 1
+          },
+          {
+            "id": 2036,
+            "name": "微信图片编辑_20240624181917",
+            "path": "project/243/task/resources/c2d29846-3028-4659-90d1-06e10605fbc6.jpg",
+            "uuid": "c2d29846-3028-4659-90d1-06e10605fbc6",
+            "loadingMethod": 1
+          }
+        ],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 4
+      },
+      {
+        "id": 28511,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "基础数值核对",
+        "description": "虚拟信息显示面板中,送气/待机数值与现场液晶控制屏显示是否一致",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 5
+      },
+      {
+        "id": 28512,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "告警数值检查",
+        "description": "虚拟面板显示异常数据,进行现场核对,并确认异常是否存在",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 6
+      },
+      {
+        "id": 28513,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "操作指示",
+        "description": "针对虚拟信息显示面板中异常数据,进行对应操作,如:开放“待机”伐、关闭“送气”伐",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [
+          {
+            "id": 2037,
+            "name": "微信图片_20240416135230",
+            "path": "project/243/task/resources/a9b3a2b9-fc5a-4976-a848-918eff864a91.jpg",
+            "uuid": "a9b3a2b9-fc5a-4976-a848-918eff864a91",
+            "loadingMethod": 1
+          }
+        ],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 7
+      },
+      {
+        "id": 28514,
+        "projectInspectionId": 11915,
+        "projectId": 243,
+        "type": 2,
+        "title": "结果上传",
+        "description": "拍照上传处理后液晶控制板图片",
+        "targetingMethod": 1,
+        "locatorNumber": "",
+        "confirmNormal": true,
+        "diagram": [],
+        "resources": [],
+        "data": [],
+        "status": 0,
+        "completionTime": 0,
+        "sort": 8
+      }
+    ]
+  }
+}

+ 7 - 0
Assets/FrameWork/LocalXunJian.txt.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 37b9e1d3c7e9dbb46a7e5583ae08bcf3
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Assets/FrameWork/ProjectManager/XunJian/列表模块/列表模块.prefab

@@ -5016,7 +5016,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 85, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 1}
 --- !u!114 &4594328452210515319

+ 1 - 0
Assets/FrameWork/ProjectManager/paizhaoItem.prefab

@@ -164,6 +164,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 0ab938c0a73719d42b9f2a2ef9f79083, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  mediaPlayer: {fileID: 0}
 --- !u!1 &3810644886565967928
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 0
Assets/FrameWork/WindowsItem.asset

@@ -88,6 +88,8 @@ MonoBehaviour:
   listJosn:
   - name: LangChao
     obj: {fileID: 4900000, guid: 342eb3f8e94427b49b1fa40bf115d3a8, type: 3}
+  - name: LocalXunJian
+    obj: {fileID: 4900000, guid: 37b9e1d3c7e9dbb46a7e5583ae08bcf3, type: 3}
   listTexture:
   - PrefabList:
       name: icon

+ 0 - 198
Assets/HotUpdate/Scripts/Scripts/Project/RTC/AVProVideoPlayer.cs

@@ -1,198 +0,0 @@
-
-using RenderHeads.Media.AVProVideo;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using static MediaPlayerCtrl;
-
-public class AVProVideoPlayer : MonoBehaviour
-{
-    private MediaPlayerCtrl mediaPlayer;
-    private bool isVideoReady;
-    private void Start()
-    {
-        MediaPlayer.m_eventOnReady = new UnityEngine.Events.UnityEvent();
-        MediaPlayer.m_eventOnReady.AddListener(OnVideoReady);
-
-      //  SetUrl("D:\\2-3D.mp4");
-      //  Play();
-    }
-  
-    /// <summary>
-    ///  当前视频状态
-    /// </summary>
-    /// <param name="mp"></param>
-    /// <param name="et"></param>
-    /// <param name="errorCode"></param>
-    private void OnVideoReady()
-    {
-        isVideoReady = true;
-
-    }
-
-    public Texture getTexture()
-    {
-        return MediaPlayer.m_VideoTexture;
-    }
-    private MediaPlayerCtrl MediaPlayer
-    {
-        get 
-        { 
-            if(mediaPlayer == null)
-            {
-                mediaPlayer = GetComponent<MediaPlayerCtrl>();
-            }
-            if (mediaPlayer == null)
-            {
-                mediaPlayer = this.gameObject.AddComponent<MediaPlayerCtrl>();
-                 
-            }
-            return mediaPlayer;
-        }
-    }
-
-    public void Play()
-    {
-        if (MediaPlayer.pathLoad != null)
-        {
-
-            if (IsFinished())
-            {
-                MediaPlayer.Load(MediaPlayer.pathLoad);
-                Debug.Log("DGJ ===> Play Load " + MediaPlayer.pathLoad);
-            }
-            else
-            {
-
-                MediaPlayer.Play();
-                Debug.Log("DGJ ===> Play");
-            }
-        }else
-        {
-
-            Debug.LogError(" MediaPlayer.pathLoad == null");
-        }
-        Debug.Log("开始播放");
-    } 
-
-    public void Stop()
-    {
-        MediaPlayer.Stop();
-    }
-
-    public void Pause()
-    {
-        MediaPlayer.Pause();
-    }
-
-    public void SetUrl(string url)
-    {
-#if !UNITY_EDITOR
-
-  if(!url.Contains("file://") && !url.Contains("//"))
-        {
-            url = "file://" + url;
-        }
-#endif
-       
-        MediaPlayer.pathLoad= url;
-        Debug.Log("DGJ ===> pathLoad" + MediaPlayer.pathLoad);
-    }
-
-    public string GetUrl()
-    {
-        return MediaPlayer.pathLoad;
-    }
-
-    public void SetVolue( float volume)
-    {
-        MediaPlayer.SetVolume( volume);
-    }
-
-    public void SetSeek(float value)
-    {
-        float targetTimeMs = value;
-        if(targetTimeMs>=0&& targetTimeMs<=1)
-        MediaPlayer.SetSeekBarValue(targetTimeMs);
-    }
-
-    public float GetMaxTimer()
-    {
-        return (float)MediaPlayer.GetDuration()/1000;
-    }
-
-    public float GetNowTimer()
-    {
-        return (float)MediaPlayer.GetSeekPosition() / 1000;
-
-    }
-
-    public bool IsVideoReady()
-    {
-        return isVideoReady;
-    }
- 
-    public float GetVolue()
-    {
-       return MediaPlayer.m_fVolume;
-    }
-
-
-    public bool IsPlaying()
-    {
-        if(MediaPlayer == null||MediaPlayer.pathLoad==null)
-            return false;
-        try
-        {
-            if(MediaPlayer.m_CurrentState== MEDIAPLAYER_STATE.PLAYING&& MediaPlayer.m_CurrentState!= MEDIAPLAYER_STATE.END)
-            {
-                return true;
-            }
-            return false;
-        }
-        catch (System.Exception e)
-        {
-            Debug.LogError(e.Message);
-            return false;
-           
-        }
-      
-    }
-
-    public float GetVideoWidth()
-    {
-        return MediaPlayer.GetVideoWidth();
-    }
-
-    public float GetVideoHeight() 
-    { 
-        return mediaPlayer.GetVideoHeight();
-    }
-
-    public bool IsPaused()
-    {
-        if (MediaPlayer.m_CurrentState == MEDIAPLAYER_STATE.PAUSED)
-        {
-            return true;
-        }
-        return false;
-    }
-
-    public bool IsFinished()
-    {
-        if ( MediaPlayer.m_CurrentState == MEDIAPLAYER_STATE.END)
-        {
-
-            return true;
-        }
-            return false;
-    }
-
-   
-    public MEDIAPLAYER_STATE GetVideoState()
-    {
-        return MediaPlayer.m_CurrentState;
-    }
-
-
-}

+ 0 - 11
Assets/HotUpdate/Scripts/Scripts/Project/RTC/AVProVideoPlayer.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: eb94bf957aaed554492064dde1c1775e
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 20 - 3
Assets/HotUpdate/Scripts/Scripts/Project/XunJianLieBiaoItem.cs

@@ -72,6 +72,13 @@ public class XunJianLieBiaoItem : MonoBehaviour
     }
 
 
+    private string testTasksMsg;
+
+    private void Start()
+    {
+       TextAsset textAsset =  WindowsManager.Instance.GetJson("LocalXunJian");
+        testTasksMsg = textAsset.ToString();
+    }
 
     public void gotoXunJian()
     {
@@ -97,9 +104,19 @@ public class XunJianLieBiaoItem : MonoBehaviour
                 }
                 else
                 {
-                    ShowInfoTipManager.Instance.showTip("项目访问被拒绝");
-                    TimerMgr.Instance.CreateTimer(()=> { ShowInfoTipManager.Instance.closeTip(); },2f);
-                    data.tasksList = new List<XunJianTasks>();
+                    // msg = ""
+                    msg = testTasksMsg;
+                    JObject jObject2 = JObject.Parse(msg);
+                    Debug.Log("DGJLocal jObjectjObject" + jObject2["data"]["tasks"].ToString());
+
+                    data.tasksList = JsonConvert.DeserializeObject<List<XunJianTasks>>(jObject2["data"]["tasks"].ToString());
+
+
+                    if (!IsXunJianOver(data))
+                        XunJianDataManager.Instance.GotoXunJian(data);
+                    //ShowInfoTipManager.Instance.showTip("项目访问被拒绝");
+                    //TimerMgr.Instance.CreateTimer(()=> { ShowInfoTipManager.Instance.closeTip(); },2f);
+                    //data.tasksList = new List<XunJianTasks>();
                 }
             });
         }

+ 1 - 1
Assets/LangChaoRTC/Remote/ShowRoom/RemoteVideoControl.cs

@@ -76,7 +76,7 @@ public class RemoteVideoControl : MonoBehaviour
         {
             yield return new WaitForSeconds(0.1f);
 
-            switch (avProVideoPlayer.GetVideoState())
+            switch (avProVideoPlayer.mediaPlayer.m_CurrentState)
             {
                 case MediaPlayerCtrl.MEDIAPLAYER_STATE.NOT_READY:
                     if (!Icon.activeSelf)

+ 1 - 0
Assets/LangChaoRTC/Remote/ShowRoom/RoomFile.cs

@@ -192,6 +192,7 @@ public class RoomFile : RemoteSingleton<RoomFile>
 
     public void ClearAllFileItem()
     {
+        Debug.Log("DGJ ====> ClearAllFileItem()");
         if (ShowRoom.Instance && ShowRoom.Instance.fileConfiglist != null && ShowRoom.Instance.fileConfiglist.Count > 0)
         {
             ShowRoom.Instance.fileConfiglist.Clear();

+ 7 - 6
Assets/LangChaoRTC/Remote/ShowRoom/RoomInvite/Prefab/Mp4Item.prefab

@@ -541,7 +541,7 @@ MonoBehaviour:
   ChooseKuang: {fileID: 8863066222953644753}
   showVideo: {fileID: 0}
   rectTransform: {fileID: 7501303589197907794}
-  aVProVideoPlayer: {fileID: 2795984278497288442}
+  aVProVideoPlayer: {fileID: 2303724800065381063}
 --- !u!1 &2324156131359843720
 GameObject:
   m_ObjectHideFlags: 0
@@ -805,7 +805,7 @@ GameObject:
   - component: {fileID: 7501303589197907794}
   - component: {fileID: 4772399195672543194}
   - component: {fileID: 5004922790156949567}
-  - component: {fileID: 2795984278497288442}
+  - component: {fileID: 2303724800065381063}
   m_Layer: 3
   m_Name: MainVideo
   m_TagString: Untagged
@@ -856,11 +856,11 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   Icon: {fileID: 3304120222688893482}
   Stop: {fileID: 9123130154353662305}
-  avProVideoPlayer: {fileID: 2795984278497288442}
+  avProVideoPlayer: {fileID: 2303724800065381063}
   slider: {fileID: 6349363836886034461}
   currentTime: {fileID: 2207506276946927452}
   textTotalTime: {fileID: 7664475438327412785}
---- !u!114 &2795984278497288442
+--- !u!114 &2303724800065381063
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -869,9 +869,10 @@ MonoBehaviour:
   m_GameObject: {fileID: 4243057379313034182}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: eb94bf957aaed554492064dde1c1775e, type: 3}
+  m_Script: {fileID: 11500000, guid: 0ab938c0a73719d42b9f2a2ef9f79083, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  mediaPlayer: {fileID: 0}
 --- !u!1 &4468352108730432857
 GameObject:
   m_ObjectHideFlags: 0
@@ -1209,7 +1210,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: c54f43da0e693e24daf70f8941e1e41b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  ap: {fileID: 2795984278497288442}
+  ap: {fileID: 2303724800065381063}
 --- !u!1 &6349363835038450775
 GameObject:
   m_ObjectHideFlags: 0

+ 2 - 0
Assets/LangChaoRTC/Remote/ShowRoom/RoomInvite/Scripts/FileList.cs

@@ -93,6 +93,8 @@ public class FileList : UnitySingleton<FileList>
 
     public void DestoryAll()
     {
+
+        Debug.Log("DestoryAll");
         if (transform.childCount > 0)
         {
             for (int i = 0; i < transform.childCount; i++)

+ 6 - 5
Assets/Scripts/RTC/LiveRTCRoomMain.cs

@@ -46,10 +46,10 @@ public class LiveRTCRoomMain : MonoSingleton<LiveRTCRoomMain>
             //    rtcRawImage.gameObject.SetActive(false);
         }
 
-        if (!XRRGBCamera.Instance.RGBCamTexture.isPlaying)
-        {
-          //  XRRGBCamera.Instance.playCamera(1280, 720);
-        }
+        //if (!XRRGBCamera.Instance.RGBCamTexture.isPlaying)
+        //{
+        //  //  XRRGBCamera.Instance.playCamera(1280, 720);
+        //}
 
     }
     private void OnInit()
@@ -105,7 +105,8 @@ public class LiveRTCRoomMain : MonoSingleton<LiveRTCRoomMain>
 
     public void LeaveRoom()
     {
-       
+
+      
          RTCRoomManager.Instance.LeaveChannel();
 
         RTCMainManager.Instance.CloseRoomMain();

+ 12 - 11
Assets/Scripts/RTC/OnWebSocketMsg.cs

@@ -18,12 +18,12 @@ public class OnWebSocketMsg : MonoSingleton<OnWebSocketMsg>
             }
         }
 
-        if (SignalClient.showErrorList.Count > 0)
-        {
-            ShowError error = SignalClient.showErrorList.Dequeue();
+        //if (SignalClient.showErrorList.Count > 0)
+        //{
+        //    ShowError error = SignalClient.showErrorList.Dequeue();
 
-           // ErrorPopup.Instance.ShowRTCError(error.error, error.timer);
-        }
+        //   // ErrorPopup.Instance.ShowRTCError(error.error, error.timer);
+        //}
     }
 
     public void OnWebSocketMessage(SignalResponse response)
@@ -156,6 +156,7 @@ public class OnWebSocketMsg : MonoSingleton<OnWebSocketMsg>
                             string uid = obj["update"]["participants"][0]["sid"].ToString();
                             //if (ScenesManager.Instance.getWindow() == ScenesManager.SceneType.ShowRTC)
                             //{
+                            if (ScenesManager.Instance.getWindow() != ScenesManager.SceneType.ShowRoom)
                                 ScenesManager.Instance.showWindow(ScenesManager.SceneType.ShowRoom);
                             RTCMainManager.Instance.ShowRoomMain();
 
@@ -177,13 +178,13 @@ public class OnWebSocketMsg : MonoSingleton<OnWebSocketMsg>
                         {
                             RTCRoomManager.Instance.UserJoined(UserEnum.Player);
                          //   ErrorPopup.Instance.UpdateRTCState(NetState.Connect);
-                            if (SignalClient.isReconnect == true)
-                            {
-                                Debug.LogError("RTC服务重连成功");
+                            //if (SignalClient.isReconnect == true)
+                            //{
+                            //    Debug.LogError("RTC服务重连成功");
                               
-                                SignalClient.showErrorList.Enqueue(new ShowError("RTC服务重连成功", 3));
-                                SignalClient.isReconnect = false;
-                            }
+                            //    SignalClient.showErrorList.Enqueue(new ShowError("RTC服务重连成功", 3));
+                            //    SignalClient.isReconnect = false;
+                            //}
                             //  RTCRoomManager.Instance.OnLocalUserJoined();
                         }
                     }

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -147,8 +147,6 @@ PlayerSettings:
     Others: 1
   bundleVersion: 1.0.0
   preloadedAssets:
-  - {fileID: 2720162604194769745, guid: 6f45d16099e3af24c9d1814902f6c1cd, type: 2}
-  - {fileID: -1976151159784538485, guid: 2fc93d2ce72dd364f968f3400a68213b, type: 2}
   - {fileID: 4800000, guid: ea9a295053a0dc440b9698a7f41d9741, type: 3}
   - {fileID: 4800000, guid: 1499e61b3897c4a4b9318a56ca931b8a, type: 3}
   - {fileID: 4800000, guid: 798d6e253a35a144d94205b80c8fd48b, type: 3}
@@ -156,6 +154,8 @@ PlayerSettings:
   - {fileID: 4800000, guid: 58841e6e22debfc43ba09a0cf58cd92d, type: 3}
   - {fileID: 4800000, guid: a336f422ffebbec4c89b4dac26022d5f, type: 3}
   - {fileID: 11400000, guid: 852e6bd112d2b174996470390b08d3a7, type: 2}
+  - {fileID: 2720162604194769745, guid: 6f45d16099e3af24c9d1814902f6c1cd, type: 2}
+  - {fileID: -1976151159784538485, guid: 2fc93d2ce72dd364f968f3400a68213b, type: 2}
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1