bill 2 miesięcy temu
rodzic
commit
a532303e72

+ 8 - 7
src/example/fuse/enter-shared.ts

@@ -68,7 +68,6 @@ export const postFile = (url: string, data: Record<string, any>) => {
   }
 
   const l = `${resourceURLS[SCENE_TYPE.fuse]}${url}`;
-  console.log(l)
   return after(
     fetch(l, {
       headers: window.platform.getHeaders(),
@@ -322,13 +321,15 @@ export const uploadResourse = genLoading(
 );
 
 export const getResource = (url: string) => {
-  if (url.includes("//")) {
     return url;
-  } else if (import.meta.env.DEV && import.meta.env.VITE_STATIC) {
-    return `${import.meta.env.VITE_STATIC}${url}`;
-  } else {
-    return url;
-  }
+  // if (url.includes("//")) {
+  //   return url;
+  // } else if (import.meta.env.DEV && import.meta.env.VITE_STATIC) {
+  //   console.log(url, import.meta.env.VITE_STATIC)
+  //   return `${import.meta.env.VITE_STATIC}${url}`;
+  // } else {
+  //   return url;
+  // }
 };
 
 export const getTableTemp = () => {

+ 2 - 2
src/example/fuse/router.ts

@@ -6,9 +6,9 @@ import Tabulation from "./views/tabulation/index.vue";
 export const history = createWebHashHistory();
 const routes = [{ path: "/overview", name: "overview", component: Overview }];
 
-if (!window.platform.sceneDraw) {
+// if (!window.platform.sceneDraw) {
   routes.push({ path: "/tabulation", name: "tabulation", component: Tabulation })
-}
+// }
 
 
 export const router = createRouter({

+ 9 - 5
src/example/fuse/views/overview/header.vue

@@ -50,7 +50,8 @@ const emit = defineEmits<{
   (e: "saveAfter"): void;
 }>();
 
-const showTabulation = !params.value.sceneDraw;
+// const showTabulation = !params.value.sceneDraw;
+const showTabulation = true;
 const baseActions = getHeaderActions(draw);
 const actions = [
   [baseActions.undo, baseActions.redo],
@@ -306,11 +307,9 @@ const saveHandler = repeatedlyOnly(async () => {
 
   console.log(tabStore);
   tabStore.config.compass = storeData.config.compass;
-
-  overviewId.value = await window.platform.saveOverviewData(overviewId.value, {
+  const body: any = {
     ...overviewData.value,
     listCover: listUrl,
-    kankanCover: kankanUrl,
     store: storeData,
     viewport: draw!.viewer.transform.m,
     caseTabulation: {
@@ -321,7 +320,12 @@ const saveHandler = repeatedlyOnly(async () => {
       store: tabStore,
       overviewId: overviewId.value,
     },
-  });
+  };
+  if (window.platform.sceneDraw) {
+    body.kankanCover = kankanUrl;
+  }
+
+  overviewId.value = await window.platform.saveOverviewData(overviewId.value, body);
   tabulationId.value = await window.platform.getTabulationId(overviewId.value);
   console.log("保存完毕");
   emit("saveAfter");

+ 3 - 2
src/example/platform/resource-swkk.ts

@@ -238,10 +238,11 @@ export const getTraceTaggingInfos = async (
   const reqs: Promise<any>[] = [];
   
 
+  console.log('traces', traces)
   for (const trace of traces) {
     if (
-      !validNum(trace.position.x) ||
-      !validNum(trace.position.z) ||
+      !validNum(trace.position?.x) ||
+      !validNum(trace.position?.z) ||
       ("floorIndex" in trace && trace.floorIndex !== floorIndex) ||
       trace.iconType === 0
     )