bill 8 bulan lalu
induk
melakukan
f759349d4e
4 mengubah file dengan 55 tambahan dan 11 penghapusan
  1. 1 0
      src/components/tagging/sign-new.vue
  2. 4 0
      src/env/index.ts
  3. 34 2
      src/main.ts
  4. 16 9
      src/views/sign-model/index.vue

+ 1 - 0
src/components/tagging/sign-new.vue

@@ -142,6 +142,7 @@ const getPosition = () => ({
 let currentPosition = getPosition();
 let changeTimeout: any;
 tag.bus.on("changePosition", (data) => {
+  console.error(data);
   clearTimeout(changeTimeout);
   emit(
     "changePosition",

+ 4 - 0
src/env/index.ts

@@ -55,6 +55,10 @@ export type Params = {
   caseId: number,
   baseURL?: string,
   modelId?: string,
+  fileUrl?: string
+  sign?: string
+  type?: string
+  title?: string
   m?: string
   share?: boolean,
   single?: boolean

+ 34 - 2
src/main.ts

@@ -36,12 +36,44 @@ addHook({
   },
 });
 
+addHook({
+  before(config: any) {
+    if (params.sign) {
+      config.headers["sign"] = params.sign
+    }
+  },
+});
+
 watchEffect(
   (onCleanup) => {
     if (
-      [RoutesName.show, RoutesName.signModel].includes(currentLayout.value!)
+      params.sign && [RoutesName.show, RoutesName.signModel].includes(currentLayout.value!)
     ) {
-      const untokenURLS = [URL.AUTH_PWD];
+      const untokenURLS = [
+        URL.FUSE_MODEL_LIST,
+        URL.MODEL_LIST,
+        URL.GET_SETTING,
+        URL.TAGGING_LIST,
+        URL.TAGGING_POINT_LIST,
+        URL.TAGGING_STYLE_LIST,
+        URL.MESASURE_LIST,
+        URL.GUIDE_LIST,
+        URL.GUIDE_PATH_LIST,
+        URL.RECORD_LIST,
+        URL.RECORD_FRAGMENT_LIST,
+        URL.VIEW_LIST,
+        URL.FOLDER_TYPE_LIST,
+        URL.FLODER_LIST,
+        URL.MODEL_SIGN,
+        URL.CASE_INFO,
+        URL.PATH_LIST,
+        URL.AUTH_PWD,
+        '/fusion-xj/caseInquest/info',
+        '/fusion-xj/caseExtractDetail/info',
+        '/fusion-xj/caseInquest/downDocx',
+        '/fusion-xj/caseExtractDetail/downDocx',
+        '/fusion-xj/caseImg/getFfmpegImage'
+      ]
       addUnsetTokenURLS(...untokenURLS);
       onCleanup(() => {
         delUnsetTokenURLS(...untokenURLS);

+ 16 - 9
src/views/sign-model/index.vue

@@ -5,12 +5,7 @@ import { computed, ref } from "vue";
 import { loadModel, fuseModel as FModel } from "@/model";
 import { fetchScene, fetchScenesAll, getSceneUrl, Scene, SceneType } from "@/api";
 import { createFuseModels, defTitle, fuseModels, SceneStatus } from "@/store";
-import {
-  custom,
-  params,
-  showRightPanoStack,
-  viewModeStack,
-} from "@/env";
+import { custom, params, showRightPanoStack, viewModeStack } from "@/env";
 import { Dialog } from "bill/index";
 import { useViewStack, useActive } from "@/hook";
 import { sdk } from "@/sdk";
@@ -41,7 +36,19 @@ const loadSignModel = async () => {
     });
     const scenes = [...SSscenes, ...YDscenes, ...DDscenes];
     scene = scenes.find((scene) => scene.num === params.m);
-    console.log(scene);
+  } else if ("fileUrl" in params && "type" in params) {
+    const url = unescape(params.fileUrl!);
+
+    scene = {
+      modelId: 0,
+      modelTitle: decodeURIComponent(params.title!),
+      type: SceneType.SWMX,
+      modelDateType: params.type!,
+      model3dgsUrl: url,
+      modelShpUrl: url,
+      modelGlbUrl: url,
+      modelObjUrl: url,
+    } as Scene;
   }
 
   if (!scene) {
@@ -49,7 +56,7 @@ const loadSignModel = async () => {
   }
   if (active.value) {
     defTitle.value = scene.title || scene.modelTitle;
-
+    console.error(getSceneUrl(scene));
     const fuseModel = createFuseModels({
       modelId: scene.modelId,
       show: true,
@@ -75,7 +82,7 @@ useViewStack(() => {
   loadSignModel();
   return () => {
     fuseModels.value = bcModels;
-    pop && pop();
+    pop! && pop();
   };
 });
 </script>