lihao1 vor 3 Jahren
Ursprung
Commit
d5e82f3b6b
61 geänderte Dateien mit 1243 neuen und 1739 gelöschten Zeilen
  1. 1 1
      demo/build.gradle
  2. 745 0
      demo/src/main/assets/dist/JsonConfig/PorjectConfig.json
  3. 0 22
      demo/src/main/assets/dist/abc.html
  4. 1 0
      demo/src/main/assets/dist/css/app.79d266af.css
  5. 1 0
      demo/src/main/assets/dist/css/chunk-vendors.a16c4353.css
  6. BIN
      demo/src/main/assets/dist/favicon.ico
  7. BIN
      demo/src/main/assets/dist/fonts/element-icons.535877f5.woff
  8. BIN
      demo/src/main/assets/dist/fonts/element-icons.732389de.ttf
  9. 18 1
      demo/src/main/assets/dist/index.html
  10. 2 0
      demo/src/main/assets/dist/js/app.78aef205.js
  11. 1 0
      demo/src/main/assets/dist/js/app.78aef205.js.map
  12. 74 0
      demo/src/main/assets/dist/js/chunk-vendors.d31a0221.js
  13. 1 0
      demo/src/main/assets/dist/js/chunk-vendors.d31a0221.js.map
  14. 0 2
      demo/src/main/assets/dist/static/css/app.aa519651e328a583ca88e8b7d02122ab.css
  15. 0 1
      demo/src/main/assets/dist/static/css/app.aa519651e328a583ca88e8b7d02122ab.css.map
  16. 0 2
      demo/src/main/assets/dist/static/css/app.cca059254702f9ed953b7df749673cf4.css
  17. 0 1
      demo/src/main/assets/dist/static/css/app.cca059254702f9ed953b7df749673cf4.css.map
  18. 0 2
      demo/src/main/assets/dist/static/js/app.4768fdc1107768177998.js
  19. 0 1
      demo/src/main/assets/dist/static/js/app.4768fdc1107768177998.js.map
  20. 0 2
      demo/src/main/assets/dist/static/js/app.c59eccc233104d73ccb7.js
  21. 0 1
      demo/src/main/assets/dist/static/js/app.c59eccc233104d73ccb7.js.map
  22. 0 2
      demo/src/main/assets/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js
  23. 0 1
      demo/src/main/assets/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map
  24. 0 2
      demo/src/main/assets/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js
  25. 0 1
      demo/src/main/assets/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  26. 0 13
      demo/src/main/assets/dist/static/js/vendor.7fed9fa7b7ba482410b7.js
  27. 0 1
      demo/src/main/assets/dist/static/js/vendor.7fed9fa7b7ba482410b7.js.map
  28. 0 13
      demo/src/main/assets/dist/static/js/vendor.9d43f691bba00d2c76b8.js
  29. 0 1
      demo/src/main/assets/dist/static/js/vendor.9d43f691bba00d2c76b8.js.map
  30. 0 1
      demo/src/main/assets/vue/index.html
  31. 0 310
      demo/src/main/assets/vue/static/css/app.365230fcdec5540c73c87126a6b39cdb.css
  32. 0 1
      demo/src/main/assets/vue/static/css/app.365230fcdec5540c73c87126a6b39cdb.css.map
  33. BIN
      demo/src/main/assets/vue/static/fonts/iconfont.83485c9.ttf
  34. BIN
      demo/src/main/assets/vue/static/fonts/iconfont.df5f83a.eot
  35. 0 1259
      demo/src/main/assets/vue/static/img/iconfont.15eea4c.svg
  36. 0 2
      demo/src/main/assets/vue/static/js/app.bcfe948aec3e9d1194c5.js
  37. 0 1
      demo/src/main/assets/vue/static/js/app.bcfe948aec3e9d1194c5.js.map
  38. 0 2
      demo/src/main/assets/vue/static/js/manifest.2ae2e69a05c33dfc65f8.js
  39. 0 1
      demo/src/main/assets/vue/static/js/manifest.2ae2e69a05c33dfc65f8.js.map
  40. 0 13
      demo/src/main/assets/vue/static/js/vendor.94ad8e265ab2d614e07f.js
  41. 0 1
      demo/src/main/assets/vue/static/js/vendor.94ad8e265ab2d614e07f.js.map
  42. 3 0
      demo/src/main/java/com/framework/mvvm/model/db/dao/ObjectDao.kt
  43. 2 1
      demo/src/main/java/com/framework/mvvm/model/db/entity/task/ObjectEntity.kt
  44. 4 0
      demo/src/main/java/com/framework/mvvm/model/repository/AdmRepository.kt
  45. 12 2
      demo/src/main/java/com/sybotan/android/demo/activities/EquipContainerActivity.kt
  46. 4 1
      demo/src/main/java/com/sybotan/android/demo/activities/EquipDetailActivity.kt
  47. 16 7
      demo/src/main/java/com/sybotan/android/demo/activities/GraphyActivity.kt
  48. 3 11
      demo/src/main/java/com/sybotan/android/demo/activities/PocActivity.kt
  49. 97 6
      demo/src/main/java/com/sybotan/android/demo/activities/Scene3DActivity.kt
  50. 71 22
      demo/src/main/java/com/sybotan/android/demo/activities/Space3DActivity.kt
  51. 0 22
      demo/src/main/java/com/sybotan/android/demo/bean/SpaceData3D.java
  52. 9 0
      demo/src/main/java/com/sybotan/android/demo/bean/model3d/FunctionEndBlockModel.java
  53. 10 0
      demo/src/main/java/com/sybotan/android/demo/bean/model3d/GetLocalHostMeshDataModel.java
  54. 11 0
      demo/src/main/java/com/sybotan/android/demo/bean/model3d/SetFloorPathModel.java
  55. 24 0
      demo/src/main/java/com/sybotan/android/demo/bean/model3d/SpaceData3D.java
  56. 15 0
      demo/src/main/java/com/sybotan/android/demo/data/PageParam.java
  57. 2 1
      demo/src/main/java/com/sybotan/android/demo/viewmodel/EquipDetailVM.kt
  58. 42 0
      demo/src/main/java/com/sybotan/android/demo/viewmodel/Scene3DVM.kt
  59. 17 0
      demo/src/main/java/com/sybotan/android/demo/viewmodel/Space3DVM.kt
  60. 56 5
      demo/src/main/res/layout/activity_scene3_dactivity.xml
  61. 1 0
      demo/src/main/res/layout/activity_space3_dactivity.xml

+ 1 - 1
demo/build.gradle

@@ -46,7 +46,7 @@ android {
         multiDexEnabled true
         ndk {
             //选择要添加的对应cpu类型的.so库。
-            abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64'
+            abiFilters 'arm64-v8a'
             // 还可以添加 abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
 
         }

+ 745 - 0
demo/src/main/assets/dist/JsonConfig/PorjectConfig.json

@@ -0,0 +1,745 @@
+{
+  "Url": {
+    "burl": "http://60.205.177.43:8000/",
+    "rurl": "api/WebMeshProvider/"
+  },
+  "Other": {
+    "WebView": {
+      "MaxViewNumber": 30
+    },
+    "CameraMove": {
+      "Angle": 45,
+      "Scale": 20
+    }
+  },
+  "Scene": {
+    "background": "#ffffff"
+  },
+  "SceneShowConfig": {
+    "IsShowHellp": false,
+    "IsSaveBgFileContent": true
+  },
+  "Camera": {
+    "set_position": [201.69111390728676, 64.05603286250314, 354.8486370303567],
+    "set_rotation": [0,0,3.1415926],
+    "set_up": [0, 0, 1],
+    "far": 2000000
+  },
+  "Controls": {
+    "set_target": [201.56757796623262, 49.06930207992287, -3.673672653795472e-15],
+    "minDistance": 0,
+    "maxDistance": 1000000,    
+    "enableDamping": false,
+    "dampingFactor": 0.05
+  },
+  "Light": {
+    "DirectionalLight": {
+      "set_position": [0, 41.497, 47.424],
+      "color": "#EEFOF6",
+      "intensity":0.8
+    },
+    "AmbientLight": {
+      "color": "#000003"
+    }
+  },
+  "Material": {
+    "DefaultMaterial": {
+      "matType": "MeshPhongMaterial",
+      "color": "#92CBEE",
+      "transparent": true
+    },
+    "System": {
+      "OST_Doors": {
+        "color": "#ffffff"
+      },
+      "OST_Windows ": {
+        "color": "#ffffff"
+      },"OST_Floors": {
+        "color": "#ffffff"
+      },"OST_Stairs": {
+        "color": "#ffffff"
+      },
+      "OST_Stairsrailing": {
+        "color": "#ffffff"
+      },
+      "OST_StructuralColumns": {
+        "color": "#ffffff"
+      },
+      "OST_Walls": {
+        "color": "#ffffff"
+      },
+      "OST_PipeFitting": {
+        "color": "#6d67e0"
+      },
+      "OST_PipeAccessory": {
+        "color": "#6d67e0"
+      },
+      "OST_PipeCurves": {
+        "color": "#6d67e0"
+      },
+      "OST_DuctFitting": {
+        "color": "#6d67e0"
+      },
+      "OST_DuctCurves": {
+        "color": "#6d67e0"
+      }
+    },
+    "CustomGroup": {
+
+    }
+  },
+  "Matrix": {
+    "CustomGroup": {
+      "BaoJingWebPanel": {
+        "contentMessage": "所有报警设备面板默认位置以及缩放系数",
+        "translate": {
+          "y": 10
+        },
+        "scale": {
+          "x": 1,
+          "y": 1,
+          "z": 1
+        }
+      }
+    }
+  },
+  "Clip_OST":[
+    {
+      "name": "OST_MechanicalEquipment",
+      "CName": "机械设备"
+    },
+    {
+      "name": "OST_PipeFitting",
+      "CName": "管件"
+    },
+    {
+      "name": "OST_PipeAccessory",
+      "CName": "管道附件"
+    },
+    {
+      "name": "OST_PipeCurves",
+      "CName": "管道"
+    },
+    {
+      "name": "OST_CableTray",
+      "CName": "电缆桥架"
+    },
+    {
+      "name": "OST_CableTrayFitting",
+      "CName": "电缆桥架配件"
+    },
+    {
+      "name": "OST_DuctFitting",
+      "CName": "风管管件"
+    },
+    {
+      "name": "OST_DuctCurves",
+      "CName": "风管"
+    },
+    {
+      "name": "OST_DuctAccessory",
+      "CName": "风管附件"
+    },
+    {
+      "name": "OST_DuctTerminal",
+      "CName": "风道末端"
+    },
+    {
+      "name": "OST_ElectricalEquipment",
+      "CName": "电气设备"
+    },
+    {
+      "name": "OST_ElectricalFixtures",
+      "CName": "电气装置"
+    },
+    {
+      "name": "OST_FireAlarmDevices",
+      "CName": "火警设备"
+    },
+    {
+      "name": "OST_LightingFixtures",
+      "CName": "照明设备"
+    },
+    {
+      "name": "OST_SecurityDevices",
+      "CName": "安全设备"
+    },
+    {
+      "name": "OST_SpecialityEquipment",
+      "CName": "专用设备"
+    },
+    {
+      "name": "OST_FlexPipeCurves",
+      "CName": "软管"
+    },
+    {
+      "name": "OST_FlexDuctCurves",
+      "CName": "软风管"
+    },
+    {
+      "name": "OST_FabricationParts",
+      "CName": "预制零件"
+    },
+    {
+      "name": "OST_GenericModel",
+      "CName": "常规模型"
+    },
+    {
+      "name": "OST_Walls",
+      "CName": "墙"
+    },
+    {
+      "name": "OST_Ceilings",
+      "CName": "天花板"
+    },
+    {
+      "name": "OST_Floors",
+      "CName": "楼板"
+    },
+    {
+      "name": "OST_Roofs",
+      "CName": "屋顶"
+    },
+    {
+      "name": "OST_Doors",
+      "CName": "门"
+    },
+    {
+      "name": "OST_Windows",
+      "CName": "窗"
+    },
+    {
+      "name": "OST_Columns",
+      "CName": "柱"
+    },
+    {
+      "name": "OST_StructuralStiffener",
+      "CName": "结构加强板"
+    },
+    {
+      "name": "OST_AreaRein",
+      "CName": "结构区域钢筋"
+    },
+    {
+      "name": "OST_StructuralFoundation",
+      "CName": "结构基础"
+    },
+    {
+      "name": "OST_StructuralColumns",
+      "CName": "结构柱"
+    },
+    {
+      "name": "OST_StructuralTruss",
+      "CName": "结构桁架"
+    },
+    {
+      "name": "OST_StructuralFraming",
+      "CName": "结构框架"
+    },
+    {
+      "name": "OST_Stairs",
+      "CName": "楼梯"
+    },
+    {
+      "name": "OST_CurtainWallPanels",
+      "CName": "幕墙嵌板"
+    },
+    {
+      "name": "OST_CurtainWallMullions",
+      "CName": "幕墙竖梃"
+    },
+    {
+      "name": "OST_CurtaSystem",
+      "CName": "幕墙系统"
+    },
+    {
+      "name": "OST_Topography",
+      "CName": "地形"
+    },
+    {
+      "name": "OST_Site",
+      "CName": "场地"
+    },
+    {
+      "name": "OST_Ramps",
+      "CName": "坡道"
+    },
+    {
+      "name": "OST_HVAC_Zones",
+      "CName": "HVAC 区"
+    },
+    {
+      "name": "OST_Mass",
+      "CName": "体量"
+    },
+    {
+      "name": "OST_Parking",
+      "CName": "停车场"
+    },
+    {
+      "name": "OST_RasterImages",
+      "CName": "光栅图像"
+    },
+    {
+      "name": "OST_PlumbingFixtures",
+      "CName": "卫浴装置"
+    },
+    {
+      "name": "OST_Sprinklers",
+      "CName": "喷头"
+    },
+    {
+      "name": "OST_Furniture",
+      "CName": "家具"
+    },
+    {
+      "name": "OST_FurnitureSystems",
+      "CName": "家具系统"
+    },
+    {
+      "name": "OST_Wire",
+      "CName": "导线"
+    },
+    {
+      "name": "OST_Rooms",
+      "CName": "房间"
+    },
+    {
+      "name": "OST_NurseCallDevices",
+      "CName": "护理呼叫设备"
+    },
+    {
+      "name": "OST_DataDevices",
+      "CName": "数据设备"
+    },
+    {
+      "name": "OST_StairsRailing",
+      "CName": "栏杆扶手"
+    },
+    {
+      "name": "OST_Planting",
+      "CName": "植物"
+    },
+    {
+      "name": "OST_Casework",
+      "CName": "橱柜"
+    },
+    {
+      "name": "OST_LightingDevices",
+      "CName": "灯具"
+    },
+    {
+      "name": "OST_TelephoneDevices",
+      "CName": "电话设备"
+    },
+    {
+      "name": "OST_MEPSpaces",
+      "CName": "空间"
+    },
+    {
+      "name": "OST_PipeInsulations",
+      "CName": "管道隔热层"
+    },
+    {
+      "name": "OST_Entourage",
+      "CName": "环境"
+    },
+    {
+      "name": "OST_DetailComponents",
+      "CName": "详图项目"
+    },
+    {
+      "name": "OST_CommunicationDevices",
+      "CName": "通讯设备"
+    },
+    {
+      "name": "OST_Roads",
+      "CName": "道路"
+    },
+    {
+      "name": "OST_Areas",
+      "CName": "面积"
+    },
+    {
+      "name": "OST_DuctLinings",
+      "CName": "风管内衬"
+    },
+    {
+      "name": "OST_PlaceHolderDucts",
+      "CName": "风管占位符"
+    },
+    {
+      "name": "OST_DuctInsulations",
+      "CName": "风管隔热层"
+    },
+    {
+      "name": "OST_PlaceHolderPipes",
+      "CName": "管道占位符"
+    },
+    {
+      "name": "OST_Lines",
+      "CName": "线"
+    },
+    {
+      "name": "OST_Conduit",
+      "CName": "线管"
+    },
+    {
+      "name": "OST_ConduitFitting",
+      "CName": "线管配件"
+    },
+    {
+      "name": "OST_Parts",
+      "CName": "组成部分"
+    },
+    {
+      "name": "OST_StructuralFramingSystem",
+      "CName": "结构梁系统"
+    },
+    {
+      "name": "OST_PathRein",
+      "CName": "结构路径钢筋"
+    },
+    {
+      "name": "OST_StructConnections",
+      "CName": "结构连接"
+    },
+    {
+      "name": "OST_Rebar",
+      "CName": "结构钢筋"
+    },
+    {
+      "name": "OST_FabricReinforcement",
+      "CName": "结构钢筋网"
+    },
+    {
+      "name": "OST_FabricAreas",
+      "CName": "结构钢筋网区域"
+    },
+    {
+      "name": "OST_ShaftOpening",
+      "CName": "竖井洞口"
+    }
+  ],
+  "Load_OST": [{
+      "name": "OST_MechanicalEquipment",
+      "CName": "机械设备"
+    },
+    {
+      "name": "OST_PipeFitting",
+      "CName": "管件"
+    },
+    {
+      "name": "OST_PipeAccessory",
+      "CName": "管道附件"
+    },
+    {
+      "name": "OST_PipeCurves",
+      "CName": "管道"
+    },
+    {
+      "name": "OST_CableTray",
+      "CName": "电缆桥架"
+    },
+    {
+      "name": "OST_CableTrayFitting",
+      "CName": "电缆桥架配件"
+    },
+    {
+      "name": "OST_DuctFitting",
+      "CName": "风管管件"
+    },
+    {
+      "name": "OST_DuctCurves",
+      "CName": "风管"
+    },
+    {
+      "name": "OST_DuctAccessory",
+      "CName": "风管附件"
+    },
+    {
+      "name": "OST_DuctTerminal",
+      "CName": "风道末端"
+    },
+    {
+      "name": "OST_ElectricalEquipment",
+      "CName": "电气设备"
+    },
+    {
+      "name": "OST_ElectricalFixtures",
+      "CName": "电气装置"
+    },
+    {
+      "name": "OST_FireAlarmDevices",
+      "CName": "火警设备"
+    },
+    {
+      "name": "OST_LightingFixtures",
+      "CName": "照明设备"
+    },
+    {
+      "name": "OST_SecurityDevices",
+      "CName": "安全设备"
+    },
+    {
+      "name": "OST_SpecialityEquipment",
+      "CName": "专用设备"
+    },
+    {
+      "name": "OST_FlexPipeCurves",
+      "CName": "软管"
+    },
+    {
+      "name": "OST_FlexDuctCurves",
+      "CName": "软风管"
+    },
+    {
+      "name": "OST_FabricationParts",
+      "CName": "预制零件"
+    },
+    {
+      "name": "OST_GenericModel",
+      "CName": "常规模型"
+    },
+    {
+      "name": "OST_Walls",
+      "CName": "墙"
+    },
+    {
+      "name": "OST_Ceilings",
+      "CName": "天花板"
+    },
+    {
+      "name": "OST_Floors",
+      "CName": "楼板"
+    },
+    {
+      "name": "OST_Roofs",
+      "CName": "屋顶"
+    },
+    {
+      "name": "OST_Doors",
+      "CName": "门"
+    },
+    {
+      "name": "OST_Windows",
+      "CName": "窗"
+    },
+    {
+      "name": "OST_Columns",
+      "CName": "柱"
+    },
+    {
+      "name": "OST_StructuralStiffener",
+      "CName": "结构加强板"
+    },
+    {
+      "name": "OST_AreaRein",
+      "CName": "结构区域钢筋"
+    },
+    {
+      "name": "OST_StructuralFoundation",
+      "CName": "结构基础"
+    },
+    {
+      "name": "OST_StructuralColumns",
+      "CName": "结构柱"
+    },
+    {
+      "name": "OST_StructuralTruss",
+      "CName": "结构桁架"
+    },
+    {
+      "name": "OST_StructuralFraming",
+      "CName": "结构框架"
+    },
+    {
+      "name": "OST_Stairs",
+      "CName": "楼梯"
+    },
+    {
+      "name": "OST_CurtainWallPanels",
+      "CName": "幕墙嵌板"
+    },
+    {
+      "name": "OST_CurtainWallMullions",
+      "CName": "幕墙竖梃"
+    },
+    {
+      "name": "OST_CurtaSystem",
+      "CName": "幕墙系统"
+    },
+    {
+      "name": "OST_Topography",
+      "CName": "地形"
+    },
+    {
+      "name": "OST_Site",
+      "CName": "场地"
+    },
+    {
+      "name": "OST_Ramps",
+      "CName": "坡道"
+    },
+    {
+      "name": "OST_HVAC_Zones",
+      "CName": "HVAC 区"
+    },
+    {
+      "name": "OST_Mass",
+      "CName": "体量"
+    },
+    {
+      "name": "OST_Parking",
+      "CName": "停车场"
+    },
+    {
+      "name": "OST_RasterImages",
+      "CName": "光栅图像"
+    },
+    {
+      "name": "OST_PlumbingFixtures",
+      "CName": "卫浴装置"
+    },
+    {
+      "name": "OST_Sprinklers",
+      "CName": "喷头"
+    },
+    {
+      "name": "OST_Furniture",
+      "CName": "家具"
+    },
+    {
+      "name": "OST_FurnitureSystems",
+      "CName": "家具系统"
+    },
+    {
+      "name": "OST_Wire",
+      "CName": "导线"
+    },
+    {
+      "name": "OST_Rooms",
+      "CName": "房间"
+    },
+    {
+      "name": "OST_NurseCallDevices",
+      "CName": "护理呼叫设备"
+    },
+    {
+      "name": "OST_DataDevices",
+      "CName": "数据设备"
+    },
+    {
+      "name": "OST_StairsRailing",
+      "CName": "栏杆扶手"
+    },
+    {
+      "name": "OST_Planting",
+      "CName": "植物"
+    },
+    {
+      "name": "OST_Casework",
+      "CName": "橱柜"
+    },
+    {
+      "name": "OST_LightingDevices",
+      "CName": "灯具"
+    },
+    {
+      "name": "OST_TelephoneDevices",
+      "CName": "电话设备"
+    },
+    {
+      "name": "OST_MEPSpaces",
+      "CName": "空间"
+    },
+    {
+      "name": "OST_PipeInsulations",
+      "CName": "管道隔热层"
+    },
+    {
+      "name": "OST_Entourage",
+      "CName": "环境"
+    },
+    {
+      "name": "OST_DetailComponents",
+      "CName": "详图项目"
+    },
+    {
+      "name": "OST_CommunicationDevices",
+      "CName": "通讯设备"
+    },
+    {
+      "name": "OST_Roads",
+      "CName": "道路"
+    },
+    {
+      "name": "OST_Areas",
+      "CName": "面积"
+    },
+    {
+      "name": "OST_DuctLinings",
+      "CName": "风管内衬"
+    },
+    {
+      "name": "OST_PlaceHolderDucts",
+      "CName": "风管占位符"
+    },
+    {
+      "name": "OST_DuctInsulations",
+      "CName": "风管隔热层"
+    },
+    {
+      "name": "OST_PlaceHolderPipes",
+      "CName": "管道占位符"
+    },
+    {
+      "name": "OST_Lines",
+      "CName": "线"
+    },
+    {
+      "name": "OST_Conduit",
+      "CName": "线管"
+    },
+    {
+      "name": "OST_ConduitFitting",
+      "CName": "线管配件"
+    },
+    {
+      "name": "OST_Parts",
+      "CName": "组成部分"
+    },
+    {
+      "name": "OST_StructuralFramingSystem",
+      "CName": "结构梁系统"
+    },
+    {
+      "name": "OST_PathRein",
+      "CName": "结构路径钢筋"
+    },
+    {
+      "name": "OST_StructConnections",
+      "CName": "结构连接"
+    },
+    {
+      "name": "OST_Rebar",
+      "CName": "结构钢筋"
+    },
+    {
+      "name": "OST_FabricReinforcement",
+      "CName": "结构钢筋网"
+    },
+    {
+      "name": "OST_FabricAreas",
+      "CName": "结构钢筋网区域"
+    },
+    {
+      "name": "OST_ShaftOpening",
+      "CName": "竖井洞口"
+    }
+  ],
+  "CodeString":{
+    "SpaceCatName":"OST_Space",
+    "OutLineUnit":0.00328083989501
+  }
+}

+ 0 - 22
demo/src/main/assets/dist/abc.html

@@ -1,22 +0,0 @@
-<html>
-<body>
-<script lang="javascript">
-console.debug("begin=================================================")
-//LPrinter.getAll("printer");
-alert(LPrinter.getAllPrinters(""))
-alert(LPrinter.openPrinterSync(""))
-//LPrinter.startJob(40, 30, 0)
-//LPrinter.drawText("Hello world!", 4, 5, 40, 30, 4)
-// LPrinter.drawText("上格云技术!", 4, 15, 40, 30, 4)
-
-//LPrinter.drawImage("file:///android_asset/ic_launcher.png", 0.0, 5.0, 20.0, 20.0)
-LPrinter.drawImage("/sdcard/ic_launcher.png", 0.0, 5.0, 20.0, 20.0)
-LPrinter.commitJob()
-console.debug("end=================================================")
-</script>
-
-<h1>abcdefg</h1>
-<a href="services://qrcode?context=abceefg&size=400">services://qrcode?context=abceefg&size=400</a>
-<img src="services://qrcode?context=abceefg&size=200">
-</body>
-</html>

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
demo/src/main/assets/dist/css/app.79d266af.css


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
demo/src/main/assets/dist/css/chunk-vendors.a16c4353.css


BIN
demo/src/main/assets/dist/favicon.ico


BIN
demo/src/main/assets/dist/fonts/element-icons.535877f5.woff


BIN
demo/src/main/assets/dist/fonts/element-icons.732389de.ttf


Datei-Diff unterdrückt, da er zu groß ist
+ 18 - 1
demo/src/main/assets/dist/index.html


Datei-Diff unterdrückt, da er zu groß ist
+ 2 - 0
demo/src/main/assets/dist/js/app.78aef205.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
demo/src/main/assets/dist/js/app.78aef205.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 74 - 0
demo/src/main/assets/dist/js/chunk-vendors.d31a0221.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
demo/src/main/assets/dist/js/chunk-vendors.d31a0221.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/dist/static/css/app.aa519651e328a583ca88e8b7d02122ab.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/css/app.aa519651e328a583ca88e8b7d02122ab.css.map


+ 0 - 2
demo/src/main/assets/dist/static/css/app.cca059254702f9ed953b7df749673cf4.css

@@ -1,2 +0,0 @@
-#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}h1[data-v-694cd902],h2[data-v-694cd902]{font-weight:400}ul[data-v-694cd902]{list-style-type:none;padding:0}li[data-v-694cd902]{display:inline-block;margin:0 10px}a[data-v-694cd902]{color:#42b983}
-/*# sourceMappingURL=app.cca059254702f9ed953b7df749673cf4.css.map */

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/css/app.cca059254702f9ed953b7df749673cf4.css.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/dist/static/js/app.4768fdc1107768177998.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/app.4768fdc1107768177998.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/dist/static/js/app.c59eccc233104d73ccb7.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/app.c59eccc233104d73ccb7.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 13
demo/src/main/assets/dist/static/js/vendor.7fed9fa7b7ba482410b7.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/vendor.7fed9fa7b7ba482410b7.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 13
demo/src/main/assets/dist/static/js/vendor.9d43f691bba00d2c76b8.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/dist/static/js/vendor.9d43f691bba00d2c76b8.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/vue/index.html


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 310
demo/src/main/assets/vue/static/css/app.365230fcdec5540c73c87126a6b39cdb.css


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/vue/static/css/app.365230fcdec5540c73c87126a6b39cdb.css.map


BIN
demo/src/main/assets/vue/static/fonts/iconfont.83485c9.ttf


BIN
demo/src/main/assets/vue/static/fonts/iconfont.df5f83a.eot


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1259
demo/src/main/assets/vue/static/img/iconfont.15eea4c.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/vue/static/js/app.bcfe948aec3e9d1194c5.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/vue/static/js/app.bcfe948aec3e9d1194c5.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 2
demo/src/main/assets/vue/static/js/manifest.2ae2e69a05c33dfc65f8.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/vue/static/js/manifest.2ae2e69a05c33dfc65f8.js.map


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 13
demo/src/main/assets/vue/static/js/vendor.94ad8e265ab2d614e07f.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 1
demo/src/main/assets/vue/static/js/vendor.94ad8e265ab2d614e07f.js.map


+ 3 - 0
demo/src/main/java/com/framework/mvvm/model/db/dao/ObjectDao.kt

@@ -14,6 +14,9 @@ interface ObjectDao {
     @Query("select * from object where id = :id")
     suspend fun getObjectById(id: String): ObjectEntity?
 
+    @Query("select * from object where bim_id = :bimId")
+    suspend fun getObjectByBimId(bimId: String): ObjectEntity?
+
     @Query("select * from object where obj_type = :objType and valid = 1")
     suspend fun getObjectByObjType(objType: String): List<ObjectEntity>
 

+ 2 - 1
demo/src/main/java/com/framework/mvvm/model/db/entity/task/ObjectEntity.kt

@@ -28,7 +28,7 @@ data class ObjectEntity(
     @ColumnInfo(name = "obj_type") val objType: String? = "",                   // 对象类型
     @ColumnInfo(name = "class_code") var classCode: String? = "",               // 对象类型编码
     @ColumnInfo(name = "local_id") var localId: String? = "",                   // 对象位置编码
-    @ColumnInfo(name = "local_name") val localName: String? = "",               // 对象位置名称
+    @ColumnInfo(name = "local_name") var localName: String? = "",               // 对象位置名称
     @ColumnInfo(name = "group_code") val groupCode: String? = "",               // 集团编码
     @ColumnInfo(name = "grouping") val grouping: Int = 1,                       // 1 表示单个对象,2 表示对象组
     @ColumnInfo(name = "client_device") val clientDevice: String? = "",         // 标识客户端设备
@@ -81,6 +81,7 @@ data class InfosforBuild(
 
 data class InfosforFloor(
     val digitalDeliveryID: String,
+    val bimIdPre: String,
 )
 
 data class InfosforSpace(

+ 4 - 0
demo/src/main/java/com/framework/mvvm/model/repository/AdmRepository.kt

@@ -71,6 +71,10 @@ class AdmRepository(
         return db.objectDao().getObjectById(objId)
     }
 
+    suspend fun getObjectByBimId(bimId: String): ObjectEntity? {
+        return db.objectDao().getObjectByBimId(bimId)
+    }
+
     suspend fun getSpaceByArchStateFloorId(id: String, archState: String): List<JobSpaceEntity> {
         return db.jobSpaceDao().getSpaceByArchStateFloorId(id, archState)
     }

+ 12 - 2
demo/src/main/java/com/sybotan/android/demo/activities/EquipContainerActivity.kt

@@ -33,7 +33,10 @@ class EquipContainerActivity : BaseActivity() {
 
     /** 设备Id */
     private lateinit var deviceId: String
+    private lateinit var floorMap: String
     private lateinit var spaceId: String
+    private var scale: Float = 0f
+    private lateinit var centerPoint: PointF
     private var position: Position? = null
     lateinit var containerVM: ContainerVM
     override fun onCreate(savedInstanceState: Bundle?) {
@@ -68,7 +71,9 @@ class EquipContainerActivity : BaseActivity() {
                             bundle.putString("containerId", deviceId)
                             bundle.putString("widgetCode", group.widgetCode)
                             bundle.putString("projectId", projectId)
-                            bundle.putParcelable("centerPoint", PointF(0f, 0f))
+                            bundle.putString("floorMap", floorMap)
+                            bundle.putFloat("scale", scale)
+                            bundle.putParcelable("centerPoint", centerPoint)
                             intent.putExtra("equip", bundle)
                             startActivity(intent)
                         }
@@ -97,7 +102,9 @@ class EquipContainerActivity : BaseActivity() {
                             bundle.putString("deviceId", item.id)
                             bundle.putString("projectId", projectId)
                             bundle.putString("containerId", deviceId)
-                            bundle.putParcelable("centerPoint", PointF(0f, 0f))
+                            bundle.putString("floorMap", floorMap)
+                            bundle.putFloat("scale", scale)
+                            bundle.putParcelable("centerPoint", centerPoint)
                             intent.putExtra("equip", bundle)
                             startActivity(intent)
                         }
@@ -125,5 +132,8 @@ class EquipContainerActivity : BaseActivity() {
         deviceId = params.getString("deviceId", "")!!
         spaceId = params.getString("spaceId", "")!!
         position = params?.getSerializable("position") as? Position
+        floorMap = params.getString("floorMap", "")
+        scale = params.getFloat("scale", 0f)
+        centerPoint = params.getParcelable("centerPoint")!!
     }
 }

+ 4 - 1
demo/src/main/java/com/sybotan/android/demo/activities/EquipDetailActivity.kt

@@ -193,7 +193,10 @@ class EquipDetailActivity : BaseActivity(), View.OnTouchListener {
             pasteDetail.isEnabled = true
         }
         pasteDetail.setOnClickListener {
-            staticInfoAdapter.hashMap = Constant.infoMap
+            for (key in Constant.infoMap.keys) {
+                staticInfoAdapter.hashMap[key] = Constant.infoMap[key]
+            }
+//            staticInfoAdapter.hashMap = Constant.infoMap
             staticInfoAdapter.valueList.clear()
             staticInfoAdapter.notifyDataSetChanged()
             if (staticInfoAdapter.hashMap != null && staticInfoAdapter.hashMap.get("compType") != null) {

+ 16 - 7
demo/src/main/java/com/sybotan/android/demo/activities/GraphyActivity.kt

@@ -932,8 +932,7 @@ class GraphyActivity : BaseActivity(), ICaptureStatusListener, ICameraChangedCal
         graphyVM.getContainer(point.data.deviceId!!)
         point.data.equipState = 4
         equipDetail.setOnClickListener {
-            val intent =
-                Intent(this@GraphyActivity, EquipDetailActivity::class.java)
+            val intent = Intent(this@GraphyActivity, EquipDetailActivity::class.java)
             val bundle = Bundle()
             val positon = Position()
             positon.x = point.data.mX.toString()
@@ -977,6 +976,17 @@ class GraphyActivity : BaseActivity(), ICaptureStatusListener, ICameraChangedCal
             bundle.putString("floorId", floorId)
             bundle.putString("projectId", projectId)
             bundle.putString("deviceId", point.data.deviceId)
+            bundle.putString("floorMap", floorMap)
+            bundle.putFloat("scale", scene.view!!.scale)
+            bundle.putParcelable(
+                "centerPoint",
+                graphyView.mapToScene(
+                    PointF(
+                        graphyView.width / 2f,
+                        graphyView.height / 2f
+                    )
+                )
+            )
             val position =
                 gson.fromJson(point.data.position, Position::class.java)
             bundle.putSerializable("position", position)
@@ -1858,15 +1868,14 @@ class GraphyActivity : BaseActivity(), ICaptureStatusListener, ICameraChangedCal
         drawLl.visibility = View.GONE
         equipLl.visibility = View.VISIBLE
         equipRg.clearCheck()
-        if (info.zRegion.equals("roof")) {
+        if (info.zRegion == "roof") {
             roof.isChecked = true
-        } else if (info.zRegion.equals("floor")) {
+        } else if (info.zRegion == "floor") {
             floor.isChecked = true
-        } else if (info.zRegion.equals("wall")) {
+        } else if (info.zRegion == "wall") {
             wall.isChecked = true
-        } else if (info.zRegion.equals("air")) {
+        } else if (info.zRegion == "air") {
             air.isChecked = true
-        }
         equipEdit.setText(info.location.z().toString())
 
         scene.point.mX = info.location.x()

+ 3 - 11
demo/src/main/java/com/sybotan/android/demo/activities/PocActivity.kt

@@ -7,11 +7,13 @@ import android.content.Intent
 import android.content.SharedPreferences
 import android.content.pm.PackageManager
 import android.net.Uri
+import android.os.Build
 import android.os.Bundle
 import android.os.Environment
 import android.provider.Settings
 import android.widget.Button
 import android.widget.TextView
+import androidx.annotation.RequiresApi
 import androidx.constraintlayout.widget.ConstraintLayout
 import androidx.core.app.ActivityCompat
 import androidx.lifecycle.lifecycleScope
@@ -202,6 +204,7 @@ class PocActivity : BaseActivity(), DIAware {
         Thread(DownLoadApk(dialog, url, this@PocActivity, build)).start()
     }
 
+    @RequiresApi(Build.VERSION_CODES.R)
     private fun checkStoragePermission() {
 //        ActivityCompat.requestPermissions(
 //            this, arrayOf(
@@ -226,16 +229,5 @@ class PocActivity : BaseActivity(), DIAware {
             )
         }
 
-        if (Environment.isExternalStorageManager()) {
-
-// If you don't have access, launch a new activity to show the user the system's dialog
-// to allow access to the external storage
-        } else {
-            val intent = Intent()
-            intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)
-            val uri: Uri = Uri.fromParts("package", this.packageName, null)
-            intent.setData(uri)
-            startActivity(intent)
-        }
     }
 }

+ 97 - 6
demo/src/main/java/com/sybotan/android/demo/activities/Scene3DActivity.kt

@@ -1,20 +1,47 @@
 package com.sybotan.android.demo.activities
 
-import androidx.appcompat.app.AppCompatActivity
+import android.content.Intent
+import android.graphics.PointF
 import android.os.Bundle
+import android.view.View
 import android.webkit.JavascriptInterface
 import android.webkit.WebSettings
 import android.webkit.WebView
 import android.webkit.WebViewClient
+import android.widget.LinearLayout
+import android.widget.TextView
+import com.framework.mvvm.model.db.entity.task.InfosforEq
+import com.framework.mvvm.model.db.entity.task.ObjectEntity
+import com.google.gson.Gson
 import com.sybotan.android.demo.R
-import com.sybotan.android.demo.tools.ToastUtils
+import com.sybotan.android.demo.bean.model3d.FunctionEndBlockModel
+import com.sybotan.android.demo.bean.result.Position
+import com.sybotan.android.demo.bean.result.Z
+import com.sybotan.android.demo.data.PageParam
+import com.sybotan.android.demo.tools.ObjectNameUtils
+import com.sybotan.android.demo.viewmodel.Scene3DVM
+
+class Scene3DActivity : BaseActivity() {
+    companion object {
+        private lateinit var webview: WebView
+        private lateinit var viewModel: Scene3DVM
+        private val gson = Gson()
+    }
+
+    private lateinit var title: TextView
+    private lateinit var equipDetail: TextView
+    private lateinit var equipDelete: TextView
+    private lateinit var bottomLl: LinearLayout
+    private lateinit var equipObject: ObjectEntity
 
-class Scene3DActivity : AppCompatActivity() {
-    private lateinit var webview: WebView
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         setContentView(R.layout.activity_scene3_dactivity)
         webview = findViewById(R.id.webview)
+        title = findViewById(R.id.title)
+        equipDetail = findViewById(R.id.equipDetail)
+        equipDelete = findViewById(R.id.equipDelete)
+        bottomLl = findViewById(R.id.bottomLl)
         val settings: WebSettings = webview.getSettings()
         settings.javaScriptEnabled = true
         settings.defaultTextEncodingName = "utf-8"
@@ -28,12 +55,68 @@ class Scene3DActivity : AppCompatActivity() {
         settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
         webview.addJavascriptInterface(this, "android")
         webview.loadUrl("http://60.205.177.43:8000/APP/#/?PageType=2")
+
+        viewModel = Scene3DVM(this.application, { name, params ->
+            when (name) {
+                Scene3DVM.EQUIP_OBJECT -> {
+                    if (params != null) {
+                        equipObject = params as ObjectEntity
+                        title.text = "本地名称:${equipObject.localName} , 本地编码:${equipObject.localId} , 数字化交付编码:${ObjectNameUtils.getEquipName(equipObject)}"
+                    } else {
+                        title.text = ""
+                    }
+                }
+            }
+        }, this)
+        equipDetail.setOnClickListener {
+            val intent = Intent(this@Scene3DActivity, EquipDetailActivity::class.java)
+            val infosForEq = gson.fromJson(equipObject.infos, InfosforEq::class.java)
+            val bundle = Bundle()
+            val positon = Position()
+            positon.x = infosForEq.location.x().toString()
+            positon.y = infosForEq.location.y().toString()
+            val z = Z()
+            z.offset = infosForEq.location.z().toString()
+            z.region = infosForEq.zRegion
+            positon.z = z
+//            for (space in scene.tunableSpaceList) {
+//                val isContain = Lasso.isPolygonContainsPoint(space.mPoints, android.graphics.Point(positon.x.toFloat().toInt(), -positon.y.toFloat().toInt()))
+//                if (isContain) {
+//                    bundle.putString("spaceId", space.data.id)
+//                    break
+//                }
+//            }
+            bundle.putSerializable("position", positon)
+            bundle.putString("buildingId", equipObject.buildingId)
+            bundle.putString("floorId", equipObject.floorId)
+            bundle.putString("deviceId", equipObject.id)
+            bundle.putString("projectId", equipObject.projectId)
+//            bundle.putString("floorMap", floorMap)
+            bundle.putFloat("scale", 0f)
+            bundle.putParcelable("centerPoint", PointF(0f, 0f))
+            intent.putExtra("equip", bundle)
+            startActivity(intent)
+        }
+    }
+
+    @JavascriptInterface
+    fun FunctionEndBlock(name: String) {
+        val nameObject = gson.fromJson(name, FunctionEndBlockModel::class.java)
+        when (nameObject.Name) {
+            "OpenPage" -> {
+                runOnUiThread { webview.loadUrl("javascript:OpenTestData()") }
+            }
+            "OpenTestData" -> {
+                runOnUiThread { webview.loadUrl("javascript:LoadAllModelWithFloor()") }
+            }
+        }
     }
 
     @JavascriptInterface
-    fun MeshClick(meshObject: String) {
+    fun MeshClick(meshString: String) {
         runOnUiThread {
-            ToastUtils.showMyToast("选中了ID:${meshObject}")
+            viewModel.getObject(meshString)
+            bottomLl.visibility = View.VISIBLE
         }
     }
 
@@ -46,6 +129,14 @@ class Scene3DActivity : AppCompatActivity() {
 
         override fun onPageFinished(view: WebView, url: String) {
             super.onPageFinished(view, url)
+            if (view.progress == 100) {
+//            viewModel.getFloorSpace()
+                val pageParam = PageParam()
+                val param = PageParam.Param()
+                param.PageType = "2"
+                pageParam.Param = param
+                webview.loadUrl("javascript:OpenPage('${gson.toJson(pageParam)}')")
+            }
         }
     }
 }

+ 71 - 22
demo/src/main/java/com/sybotan/android/demo/activities/Space3DActivity.kt

@@ -1,29 +1,26 @@
 package com.sybotan.android.demo.activities
 
-import androidx.appcompat.app.AppCompatActivity
 import android.os.Bundle
 import android.webkit.JavascriptInterface
 import android.webkit.WebSettings
 import android.webkit.WebView
 import android.webkit.WebViewClient
-import android.widget.TextView
-import androidx.databinding.DataBindingUtil
 import cn.sagacloud.android.cadengine.types.FloorData
+import com.framework.mvvm.model.db.entity.task.ObjectEntity
 import com.google.gson.Gson
 import com.sybotan.android.demo.R
-import com.sybotan.android.demo.bean.SpaceData3D
-import com.sybotan.android.demo.bean.model3d.MeshObject
-import com.sybotan.android.demo.databinding.ActivitySpace3DactivityBinding
+import com.sybotan.android.demo.bean.SpaceInfo
+import com.sybotan.android.demo.bean.model3d.FunctionEndBlockModel
+import com.sybotan.android.demo.bean.model3d.SetFloorPathModel
+import com.sybotan.android.demo.bean.model3d.SpaceData3D
+import com.sybotan.android.demo.data.PageParam
 import com.sybotan.android.demo.tools.ToastUtils
-import com.sybotan.android.demo.viewmodel.ChooseSpaceVM
-import com.sybotan.android.demo.viewmodel.GraphyVM
 import com.sybotan.android.demo.viewmodel.Space3DVM
 import com.sybotan.base.utils.SJsonUtil
 import org.kodein.di.DI
 import org.kodein.di.DIAware
 import org.kodein.di.android.closestDI
 import java.io.File
-import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
 
 class Space3DActivity : BaseActivity(), DIAware {
 
@@ -32,13 +29,13 @@ class Space3DActivity : BaseActivity(), DIAware {
     companion object {
         private lateinit var webview: WebView
         lateinit var viewModel: Space3DVM
+        val gson = Gson()
     }
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
-//        setContentView(R.layout.activity_space3_dactivity)
-        val da = DataBindingUtil.setContentView<ActivitySpace3DactivityBinding>(this, R.layout.activity_space3_dactivity)
-        webview = da.webview
+        setContentView(R.layout.activity_space3_dactivity)
+        webview = findViewById(R.id.webview)
         webview.clearCache(true)
         val settings: WebSettings = webview.settings
         settings.javaScriptEnabled = true
@@ -51,23 +48,43 @@ class Space3DActivity : BaseActivity(), DIAware {
         settings.domStorageEnabled = true
         settings.databaseEnabled = true
         settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
+        WebView.setWebContentsDebuggingEnabled(true)
         webview.addJavascriptInterface(this, "android")
         webview.webViewClient = MyWebViewClient()
-        webview.loadUrl("http://60.205.177.43:8000/APP/#/?PageType=1")
-
+        webview.loadUrl("http://60.205.177.43:8000/APP/")
+//        webview.loadUrl("file:///android_asset/dist/index.html")
 
         val mapFile = File("/storage/emulated/0/Android/data/com.sybotan.android.demo/files/floorMap/Fl99099900021206b35236df4465845b9dae69ae45bf")
         val map = mapFile.bufferedReader().use { it.readText() }
         val floorData = SJsonUtil.fromJson(map, FloorData::class.java)
-        da.click.setOnClickListener {
-//            webview.loadUrl("javascript:GetInitSceneData(${map})")
-//            webview.loadUrl("javascript:GetInitSceneData(" + "12345" + ")")
-
 
-        }
         viewModel = Space3DVM(this.application, { name, param ->
             when (name) {
+                Space3DVM.FLOOR_SPACE -> {
+                    val spaces = param as ArrayList<ObjectEntity>
+                    val spaceDataList = ArrayList<SpaceData3D>()
+                    val space3D = SpaceData3D()
+                    for (space in spaces) {
+                        val id = SpaceData3D.ID()
+                        id.ID = space.id
+
+                        val info = gson.fromJson(space.infos, SpaceInfo::class.java)
+                        val outLineString = gson.toJson(info.outline)
+                        id.OutLine = outLineString.replace("\"", "\\\"")
 
+                        space3D.ID.add(id)
+                        if (space3D.ID.size >= 5) {
+                            spaceDataList.add(space3D)
+                            val sss = gson.toJson(spaceDataList)
+                            val a = "javascript:SetSpaceData('${sss}')"
+                            webview.loadUrl("javascript:SetSpaceData('${sss}')")
+                            space3D.ID.clear()
+                            spaceDataList.clear()
+                        }
+                    }
+
+
+                }
             }
         }, this)
     }
@@ -80,6 +97,33 @@ class Space3DActivity : BaseActivity(), DIAware {
         }
     }
 
+    @JavascriptInterface
+    fun FunctionEndBlock(name: String) {
+        val nameObject = gson.fromJson(name, FunctionEndBlockModel::class.java)
+        when (nameObject.Name) {
+            "OpenPage" -> {
+                /**
+                {
+                "PorjectID":"Pj9909990002",
+                "FloorID":"Pj99099900022fcaba5e46b611ec821df544d04bf03aB3"
+                }
+                 */
+//                runOnUiThread { webview.loadUrl("javascript:OpenTestData()") }
+                runOnUiThread { viewModel.getFloorSpace() }
+            }
+            "SetSpaceData" -> {
+                val model = SetFloorPathModel()
+                runOnUiThread { webview.loadUrl("javascript:SetFloorPath('${gson.toJson(model)}')") }
+            }
+            "SetFloorPath" -> {
+                runOnUiThread { webview.loadUrl("javascript:LoadAllModelWithFloor()") }
+            }
+            "OpenTestData" -> {
+                runOnUiThread { webview.loadUrl("javascript:LoadAllModelWithFloor()") }
+            }
+        }
+    }
+
     class MyWebViewClient : WebViewClient() {
         //兼容低版本
         override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
@@ -89,9 +133,14 @@ class Space3DActivity : BaseActivity(), DIAware {
 
         override fun onPageFinished(view: WebView, url: String) {
             super.onPageFinished(view, url)
-            viewModel.getFloorSpace()
-            webview.loadUrl("javascript:OpenTestData()")
-            webview.loadUrl("javascript:LoadAllModelWithFloor()")
+            if (view.progress == 100) {
+//            viewModel.getFloorSpace()
+                val pageParam = PageParam()
+                val param = PageParam.Param()
+                param.PageType = "1"
+                pageParam.Param = param
+                webview.loadUrl("javascript:OpenPage('${gson.toJson(pageParam)}')")
+            }
         }
     }
 }

+ 0 - 22
demo/src/main/java/com/sybotan/android/demo/bean/SpaceData3D.java

@@ -1,22 +0,0 @@
-package com.sybotan.android.demo.bean;
-
-import java.util.ArrayList;
-
-/**
- * Created by lihao.
- * Date: 2021/11/26
- */
-public class SpaceData3D {
-    public ArrayList<ID> ID = new ArrayList<>();
-    public Style Style;
-
-    public static class ID{
-        public String ID;
-        public String OutLine;
-        public boolean IsShow;
-        public int SpaceHeight;
-    }
-    public static class Style{
-        public String color;
-    }
-}

+ 9 - 0
demo/src/main/java/com/sybotan/android/demo/bean/model3d/FunctionEndBlockModel.java

@@ -0,0 +1,9 @@
+package com.sybotan.android.demo.bean.model3d;
+
+/**
+ * Created by lihao.
+ * Date: 2021/12/2
+ */
+public class FunctionEndBlockModel {
+    public String Name;
+}

+ 10 - 0
demo/src/main/java/com/sybotan/android/demo/bean/model3d/GetLocalHostMeshDataModel.java

@@ -0,0 +1,10 @@
+package com.sybotan.android.demo.bean.model3d;
+
+/**
+ * Created by lihao.
+ * Date: 2021/12/7
+ */
+public class GetLocalHostMeshDataModel {
+    public String ProjectID;
+    public String FloorID;
+}

+ 11 - 0
demo/src/main/java/com/sybotan/android/demo/bean/model3d/SetFloorPathModel.java

@@ -0,0 +1,11 @@
+package com.sybotan.android.demo.bean.model3d;
+
+/**
+ * Created by lihao.
+ * Date: 2021/12/7
+ */
+public class SetFloorPathModel {
+    public String PorjectID = "Pj9909990002";
+    public String FloorID = "Pj99099900022fcaba5e46b611ec821df544d04bf03aB3";
+    public double FloorElevation = -13.8;
+}

+ 24 - 0
demo/src/main/java/com/sybotan/android/demo/bean/model3d/SpaceData3D.java

@@ -0,0 +1,24 @@
+package com.sybotan.android.demo.bean.model3d;
+
+import java.util.ArrayList;
+
+/**
+ * Created by lihao.
+ * Date: 2021/11/26
+ */
+public class SpaceData3D {
+    public ArrayList<ID> ID = new ArrayList<>();
+    public Style Style = new Style();
+
+    public static class ID {
+        public String ID;
+        public String OutLine;
+        public boolean IsShow = true;
+        public int SpaceHeight = 3;
+        public double FloorElevation = -13.8;
+    }
+
+    public static class Style {
+        public String color = "#C4C8F2";
+    }
+}

+ 15 - 0
demo/src/main/java/com/sybotan/android/demo/data/PageParam.java

@@ -0,0 +1,15 @@
+package com.sybotan.android.demo.data;
+
+/**
+ * Created by lihao.
+ * Date: 2021/12/2
+ */
+public class PageParam {
+    public String Name = "SpaceController";
+    public Param Param;
+
+    public static class Param {
+        //1 空间核查 2 空间勘测
+        public String PageType;
+    }
+}

+ 2 - 1
demo/src/main/java/com/sybotan/android/demo/viewmodel/EquipDetailVM.kt

@@ -179,7 +179,7 @@ class EquipDetailVM(
             }
             var localName = ""
             if (hashMap!!["localName"] != null && !TextUtils.isEmpty(hashMap["localName"].toString())) {
-                localId = hashMap["localName"].toString()
+                localName = hashMap["localName"].toString()
             }
             hashMap!!.put("equipContent", equipContent)
             var photos = ArrayList<Photos>()
@@ -214,6 +214,7 @@ class EquipDetailVM(
 //                equip!!.infos = JSONObject(hashMap as Map<*, *>)
                 equip!!.classCode = equipEntity.code!!
                 equip.localId = localId
+                equip.localName = localName
                 equip.infos = gson.toJsonTree(hashMap)
                 equip.state()
                 repo.insObject(equip)

+ 42 - 0
demo/src/main/java/com/sybotan/android/demo/viewmodel/Scene3DVM.kt

@@ -0,0 +1,42 @@
+package com.sybotan.android.demo.viewmodel
+
+import android.app.Application
+import androidx.lifecycle.viewModelScope
+import com.framework.mvvm.model.repository.AdmRepository
+import com.google.gson.Gson
+import com.sybotan.android.demo.activities.BaseActivity
+import com.sybotan.android.demo.bean.model3d.MeshObject
+import com.sybotan.android.demo.retrofit.BaseViewModelInterface
+import kotlinx.coroutines.launch
+import org.kodein.di.DI
+import org.kodein.di.DIAware
+import org.kodein.di.android.x.closestDI
+import org.kodein.di.instance
+
+
+/**
+ * Created by lihao.
+ * Date: 2021/6/9
+ */
+class Scene3DVM(
+    app: Application,
+    b: BaseViewModelInterface?, activity: BaseActivity?, //建筑id
+) : BaseViewModel(app, b, activity), DIAware {
+    private val gson = Gson()
+
+    override val di: DI by closestDI()
+    val repo: AdmRepository by instance()
+
+
+    fun getObject(meshString: String) {
+        viewModelScope.launch {
+            val meshObject = gson.fromJson(meshString, MeshObject::class.java)
+            val equip = repo.getObjectByBimId(meshObject.ID)
+            mEmitter.SendDirective(EQUIP_OBJECT, equip)
+        }
+    }
+
+    companion object {
+        const val EQUIP_OBJECT = "EQUIP_OBJECT"
+    }
+}

+ 17 - 0
demo/src/main/java/com/sybotan/android/demo/viewmodel/Space3DVM.kt

@@ -2,15 +2,19 @@ package com.sybotan.android.demo.viewmodel
 
 import android.app.Application
 import androidx.lifecycle.viewModelScope
+import cn.sagacloud.android.cadengine.types.FloorData
+import com.framework.mvvm.model.db.entity.task.InfosforFloor
 import com.framework.mvvm.model.repository.AdmRepository
 import com.google.gson.Gson
 import com.sybotan.android.demo.activities.BaseActivity
 import com.sybotan.android.demo.retrofit.BaseViewModelInterface
+import com.sybotan.base.utils.SJsonUtil
 import kotlinx.coroutines.launch
 import org.kodein.di.DI
 import org.kodein.di.DIAware
 import org.kodein.di.android.x.closestDI
 import org.kodein.di.instance
+import java.io.File
 
 
 /**
@@ -29,6 +33,19 @@ class Space3DVM(
     fun getFloorSpace() {
         viewModelScope.launch {
 //            repo.getSpaceByFloorId()
+            val floors = repo.getObjectByObjType("floor")
+            for (floor in floors) {
+                val mapFile = File("${floor.floorMap}")
+                val map = mapFile.bufferedReader().use { it.readText() }
+                val floorOfflineData = SJsonUtil.fromJson(map, FloorData::class.java)
+
+                val infosforFloor = gson.fromJson(floor.infos, InfosforFloor::class.java)
+                if (infosforFloor.bimIdPre == "Pj99099900022fcaba5e46b611ec821df544d04bf03aB3") {
+                    val spaces = repo.getSpaceByFloorId(floor.id)
+                    mEmitter.SendDirective(FLOOR_SPACE, spaces)
+                    break
+                }
+            }
         }
     }
 

+ 56 - 5
demo/src/main/res/layout/activity_scene3_dactivity.xml

@@ -1,10 +1,61 @@
 <?xml version="1.0" encoding="utf-8"?>
-<WebView xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/webview"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".activities.Space3DActivity">
+    android:layout_height="match_parent">
 
-</WebView>
+    <WebView
+        android:id="@+id/webview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+    <LinearLayout
+        android:id="@+id/bottomLl"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:background="@drawable/bg_gray_f2f3f6"
+        android:gravity="center_horizontal"
+        android:orientation="vertical"
+        android:paddingBottom="20dp"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="5dp"
+            android:textColor="@color/black_272727"
+            android:textSize="16sp" />
+
+        <TextView
+            android:id="@+id/equipDetail"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:background="@color/green_36A4AA"
+            android:paddingLeft="60dp"
+            android:paddingTop="5dp"
+            android:paddingRight="60dp"
+            android:paddingBottom="5dp"
+            android:text="记录设备信息"
+            android:textColor="@color/white_ffffff"
+            android:textSize="16sp" />
+
+
+        <TextView
+            android:id="@+id/equipDelete"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:background="@color/green_36A4AA"
+            android:paddingLeft="60dp"
+            android:paddingTop="5dp"
+            android:paddingRight="60dp"
+            android:paddingBottom="5dp"
+            android:text="删除设备/标记多余"
+            android:textColor="@color/white_ffffff"
+            android:textSize="16sp" />
+    </LinearLayout>
+</RelativeLayout>

+ 1 - 0
demo/src/main/res/layout/activity_space3_dactivity.xml

@@ -19,6 +19,7 @@
             tools:context=".activities.Space3DActivity"></WebView>
 
         <TextView
+            android:visibility="gone"
             android:id="@+id/click"
             android:background="@color/white_ffffff"
             android:textColor="@color/black_272727"