bill vor 3 Wochen
Ursprung
Commit
e55664cfff

+ 50 - 40
src/core/components/line/attach-server.ts

@@ -86,7 +86,7 @@ export const repPointRef = (
   data: LineData,
   data: LineData,
   delId: string,
   delId: string,
   repId: string,
   repId: string,
-  queUpdate = true
+  queUpdate = true,
 ) => {
 ) => {
   for (let i = 0; i < data.lines.length; i++) {
   for (let i = 0; i < data.lines.length; i++) {
     const line = data.lines[i];
     const line = data.lines[i];
@@ -145,14 +145,14 @@ export const deduplicateLines = (data: LineData) => {
 export const getJoinLine = (
 export const getJoinLine = (
   data: LineData,
   data: LineData,
   line: LineDataLine,
   line: LineDataLine,
-  pId: string
+  pId: string,
 ) => {
 ) => {
   const pointIds = [line.a, line.b];
   const pointIds = [line.a, line.b];
   return data.lines
   return data.lines
     .filter(
     .filter(
       (item) =>
       (item) =>
         (item.a === pId || item.b === pId) &&
         (item.a === pId || item.b === pId) &&
-        !(pointIds.includes(item.a) && pointIds.includes(item.b))
+        !(pointIds.includes(item.a) && pointIds.includes(item.b)),
     )
     )
     .map((line) => {
     .map((line) => {
       const pointIds = pId === line.a ? [line.a, line.b] : [line.b, line.a];
       const pointIds = pId === line.a ? [line.a, line.b] : [line.b, line.a];
@@ -232,7 +232,7 @@ export const genMoveLineHandler = (
   lineId: string,
   lineId: string,
   snapConfig: ReturnType<typeof useSnapConfig>,
   snapConfig: ReturnType<typeof useSnapConfig>,
   snapResult: SnapResultInfo,
   snapResult: SnapResultInfo,
-  ctx = getInitCtx()
+  ctx = getInitCtx(),
 ) => {
 ) => {
   const line = data.lines.find((line) => line.id === lineId)!;
   const line = data.lines.find((line) => line.id === lineId)!;
   const pointIds = [line.a, line.b];
   const pointIds = [line.a, line.b];
@@ -283,10 +283,10 @@ export const genMoveLineHandler = (
     let isAlong = !invSelectLineDire;
     let isAlong = !invSelectLineDire;
     if (!isAlong && alongSelectLineDire) {
     if (!isAlong && alongSelectLineDire) {
       const invMoveAngle = Math.abs(
       const invMoveAngle = Math.abs(
-        vector2IncludedAngle(moveDire, invSelectLineDire!)
+        vector2IncludedAngle(moveDire, invSelectLineDire!),
       );
       );
       const alongMoveAngle = Math.abs(
       const alongMoveAngle = Math.abs(
-        vector2IncludedAngle(moveDire, alongSelectLineDire!)
+        vector2IncludedAngle(moveDire, alongSelectLineDire!),
       );
       );
       isAlong = alongMoveAngle! < invMoveAngle!;
       isAlong = alongMoveAngle! < invMoveAngle!;
     }
     }
@@ -313,8 +313,8 @@ export const genMoveLineHandler = (
         (dire) =>
         (dire) =>
           dire !== info.selectLineDire &&
           dire !== info.selectLineDire &&
           !zeroEq(
           !zeroEq(
-            rangMod(vector2IncludedAngle(dire, info.selectLineDire), Math.PI)
-          )
+            rangMod(vector2IncludedAngle(dire, info.selectLineDire), Math.PI),
+          ),
       );
       );
     return { ...info, needSplit, needVertical, joinPoints };
     return { ...info, needSplit, needVertical, joinPoints };
   };
   };
@@ -379,14 +379,17 @@ export const genMoveLineHandler = (
     const uNdx = ndx === 1 ? 0 : 1;
     const uNdx = ndx === 1 ? 0 : 1;
     const move = new Vector2(
     const move = new Vector2(
       points[ndx].x - initPoints[ndx].x,
       points[ndx].x - initPoints[ndx].x,
-      points[ndx].y - initPoints[ndx].y
+      points[ndx].y - initPoints[ndx].y,
     );
     );
     if (!snapLines[uNdx]) {
     if (!snapLines[uNdx]) {
       assignPos(points[uNdx], move.add(initPoints[uNdx]));
       assignPos(points[uNdx], move.add(initPoints[uNdx]));
     } else {
     } else {
       assignPos(
       assignPos(
         points[uNdx],
         points[uNdx],
-        lineIntersection(getVectorLine(lineDire, points[ndx]), snapLines[uNdx])!
+        lineIntersection(
+          getVectorLine(lineDire, points[ndx]),
+          snapLines[uNdx],
+        )!,
       );
       );
     }
     }
   };
   };
@@ -394,7 +397,7 @@ export const genMoveLineHandler = (
   const move = (finalPoss: Pos[]) => {
   const move = (finalPoss: Pos[]) => {
     if (!inited) {
     if (!inited) {
       const moveDires = finalPoss.map((pos, ndx) =>
       const moveDires = finalPoss.map((pos, ndx) =>
-        lineVector([initPoints[ndx], pos])
+        lineVector([initPoints[ndx], pos]),
       );
       );
       inited = true;
       inited = true;
       init(moveDires);
       init(moveDires);
@@ -421,7 +424,7 @@ export const genMoveLineHandler = (
   const getSnapRefPoint = (
   const getSnapRefPoint = (
     point: Pos,
     point: Pos,
     refPoints: Pos[],
     refPoints: Pos[],
-    line: Pos[] | null
+    line: Pos[] | null,
   ) => {
   ) => {
     for (const refPoint of refPoints) {
     for (const refPoint of refPoints) {
       if (
       if (
@@ -452,7 +455,7 @@ export const genMoveLineHandler = (
       refPoint = getSnapRefPoint(
       refPoint = getSnapRefPoint(
         points[0],
         points[0],
         refInfos[0]?.joinPoints,
         refInfos[0]?.joinPoints,
-        snapLines[0]
+        snapLines[0],
       );
       );
       if (refPoint) {
       if (refPoint) {
         ndx = 0;
         ndx = 0;
@@ -463,7 +466,7 @@ export const genMoveLineHandler = (
       refPoint = getSnapRefPoint(
       refPoint = getSnapRefPoint(
         points[1],
         points[1],
         refInfos[1]?.joinPoints,
         refInfos[1]?.joinPoints,
-        snapLines[1]
+        snapLines[1],
       );
       );
       if (refPoint) {
       if (refPoint) {
         ndx = 1;
         ndx = 1;
@@ -510,10 +513,10 @@ export const useLineDataSnapInfos = (type: "line" | "lineChunk") => {
     snapInfos = getSnapInfos({
     snapInfos = getSnapInfos({
       ...lineData.value,
       ...lineData.value,
       lines: lineData.value.lines.filter(
       lines: lineData.value.lines.filter(
-        (item) => !(pointIds.includes(item.a) || pointIds.includes(item.b))
+        (item) => !(pointIds.includes(item.a) || pointIds.includes(item.b)),
       ),
       ),
       points: lineData.value.points.filter(
       points: lineData.value.points.filter(
-        (item) => !pointIds.includes(item.id)
+        (item) => !pointIds.includes(item.id),
       ),
       ),
     });
     });
     snapInfos.forEach((item) => {
     snapInfos.forEach((item) => {
@@ -536,7 +539,7 @@ export const updateLineLength = (
   line: LineDataLine,
   line: LineDataLine,
   length: number,
   length: number,
   flex?: "a" | "b" | "both",
   flex?: "a" | "b" | "both",
-  vector?: Pos
+  vector?: Pos,
 ) => {
 ) => {
   const points = [
   const points = [
     lineData.points.find((p) => p.id === line.a)!,
     lineData.points.find((p) => p.id === line.a)!,
@@ -546,10 +549,10 @@ export const updateLineLength = (
 
 
   if (!flex) {
   if (!flex) {
     const aCount = lineData.lines.filter(
     const aCount = lineData.lines.filter(
-      (line) => line.a === points[0].id || line.b === points[0].id
+      (line) => line.a === points[0].id || line.b === points[0].id,
     ).length;
     ).length;
     const bCount = lineData.lines.filter(
     const bCount = lineData.lines.filter(
-      (line) => line.a === points[1].id || line.b === points[1].id
+      (line) => line.a === points[1].id || line.b === points[1].id,
     ).length;
     ).length;
     if (aCount === bCount || (aCount > 1 && bCount > 1)) {
     if (aCount === bCount || (aCount > 1 && bCount > 1)) {
       flex = "both";
       flex = "both";
@@ -565,7 +568,7 @@ export const updateLineLength = (
     const l1 = getVectorLine(
     const l1 = getVectorLine(
       moveVector.clone().multiplyScalar(-1),
       moveVector.clone().multiplyScalar(-1),
       center,
       center,
-      length / 2
+      length / 2,
     );
     );
     const l2 = getVectorLine(moveVector, center, length / 2);
     const l2 = getVectorLine(moveVector, center, length / 2);
     npoints = [l1[1], l2[1]];
     npoints = [l1[1], l2[1]];
@@ -575,7 +578,7 @@ export const updateLineLength = (
     const line = getVectorLine(
     const line = getVectorLine(
       mNdx === 1 ? moveVector : moveVector.multiplyScalar(-1),
       mNdx === 1 ? moveVector : moveVector.multiplyScalar(-1),
       points[fNdx],
       points[fNdx],
-      length
+      length,
     );
     );
     const nPoints: Pos[] = [];
     const nPoints: Pos[] = [];
     nPoints[fNdx] = points[fNdx];
     nPoints[fNdx] = points[fNdx];
@@ -590,7 +593,7 @@ export const useLineDescribes = (
   line: Ref<LineDataLine>,
   line: Ref<LineDataLine>,
   type: "line" | "lineChunk",
   type: "line" | "lineChunk",
   fixedStroke = false,
   fixedStroke = false,
-  fixedStrokeOptions: number[] = []
+  fixedStrokeOptions: number[] = [],
 ) => {
 ) => {
   const d: any = useComponentDescribes(line, ["stroke", "strokeWidth"], {});
   const d: any = useComponentDescribes(line, ["stroke", "strokeWidth"], {});
   const store = useStore();
   const store = useStore();
@@ -605,30 +608,37 @@ export const useLineDescribes = (
     watch(
     watch(
       d,
       d,
       (d) => {
       (d) => {
-        d.strokeWidth.label = ui18n.t('shape.wall.strokeWidth');
+        d.strokeWidth.label = ui18n.t("shape.wall.strokeWidth");
         d.strokeWidth.props = {
         d.strokeWidth.props = {
           ...d.strokeWidth.props,
           ...d.strokeWidth.props,
           proportion: true,
           proportion: true,
         };
         };
       },
       },
-      { immediate: true }
+      { immediate: true },
     );
     );
   } else {
   } else {
-    useInstallStrokeWidthDescribe(d, line, fixedStrokeOptions, undefined, undefined, ui18n.t('sys.line.strokeWidth'));
+    useInstallStrokeWidthDescribe(
+      d,
+      line,
+      fixedStrokeOptions,
+      undefined,
+      undefined,
+      ui18n.t("sys.line.strokeWidth"),
+    );
   }
   }
-  
+
   watch(
   watch(
     d,
     d,
     (d) => {
     (d) => {
-      if (type === 'line') {
-        d.stroke.label = ui18n.t('sys.color');
+      d.stroke.label = ui18n.t("sys.color");
+      if (type === "line") {
         d.stroke.props = {
         d.stroke.props = {
-          colors: ['#000000', '#cccccc', null]
-        }
+          colors: ["#000000", "#cccccc", null],
+        };
       }
       }
       d.length = {
       d.length = {
         type: "inputNum",
         type: "inputNum",
-        label: ui18n.t('line.length'),
+        label: ui18n.t("line.length"),
         "layout-type": "row",
         "layout-type": "row",
         props: {
         props: {
           proportion: true,
           proportion: true,
@@ -647,12 +657,12 @@ export const useLineDescribes = (
             line.value,
             line.value,
             val,
             val,
             undefined,
             undefined,
-            setLineVector
+            setLineVector,
           );
           );
         },
         },
       };
       };
     },
     },
-    { immediate: true }
+    { immediate: true },
   );
   );
   return d as Ref<PropertyDescribes>;
   return d as Ref<PropertyDescribes>;
 };
 };
@@ -667,7 +677,7 @@ export const useDrawLinePoint = (
     point: LineData["points"][0];
     point: LineData["points"][0];
     oldIcons: LineIconData[];
     oldIcons: LineIconData[];
     newIcons: LineIconData[];
     newIcons: LineIconData[];
-  }) => void
+  }) => void,
 ) => {
 ) => {
   const mode = useMode();
   const mode = useMode();
   let __leave: (() => void) | null;
   let __leave: (() => void) | null;
@@ -698,7 +708,7 @@ export const useDrawLinePoint = (
   const icons = computed(() =>
   const icons = computed(() =>
     store
     store
       .getTypeItems("lineIcon")
       .getTypeItems("lineIcon")
-      .filter((item) => item.lineId === line.value.id)
+      .filter((item) => item.lineId === line.value.id),
   );
   );
   const drawStore = useDrawIngData();
   const drawStore = useDrawIngData();
   const cursor = useCursor();
   const cursor = useCursor();
@@ -762,21 +772,21 @@ export const useDrawLinePoint = (
             newIcons: drawStore.lineIcon!,
             newIcons: drawStore.lineIcon!,
           });
           });
           leave();
           leave();
-        })
+        }),
       ),
       ),
       watch(
       watch(
         pos,
         pos,
         (pos) => {
         (pos) => {
           pos && afterUpdate(pos);
           pos && afterUpdate(pos);
         },
         },
-        { immediate: true }
+        { immediate: true },
       ),
       ),
       () => {
       () => {
         drawProps.value = undefined;
         drawProps.value = undefined;
         snapInfos.clear();
         snapInfos.clear();
         snap.clear();
         snap.clear();
         isStop = true;
         isStop = true;
-      }
+      },
     );
     );
   };
   };
 
 
@@ -789,8 +799,8 @@ export const useDrawLinePoint = (
         (hasDraw, _, onCleanup) => {
         (hasDraw, _, onCleanup) => {
           hasDraw ? onCleanup(enterDraw()) : leave();
           hasDraw ? onCleanup(enterDraw()) : leave();
         },
         },
-        { immediate: true }
-      )
+        { immediate: true },
+      ),
     );
     );
   };
   };
 
 

+ 4 - 4
src/core/components/table/table.vue

@@ -270,11 +270,11 @@ watch(
         col.fontSize = data.value.fontSize;
         col.fontSize = data.value.fontSize;
       });
       });
     });
     });
-    const $shape = shape.value!.getNode();
-    data.value = matToData(data.value, $shape.getTransform());
+    // const $shape = shape.value!.getNode();
+    // data.value = matToData(data.value, $shape.getTransform());
 
 
-    sync(data.value);
-    $shape.fire("bound-change");
+    // sync(data.value);
+    // $shape.fire("bound-change");
   },
   },
   { flush: "sync" }
   { flush: "sync" }
 );
 );

+ 1 - 1
src/core/hook/use-expose.ts

@@ -238,7 +238,7 @@ export const useShortcutKey = () => {
                 belong.item as any,
                 belong.item as any,
                 belong.isSelf ? undefined : belong.curId,
                 belong.isSelf ? undefined : belong.curId,
               );
               );
-            } else if (belong.isSelf) {
+            } else if (belong.isSelf && !belong.item.disableDelete) {
               store.delItem(belong.type, belong.id);
               store.delItem(belong.type, belong.id);
             }
             }
           });
           });

+ 0 - 17
src/core/hook/use-layer.ts

@@ -68,15 +68,6 @@ export const useMigrateLayer = (shape: Ref<DC<EntityShape> | undefined>) => {
       $shape.remove();
       $shape.remove();
       rawParent.add($shape);
       rawParent.add($shape);
 
 
-      if (import.meta.env.DEV) {
-        setTimeout(() => {
-          console.log(
-            `recovery raw:${rawParent.id()} ${
-              rawParent.children.length
-            } to:${toLayer.id()} ${toLayer.children.length}`
-          );
-        });
-      }
 
 
       if ((toRaw(formal.value) === toRaw(rawParent) || rawParent.id() === DataGroupId) && zIndexs.get($shape)) {
       if ((toRaw(formal.value) === toRaw(rawParent) || rawParent.id() === DataGroupId) && zIndexs.get($shape)) {
         zIndexs.refresh();
         zIndexs.refresh();
@@ -90,14 +81,6 @@ export const useMigrateLayer = (shape: Ref<DC<EntityShape> | undefined>) => {
     toLayer = to;
     toLayer = to;
     $shape.remove();
     $shape.remove();
     to.add($shape);
     to.add($shape);
-
-    if (import.meta.env.DEV) {
-      console.log(
-        `migrate raw:${rawParent.id()} ${
-          rawParent.children.length
-        } to:${toLayer.id()} ${toLayer.children.length}`
-      );
-    }
   };
   };
 
 
   return [migrate, recovery] as const;
   return [migrate, recovery] as const;

+ 1 - 1
src/core/html-mount/propertys/components/input-num.vue

@@ -7,7 +7,7 @@
       "
       "
       @update:model-value="(val: any) => props.proportion ? changeHandler(invTransform(val), val) : changeHandler(val, val)"
       @update:model-value="(val: any) => props.proportion ? changeHandler(invTransform(val), val) : changeHandler(val, val)"
       @change="$emit('change')"
       @change="$emit('change')"
-      style="width: 98px"
+      style="width: 128px"
       :precision="0"
       :precision="0"
       :min="min"
       :min="min"
       :max="max"
       :max="max"

+ 2 - 1
src/core/html-mount/propertys/index.ts

@@ -1,6 +1,7 @@
 import Color from "./components/color.vue";
 import Color from "./components/color.vue";
 import Select from "./components/select.vue";
 import Select from "./components/select.vue";
-import Num from "./components/num.vue";
+// import Num from "./components/num.vue";
+import Num from "./components/input-num.vue";
 import Checkbox from "./components/checkbox.vue";
 import Checkbox from "./components/checkbox.vue";
 import InputNum from "./components/input-num.vue";
 import InputNum from "./components/input-num.vue";
 
 

+ 8 - 8
src/core/html-mount/propertys/sys-describes.ts

@@ -52,7 +52,7 @@ export default {
       "step": 1,
       "step": 1,
       "max": 500
       "max": 500
     },
     },
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "rotate": {
   "rotate": {
     "type": "num",
     "type": "num",
@@ -62,7 +62,7 @@ export default {
       "min": -180,
       "min": -180,
       "max": 180
       "max": 180
     },
     },
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "coverStrokeWidth": {
   "coverStrokeWidth": {
     "type": "num",
     "type": "num",
@@ -72,7 +72,7 @@ export default {
       "min": 0.5,
       "min": 0.5,
       "max": 10
       "max": 10
     },
     },
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "opacity": {
   "opacity": {
     "type": "num",
     "type": "num",
@@ -83,7 +83,7 @@ export default {
       "step": 0.01
       "step": 0.01
     },
     },
     "default": 1,
     "default": 1,
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "coverOpcatiy": {
   "coverOpcatiy": {
     "type": "num",
     "type": "num",
@@ -94,7 +94,7 @@ export default {
       "step": 0.01
       "step": 0.01
     },
     },
     "default": 1,
     "default": 1,
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "zIndex": {
   "zIndex": {
     "type": "num",
     "type": "num",
@@ -105,7 +105,7 @@ export default {
       "step": 1
       "step": 1
     },
     },
     "default": 0,
     "default": 0,
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "pointerLength": {
   "pointerLength": {
     "type": "num",
     "type": "num",
@@ -114,7 +114,7 @@ export default {
       "min": 0.5,
       "min": 0.5,
       "max": 10
       "max": 10
     },
     },
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "align": {
   "align": {
     "type": "select",
     "type": "select",
@@ -145,7 +145,7 @@ export default {
       "step": 1,
       "step": 1,
       "max": 100
       "max": 100
     },
     },
-    "layout-type": "column"
+    "layout-type": "row"
   },
   },
   "fontStyle": {
   "fontStyle": {
     "type": "select",
     "type": "select",

+ 4 - 3
src/example/components/slide/actions.ts

@@ -145,16 +145,17 @@ export const imp: MenuItem = {
         const url = await window.platform.uploadResourse(files[0]);
         const url = await window.platform.uploadResourse(files[0]);
         const image = await getImage(window.platform.getResource(url));
         const image = await getImage(window.platform.getResource(url));
         ElMessage.warning(ui18n.t('sys.actions.import.local.tip'));
         ElMessage.warning(ui18n.t('sys.actions.import.local.tip'));
+        console.log(image.width, image.height)
         draw.enterDrawShape(
         draw.enterDrawShape(
           "image",
           "image",
           {
           {
             width: image.width,
             width: image.width,
             height: image.height,
             height: image.height,
-            key: "kankan-floor-cover",
+            // key: "kankan-floor-cover",
             url,
             url,
-            lock: true,
+            // lock: true,
             cornerRadius: 0,
             cornerRadius: 0,
-            zIndex: -2,
+            // zIndex: -2,
           },
           },
           true
           true
         );
         );

+ 4 - 2
src/example/dialog/vr/vr.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div style="padding: 20px 20px 40px">
   <div style="padding: 20px 20px 40px">
     <p class="title">
     <p class="title">
-      {{ label ? label : $t('sys.vr.dialog.title') }}
+      {{ label ? label : $t("sys.vr.dialog.title") }}
     </p>
     </p>
     <el-select
     <el-select
       :model-value="value?.id"
       :model-value="value?.id"
@@ -38,6 +38,7 @@ const emit = defineEmits<{ (e: "update:value", val: Scene): void }>();
 const _value = ref<Scene>();
 const _value = ref<Scene>();
 const value = computed({
 const value = computed({
   get: () => {
   get: () => {
+    console.error(props.value);
     if (props.value !== undefined) {
     if (props.value !== undefined) {
       return props.value;
       return props.value;
     } else {
     } else {
@@ -61,7 +62,8 @@ const refresh = async () => {
 
 
 watch(scenes, (scenes) => {
 watch(scenes, (scenes) => {
   if (scenes.length === 1) {
   if (scenes.length === 1) {
-    emit("update:value", scenes[0]);
+    value.value = scenes[0];
+    // emit("update:value", scenes[0]);
   }
   }
 });
 });
 
 

+ 4 - 4
src/example/fuse/enter-case.ts

@@ -23,12 +23,12 @@ window.platform.login = (isBack = true) => {
       shadred
       shadred
         .post("/service/manage/login", {
         .post("/service/manage/login", {
           // password: "JwiuK95dExMjM0NTY=7nHGf5ySQWSuC4G1An",
           // password: "JwiuK95dExMjM0NTY=7nHGf5ySQWSuC4G1An",
-          // username: "super-admin",
-          // userName: "super-admin",
+          username: "super-admin",
+          userName: "super-admin",
 
 
           password: encodePwd('Aa123456'),
           password: encodePwd('Aa123456'),
-          username: "20迈",
-          userName: "20迈",
+          // username: "20迈",
+          // userName: "20迈",
 
 
         })
         })
         .then((res) => {
         .then((res) => {

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

@@ -19,8 +19,8 @@ window.platform.login = (isBack = true) => {
         password: encodePwd("Aa123456"),
         password: encodePwd("Aa123456"),
         username: "super-admin",
         username: "super-admin",
         userName: "super-admin",
         userName: "super-admin",
-        // username: "20迈",
-        // userName: "20迈",
+        // username: "潘少爷",
+        // userName: "潘少爷",
         
         
       })
       })
       .then((res) => {
       .then((res) => {

+ 1 - 0
src/example/fuse/views/overview/header.vue

@@ -217,6 +217,7 @@ const saveHandler = repeatedlyOnly(async () => {
   tabulationId.value = tabId;
   tabulationId.value = tabId;
   await refreshTabulationData();
   await refreshTabulationData();
 
 
+  console.error(storeData.config.compass.rotation);
   const tabStore = await repTabulationStore(
   const tabStore = await repTabulationStore(
     tabulationData.value.paperKey,
     tabulationData.value.paperKey,
     storeData.config.compass.rotation,
     storeData.config.compass.rotation,

+ 7 - 3
src/example/fuse/views/overview/index.vue

@@ -23,7 +23,12 @@
         v-if="vrScene"
         v-if="vrScene"
         ref="vr"
         ref="vr"
         v-model:height="vrHeight"
         v-model:height="vrHeight"
-        @close="vrScene = undefined"
+        @close="
+          () => {
+            vrScene = undefined;
+            vrHeight = 220;
+          }
+        "
       />
       />
       <div class="three-view" v-if="attach && showThree">
       <div class="three-view" v-if="attach && showThree">
         <component :is="attach" :draw="(draw as any)" />
         <component :is="attach" :draw="(draw as any)" />
@@ -133,7 +138,7 @@ watch(draw, (draw, _, onCleanup) => {
     });
     });
   }
   }
 });
 });
-const title = computed(() => overviewData.value?.title || ui18n.t('sys.defTitle'));
+const title = computed(() => overviewData.value?.title || ui18n.t("sys.defTitle"));
 watchEffect(() => {
 watchEffect(() => {
   document.title = title.value;
   document.title = title.value;
 });
 });
@@ -149,6 +154,5 @@ watchEffect(() => {
 }
 }
 .overview-height .mount-layout {
 .overview-height .mount-layout {
   --draw-mount-layout-top: var(--vrHeight);
   --draw-mount-layout-top: var(--vrHeight);
-  
 }
 }
 </style>
 </style>

+ 28 - 8
src/example/fuse/views/tabulation/index.vue

@@ -164,7 +164,11 @@ const setMapHandler = async (config: { url: string; size: Size }) => {
 {
 {
   const serialTable = computed(() => {
   const serialTable = computed(() => {
     const tables = draw.value?.store.getTypeItems("table");
     const tables = draw.value?.store.getTypeItems("table");
-    return tables && tables.find((table) => table.key === tableSerialTableKey);
+    const table = tables && tables.find((table) => table.key === tableSerialTableKey);
+    if (table) {
+      table.disableDelete = true;
+    }
+    return table;
   });
   });
 
 
   watchEffect((onCleanup) => {
   watchEffect((onCleanup) => {
@@ -432,6 +436,7 @@ const setCover = (paperKey: PaperKey, draw: Draw) => {
       scale: round(scale, 1),
       scale: round(scale, 1),
     };
     };
   }
   }
+  text.disableDelete = true;
 
 
   const coverQue = computed(() => draw.store.getItem("image", cover.id));
   const coverQue = computed(() => draw.store.getItem("image", cover.id));
   const coverTexQue = computed(() => draw.store.getItem("text", text.id));
   const coverTexQue = computed(() => draw.store.getItem("text", text.id));
@@ -461,13 +466,28 @@ const setCover = (paperKey: PaperKey, draw: Draw) => {
       coverTexQue,
       coverTexQue,
       (tex, _, cleanup) => {
       (tex, _, cleanup) => {
         if (!tex) return;
         if (!tex) return;
+        tex.disableDelete = true;
         cleanup(
         cleanup(
-          mountMenus.setShapeMenusFilter(tex.id, (menus) => {
-            const newMenus = { ...menus };
-            delete newMenus.align;
-            delete newMenus.fontStyle;
-            return newMenus;
-          })
+          mergeFuns(
+            mountMenus.setShapeMenusFilter(tex.id, (menus) => {
+              const newMenus = { ...menus };
+              delete newMenus.align;
+              delete newMenus.fontStyle;
+              return newMenus;
+            }),
+            menusFilter.setShapeMenusFilter(tex.id, (menus) => [
+              ...menus,
+              {
+                label: ui18n.t("sys.hide"),
+                handler() {
+                  draw.store.setItem("text", {
+                    value: { ...tex, hide: true },
+                    id: tex.id,
+                  });
+                },
+              },
+            ])
+          )
         );
         );
       },
       },
       { immediate: true }
       { immediate: true }
@@ -655,7 +675,7 @@ watch(compass, (compass, _, onCleanup) => {
           min: 0,
           min: 0,
           max: 360,
           max: 360,
         },
         },
-        "layout-type": "column",
+        "layout-type": "row",
         sort: 3,
         sort: 3,
         get value() {
         get value() {
           return round((new Transform(compass.mat).decompose().rotation + 360) % 360, 1);
           return round((new Transform(compass.mat).decompose().rotation + 360) % 360, 1);

+ 0 - 10
src/example/fuse/views/tabulation/overview-viewport.vue

@@ -240,17 +240,7 @@ const updateOrigin = () => {
   d.initViewport(padding * viewScale.value!);
   d.initViewport(padding * viewScale.value!);
   const canvas = draw.value!.stage!.container().children[0]
   const canvas = draw.value!.stage!.container().children[0]
     .children[0] as HTMLCanvasElement;
     .children[0] as HTMLCanvasElement;
-  const image = new Image();
   emit("changeOrigin", canvas);
   emit("changeOrigin", canvas);
-
-  if (import.meta.env.DEV) {
-    const mat = d!.viewer.transform.invert();
-    const testScale =
-      lineLen(mat.point({ x: 1, y: 0 }), mat.point({ x: 0, y: 0 })) * viewScale.value!;
-    // 一个像素 真实尺寸
-    console.log(`需要: 绘图一个像素:${pixelPaperToDrawPixel.value}`);
-    console.log(`实际: 绘图一个像素:${testScale}`);
-  }
 };
 };
 
 
 const frameUpdateOrigin = debounce(updateOrigin, 300);
 const frameUpdateOrigin = debounce(updateOrigin, 300);

+ 0 - 1
src/example/platform/resource-swkk.ts

@@ -669,7 +669,6 @@ export const getResource = async ({
 
 
   const compass = await getCompass(scene);
   const compass = await getCompass(scene);
   const reqs: Promise<any>[] = [
   const reqs: Promise<any>[] = [
-    getCompass(scene),
     getCoverLine(scene, key, scale)
     getCoverLine(scene, key, scale)
       .then((lines) => (coverLine = lines))
       .then((lines) => (coverLine = lines))
       .then((cover) =>
       .then((cover) =>

+ 2 - 2
src/lang/locales/zh.json

@@ -157,7 +157,7 @@
       "case_other": "其他物证",
       "case_other": "其他物证",
       "check": "特殊物证",
       "check": "特殊物证",
       "chelunhenji_o": "车轮印",
       "chelunhenji_o": "车轮印",
-      "chuang": "窗",
+      "chuang": "平开窗",
       "corpse": "尸体",
       "corpse": "尸体",
       "cube": "提取物品",
       "cube": "提取物品",
       "danke_o": "弹壳",
       "danke_o": "弹壳",
@@ -168,7 +168,7 @@
       "handprint": "手印痕迹",
       "handprint": "手印痕迹",
       "loudao": "楼道",
       "loudao": "楼道",
       "luodichuang": "落地窗",
       "luodichuang": "落地窗",
-      "men_l": "开门",
+      "men_l": "开门",
       "physics_and_chemistry": "理化物证",
       "physics_and_chemistry": "理化物证",
       "piaochuang": "飘窗",
       "piaochuang": "飘窗",
       "poison": "毒化物证",
       "poison": "毒化物证",