Parcourir la source

fix: Merge branch 'v1.9.0-jm' of http://192.168.0.115:3000/bill/fuse-code into v1.9.0-jm

# Conflicts:
#	src/sdk/cover/index.js
xzw il y a 8 mois
Parent
commit
c3a3fcac4a

Fichier diff supprimé car celui-ci est trop grand
+ 836 - 1051
pnpm-lock.yaml


+ 7 - 1
src/components/materials/index.vue

@@ -138,6 +138,12 @@ const rowSelection: any = ref({
     }
   },
   getCheckboxProps: (record: Material) => {
+    console.log(
+      props.format && !props.format.includes(record.format),
+      props.maxSize && record.size > props.maxSize,
+      props.maxSize,
+      record.size
+    );
     return {
       disabled:
         (props.format && !props.format.includes(record.format)) ||
@@ -148,7 +154,7 @@ const rowSelection: any = ref({
 const cloumns = computed(() => [
   {
     width: "400px",
-    title: "图片名称",
+    title: "名称",
     dataIndex: "name",
     key: "name",
   },

+ 1 - 1
src/components/path/list.vue

@@ -1,7 +1,7 @@
 <template>
   <template v-for="(path, index) in paths" :key="path.id">
     <Sign
-      v-if="getPathIsShow(path) && path.points.length"
+      v-if="getPathIsShow(path)"
       @delete="deletePath(path)"
       @updatePoints="(data) => updatePosition(index, data)"
       @updateLinePosition="(data) => updateLinePosition(index, data)"

+ 2 - 2
src/components/path/sign.vue

@@ -31,9 +31,9 @@ const getLineProps = () => ({
   width: props.path.lineWidth,
   color: props.path.lineColor,
   altitudeAboveGround: props.path.lineAltitudeAboveGround,
-  position: props.path.linePosition?.position || props.path.points[0].position,
+  position: props.path.linePosition?.position || props.path.points[0]?.position,
   normal: props.path.linePosition?.normal || { x: 0, y: 0, z: 1 },
-  modelId: props.path.linePosition?.modelId || props.path.points[0].modelId,
+  modelId: props.path.linePosition?.modelId || props.path.points[0]?.modelId,
 });
 
 const path = sdk.createPath({

+ 6 - 3
src/components/tagging/list.vue

@@ -24,9 +24,12 @@ const props = defineProps<{ tagging: Tagging }>();
 const positions = computed(() => getTaggingPositions(props.tagging));
 const nodes = reactive([]) as TaggingNode;
 
-watchEffect(() => {
-  nodes.length = positions.value.length;
-});
+watchEffect(
+  () => {
+    nodes.length = positions.value.length;
+  },
+  { flush: "sync" }
+);
 const deletePosition = (pos: TaggingPosition) => {
   const index = taggingPositions.value.indexOf(pos);
   taggingPositions.value.splice(index, 1);

+ 1 - 1
src/sdk/association/tagging.ts

@@ -35,7 +35,7 @@ export const getTaggingPosNode = (
   if (!taggingNodeItem) return void 0;
 
   const taggingPositionNodeItem = taggingNodeItem.find(
-    (item) => item.id === pos.id
+    (item) => item?.id === pos.id
   );
   if (taggingPositionNodeItem) {
     return taggingPositionNodeItem.node;

+ 7 - 1
src/views/tagging-position/index.vue

@@ -44,7 +44,7 @@ import {
   watch,
   watchEffect,
 } from "vue";
-import { sdk } from "@/sdk";
+import { sdk, taggingsGroup } from "@/sdk";
 import { showTaggingPositionsStack } from "@/env";
 import {
   autoSaveTaggings,
@@ -145,7 +145,13 @@ onUnmounted(() => unKeepAdding.value && unKeepAdding.value());
 
 useViewStack(autoSaveTaggings);
 useViewStack(() => {
+  taggingsGroup.changeCanMove(true);
+  taggingsGroup.showDelete(true);
   enterEdit(() => router.back());
+  return () => {
+    taggingsGroup.changeCanMove(false);
+    taggingsGroup.showDelete(false);
+  };
 });
 </script>
 

+ 3 - 1
src/views/tagging-position/sign.vue

@@ -100,7 +100,9 @@ const emit = defineEmits<{
   (e: "delete"): void;
   (e: "show"): void;
 }>();
-const node = computed(() => getTaggingPosNode(props.position));
+const node = computed(() => {
+  return getTaggingPosNode(props.position);
+});
 watchEffect((onCleanup) => {
   if (!node.value) return;
   const $node = node.value;

+ 2 - 2
src/views/tagging/edit.vue

@@ -282,7 +282,7 @@ const musicSelect = async () => {
   const list = await selectMaterials({
     format: audioFormat,
     count: audioCount,
-    maxSize: audioCount,
+    maxSize: audioSize,
   });
   if (list?.length) {
     audioChange(list[0].url);
@@ -292,7 +292,7 @@ const imageSelect = async () => {
   const list = await selectMaterials({
     format: imageFormat,
     count: imageCount - tagging.value.images.length,
-    maxSize: imageCount,
+    maxSize: imageSize,
   });
   if (list?.length) {
     fileChange([...tagging.value.images, ...list.map((item) => item.url)]);