bill 8 ماه پیش
والد
کامیت
93f9cef703

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

@@ -115,7 +115,7 @@ const ft = computed(() => {
 const Search = Input.Search;
 const params = reactive({
   pageNum: 1,
-  pageSize: 12,
+  pageSize: 10,
   groupIds: [],
   formats: props.format,
 }) as MaterialPageProps;
@@ -214,8 +214,11 @@ const addHandler = async (file: File) => {
 };
 const delHandler = async (id: Material["id"]) => {
   if (await Dialog.confirm("确定要删除此数据吗?")) {
-    console.error(id);
     await delMaterial(id);
+    const ndx = selectKeys.value.indexOf(id);
+    if (ndx) {
+      selectKeys.value.splice(ndx, 1);
+    }
     refresh();
   }
 };

+ 8 - 4
src/layout/scene-list/index.vue

@@ -76,9 +76,13 @@ const showModelList = ref(true);
 
 const voffline = offline;
 const canSync = (scene: Scene) =>
-  [SceneType.SWKK, SceneType.DSFXJ, SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX].includes(
-    scene.raw.type
-  );
+  [
+    SceneType.SWKK,
+    SceneType.DSFXJ,
+    SceneType.SWKJ,
+    SceneType.SWSSMX,
+    SceneType.SWYDMX,
+  ].includes(scene.raw.type);
 
 const sync = async (scene: Scene) => {
   const link = await getSWKKSyncLink(scene);
@@ -86,7 +90,7 @@ const sync = async (scene: Scene) => {
 };
 
 const list = computed(() => {
-  const sceneList = caseProject.value?.showScenes
+  const sceneList = true
     ? scenes.value.map((scene) => ({
         raw: scene,
         select:

+ 2 - 0
src/sdk/sdk.ts

@@ -162,6 +162,8 @@ export interface SDK {
   switchScene: (
     scene: { type: SceneType; num: string } | null
   ) => Promise<void>;
+  startAddSth: () => void
+  endAddSth: () => void
   addModel: (props: AddModelProps) => SceneModel;
   setCameraFov: (fov: number) => void;
   enableMap(dom: HTMLDivElement, latlng: number[]): void;

+ 2 - 4
src/views/guide/path/sign.vue

@@ -1,8 +1,6 @@
 <template>
-  <ui-group-option
-    :class="`sign-guide ${focus ? 'active' : ''}`"
-    @click.stop="clickHandler"
-  >
+  <!-- ${focus ? 'active' : ''} -->
+  <ui-group-option :class="`sign-guide `" @click.stop="clickHandler">
     <div class="info">
       <div class="guide-cover">
         <span class="img">

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

@@ -128,6 +128,7 @@ const applyGlobal = async (position: TaggingPosition, keys: string | string[]) =
 let unKeepAdding = shallowRef<() => void>();
 const keepAdding = () => {
   unKeepAdding.value && unKeepAdding.value();
+  sdk.startAddSth();
   const hide = Message.show({ msg: "请在模型上单击选择标签位置", type: "warning" });
   showId.value = void 0;
 
@@ -139,18 +140,21 @@ const keepAdding = () => {
     if (!position) {
       Message.error("当前位置无法添加");
     } else {
-      console.error(tagging.value);
       const storePosition = createTaggingPosition({
         ...position,
         taggingId: tagging.value!.id,
       });
       taggingPositions.value.push(storePosition);
       showId.value = storePosition.id;
+      nextTick(() => {
+        getTaggingPosNode(storePosition)!.changeCanMove(true);
+      });
     }
   });
 
   unKeepAdding.value = () => {
     hide();
+    sdk.endAddSth();
     removeListener();
     unKeepAdding.value = void 0;
   };