Procházet zdrojové kódy

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

xzw před 8 měsíci
rodič
revize
62a2bbfd33

+ 1 - 1
package.json

@@ -19,7 +19,7 @@
     "simaqcore": "^1.2.0",
     "swiper": "^11.1.15",
     "vite-plugin-mkcert": "^1.10.1",
-    "vue": "^3.2.37",
+    "vue": "3.2.47",
     "vue-cropper": "1.0.2",
     "vue-router": "^4.1.3",
     "vuedraggable": "^4.1.0"

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 918 - 1056
pnpm-lock.yaml


+ 1 - 0
src/api/material.ts

@@ -55,6 +55,7 @@ export const fetchMaterialPage = async (params: MaterialPageProps) => {
   const material = await axios.post<PagingResult<ServiceMaterial[]>>(MATERIAL_PAG, {
     pageNum: params.pageNum,
     pageSize: params.pageSize,
+    name: params.name,
     dictIds: params.groupIds,
     fileFormats: params.formats
   });

+ 4 - 2
src/api/scene.ts

@@ -19,15 +19,17 @@ export enum SceneType {
   SWSSMX = 4,
   SWYDSS = 5,
   SWYDMX = 6,
+  DSFXJ = 7,
 }
 export const SceneTypeDesc: Record<SceneType, string>  = {
   [SceneType.SWKK]: '八目',
   [SceneType.SWKJ]: '双目转台',
   [SceneType.SWSS]: '激光转台点云场景',
-  [SceneType.SWMX]: '三维模型',
+  [SceneType.SWMX]: '媒体库',
   [SceneType.SWSSMX]: '激光转台Mesh场景',
   [SceneType.SWYDSS]: '激光移动点云场景',
-  [SceneType.SWYDMX]: '激光移动Mesh场景'
+  [SceneType.SWYDMX]: '激光移动Mesh场景',
+  [SceneType.DSFXJ]: '第三方相机'
 }
 
 

+ 3 - 3
src/api/tagging-position.ts

@@ -18,7 +18,7 @@ interface ServicePosition {
   "tagPoint": string,
   normal: string
   
-  globalVisibility: number
+  show3dTitle: number
   type: string,
   mat: string
   fontSize: number,
@@ -54,7 +54,7 @@ const serviceToLocal = (position: ServicePosition, taggingId?: Tagging['id']): T
   taggingId: taggingId || position.tagId.toString(),
   localPos: JSON.parse(position.tagPoint),
   type: (position.type || TaggingPositionType['2d']) as TaggingPositionType,
-  globalVisibility: Boolean(position.globalVisibility),
+  globalVisibility: Boolean(position.show3dTitle),
   normal: position.normal ? JSON.parse(position.normal) : { x: 0, y: 0, z: 1 },
   mat: position.mat ? JSON.parse(position.mat) : {
     scale: 1,
@@ -70,7 +70,7 @@ const localToService = (position: TaggingPosition, update = false): PartialProps
   "tagId": Number(position.taggingId),
   "fusionNumId": Number(position.modelId),
   "tagPoint": JSON.stringify(position.localPos),
-  globalVisibility: Number(position.globalVisibility),
+  show3dTitle: Number(position.globalVisibility),
   type: position.type,
   mat: position.mat && JSON.stringify(position.mat),
   normal: JSON.stringify(position.normal),

+ 4 - 1
src/api/tagging.ts

@@ -25,7 +25,7 @@ interface ServerTagging {
 
   show3dTitle: number
   audio: string
-
+  fileName: string
 }
 
 export interface Tagging {
@@ -39,6 +39,7 @@ export interface Tagging {
   principal: string
   images: string[],
   audio: string
+  audioName: string
 }
 
 export type Taggings = Tagging[]
@@ -51,6 +52,7 @@ const serviceToLocal = (serviceTagging: ServerTagging): Tagging => ({
   desc: serviceTagging.tagDescribe,
   part: serviceTagging.leaveBehind,
   // show3dTitle: true, 
+  audioName: serviceTagging.fileName,
   show3dTitle: Boolean(serviceTagging.show3dTitle),
   method: serviceTagging.getMethod,
   principal: serviceTagging.getUser,
@@ -64,6 +66,7 @@ const localToService = (tagging: Tagging, update = false): PartialProps<ServerTa
   "getMethod": tagging.method,
   show3dTitle: Number(tagging.show3dTitle),
   "getUser": tagging.principal,
+  fileName: tagging.audioName,
   "hotIconUrl": "static/img_default/lQLPDhrvVzvNvTswMLAOU-UNqYnnZQG1YPJUwLwA_48_48.png",
   "tagId": update ? Number(tagging.id) : undefined,
   "tagImgUrl": JSON.stringify(tagging.images),

+ 10 - 10
src/app.vue

@@ -1,5 +1,15 @@
 <template>
   <ConfigProvider v-bind="config">
+    <template v-for="needMount in needMounts">
+      <Teleport :to="needMount[0]">
+        <component
+          :is="needMount[1]"
+          v-bind="needMount[2]"
+          :ref="(v: any) => needMount[3] && needMount[3](v)"
+        />
+      </Teleport>
+    </template>
+
     <ui-editor-layout
       @click.stop
       id="layout-app"
@@ -17,16 +27,6 @@
     </ui-editor-layout>
 
     <PwdModel v-if="inputPwd" @close="inputPwd = false" />
-
-    <template v-for="needMount in needMounts">
-      <Teleport :to="needMount[0]">
-        <component
-          :is="needMount[1]"
-          v-bind="needMount[2]"
-          :ref="(v: any) => needMount[3] && needMount[3](v)"
-        />
-      </Teleport>
-    </template>
   </ConfigProvider>
 </template>
 

+ 3 - 0
src/assets/style/global.css

@@ -33,3 +33,6 @@ textarea {
 .ant-input-number {
   background: var(--colors-normal-back) !important;
 }
+.cesium-widget-credits {
+  display: none !important;
+}

+ 4 - 0
src/assets/style/global.less

@@ -43,4 +43,8 @@ button, input, select, textarea {
 }
 .ant-input-number {
   background: var(--colors-normal-back) !important;
+}
+
+.cesium-widget-credits {
+  display: none !important;
 }

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

@@ -122,7 +122,7 @@ const params = reactive({
 const origin = ref<PagingResult<Material[]>>({
   list: [],
   pageNum: 1,
-  pageSize: 12,
+  pageSize: 10,
   total: 0,
 });
 const groups = ref<MaterialGroup[]>([]);
@@ -136,7 +136,7 @@ const rowSelection: any = ref({
       (key) => !origin.value.list.some((item) => key === item.id)
     );
     const newKeys = Array.from(new Set([...otherPageKeys, ...ids]));
-    if (!props.count || props.count >= newKeys.length) {
+    if (typeof props.count !== "number" || props.count >= newKeys.length) {
       selectKeys.value = newKeys;
     } else {
       Message.error(`最多选择${props.count}项`);
@@ -193,6 +193,10 @@ const refresh = debounceStack(
     groups.value = group;
     origin.value = pag;
     pag.list.forEach((item) => (allData[item.id] = item));
+    if (pag.pageNum > 1 && pag.pageNum > Math.ceil(pag.total / pag.pageSize)) {
+      params.pageNum = Math.ceil(pag.total / pag.pageSize);
+      refresh();
+    }
   },
   160
 );
@@ -261,4 +265,8 @@ const handleTableChange: TableProps["onChange"] = (pag, filters) => {
 .ant-modal-root .ant-table-tbody > tr > td {
   word-break: break-all;
 }
+
+.content-header-search {
+  flex: 1;
+}
 </style>

+ 5 - 0
src/components/tagging/sign-new.vue

@@ -37,6 +37,7 @@
           </template>
         </div>
         <Images
+          class="images"
           :tagging="tagging"
           :in-full="true"
           @pull="(index) => (pullIndex = index)"
@@ -286,6 +287,10 @@ defineExpose(tag);
     cursor: pointer;
   }
 }
+
+.images {
+  height: 250px;
+}
 </style>
 
 <style>

+ 1 - 1
src/env/index.ts

@@ -18,7 +18,7 @@ export const showPathsStack = stackFactory(ref<boolean>(true))
 export const showPathStack = stackFactory(ref<Path['id']>())
 export const showMeasuresStack = stackFactory(ref<boolean>(true))
 export const currentModelStack = stackFactory(ref<FuseModel | null>(null))
-export const showModelsMapStack = stackFactory(ref<WeakMap<FuseModel, boolean>>(new WeakMap()), true)
+export const showModelsMapStack = stackFactory(ref<WeakMap<FuseModel, boolean>>(new Map()), true)
 export const modelsChangeStoreStack = stackFactory(ref<boolean>(false))
 export const showTaggingPositionsStack = stackFactory(ref<WeakSet<TaggingPosition>>(new WeakSet()))
 export const currentViewStack = stackFactory(ref<View>())

+ 1 - 1
src/layout/edit/scene-select.vue

@@ -199,7 +199,7 @@ watch(visible, (visible, oldvisible) => {
 const selectModel = async () => {
   const list = await selectMaterials({
     uploadFormat: ["zip"],
-    format: ["obj", "ply", "las", "laz", "b3dm", "shp"],
+    format: ["obj", "ply", "las", "laz", "b3dm", "shp", "osgb"],
     maxSize: 2 * 1024 * 1024 * 1024,
   });
   if (!list?.length) return;

+ 1 - 1
src/layout/scene-list/index.vue

@@ -76,7 +76,7 @@ const showModelList = ref(true);
 
 const voffline = offline;
 const canSync = (scene: Scene) =>
-  [SceneType.SWKK, SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX].includes(
+  [SceneType.SWKK, SceneType.DSFXJ, SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX].includes(
     scene.raw.type
   );
 

+ 1 - 1
src/layout/show/index.vue

@@ -64,8 +64,8 @@ const initialSys = async () => {
     initialTaggingStyles(),
     initialTaggings(),
     initialGuides(),
-    initialPaths(),
   ]);
+  await initialPaths();
   await initialMeasures();
   await loadModel(fuseModel);
   await asyncTimeout(1000);

+ 3 - 0
src/model/app.vue

@@ -63,6 +63,7 @@ export const Model = defineComponent({
       const urls = offline
         ? {
             [SceneType.SWKK]: `${offlinePrev}swkk/${scene.value.num}/wwwroot/spg.html?m=${scene.value.num}&lang=zh`,
+            [SceneType.DSFXJ]: `${offlinePrev}swkk/${scene.value.num}/wwwroot/spg.html?m=${scene.value.num}&lang=zh`,
             [SceneType.SWKJ]: `${offlinePrev}swkk/${scene.value.num}/wwwroot/spg.html?m=${scene.value.num}&lang=zh`,
             [SceneType.SWSS]: `${offlinePrev}swss/${scene.value.num}/www/offline.html?m=${scene.value.num}&lang=zh`,
             [SceneType.SWSSMX]: `${offlinePrev}swkk/${scene.value.num}/wwwroot/spg.html?m=${scene.value.num}&lang=zh`,
@@ -72,6 +73,7 @@ export const Model = defineComponent({
           }
         : {
             [SceneType.SWKK]: `/swkk/spg.html?m=${scene.value.num}`,
+            [SceneType.DSFXJ]: `/swkk/spg.html?m=${scene.value.num}`,
             [SceneType.SWKJ]: `/swkk/spg.html?m=${scene.value.num}`,
             [SceneType.SWSS]: `/swss/index.html?m=${scene.value.num}`,
             [SceneType.SWSSMX]: `/swkk/spg.html?m=${scene.value.num}`,
@@ -83,6 +85,7 @@ export const Model = defineComponent({
       if (import.meta.env.DEV && !offline) {
         Object.assign(urls, {
           [SceneType.SWKK]: `/swkk/spg.html?m=${scene.value.num}&toen=${getToken()}`,
+          [SceneType.DSFXJ]: `/swkk/spg.html?m=${scene.value.num}&toen=${getToken()}`,
           [SceneType.SWKJ]: `/swkk/spg.html?m=${scene.value.num}&toen=${getToken()}`,
           [SceneType.SWSS]: `/swss/index.html?m=${scene.value.num}&toen=${getToken()}`,
           [SceneType.SWSSMX]: `/swkk/spg.html?m=${scene.value.num}&toen=${getToken()}`,

+ 1 - 1
src/model/platform.ts

@@ -187,7 +187,7 @@ export async function exposeFactory(
       },
     },
   };
-  platforms[SceneType.SWYDSS] = platforms[SceneType.SWSS];
+  platforms[SceneType.DSFXJ] = platforms[SceneType.SWYDSS] = platforms[SceneType.SWSS];
   platforms[SceneType.SWYDMX] =
     platforms[SceneType.SWSSMX] =
     platforms[SceneType.SWKJ] =

+ 6 - 6
src/store/path.ts

@@ -45,7 +45,7 @@ export const createPath = (path: Partial<Path> = {}): Path => {
     lineColor: '#ffffff',
     lineAltitudeAboveGround: 10,
     reverseDirection: false,
-    lineWidth: 0.6,
+    lineWidth: 0.5,
     name: '',
     fontSize: 12,
     showDirection: false,
@@ -61,13 +61,13 @@ export const createPath = (path: Partial<Path> = {}): Path => {
 let bcPaths: Paths = []
 export const getBackupPaths = () => bcPaths
 export const backupPaths = () => {
-  bcPaths = paths.value.map(path => ({
-    ...path,
-    points: path.points.map(item => ({...item})),
-  }))
+  bcPaths = JSON.parse(JSON.stringify(paths.value))
 }
 
-export const initialPaths = fetchStoreItems(paths, fetchPaths, backupPaths)
+export const initialPaths = fetchStoreItems(paths, async () => {
+  const paths = await fetchPaths()
+  return paths.filter(getPathIsShow)
+}, backupPaths)
 export const recoverPaths = async () => {
   const backupItems = bcPaths;
   paths.value.length = 0

+ 2 - 1
src/store/scene.ts

@@ -26,6 +26,7 @@ export const SceneTypePaths: { [key in SceneType]: string[] } = {
     `/livestream/fd/criminal.html`,
   ],
   [SceneType.SWKJ]: ["/swkk/spg.html", "/swkk/epg.html"],
+  [SceneType.DSFXJ]: ["/swkk/spg.html", "/swkk/epg.html"],
   [SceneType.SWSS]: ["/swss/index.html", "/swss/index.html"],
   [SceneType.SWMX]: import.meta.env.DEV
     ? ["/dev-code/index.html", "/dev-code/index.html"]
@@ -37,7 +38,7 @@ export const SceneTypePaths: { [key in SceneType]: string[] } = {
 
 export const getSWKKSyncLink = async (scene: Scene) => {
   console.log('scene', scene)
-  const supportTypes = [SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX];
+  const supportTypes = [SceneType.SWKJ, SceneType.SWSSMX, SceneType.SWYDMX, SceneType.DSFXJ];
   const kkScenes = scenes.value.filter((scene) =>
     supportTypes.includes(scene.type)
   );

+ 0 - 1
src/store/sys.ts

@@ -115,7 +115,6 @@ export const autoSetModeCallback = <T extends object>(
   const leaveCallback =
     (setting.recovery || setting.backup) &&
     (async () => {
-      console.log("???", isLeaveIng);
       isLeaveIng = true;
       setting.recovery && (await setting.recovery());
       setting.backup && (await setting.backup());

+ 2 - 1
src/store/tagging.ts

@@ -51,11 +51,12 @@ export const createTagging = (tagging: Partial<Tagging> = {}): Tagging => {
   return {
     id: createTemploraryID(),
     title: ``,
-    styleId: lastUseStyle.value?.id || defaultStyle.value?.id || '',
+    styleId: '',
     desc: '',
     part: '',
     method: '',
     show3dTitle: false,
+    audioName: '',
     principal: '',
     audio: '',
     images: [],

+ 1 - 1
src/views/guide/guide/sign.vue

@@ -45,7 +45,7 @@ const emit = defineEmits<{
 
 const menus = [
   { label: "编辑", value: "edit" },
-  { label: "下载", value: "download" },
+  // { label: "下载", value: "download" },
   { label: "删除", value: "delete" },
 ];
 const actions = {

+ 10 - 6
src/views/guide/index.vue

@@ -21,14 +21,18 @@
 import { RightFillPano } from "@/layout";
 import GuideEdit from "./guide/edit.vue";
 import PathEdit from "./path/edit.vue";
-import { ref } from "vue";
-import { isEdit } from "@/store";
+import { reactive, ref, watchEffect } from "vue";
+import { guides, isEdit, paths } from "@/store";
 
 const current = ref("guide");
-const tabs = [
-  { key: "guide", text: "导览" },
-  { key: "path", text: "路线" },
-];
+const tabs = reactive([
+  { key: "guide", text: "导览()" },
+  { key: "path", text: "路线()" },
+]);
+watchEffect(() => {
+  tabs[0].text = `导览(${guides.value.length})`;
+  tabs[1].text = `路线(${paths.value.length})`;
+});
 </script>
 
 <style lang="scss" scoped>

+ 11 - 4
src/views/guide/path/edit-path.vue

@@ -15,10 +15,11 @@
               width="100%"
               type="text"
               ref="nameInput"
+              class="nameInput"
               placeholder="路径名称"
               @keydown="keydownHandler"
               v-model="data.name"
-              :maxlength="60"
+              :maxlength="100"
             />
           </ui-group-option>
           <ui-group-option class="item">
@@ -28,7 +29,7 @@
                 style="width: 120px"
                 v-model:value="data.lineWidth"
                 :max="1"
-                :min="0.2"
+                :min="0.1"
                 :step="0.1"
                 :controls="false"
               >
@@ -36,7 +37,7 @@
                   <span
                     class="fun-ctrl"
                     @click="
-                      data.lineWidth = round(Math.max(0.2, data.lineWidth - 0.1), 1)
+                      data.lineWidth = round(Math.max(0.1, data.lineWidth - 0.1), 1)
                     "
                     >-</span
                   >
@@ -100,7 +101,7 @@
               <template v-slot:label>
                 <ui-input
                   type="checkbox"
-                  label="全部范围可"
+                  label="全部范围可"
                   :modelValue="!!data.globalVisibility"
                   @update:modelValue="(v: boolean) => data.globalVisibility = v"
                 />
@@ -301,3 +302,9 @@ const switchPlay = () => {
   justify-content: center;
 }
 </style>
+
+<style>
+.nameInput.ui-input .text.suffix input {
+  padding-right: 60px;
+}
+</style>

+ 1 - 1
src/views/guide/show.vue

@@ -33,7 +33,7 @@ import { guides, paths } from "@/store";
 import { Menu, Dropdown } from "ant-design-vue";
 import { DownOutlined } from "@ant-design/icons-vue";
 
-const currentKey = ref("path");
+const currentKey = ref("guide");
 const tabs = computed(() => [
   { key: "guide", text: "导览", count: guides.value.length },
   { key: "path", text: "路线", count: paths.value.length },

+ 7 - 3
src/views/sign-model/index.vue

@@ -8,7 +8,6 @@ import { createFuseModels, defTitle, fuseModels, SceneStatus } from "@/store";
 import {
   custom,
   params,
-  showModelsMapStack,
   showRightPanoStack,
   viewModeStack,
 } from "@/env";
@@ -36,7 +35,11 @@ const loadSignModel = async () => {
       numList: [params.m!],
       type: SceneType.SWYDMX,
     });
-    const scenes = [...SSscenes, ...YDscenes];
+    const DDscenes = await fetchScenesAll({
+      numList: [params.m!],
+      type: SceneType.DSFXJ,
+    });
+    const scenes = [...SSscenes, ...YDscenes, ...DDscenes];
     scene = scenes.find((scene) => scene.num === params.m);
     console.log(scene);
   }
@@ -59,7 +62,8 @@ const loadSignModel = async () => {
     fuseModels.value.push(fuseModel);
 
     await loadModel(FModel);
-    pop = showModelsMapStack.push(ref(new Map([[fuseModel, true]])));
+    custom.showModelsMap.set(fuseModel, true);
+    // pop = showModelsMapStack.push(ref(new Map([[fuseModel, true]])));
     (window as any).__sdk = sdk;
   }
 };

+ 14 - 12
src/views/tagging-position/index.vue

@@ -65,6 +65,19 @@ const showId = ref<TaggingPosition["id"]>();
 const tagging = computed(() => getTagging(router.currentRoute.value.params.id as string));
 const positions = computed(() => tagging.value && getTaggingPositions(tagging.value));
 
+onUnmounted(() => unKeepAdding.value && unKeepAdding.value());
+
+useViewStack(autoSaveTaggings);
+useViewStack(() => {
+  taggingsGroup.changeCanMove(true);
+  taggingsGroup.showDelete(true);
+  enterEdit(() => router.back());
+  return () => {
+    taggingsGroup.changeCanMove(false);
+    taggingsGroup.showDelete(false);
+  };
+});
+
 watch(showId, (id) => {
   const position = positions.value?.find((item) => item.id === id);
   position && flyTaggingPosition(position);
@@ -142,18 +155,7 @@ const keepAdding = () => {
     unKeepAdding.value = void 0;
   };
 };
-onUnmounted(() => unKeepAdding.value && unKeepAdding.value());
-
-useViewStack(autoSaveTaggings);
-useViewStack(() => {
-  taggingsGroup.changeCanMove(true);
-  taggingsGroup.showDelete(true);
-  enterEdit(() => router.back());
-  return () => {
-    taggingsGroup.changeCanMove(false);
-    taggingsGroup.showDelete(false);
-  };
-});
+keepAdding();
 </script>
 
 <style lang="scss" scoped>

+ 5 - 4
src/views/tagging-position/sign.vue

@@ -32,11 +32,12 @@
         class="item"
         @apply-global="$emit('applyGlobal', ['mat', 'scale'])"
       >
-        <Slider v-model:value="position.mat.scale" :min="0.1" :max="10" :step="0.1" />
+        <Slider v-model:value="position.mat.scale" :min="0.5" :max="5" :step="0.1" />
       </SignItem>
       <SignItem
-        label="图标角度"
+        label="旋转图标"
         class="item"
+        v-if="TaggingPositionType['2d'] !== position.type"
         @apply-global="$emit('applyGlobal', ['mat', 'rotation'])"
       >
         <Slider v-model:value="position.mat.rotation" :min="0" :max="360" :step="0.1" />
@@ -53,7 +54,7 @@
         class="item"
         @apply-global="$emit('applyGlobal', 'lineHeight')"
       >
-        <Slider v-model:value="position.lineHeight" :min="0" :max="10" :step="0.1" />
+        <Slider v-model:value="position.lineHeight" :min="0.5" :max="5" :step="0.1" />
       </SignItem>
       <SignItem
         label="可见范围"
@@ -72,7 +73,7 @@
         <template v-slot:label>
           <ui-input
             type="checkbox"
-            label="全部范围可"
+            label="全部范围可"
             :modelValue="!!position.globalVisibility"
             @update:modelValue="(v: boolean) => position.globalVisibility = v"
           />

+ 22 - 11
src/views/tagging/edit.vue

@@ -99,7 +99,7 @@
             </p>
             <p v-else class="rep-val">
               <span>
-                {{ getFileName(tagging.audio) }}
+                {{ tagging.audioName }}
               </span>
               <ui-icon class="icon" @click.stop="tagging.audio = ''" type="del" ctrl />
             </p>
@@ -110,7 +110,12 @@
       <div class="input">
         <div class="mat-select">
           <span>图片/视频</span>
-          <span class="select" @click="imageSelect">+从媒体库上传</span>
+          <span
+            class="select"
+            @click="imageSelect"
+            v-if="imageCount - tagging.images.length > 0"
+            >+从媒体库上传</span
+          >
         </div>
         <ui-input
           type="file"
@@ -118,7 +123,7 @@
           height="225px"
           preview
           placeholder="上传图片/视频"
-          othPlaceholder="支持JPG、PNG、MP4等格式,单张不超过5MB,最多支持上传9张。"
+          othPlaceholder="支持JPG、PNG、MP4等格式,单个不超过100MB,最多支持上传10张。"
           :accept="imageFormat.map((u) => `.${u}`).join(',')"
           :disable="true"
           :multiple="true"
@@ -171,8 +176,8 @@ export type EditProps = {
   data: Tagging;
 };
 
-const imageSize = 50 * 1024 * 1024;
-const imageCount = 9;
+const imageSize = 100 * 1024 * 1024;
+const imageCount = 10;
 const imageFormat = ["jpg", "png", "mp4"];
 const audioSize = 30 * 1024 * 1024;
 const audioCount = 1;
@@ -184,9 +189,9 @@ const tagging = ref<Tagging>({ ...props.data, images: [...props.data.images] });
 const activeStyle = computed(() => getTaggingStyle(tagging.value.styleId));
 // 去除默认
 if (!activeStyle.value && defaultStyle.value) {
-  tagging.value.styleId = defaultStyle.value.id;
+  // tagging.value.styleId = defaultStyle.value.id;
 }
-const type = ref(activeStyle.value ? activeStyle.value.typeId : styleTypes[0].id);
+const type = ref(activeStyle.value ? activeStyle.value.typeId : defStyleType.id);
 
 const submitHandler = () => {
   if (activeStyle.value?.typeId !== type.value) {
@@ -205,8 +210,10 @@ const submitHandler = () => {
 const styles = computed(() => {
   const fStyles = taggingStyles.value.filter((item) => item.typeId === type.value);
   console.log(fStyles);
-  return fStyles.sort((a, b) =>
-    a.default
+  return fStyles.sort((a, b) => {
+    if (a.default && b.default) return 0;
+
+    return a.default
       ? -1
       : b.default
       ? 1
@@ -218,8 +225,8 @@ const styles = computed(() => {
       ? -1
       : isTemploraryID(b.id)
       ? 1
-      : 0
-  );
+      : 0;
+  });
 });
 watchEffect(() => {
   if (type.value && activeStyle.value?.typeId !== type.value && styles.value.length) {
@@ -258,6 +265,9 @@ const audioChange = (file: LocalImageFile) => {
           blob: file.file,
           url: file.preview,
         };
+  if (!(typeof file === "string" || "blob" in file)) {
+    tagging.value.audioName = file.file.name;
+  }
   tagging.value.audio = data;
 };
 
@@ -292,6 +302,7 @@ const musicSelect = async () => {
   });
   if (list?.length) {
     audioChange(list[0].url);
+    tagging.value.audioName = list[0].name;
   }
 };
 const imageSelect = async () => {

+ 8 - 4
src/views/tagging/images.vue

@@ -8,13 +8,14 @@
       @change="(i: number) => index = i"
       :showInfos="tagging.images.length > 1 && !hideInfo"
     >
-      <template v-slot="{ raw, index }">
+      <template v-slot="{ raw, index: ndx }">
         <div
           class="meta-item"
           :class="{ full: inFull }"
-          @click="inFull && $emit('pull', index)"
+          @click="inFull && $emit('pull', ndx)"
         >
-          <ResourceView :data="getFileUrl(raw)" />
+          <!-- v-if="ndx === index" -->
+          <ResourceView :data="getFileUrl(raw)" class="p-item" />
           <!-- <img :src="getResource(getFileUrl(raw))" /> -->
         </div>
       </template>
@@ -52,13 +53,16 @@ const index = ref(0);
 .mates {
   width: 100%;
   height: 100%;
-  max-height: 100%;
   overflow-y: auto;
 
   .meta-item {
     width: 100%;
     height: 100%;
 
+    .p-item {
+      height: 100%;
+    }
+
     &.full {
       cursor: zoom-in;
     }

+ 6 - 1
src/views/tagging/sign.vue

@@ -61,9 +61,14 @@ const emit = defineEmits<{
 }>();
 
 const findImage = computed(() => {
-  return props.tagging.images.find(
+  let img = props.tagging.images.find(
     (a) => getUrlType(getResource(getFileUrl(a))) === MetaType.image
   );
+  if (!img) {
+    return getTaggingStyle(props.tagging.styleId)?.icon;
+  } else {
+    return img;
+  }
 });
 
 const menus = [

+ 7 - 5
src/views/tagging/style-type-select.vue

@@ -1,8 +1,9 @@
 <template>
   <!-- <Menu style="width: 256px" mode="vertical" :items="getItems()" @click="handleClick" /> -->
-  <Dropdown placement="bottom" v-if="current">
+  <Dropdown placement="bottom" v-if="current.length">
     <span>
-      {{ current.title }}<span class="count" v-if="count">({{ current.count }})</span>
+      {{ current.map((i: any) => i.title).join("/") }}
+      <span class="count" v-if="count">({{ current[current.length - 1].count }})</span>
       <DownOutlined />
     </span>
     <template #overlay>
@@ -67,14 +68,15 @@ const getItems = (types = styleTypes): any => {
 const getCurrentItem = (type: number, all = items.value): any => {
   for (const item of all) {
     if (type === item.key) {
-      return item;
+      return [item];
     } else if ("children" in item && item.children) {
       const citem = getCurrentItem(type, item.children);
-      if (citem) {
-        return citem;
+      if (citem.length) {
+        return [item, ...citem];
       }
     }
   }
+  return [];
 };
 const types = computed(() => {
   if (props.all) {