bill пре 2 дана
родитељ
комит
f5437739c6

+ 1 - 0
public/icons/wall.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1772245386816" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5326" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M85.333333 426.666667h853.333334v170.666666H85.333333v-170.666666z" p-id="5327"></path></svg>

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
public/icons/zoom.svg


+ 3 - 0
src/core/components/line/attach-server.ts

@@ -621,6 +621,9 @@ export const useLineDescribes = (
     d,
     (d) => {
       d.stroke.label = ui18n.t('sys.color');
+      d.stroke.props = {
+        colors: ['#000000', '#cccccc', null]
+      }
       d.length = {
         type: "inputNum",
         label: ui18n.t('sys.length'),

+ 9 - 6
src/core/components/line/index.ts

@@ -48,14 +48,14 @@ setRendererType("wall");
 export const addMode = "single-dots";
 
 export const getMouseStyle = (data: LineData) => {
-  const strokeStatus = getMouseColors(data.stroke || defaultStyle.stroke);
+  const strokeStatus = data.stroke ? getMouseColors(defaultStyle.stroke) : null;
   const strokeWidth = data.strokeWidth || defaultStyle.strokeWidth;
   return {
-    default: { stroke: data.stroke || defaultStyle.stroke, strokeWidth },
-    hover: { stroke: strokeStatus.hover },
-    select: { stroke: strokeStatus.select },
-    focus: { stroke: strokeStatus.hover },
-    press: { stroke: strokeStatus.press },
+    default: { stroke: data.stroke, strokeWidth },
+    hover: { stroke: strokeStatus?.hover },
+    select: { stroke: strokeStatus?.select },
+    focus: { stroke: strokeStatus?.hover },
+    press: { stroke: strokeStatus?.press },
   };
 };
 
@@ -197,8 +197,11 @@ export const endMatResponse = () => {
 };
 
 export const getPredefine = (key: keyof LineData) => {
+  console.error(key)
   if (key === "strokeWidth") {
     return { proportion: true };
+  } else if (key === 'stroke') {
+    return { colors: ['#000000', '#cccccc', null] };
   }
 };
 

+ 1 - 0
src/core/components/serial/serial.vue

@@ -101,6 +101,7 @@ const { shape, tData, data, operateMenus, describes } = useComponentStatus<
 });
 
 describes.value.content = {
+  sort: 1,
   type: "inputNum",
   label: ui18n.t("shape.serial.diff"),
   "layout-type": "row",

+ 1 - 1
src/core/components/share/edit-line.vue

@@ -21,7 +21,7 @@
 
 <script lang="ts" setup>
 import { copy, flatPositions, mergeFuns } from "@/utils/shared";
-import { computed, onUnmounted, ref, watch } from "vue";
+import { computed, onUnmounted, ref, watch, watchEffect } from "vue";
 import { DC } from "@/deconstruction";
 import { Line } from "konva/lib/shapes/Line";
 import { useShapeDrag } from "@/core/hook/use-transformer";

+ 23 - 20
src/core/html-mount/propertys/components/color.vue

@@ -1,34 +1,29 @@
 <template>
   <div class="color-layout">
-    <span
-      v-for="color in predefineColors"
-      :style="color && { backgroundColor: color }"
-      :class="{
-        weight: color === '#FFFFFF' || color === null,
-        tran: color === null,
-        active: (value && value.toUpperCase() === color) || (value || null) === color,
-      }"
-      @click="
+    <span v-for="color in predefineColors" :style="color && { backgroundColor: color }" :class="{
+      weight: color === '#FFFFFF' || color === null,
+      tran: color === null,
+      active: (value && value.toUpperCase() === color) || (value || null) === color,
+    }" @click="
         () => {
           emit('update:value', color);
           emit('change');
         }
-      "
-    />
+      " />
   </div>
 </template>
 
 <script lang="ts" setup>
-import { ref } from "vue";
+import { ref, watchEffect } from "vue";
 import { themeColor } from "@/constant";
 
-const props = defineProps<{ value?: string; canun?: boolean }>();
+const props = defineProps<{ value?: string; canun?: boolean, colors?: (string | null)[] }>();
 
 const emit = defineEmits<{
   (e: "update:value", val: string | null): string;
   (e: "change"): void;
 }>();
-const predefineColors = ref<Array<string | null>>([
+const def = [
   "#000000",
   "#FFFFFF",
   "#DD2C2C",
@@ -36,24 +31,32 @@ const predefineColors = ref<Array<string | null>>([
   "#FFBE00",
   "#1AAD19",
   themeColor,
-]);
-if (props.canun) {
-  predefineColors.value.push(null);
-}
+]
+
+const predefineColors = ref<Array<string | null>>(def);
+watchEffect(() => {
+  if (props.colors?.length) {
+    predefineColors.value = props.colors
+  } else {
+    predefineColors.value = def
+    if (props.canun) {
+      predefineColors.value.push(null);
+    }
+  }
+})
 </script>
 
 <style lang="scss" scoped>
 .color-layout {
   display: flex;
   align-items: center;
-  justify-content: space-between;
+  gap: 8px;
 
   span {
     cursor: pointer;
     width: 24px;
     height: 24px;
     border-radius: 4px;
-
     &.weight {
       border: 1px solid #ccc;
     }

+ 1 - 1
src/example/components/show-vr.vue

@@ -7,7 +7,7 @@
     <div class="content" :style="{ pointerEvents: downPos ? 'none' : 'all' }">
       <iframe :src="tempStrFill(viewURLS[scene.type], scene)" />
       <span ref="headerRef">
-        <Icon class="resize" :name="isFull ? 'zoom_s' : 'zoom_b'" />
+        <Icon class="resize" name="zoom" />
       </span>
     </div>
   </div>

+ 1 - 1
src/example/components/slide/actions.ts

@@ -43,8 +43,8 @@ export const draw: MenuItem = {
   value: uuid(),
   defSelect: true,
   children: [
+    { icon: "wall", ...genDrawItem("line") },
     { icon: "line", ...genDrawItem("lineChunk") },
-    { icon: "line", ...genDrawItem("line") },
     { icon: "arrows", ...genDrawItem("arrow"), single: true },
     { icon: "rectangle", ...genDrawItem("rectangle"), single: true },
     { icon: "circle", ...genDrawItem("circle"), single: true },

+ 6 - 3
src/example/components/slide/slide-icons.vue

@@ -10,7 +10,7 @@
         <icon name="Search" size="16px" />
       </template>
     </ElInput>
-    <ElCollapse class="icon-menu" v-model="activeGroups">
+    <ElCollapse class="icon-menu" v-model="activeGroups" accordion>
       <ElCollapseItem
         v-for="group in searchGroups"
         :name="group.name"
@@ -40,7 +40,7 @@
 </template>
 
 <script lang="ts" setup>
-import { computed, ref } from "vue";
+import { computed, ref, watchEffect } from "vue";
 import { ElCollapse, ElCollapseItem, ElEmpty, ElInput } from "element-plus";
 import { defaultStyle, getIconStyle } from "@/core/components/icon/index.ts";
 import { Draw } from "../container/use-draw";
@@ -78,7 +78,7 @@ const drawIcon = async (item: IconItem) => {
 };
 const activeName = computed(() => (props.draw.presetAdd?.preset as any)?.name);
 
-const activeGroups = ref(props.groups.map((item) => item.name));
+const activeGroups = ref(props.groups.map((item) => item.name)[0]);
 const keyword = ref("");
 const searchGroups = computed(() => {
   return props.groups
@@ -101,6 +101,9 @@ const searchGroups = computed(() => {
     })
     .filter((typeChildren) => typeChildren.children.length > 0);
 });
+watchEffect(() => {
+    activeGroups.value = searchGroups.value[0]?.name
+})
 
 props.cref &&
   props.cref({

+ 1 - 0
src/example/env.ts

@@ -53,6 +53,7 @@ const updateParams = () => {
   }
 };
 updateParams();
+console.log(params.value)
 
 let updateNeedReload = true;
 export const preventReload = () => {

+ 9 - 0
src/example/fuse/enter-shared.ts

@@ -219,6 +219,10 @@ export const getOverviewData = genLoading(async (id: string) => {
     };
   }
   const data = await get("fusion/caseOverview/info", { overviewId: id });
+  const tabId = await getTabulationId(id)
+  if (tabId) {
+      params.value.tabulationId = tabId;
+  }
   return {
     ...data,
     store: JSON.parse(data.store) || {
@@ -253,6 +257,7 @@ export const saveOverviewData = genLoading(
       id,
       store: JSON.stringify(data.store),
       viewport: JSON.stringify(data.viewport),
+
       caseTabulation: {
         ...data.caseTabulation,
         store: JSON.stringify(data.caseTabulation.store),
@@ -289,6 +294,9 @@ export const _getTabulationData = genLoading(async (id: string) => {
     };
   }
   const data = await get(`fusion/caseTabulation/info`, { tabulationId: id });
+  if (data.overviewId) {
+    params.value.overviewId = data.overviewId;
+  }
   return {
     ...data,
     store: JSON.parse(data.store) || {
@@ -305,6 +313,7 @@ export const _getTabulationData = genLoading(async (id: string) => {
 
 export const getTabulationData = async (...args: any[]) => {
   const result = await _getTabulationData.apply(this, args as any);
+
   const temp = await getTableTemp();
   if (!result.title && temp.title) {
     result.title = temp.title;

+ 1 - 1
src/example/fuse/router.ts

@@ -17,7 +17,7 @@ export const routes = [
 routes.push({
   path: "/tabulation",
   name: "tabulation",
-  label: ui18n.t("tabulation.name"),
+  label: ui18n.t("tabulation.name1"),
   component: Tabulation,
 });
 // }

+ 5 - 2
src/example/fuse/store.ts

@@ -1,7 +1,7 @@
 import { Ref, ref } from "vue";
 import { StoreData } from "@/core/store/store";
 import { PaperKey } from "../components/slide/actions";
-import { overviewId, tabulationId } from "../env";
+import { overviewId, params, tabulationId } from "../env";
 import { DrawItem } from "@/core/components";
 import { IRect } from "konva/lib/types";
 import { ShapeType } from "@/index";
@@ -36,6 +36,7 @@ export const overviewData = ref() as Ref<{
 export const refreshOverviewData = () => {
   return window.platform.getOverviewData(overviewId.value).then((data: any) => {
     overviewData.value = data;
+
   });
 };
 
@@ -53,7 +54,9 @@ export const tabulationData = ref() as Ref<{
 export const refreshTabulationData = () => {
   return window.platform
     .getTabulationData(tabulationId.value)
-    .then((data: any) => (tabulationData.value = data));
+    .then((data: any) => {
+      tabulationData.value = data
+    });
 };
 
 export const sysError = ref<{ code: number }>();

+ 1 - 1
src/example/fuse/views/defStyle.ts

@@ -149,7 +149,7 @@ export const overviewCustomStyle = (_draw: Draw) => {
     setDefStyle(lineChunkFixedStrokeOptions, realFixedStrokeOptions),
 
     setDefStyle(serialDefStyle, { strokeWidth: defFixelStroke }),
-    setDefStyle(lineChunkDefStyle, { strokeWidth: defFixelStroke }),
+    setDefStyle(lineChunkDefStyle, { strokeWidth: getOverviewRealPixel(realFixedStrokeOptions[2], true) }),
     setDefStyle(lineIconDefStyle, { strokeWidth: defFixelStroke }),
     setDefStyle(iconDefStyle, { strokeWidth: defFixelStroke }),
     setDefStyle(polygonDefStyle, { strokeWidth: defFixelStroke }),

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

@@ -198,7 +198,11 @@ const saveHandler = repeatedlyOnly(async () => {
     ]);
   }
 
-  tabulationId.value = await window.platform.getTabulationId(overviewId.value);
+  let tabId = await window.platform.getTabulationId(overviewId.value);
+  if (!tabId) {
+    tabId = params.value.tabulationId
+  }
+  tabulationId.value = tabId
   await refreshTabulationData();
 
   const tabStore = await repTabulationStore(