Просмотр исходного кода

Merge branch 'v2.0.0-fire' of http://192.168.0.115:3000/bill/fuse-code into v2.0.0-fire

xzw 11 часов назад
Родитель
Сommit
9b22f66c10

+ 2 - 2
index.html

@@ -28,14 +28,14 @@
         console.log(appParam, basePath, 6666)
         if (appParam.fromRoute == 'fire') {
           faviconPath = basePath + 'fire.ico';
-        } else if (appParam.fromRoute == 'crimical') {
+        } else if (appParam.fromRoute == 'criminal') {
           faviconPath = basePath + 'police.ico';
         } else if (appParam.fromRoute == 'xmfire') {
           faviconPath = basePath + 'jmlogo.png';
         } else if (appParam.fromRoute == 'cjzfire') {
           faviconPath = basePath + 'logo_big.ico';
         }
-        
+        console.log(faviconPath, 'faviconPath')
         // 查找现有的favicon链接元素
         let link = document.querySelector("link[rel~='icon']");
         

Разница между файлами не показана из-за своего большого размера
+ 0 - 1726
pnpm-lock.yaml


+ 12 - 1
src/app.vue

@@ -82,12 +82,23 @@ import { addReqErrorHandler, addResErrorHandler, ResCode, setToken } from "./api
 import { mergeFuns } from "./components/drawing/hook";
 import Login from "./views/login.vue";
 
+// 获取URL参数中的app值
+function getAppParam() {
+  const urlParams = new URLSearchParams(window.location.search);
+  return {fromRoute: urlParams.get('fromRoute')};
+}
 const gotoLogin = () => {
-  showLogin.value = true;
+  const params = getAppParam();
+  // alert("请登录");/${params.fromRoute}/#/mix3dManager
+  const loginHref = `/${params.fromRoute}/#/login`
+  location.href = loginHref + '?redirect=' + escape(`/${params.fromRoute}/#/mix3dManager`)
+  // showLogin.value = true;
 };
 
 addResErrorHandler((data: any) => {
   data = data.data;
+  const params = getAppParam();
+  console.log("addResErrorHandler", data, params);
   if (data.code === ResCode.TOKEN_INVALID) {
     gotoLogin();
   } else if (data.code === ResCode.UN_AUTH) {

+ 1 - 1
src/components/bill-ui/assets/scss/components/_audio.scss

@@ -1,7 +1,7 @@
 .audio {
   display: inline-block;
   cursor: pointer;
-  
+  min-width: 20px;
   > span {
     --height: 18px;
     width: 3px;

+ 1 - 1
src/env/index.ts

@@ -7,7 +7,7 @@ export const viewModeStack = stackFactory(ref<"full" | "auto">("auto"));
 export const showToolbarStack = stackFactory(ref<boolean>(false));
 export const showHeadBarStack = stackFactory(ref<boolean>(true));
 export const showRightPanoStack = stackFactory(ref<boolean>(true));
-export const showLeftPanoStack = stackFactory(ref<boolean>(false));
+export const showLeftPanoStack = stackFactory(ref<boolean>(true));
 export const moundLeftPanoStack = stackFactory(ref<boolean>(true));
 export const showLeftCtrlPanoStack = stackFactory(ref<boolean>(true));
 export const showAMsStack = stackFactory(ref<boolean>(false));

+ 1 - 0
src/sdk/sdk.ts

@@ -53,6 +53,7 @@ export type SceneModel = ToChangeAPI<SceneModelAttrs> & {
   leaveTransform: () => void;
   putInFrontOfCam: () => void;
   getDefaultRotation: () => SceneLocalPos;
+  getDefaultPosition: () => SceneLocalPos;
   enterAlignment: () => void;
   leaveAlignment: () => void;
   enterScaleSet: () => ScaleSet;

+ 2 - 2
src/store/sys.ts

@@ -32,8 +32,8 @@ export const title = computed(() => {
       : defTitle.value;
 
   console.error(prefix.value);
-  if (prefix.value && last) {
-    return prefix.value + " | " + last;
+  if (last) {
+    return  last;
   } else {
     return prefix.value + last;
   }

+ 1 - 1
src/store/tagging-style.ts

@@ -42,7 +42,7 @@ export const getTaggingStyle = (id: TaggingStyle['id']) => {
 let bcStyles: TaggingStyles = []
 export const getBackupTaggingStyles = () => bcStyles
 export const backupTaggingStyles = () => {
-  bcStyles = taggingStyles.value.map(style => ({...style}))
+  bcStyles = taggingStyles.value.map(style => ({...style})) 
 }
 export const recoverTaggingStyles = recoverStoreItems(taggingStyles, getBackupTaggingStyles)
 

+ 6 - 0
src/views/merge/index.vue

@@ -132,8 +132,14 @@ watch(
 const reset = async () => {
   if (custom.currentModel && (await Dialog.confirm("确定恢复默认?此操作无法撤销"))) {
     const rotation = getSceneModel(custom.currentModel)!.getDefaultRotation();
+    const position = getSceneModel(custom.currentModel)!.getDefaultPosition();
     Object.assign(custom.currentModel, {
       ...defaultFuseModelAttrs,
+      position: {
+        x: position.x,
+        y: position.y,
+        z: position.z,
+      },
       rotation: {
         x: rotation.x,
         y: rotation.y,