bill 18 hours ago
parent
commit
c43a208530

+ 2 - 2
src/api/constant.ts

@@ -130,8 +130,8 @@ export const MATERIAL_GROUP_LIST = `${namespace}/dict/getByKey/media-library`
 // export const ADD_MATERIAL = `/service/manage/common/upload/fileNew`
 // export const DEL_MATERIAL = `/service/manage/dictFile/del/media-library`
 // export const MATERIAL_GROUP_LIST = `/service/manage/dict/getByKey/media-library`
-export const MATERIAL_TA_GROUP_LIST = `/service/manage/dict/getByUseType/trace_evidence`
-export const SYNC_MATERIAL = `/service/manage/caseFusion/refreshTraceEvidenceInfoList/`
+export const MATERIAL_TA_GROUP_LIST = `${namespace}/dict/getByUseType/trace_evidence`
+export const SYNC_MATERIAL = `${namespace}/caseFusion/refreshTraceEvidenceInfoList/`
 
 
 // 动画模块

+ 2 - 1
src/api/fuse-model.ts

@@ -164,7 +164,8 @@ export const postAddFuseModel = async (model: FuseModel, attach: any = {}) => {
       ...attach,
     },
   });
-  return serviceToLocal(serviceModel);
+  const list = await fetchFuseModels()
+  return list.find(item => item.id === serviceModel.fusionNumId.toString())!
 };
 
 export const postUpdateFuseModels = (model: FuseModel) => {

+ 8 - 8
src/api/material.ts

@@ -35,7 +35,7 @@ type ServiceMaterial = {
   name: string;
   newFileName: string;
   typeKey: string;
-  content?: string
+  content?: string;
   updateTime: string;
   uploadId: number;
 };
@@ -52,7 +52,7 @@ export enum FileType {
   MUSIC = 2,
   MODEL = 3,
   OTHER = 4,
-  DOC = 5
+  DOC = 5,
 }
 export type Material = {
   id: number;
@@ -65,16 +65,16 @@ export type Material = {
   group: string;
   uploadId?: number;
   isSystem?: number;
-  dictId?: number
+  dictId?: number;
   modelId?: number;
-  fileType: FileType,
-  dictIconList?: ({id :number})[]
+  fileType: FileType;
+  dictIconList?: { id: number }[];
   content?: {
     collectedTime: string;
     createAccount: string;
     feature: string;
     leftPosition: string;
-    collectionModeName: string,
+    collectionModeName: string;
     status: number;
     title: string;
   };
@@ -113,7 +113,7 @@ export const fetchMaterialPage = async (params: MaterialPageProps) => {
         status: item.status,
         group: item.dictName,
         uploadId: item.uploadId,
-        content: item.content && JSON.parse(item.content)
+        content: item.content && JSON.parse(item.content),
       })
     ),
   };
@@ -136,7 +136,7 @@ export const fetchMaterialGroups = async (useType?: string) => {
     ) as MaterialGroup[];
   } else {
     return (
-      await axios.get<ServiceMaterialGroup[]>(MATERIAL_TA_GROUP_LIST)
+      (await axios.get<ServiceMaterialGroup[]>(MATERIAL_TA_GROUP_LIST)) || []
     ).map((item) => ({
       name: item.dictName,
       useType: item.useType,

+ 42 - 21
src/api/tagging-style.ts

@@ -20,25 +20,25 @@ interface ServiceStyle {
 
 export const defStyleType = {
   id: 8,
-  name: ui18n.t('sys.other'),
-}
+  name: ui18n.t("sys.other"),
+};
 export const styleTypes = [
   {
     id: 1,
-    name: ui18n.t('tagging.type.1'),
+    name: ui18n.t("tagging.type.1"),
     children: [
-      { id: 2, name: ui18n.t('tagging.type.2') },
-      { id: 3, name: ui18n.t('tagging.type.3') },
-      { id: 4, name: ui18n.t('tagging.type.4') },
-      { id: 5, name: ui18n.t('tagging.type.5') },
-      { id: 6, name: ui18n.t('tagging.type.6') },
+      { id: 2, name: ui18n.t("tagging.type.2") },
+      { id: 3, name: ui18n.t("tagging.type.3") },
+      { id: 4, name: ui18n.t("tagging.type.4") },
+      { id: 5, name: ui18n.t("tagging.type.5") },
+      { id: 6, name: ui18n.t("tagging.type.6") },
     ],
   },
   {
     id: 7,
-    name: ui18n.t('tagging.type.7'),
+    name: ui18n.t("tagging.type.7"),
   },
-  defStyleType
+  defStyleType,
 ];
 
 export const getStyleTypeName = (id: number, all: any = styleTypes): string => {
@@ -55,7 +55,10 @@ export const getStyleTypeName = (id: number, all: any = styleTypes): string => {
   return "";
 };
 
-export const getStyleTypeId = (dictId: number, all: any = styleTypes): number => {
+export const getStyleTypeId = (
+  dictId: number,
+  all: any = styleTypes
+): number => {
   for (const item of all) {
     if (dictId === item.dictId) {
       return item.id;
@@ -69,10 +72,9 @@ export const getStyleTypeId = (dictId: number, all: any = styleTypes): number =>
   return -1;
 };
 export const getStyleDictId = (id: number, all: any = styleTypes): number => {
-  return __map[id]
+  return __map[id];
 };
 
-
 export interface TaggingStyle {
   id: string;
   icon: string;
@@ -101,10 +103,10 @@ const toService = (style: TaggingStyle): ServiceStyle => ({
 
 export type TaggingStyles = TaggingStyle[];
 
-const __map: Record<string, number> = {}
+const __map: Record<string, number> = {};
 export const fetchTaggingStyles = async () => {
   const reqParams = params.share ? { fusionId: params.caseId } : {};
-  const treeData = await axios.get<any>(TAGGING_STYLE_TREE, {
+  let treeData = await axios.get<any>(TAGGING_STYLE_TREE, {
     params: reqParams,
   });
   const styles: any[] = [];
@@ -114,7 +116,7 @@ export const fetchTaggingStyles = async () => {
         if (level !== 0) {
           delete parent.children;
         }
-        __map[item.iconId] = item.dictId || parent.dictId
+        __map[item.iconId] = item.dictId || parent.dictId;
         styles.push(toLocal({ ...item, iconTitle: parent.id }));
       } else {
         const data = {
@@ -124,17 +126,36 @@ export const fetchTaggingStyles = async () => {
           children: [],
         };
         parent.children.push(data);
-        genTree(item.childrenList, data, ++level)
+        genTree(item.childrenList, data, ++level);
       }
     }
   };
+  // treeData = [{
+  //   iconId: 279,
+  //   iconTitle: "其他",
+  //   iconUrl: null,
+  //   userName: null,
+  //   isSystem: 1,
+  //   useNum: 13,
+  //   lastUse: 1,
+  //   isNew: 1,
+  //   caseId: null,
+  //   fusionId: null,
+  //   sort: 2,
+  //   parentId: null,
+  //   tbStatus: 0,
+  //   createTime: "2025-08-26 14:56:08",
+  //   updateTime: "2025-09-25 19:59:10",
+  //   childrenList: treeData,
+  // }];
   const tree: any = { children: [] };
   genTree(treeData, tree);
-  styleTypes.length = 0
+  console.error("treeData", treeData, tree);
+  styleTypes.length = 0;
   styleTypes.push(...tree.children)
-  Object.assign(defStyleType, tree.children[tree.children.length - 1])
-  
-  console.error('StyleT', styleTypes)
+  Object.assign(defStyleType, tree.children[tree.children.length - 1]);
+
+  console.error("StyleT", styleTypes);
 
   // const data = await axios.get<ServiceStyle[]>(TAGGING_STYLE_LIST, {
   //   params: reqParams,

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

@@ -63,7 +63,7 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
     let sceneModel: SceneModel;
     try {
       
-    console.error('addMode', item.url, item.url.map(getResources))
+    console.error('addMode', itemRaw)
       sceneModel = sdk.addModel({
         ...itemRaw,
         ...modelRange,

+ 1 - 1
src/views/setting/index.vue

@@ -54,7 +54,7 @@ import {
 } from "@/store";
 import { ref } from "vue";
 import { togetherCallback, getFileUrl, loadPack } from "@/utils";
-import { showRightPanoStack, showRightCtrlPanoStack } from "@/env";
+import { showRightPanoStack, showRightCtrlPanoStack, getResources } from "@/env";
 import { analysisPose, sdk } from "@/sdk";
 import selectBack from "./select-back.vue";
 import { Input } from "ant-design-vue";

+ 9 - 9
src/views/setting/select-back.vue

@@ -75,33 +75,33 @@ const backs = computed(() => [
   {
     label: ui18n.t("setting.backs.1"),
     type: "map",
-    image: params.static + "/profile/fusion/default/images/map.png",
+    image: params.laserRoot + "/profile/fusion/default/images/map.png",
     value: "dt",
     children: sysTiles.value.map((t) => ({ label: t.name, value: t.id })),
   },
   {
     label: ui18n.t("setting.backs.2"),
     type: "img",
-    image: params.static + "/profile/fusion/default/images/pic_ltby@2x.png",
-    value: params.static + "/profile/fusion/default/images/蓝天白云.jpg",
+    image: params.laserRoot + "/profile/fusion/default/images/pic_ltby@2x.png",
+    value: "/profile/fusion/default/images/蓝天白云.jpg",
   },
   {
     label: ui18n.t("setting.backs.3"),
     type: "img",
-    image: params.static + "/profile/fusion/default/images/pic_wymb@2x.png",
-    value: params.static + "/profile/fusion/default/images/乌云密布.jpg",
+    image: params.laserRoot + "/profile/fusion/default/images/pic_wymb@2x.png",
+    value: "/profile/fusion/default/images/乌云密布.jpg",
   },
   {
     label: ui18n.t("setting.backs.4"),
     type: "img",
-    image: params.static + "/profile/fusion/default/images/pic_yk@2x.png",
-    value: params.static + "/profile/fusion/default/images/夜空.jpg",
+    image: params.laserRoot + "/profile/fusion/default/images/pic_yk@2x.png",
+    value: "/profile/fusion/default/images/夜空.jpg",
   },
   {
     label: ui18n.t("setting.backs.5"),
     type: "img",
-    image: params.static + "/profile/fusion/default/images/pic_bw@2x.png",
-    value: params.static + "/profile/fusion/default/images/傍晚.jpg",
+    image: params.laserRoot + "/profile/fusion/default/images/pic_bw@2x.png",
+    value: "/profile/fusion/default/images/傍晚.jpg",
   },
 ]);