bill 1 周之前
父節點
當前提交
1be81010b4
共有 2 個文件被更改,包括 9 次插入2 次删除
  1. 0 1
      src/api/tagging.ts
  2. 9 1
      src/views/tagging/index.vue

+ 0 - 1
src/api/tagging.ts

@@ -106,7 +106,6 @@ const localToService = (tagging: Tagging, update = false): PartialProps<ServerTa
 
 
 export const fetchTaggings = async () => {
-  axios.get(TAGGING_TYPE_LIST)
   const staggings = await axios.get<ServerTagging[]>(TAGGING_LIST, { params: { fusionId: params.caseId } })
   return staggings.map(serviceToLocal)
 }

+ 9 - 1
src/views/tagging/index.vue

@@ -61,7 +61,7 @@ import { nextTick, reactive, ref, watchEffect } from "vue";
 import { currentIsFullView } from "@/utils/full";
 import { Dropdown, MenuItem, Menu } from "ant-design-vue";
 import { selectMaterials } from "@/components/materials/quisk";
-import { defStyleType, getStyleTypeId, tqStatusEnum } from "@/api";
+import { defStyleType, getStyleDictId, getStyleTypeId, tqStatusEnum } from "@/api";
 import { formatDate } from "@/utils";
 import { FileType } from "@/api/material";
 import { custom } from "@/env";
@@ -113,12 +113,20 @@ const exposeTagging = async () => {
       tagging.audio = item.url;
       tagging.audioName = item.name;
     }
+
     if (item.dictId) {
       const typeId = getStyleTypeId(item.dictId);
       const styles = taggingStyles.value.filter((item) => item.typeId === typeId);
       if (styles.length) {
         tagging.styleId = styles[0].id;
       }
+    } else {
+      const styles = taggingStyles.value.filter(
+        (item) => item.typeId === defStyleType.id
+      );
+      if (styles.length) {
+        tagging.styleId = styles[0].id;
+      }
     }
     return tagging;
   });