bill 1 hete
szülő
commit
642483b05f

+ 2 - 2
src/components/materials/index.vue

@@ -204,8 +204,8 @@ const cloumns = computed(() => {
           {
             width: "200px",
             title: "案件",
-            dataIndex: "kno",
-            key: "kno",
+            dataIndex: "caseTitle",
+            key: "caseTitle",
           },
           {
             width: "100px",

+ 0 - 1
src/model/app.vue

@@ -229,7 +229,6 @@ export default Model;
   transition: top 0.3s ease, right 0.3s ease;
   &.full {
     right: 0 !important;
-    top: 0 !important;
   }
 }
 </style>

+ 13 - 9
src/sdk/association/fuseMode.ts

@@ -20,7 +20,9 @@ import {
   FuseModels,
 } from "@/store";
 import { currentLayout, RoutesName } from "@/router";
-import { isUnSet, unSet } from "@/utils/unset";
+import { unsetFactory } from "@/utils/unset";
+
+const us = unsetFactory()
 
 // -----------------模型关联--------------------
 
@@ -116,13 +118,13 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
 
         if (deepIsRevise(update, transform)) {
           console.error('change', item)
-          unSet(() => Object.assign(item, transform));
+          us.unSet(() => Object.assign(item, transform));
         }
       }, 16);
     });
 
     sceneModel.bus.on("changeSelect", (select) => {
-      unSet(() => {
+      us.unSet(() => {
         // if (custom.showMode === "fuse") {
           if (custom.currentModel === item && !select) {
             custom.currentModel = null;
@@ -258,23 +260,25 @@ export const associationModels = (sdk: SDK) => {
           const modelShow = getFuseModelShowVariable(item);
           watch(
             () => item.bottom,
-            () => isUnSet || getSceneModel(item)?.changeBottom(item.bottom)
+            () => us.isUnSet || getSceneModel(item)?.changeBottom(item.bottom)
             // { immediate: true }
           );
           watch(
             () => item.opacity,
-            () => isUnSet || getSceneModel(item)?.changeOpacity(item.opacity)
+            () => us.isUnSet || getSceneModel(item)?.changeOpacity(item.opacity)
             // { immediate: true }
           );
           watch(
             () => item.scale,
-            () => isUnSet || getSceneModel(item)?.changeScale(item.scale)
+            () => {
+              us.isUnSet || getSceneModel(item)?.changeScale(item.scale)
+            }
             // { immediate: true }
           ); 
           watch(
             () => item.position,
             () => {
-              if (!isUnSet) {
+              if (!us.isUnSet) {
                 console.log('position', item.raw.modelTitle, toRaw(item.position))
                 getSceneModel(item)?.changePosition(item.position);
               }
@@ -284,7 +288,7 @@ export const associationModels = (sdk: SDK) => {
           watch(
             () => item.rotation,
             () => {
-              if (!isUnSet) {
+              if (!us.isUnSet) {
                 console.log('rotation', item.raw.modelTitle,  toRaw(item.rotation))
                 getSceneModel(item)?.changeRotation(toRaw(item.rotation));
               }
@@ -295,7 +299,7 @@ export const associationModels = (sdk: SDK) => {
             () => modelShow.value,
             () => {
               const sceneModel = getSceneModel(item);
-              if (!isUnSet && sceneModel) {
+              if (!us.isUnSet && sceneModel) {
                 sceneModel.changeSelect(false);
                 sceneModel.changeShow(modelShow.value);
               }

+ 8 - 6
src/sdk/association/measure.ts

@@ -18,7 +18,9 @@ import type {
   SDK, 
   Measure as SceneMeasure 
 } from '../sdk'
-import { isUnSet, unSet } from '@/utils/unset'
+import { unsetFactory } from "@/utils/unset";
+
+const us = unsetFactory()
 
 // -----------------测量关联--------------------
 
@@ -35,9 +37,9 @@ export const getSceneMeasureDesc = (smMeasure: SceneMeasure, measure: Measure) =
 
 export const associationMessaure = <T extends MeasureType>(smMeasure: SceneMeasure<T>, measure: Measure<T>) => {
   smMeasure.bus.on('update', ([points, modelIds]) => {
-    unSet(() => measure.positions = points.map((point, i) => ({ point, modelId: modelIds[i] })))
+    us.unSet(() => measure.positions = points.map((point, i) => ({ point, modelId: modelIds[i] })))
   })
-  smMeasure.bus.on('highlight', selected => unSet(() => measure.selected = selected))
+  smMeasure.bus.on('highlight', selected => us.unSet(() => measure.selected = selected))
 }
 
 export const associationMessaures = (sdk: SDK) => {
@@ -66,11 +68,11 @@ export const associationMessaures = (sdk: SDK) => {
   arrayChildEffectScope(getMeasures, measure => {
     watch(
       () => measure.selected, 
-      (selected = false) => isUnSet || getSceneMeasure(measure)?.changeSelect(selected)
+      (selected = false) => us.isUnSet || getSceneMeasure(measure)?.changeSelect(selected)
     )
     watch(
       () => measure.positions, 
-      (positions) => isUnSet || getSceneMeasure(measure)?.setPositions(
+      (positions) => us.isUnSet || getSceneMeasure(measure)?.setPositions(
         positions.map(position => ({...position.point})),
         positions.map(position => position.modelId),
       )
@@ -78,7 +80,7 @@ export const associationMessaures = (sdk: SDK) => {
     watch(
       () => custom.showMeasures, 
       (show) => {
-        if (!isUnSet) {
+        if (!us.isUnSet) {
           const smMeasure = getSceneMeasure(measure)
           if (show) {
             smMeasure?.show()

+ 1 - 2
src/store/fuse-model.ts

@@ -31,7 +31,7 @@ import { initialTaggings } from "./tagging";
 import { initialMeasures } from "./measure";
 
 import type { FuseModel as SModel, FuseModelAttrs } from "@/api";
-import { isUnSet } from "@/utils/unset";
+
 
 export type FuseModel = SModel & {
   loaded: boolean;
@@ -196,7 +196,6 @@ export const saveFuseModels = saveStoreItems(fuseModels, getBackupFuseModels, {
 
 export const autoSaveFuseModels = autoSetModeCallback(fuseModels, {
   isUpdate: (fuseModels) => {
-    // if (isUnSet) return false
     return deepIsRevise(
       fuseModels.map((item) => ({
         ...item,

+ 17 - 7
src/utils/unset.ts

@@ -1,8 +1,18 @@
-import { nextTick } from "vue"
+import { nextTick } from "vue";
 
-export let isUnSet = false
-export const unSet = ((fn: () => void) => {
-  isUnSet = true
-  fn()
-  nextTick(() => isUnSet = false)
-})
+export const unsetFactory = () => {
+  let isUnSet = false;
+  const unSet = (fn: () => void) => {
+    console.error("unset");
+    isUnSet = true;
+    fn();
+    nextTick(() => (isUnSet = false));
+  };
+
+  return {
+    get isUnSet() {
+      return isUnSet
+    },
+    unSet
+  }
+};

+ 2 - 1
src/views/guide/index.vue

@@ -16,7 +16,7 @@
     <PathEdit v-if="current === 'path'" ref="quiskObj" />
   </RightFillPano>
   <Teleport to=".laser-layer">
-    <div class="quisks" v-if="!isEdit && !currentIsFullView">
+    <div class="quisks" v-if="!isEdit && !currentIsFullView && !custom.full">
       <div class="quisk-item fun-ctrl" @click="quiskAdd('guide')">
         <ui-icon type="a-guide_s" />
         <span>导览</span>
@@ -41,6 +41,7 @@ import { nextTick, reactive, ref, watchEffect } from "vue";
 import { guides, isEdit, paths } from "@/store";
 import router from "@/router";
 import { currentIsFullView } from "@/utils/full";
+import { custom } from "@/env";
 
 const current = ref("path");
 const tabs = reactive([

+ 3 - 2
src/views/tagging/index.vue

@@ -18,7 +18,7 @@
   </RightFillPano>
 
   <Teleport to=".laser-layer">
-    <div class="quisks" v-if="!isEdit && !currentIsFullView">
+    <div class="quisks" v-if="!isEdit && !currentIsFullView && !custom.full">
       <Dropdown>
         <div class="quisk-item fun-ctrl">
           <ui-icon type="label" />
@@ -60,6 +60,7 @@ import { selectMaterials } from "@/components/materials/quisk";
 import { defStyleType, getStyleTypeId, tqStatusEnum } from "@/api";
 import { formatDate } from "@/utils";
 import { FileType } from "@/api/material";
+import { custom } from "@/env";
 
 const current = ref("tagging");
 const tabs = reactive([
@@ -81,7 +82,7 @@ const exposeTagging = async () => {
   const list = await selectMaterials({
     useType: "trace_evidence",
     readonly: true,
-    format: ["jpg", "png", "mp4", "mp3", "wav"],
+    format: ["jpg", "png", "mp4", "mp3", "wav", "jpeg"],
   });
   if (!list) return;