2 Комити ec97271811 ... dbd3bb44ba

Аутор SHA1 Порука Датум
  bill dbd3bb44ba fix: 1 пре 2 недеља
  bill a5f7950bdc fix: 1 пре 2 недеља

+ 1 - 1
src/core/components/line/attach-server.ts

@@ -638,7 +638,7 @@ export const useLineDescribes = (
       }
       d.length = {
         type: "inputNum",
-        label: ui18n.t("line.length"),
+        label: type === "line" ? ui18n.t("sys.length") : ui18n.t("line.length"),
         "layout-type": "row",
         props: {
           proportion: true,

+ 17 - 9
src/core/components/text/index.ts

@@ -10,7 +10,6 @@ import { getMouseColors } from "@/utils/colors.ts";
 import { shallowReactive } from "vue";
 import { InteractiveFix, InteractiveTo, MatResponseProps } from "../index.ts";
 import { zeroEq } from "@/utils/math.ts";
-import { MathUtils } from "three";
 import { getSupportedFont } from "@/utils/shared.ts";
 import { ui18n } from "@/lang/index.ts";
 import { installGlobalStyle } from "@/core/hook/use-global-style.ts";
@@ -117,16 +116,25 @@ export const getWidth = (data: TextData, scaleX: number) => {
 export const matResponse = ({ data, mat, increment }: MatResponseProps<"text">) => {
   if (increment) {
     mat = mat.copy().multiply(new Transform(data.mat))
-  }
-  const { scaleX, x, y, rotation } = mat.decompose();
-  if (!zeroEq(scaleX - 1)) {
-    data.width = getWidth(data, scaleX)
+  } 
+
+  const [a, b, c, d, x, y] = mat.m;
+  const localScaleX = Math.hypot(a, b);
+  const localScaleY = Math.hypot(c, d);
+  const rotation = Math.atan2(b, a);
+
+  if (!zeroEq(localScaleX - 1)) {
+    if (increment) return;
+    data.width = getWidth(data, localScaleX)
     data.mat = new Transform()
     .translate(x, y)
-    .rotate(MathUtils.degToRad(rotation))
-    .scale(1, 1).m
-  } else {
+    .rotate(rotation).m
+  } else if (zeroEq(localScaleY - 1))  {
     data.mat = mat.m
+  } else {
+    data.mat = new Transform()
+      .translate(x, y)
+      .rotate(rotation).m
   }
   return data
 };
@@ -135,4 +143,4 @@ export const getPredefine = (key: keyof TextData) => {
   if (key === 'stroke') {
     return { canun: true }
   }
-}
+}

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

@@ -112,7 +112,7 @@ export const useComponentMenus = <T extends DrawItem>(
     });
   }
 
-  if (copyHandler) {
+  if (copyHandler && !data.value.disableCopy) {
     const getCopyTransform = useGetShapeCopyTransform(shape);
     const status = useMouseShapesStatus();
     const stage = useStage();

+ 4 - 3
src/example/components/slide/slide-item.vue

@@ -12,7 +12,7 @@
         @mouseleave="hover?.leaveHandler(props.data)"
       >
         <Icon :name="showAttr.icon" size="24px" />
-        <span>{{ showAttr.name }}</span>
+        <span>{{ showAttr.name }} </span>
       </div>
     </template>
     <SlideItem v-for="item in data.children" :data="item" />
@@ -28,7 +28,7 @@
       @mouseenter="hover?.enterHandler(props.data)"
       @mouseleave="hover?.leaveHandler(props.data)"
     >
-      <Icon :name="showAttr.icon" size="22px" />
+      <Icon :name="showAttr.icon" size="22px"  :color="(showAttr as any)?.color" />
       <span>{{ showAttr.name }}</span>
     </div>
   </el-menu-item>
@@ -42,7 +42,7 @@ import { hoverManage } from "@/utils/shared";
 
 const props = defineProps<{
   data: MenuItem;
-  viewData?: Pick<MenuItem, "icon" | "name">;
+  viewData?: Pick<MenuItem, "icon" | "name"> &{color?: string};
   enterHandler?: (data: MenuItem) => (data: MenuItem) => void;
 }>();
 const emit = defineEmits<{
@@ -51,6 +51,7 @@ const emit = defineEmits<{
 
 const index = computed(() => props.data.value || props.data.name);
 const showAttr = computed(() => props.viewData || props.data);
+
 const active = computed(() => false);
 const clickHandler = () => {
   if (props.data.children?.length && props.data.defSelect) {

+ 13 - 5
src/example/fuse/enter-shared.ts

@@ -458,11 +458,19 @@ export let getTableTemp = async () => {
     };
 
     // if (window.platform.num) {
-    const item = await get("fusion/caseOverview/settingInfo", {
-      tabulationId: params.value.tabulationId,
-      overviewId: params.value.overviewId,
-      num: window.platform.num,
-    });
+
+    const body: any = {}
+    if (params.value.tabulationId) {
+      body.tabulationId = params.value.tabulationId;
+    }
+    if (params.value.overviewId) {
+      body.overviewId = params.value.overviewId;
+    }
+    if (window.platform.num) {
+      body.num = window.platform.num;
+    }
+
+    const item = await get("fusion/caseOverview/settingInfo", body);
     if (item) {
       table[ui18n.t("tableTemp.th1")] = item.crimeTimeBegin;
       table[ui18n.t("tableTemp.th2")] = item.caseLocation;

+ 5 - 5
src/example/fuse/views/tabulation/index.vue

@@ -259,20 +259,20 @@ const setMapHandler = async (config: { url: string; size: Size }) => {
       draw.value?.runHook(() => syncTable(table, syncSerials));
     }
 
-    if (table) {
+    if (serialTable.value) {
       if (!syncSerials.length) {
         pack(() => {
-          d.store.delItem("table", table.id);
+          d.store.delItem("table", serialTable.value!.id);
         });
       } else {
         pack(() => {
           d.store.setItem("table", {
-            id: table.id,
-            value: table,
+            id: serialTable.value!.id,
+            value: serialTable.value!,
           });
         });
       }
-    } else {
+    } else if (syncSerials.length){
       table.key = tableSerialTableKey;
       pack(() => {
         d.store.addItem("table", table);

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
tsconfig.app.tsbuildinfo