浏览代码

修改bug

bill 1 年之前
父节点
当前提交
e3236d1784
共有 7 个文件被更改,包括 30 次插入13 次删除
  1. 1 1
      index.html
  2. 2 0
      src/env/index.ts
  3. 1 1
      src/layout/pwd.vue
  4. 1 1
      src/layout/scene-list/index.vue
  5. 17 5
      src/layout/show/index.vue
  6. 4 3
      src/views/record/index.vue
  7. 4 2
      src/views/view/index.vue

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <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" />
-    <title>多元融合</title>
+    <title>案件信息</title>
   </head>
   <body>
     <div id="app"></div>

+ 2 - 0
src/env/index.ts

@@ -43,6 +43,7 @@ export const custom = flatStacksValue({
 export const params = reactive(strToParams(location.search)) as unknown as Params
 params.caseId = Number(params.caseId)
 params.share = Boolean(Number(params.share))
+params.single = Boolean(Number(params.single))
 export enum appType {
   fire = "1",
   criminal = "2"
@@ -53,6 +54,7 @@ export type Params = {
   modelId?: string,
   m?: string
   share?: boolean,
+  single?: boolean
   app: appType
   token?: string
 }

+ 1 - 1
src/layout/pwd.vue

@@ -1,5 +1,5 @@
 <template>
-  <Modal width="400px" title="三维融合平台" :visible="visible" centered class="model-table" :closable="false">
+  <Modal width="400px" title="访问密码" :visible="visible" centered class="model-table" :closable="false">
     <template #footer>
       <Button key="submit" type="primary" @click="okHandler">确定</Button>
     </template>

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

@@ -72,7 +72,7 @@ const updateCurrent = (scene: FuseModelType | Scene) => {
 }
 
 const stopWatch = watch(list, () => {
-  if (!list.value.some(model => model.raw === fuseModel)) {
+  if (!list.value.some(model => model.raw === fuseModel) && list.value.length) {
     updateCurrent(list.value[0].raw as any)
     nextTick(() => stopWatch())
   }

+ 17 - 5
src/layout/show/index.vue

@@ -1,8 +1,8 @@
 <template>
   <template v-if="loaded">
-    <div :class="{ hideLeft: !custom.showLeftPano }" :style="hasShare ? {'--left-pano-left': '0px'} : ''">
+    <div :class="{ hideLeft: !custom.showLeftPano }" :style="hasSingle ? {'--left-pano-left': '0px'} : ''">
       <SlideMenu 
-        v-if="!hasShare"
+        v-if="!hasSingle"
         :activeName="(router.currentRoute.value.name as RoutesName)" 
         @change-item="item => router.push({ name: item.name })"
       />
@@ -19,7 +19,7 @@
 
 <script lang="ts" setup>
 import { custom, params } from '@/env'
-import { ref } from 'vue'
+import { computed, nextTick, ref, watch, watchEffect } from 'vue'
 import { router, RoutesName } from '@/router'
 import { loadModel, fuseModel } from '@/model'
 import SlideMenu from './slide-menu.vue'
@@ -34,10 +34,13 @@ import {
   initialTaggingStyles,
   initialTaggings,
   initialMeasures,
-  initialGuides
+  initialGuides,
+  scenes,
+  fuseModels,
+  appEl
 } from '@/store'
 
-const hasShare = new URLSearchParams(location.search).has("share")
+const hasSingle = new URLSearchParams(location.search).has("single")
 
 const loaded = ref(false)
 const initialSys = async () => {
@@ -59,6 +62,15 @@ const initialSys = async () => {
 }
 initialSys()
 defTitle.value = ''
+initialScenes()
+
+watchEffect(() => {
+  if (appEl.value && scenes.value.length && !fuseModels.value.length) {
+    setTimeout(() => {
+      loadModel(scenes.value[0] as any)
+    }, 100)
+  }
+})
 </script>
 
 <style>

+ 4 - 3
src/views/record/index.vue

@@ -28,7 +28,7 @@ import { showMeasuresStack, showTaggingsStack } from '@/env'
 import { useViewStack } from '@/hook'
 import { diffArrayChange, togetherCallback } from '@/utils'
 import { RecordProcess } from './help'
-import { records, createRecord, Record, RecordStatus, autoSaveRecords, initialRecords, getRecordFragmentBlobs, isTemploraryID } from '@/store'
+import { records, createRecord, Record, RecordStatus, autoSaveRecords, initialRecords, getRecordFragmentBlobs, isTemploraryID, initialTaggingStyles } from '@/store'
 import { RightFillPano } from '@/layout'
 import Draggable from 'vuedraggable'
 import Sign from './sign.vue'
@@ -38,6 +38,7 @@ import { initialMeasures } from '@/store/measure'
 import { initialGuides } from '@/store/guide'
 
 initialRecords()
+initialTaggingStyles()
 initialTaggings()
 initialMeasures()
 initialGuides()
@@ -78,10 +79,10 @@ watch(setting, (setting, oldSetting = [], onCleanup) => {
 }, { flush: 'sync' })
 
 useViewStack(() => {
-  const pop = showTaggingsStack.push(ref(false))
+  // const pop = showTaggingsStack.push(ref(false))
   return () => {
     setting.value = []
-    pop()
+    // pop()
   }
 })
 useViewStack(autoSaveRecords)

+ 4 - 2
src/views/view/index.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script lang="ts" setup>
-import { views, createView, autoSaveViews, initialViews } from '@/store'
+import { views, createView, autoSaveViews, initialViews, initialTaggingStyles, initialTaggings, initialMeasures } from '@/store'
 import { RightFillPano } from '@/layout'
 import { useViewStack } from '@/hook'
 import Draggable from 'vuedraggable'
@@ -40,7 +40,9 @@ import { ref, watch } from 'vue'
 import type { View } from '@/store'
 
 initialViews()
-
+initialTaggingStyles(), 
+initialTaggings(), 
+initialMeasures()
 const getView = async () => {
   try {
     const { image, flyData } = await loadPack(async () => {