bill vor 1 Jahr
Ursprung
Commit
c43065d29e
4 geänderte Dateien mit 191 neuen und 3 gelöschten Zeilen
  1. 2 0
      index.html
  2. 185 0
      public/test-case/model-list-demo.json
  3. 2 2
      src/api/fuse-model.ts
  4. 2 1
      src/layout/scene-list/index.vue

+ 2 - 0
index.html

@@ -4,6 +4,8 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+    <link rel="stylesheet" type="text/css" href="./lib/Cesium/Widgets/CesiumWidget/CesiumWidget.css">
     <title>案件信息</title>
   </head>
   <body>

+ 185 - 0
public/test-case/model-list-demo.json

@@ -0,0 +1,185 @@
+{
+  "code": 0,
+  "message": "操作成功",
+  "data": [
+      {
+          "caseId": null,
+          "fusionNumId": 782,
+          "fusionId": 231,
+          "modelId": 834,
+          "hide": 0,
+          "transform": {
+              "scale": [
+                  0.1,
+                  0.1,
+                  0.1
+              ],
+              "position": {
+                  "x": -30.34943,
+                  "y": -49.57739,
+                  "z": -1.10143
+              },
+              "rotation": {
+                  "x": 2.16005,
+                  "y": 0.09055,
+                  "z": -1.75836
+              }
+          },
+          "opacity": 100.0,
+          "bottom": 0.0,
+          "token": null,
+          "sceneData": {
+              "modelId": 834,
+              "modelTitle": "people",
+              "modelDateType": "obj",
+              "modelSize": "81.05MB",
+              "type": 3,
+              "modelObjUrl": null,
+              "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/prod/model/glb/834/people.glb\"]",
+              "userName": "13169663387",
+              "modelType": "glb",
+              "num": null,
+              "tbStatus": 0,
+              "createStatus": 1,
+              "createTime": "2024-07-06 12:10:13",
+              "updateTime": "2024-07-06 12:10:40",
+              "deptId": "4",
+              "deptName": "公安部演示小组",
+              "id": null,
+              "buildObjStatus": null,
+              "name": null,
+              "payStatus": null,
+              "sceneName": null,
+              "snCode": null,
+              "status": 2,
+              "thumb": null,
+              "title": null,
+              "viewCount": null,
+              "isLaser": null,
+              "phone": null,
+              "bind": true,
+              "location": null
+          }
+      },
+      {
+          "caseId": null,
+          "fusionNumId": 778,
+          "fusionId": 231,
+          "modelId": 811,
+          "hide": 0,
+          "transform": {
+              "scale": [
+                  100.0,
+                  100.0,
+                  100.0
+              ],
+              "position": {
+                  "x": -20.98163,
+                  "y": -40.38273,
+                  "z": 2.17832
+              },
+              "rotation": {
+                  "x": 0.0,
+                  "y": 0.0,
+                  "z": 3.13054
+              }
+          },
+          "opacity": 100.0,
+          "bottom": 0.0,
+          "token": null,
+          "sceneData": {
+              "modelId": 811,
+              "modelTitle": null,
+              "modelDateType": "obj",
+              "modelSize": "4.55MB",
+              "type": 4,
+              "modelObjUrl": "/home/tomcat/jar-fusion-8808/prod/model/SS-X5apgUqrn4n/mesh.obj",
+              "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/prod/model/SS-X5apgUqrn4n/mesh/floor_0/lod_0/mesh.glb\"]\r",
+              "userName": null,
+              "modelType": "glb",
+              "num": "SS-X5apgUqrn4n",
+              "tbStatus": 0,
+              "createStatus": 1,
+              "createTime": "2022-11-18 17:35:53",
+              "updateTime": "2024-07-08 11:03:26",
+              "deptId": "4",
+              "deptName": "公安部演示小组",
+              "id": 3260229,
+              "buildObjStatus": 0,
+              "name": "展厅室内",
+              "payStatus": 1,
+              "sceneName": "展厅室内",
+              "snCode": "GABSS0001",
+              "status": 2,
+              "thumb": "https://4dkk.4dage.com/scene_edit_data/SS-X5apgUqrn4n/user/thumb-1k.jpg",
+              "title": "展厅室内",
+              "viewCount": 49,
+              "isLaser": false,
+              "phone": null,
+              "bind": true,
+              "location": null
+          }
+      },
+      {
+          "caseId": null,
+          "fusionNumId": 775,
+          "fusionId": 231,
+          "modelId": 808,
+          "hide": 0,
+          "transform": {
+              "scale": [
+                  100.0,
+                  100.0,
+                  100.0
+              ],
+              "position": {
+                  "x": -3894.79657,
+                  "y": 758.14082,
+                  "z": 39.06232
+              },
+              "rotation": {
+                  "x": 0.0,
+                  "y": 0.0,
+                  "z": 0.3821
+              }
+          },
+          "opacity": 100.0,
+          "bottom": 0.0,
+          "token": null,
+          "sceneData": {
+              "modelId": 808,
+              "modelTitle": "展厅外部",
+              "modelDateType": "obj",
+              "modelSize": "30.47MB",
+              "type": 3,
+              "modelObjUrl": null,
+              "modelGlbUrl": "[\"https://4dkk.4dage.com/fusion/prod/model/glb/808/2.glb\"]",
+              "userName": "13169663387",
+              "modelType": "glb",
+              "num": null,
+              "tbStatus": 0,
+              "createStatus": 1,
+              "createTime": "2024-06-21 17:47:24",
+              "updateTime": "2024-06-25 20:51:15",
+              "deptId": "4",
+              "deptName": "公安部演示小组",
+              "id": null,
+              "buildObjStatus": null,
+              "name": null,
+              "payStatus": null,
+              "sceneName": null,
+              "snCode": null,
+              "status": 2,
+              "thumb": null,
+              "title": null,
+              "viewCount": null,
+              "isLaser": null,
+              "phone": null,
+              "bind": true,
+              "location": null
+          }
+      }
+  ],
+  "success": true,
+  "timestamp": 1722393389040
+}

+ 2 - 2
src/api/fuse-model.ts

@@ -109,8 +109,8 @@ const localToService = (model: FuseModel): Omit<ServiceFuseModel, 'sceneData'> =
 export type FuseModels = FuseModel[]
 
 export const fetchFuseModels = async () => {
-  // const serviceModels = await axios.get<ServiceFuseModel[]>(FUSE_MODEL_LIST, { params: { caseId: params.caseId } })
-  const serviceModels = await axios.get<ServiceFuseModel[]>('/test-case/model-list.json', { params: { caseId: params.caseId } })
+  const serviceModels = await axios.get<ServiceFuseModel[]>(FUSE_MODEL_LIST, { params: { caseId: params.caseId } })
+  // const serviceModels = await axios.get<ServiceFuseModel[]>('/test-case/model-list.json', { params: { caseId: params.caseId } })
   console.error(serviceModels.map((item, index) => serviceToLocal(item, index == 0)))
   return serviceModels.map((item, index) => serviceToLocal(item, index == 0))
 } 

+ 2 - 1
src/layout/scene-list/index.vue

@@ -63,7 +63,8 @@ const list = computed(() => {
       && props.current.type === scene.type
   }))
   if (fuseModels.value.length) {
-    return [{ raw: fuseModel }, ...sceneList]
+    // return [{ raw: fuseModel }, ...sceneList]
+    return [{ raw: fuseModel }]
   } else {
     return sceneList
   }