bill před 1 týdnem
rodič
revize
79237ce027

+ 2 - 2
src/components/global-search/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div
     id="global-search"
-    v-if="custom.showSearch"
+    v-if="custom.showSearch && !params.pure"
     :class="{ nul: fuseModels.length === 0 }"
   >
     <Select
@@ -68,7 +68,7 @@ import {
 } from "@/store";
 import { Select, SelectOptGroup, SelectOption } from "ant-design-vue";
 import { computed, ref } from "vue";
-import { custom } from "@/env";
+import { custom, params } from "@/env";
 import { debounce } from "@/utils";
 import { searchAddress, Address } from "@/store/map";
 import { fuseModels } from "@/store";

+ 2 - 1
src/components/view-setting/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="custom.showViewSetting && currentModel === fuseModel">
+  <div v-if="custom.showViewSetting && currentModel === fuseModel && !params.pure">
     <Dropdown placement="top">
       <div class="strengthen show-setting">
         <span>显示设置</span>
@@ -26,6 +26,7 @@
 import { Dropdown, Menu, MenuItem } from "ant-design-vue";
 import {
   custom,
+  params,
   showMeasuresStack,
   showMonitorsStack,
   showPathsStack,

+ 7 - 0
src/env/index.ts

@@ -72,9 +72,11 @@ params.caseId = Number(params.caseId);
 params.share = Boolean(Number(params.share));
 params.single = Boolean(Number(params.single));
 
+
 export type Params = {
   caseId: number;
   baseURL?: string;
+  pure?: boolean
   modelId?: string;
   mapKey?: string;
   mapPlatform?: string;
@@ -103,3 +105,8 @@ export const getResource = (uri: string) => {
 };
 
 
+
+if (params.pure) {
+  showFullStack.current.value.value = true
+  console.error()
+}

+ 2 - 1
src/layout/edit/header/index.vue

@@ -6,6 +6,7 @@
 
     <div class="control">
       <ui-icon
+        :class="{pure: params.pure}"
         style="margin-right: 10px"
         :type="custom.full ? 'window_n' : 'window_m'"
         ctrl
@@ -24,7 +25,7 @@
 <script setup lang="ts">
 import { computed, ref } from "vue";
 import { isEdit, title, isOld, leave, save } from "@/store";
-import { custom } from "@/env";
+import { custom, params } from "@/env";
 
 const props = defineProps<{ title?: string }>();
 const sysTitle = computed(() => props.title || title.value);

+ 10 - 0
src/layout/edit/header/style.scss

@@ -48,6 +48,10 @@
       font-size: 1em;
       font-weight: bold;
       display: inline-block;
+      max-width: calc(100vw - 580px);
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
     }
 
     .split {
@@ -83,6 +87,12 @@
     display: flex;
     align-items: center;
 
+    .pure {
+      position: fixed;
+      right: 10px;
+      top: 10px;
+    }
+
     a {
       color: transparent;
     }

+ 38 - 2
src/layout/show/index.vue

@@ -1,11 +1,20 @@
 <template>
   <template v-if="loaded">
+    <ui-icon
+      class="screen-full"
+      v-if="params.pure"
+      :class="{ pure: params.pure }"
+      style="margin-right: 10px"
+      :type="fullScreen ? 'window_n' : 'window_m'"
+      ctrl
+      @click="fullHandler"
+    />
     <div
       :class="{ hideLeft: !custom.showLeftPano }"
       :style="hasSingle ? { '--left-pano-left': '0px' } : ''"
     >
       <SlideMenu
-        v-if="!hasSingle"
+        v-if="!hasSingle && !custom.full"
         :activeName="(router.currentRoute.value.name as RoutesName)"
         @change-item="(item) => router.push({ name: item.name })"
       />
@@ -24,7 +33,7 @@
 <script lang="ts" setup>
 import GlobalSearch from "@/components/global-search/index.vue";
 import ViewSetting from "@/components/view-setting/index.vue";
-import { custom, showRightPanoStack } from "@/env";
+import { custom, params, showRightPanoStack } from "@/env";
 import { ref, watchEffect } from "vue";
 import { router, RoutesName } from "@/router";
 import { loadModel, fuseModel } from "@/model";
@@ -50,6 +59,8 @@ import {
   initMonitors,
 } from "@/store";
 import { initialAnimationModels } from "@/store/animation";
+import { fullView } from "@/utils/full";
+import { watch } from "fs";
 
 const hasSingle = new URLSearchParams(location.search).has("single");
 
@@ -59,6 +70,22 @@ watchEffect((onCleanup) => {
   }
 });
 
+const fullScreen = ref(false);
+let quit: (() => void) | null = null;
+const fullHandler = async () => {
+  if (quit) {
+    quit();
+    fullScreen.value = false;
+    quit = null;
+  } else {
+    quit = await fullView(() => {
+      fullScreen.value = false;
+      quit = null;
+    });
+    fullScreen.value = true;
+  }
+};
+
 const loaded = ref(false);
 const initialSys = async () => {
   await Promise.all([
@@ -114,4 +141,13 @@ watchEffect((onCleanup) => {
   z-index: 99;
   right: calc(var(--editor-menu-right) + var(--editor-toolbox-width) + 20px);
 }
+
+.screen-full {
+  position: fixed;
+  right: 20px;
+  top: 20px;
+  z-index: 999;
+  font-size: 22px;
+  color: #fff !important;
+}
 </style>

+ 7 - 2
src/model/app.vue

@@ -2,7 +2,7 @@
   <iframe class="external" :src="url" ref="iframeRef" v-if="url"></iframe>
   <div class="laser-layer" v-show="!url">
     <div class="scene-canvas" ref="fuseRef">
-      <div id="direction"></div>
+      <div id="direction" :class="{ full: custom.full }"></div>
     </div>
   </div>
 </template>
@@ -10,7 +10,7 @@
 <script lang="ts">
 import { defineComponent, ref, watchEffect, computed, watch, nextTick } from "vue";
 import { SceneType } from "@/store";
-import { params } from "@/env";
+import { custom, params } from "@/env";
 import { fuseModel, modelProps } from "./index";
 import { modelSDKFactory } from "./platform";
 import { getToken } from "@/api";
@@ -189,6 +189,7 @@ export const Model = defineComponent({
       iframeRef,
       fuseRef,
       url,
+      custom,
     };
   },
 });
@@ -226,5 +227,9 @@ export default Model;
   top: calc(var(--header-top) + var(--editor-head-height) + 50px) !important;
   margin: 10px;
   transition: top 0.3s ease, right 0.3s ease;
+  &.full {
+    right: 0 !important;
+    top: 0 !important;
+  }
 }
 </style>

+ 1 - 0
src/utils/full.ts

@@ -31,6 +31,7 @@ export const fullView = async (fn: () => void) => {
 
   return () => {
     popViewMode();
+    console.log('0.0', isFull)
     if (isFull) {
       currentIsFullView.value = false
       document.fullscreenElement && document.exitFullscreen();

+ 1 - 1
src/views/setting/index.vue

@@ -90,7 +90,7 @@ const changeBack = (mapData?: [string | null, number | null], title?: string) =>
   const back = mapData ? mapData[0] : setting.value?.back;
   const mapId = mapData ? mapData[1] : setting.value?.mapId;
 
-  title = title || caseProject.value?.fusionTitle;
+  title = typeof title === "string" ? title : caseProject.value?.fusionTitle;
 
   setting.value!.back = back;
   setting.value!.mapId = mapId;