瀏覽代碼

Merge branch 'v2.0.0-ga' into v2.0.0-jm-local

bill 1 周之前
父節點
當前提交
4a29bccc79

二進制
public/images/browser_360.png


二進制
public/images/browser_Chrome.png


二進制
public/images/browser_Chromium.png


二進制
public/images/browser_Edge.png


二進制
public/images/browser_Firefox.png


二進制
public/images/browser_Qianxin.png


二進制
public/images/browser_Safari.png


+ 2 - 2
src/api/tagging.ts

@@ -26,7 +26,7 @@ interface ServerTagging {
   "tagTitle": string,
 
   show3dTitle: number
-  audio: string
+  audio: string | null
   fileName: string
 
   // 提取状态
@@ -96,7 +96,7 @@ const localToService = (tagging: Tagging, update = false): PartialProps<ServerTa
   "leaveBehind": tagging.part,
   "tagDescribe": tagging.desc,
   "tagTitle": tagging.title,
-  audio: tagging.audio,
+  audio: tagging.audio || null,
 
   // 提取状态
   tqStatus: tagging.tqStatus,

+ 67 - 28
src/below.vue

@@ -7,7 +7,8 @@
       <div class="list">
         <div v-for="item in items">
           <img :src="item.icon" />
-          <p @click="useClickHandler(item.link)"><img :src="b" /> {{ item.name }}</p>
+          <!-- <img :src="b" /> -->
+          <p @click="useClickHandler(item.link)">{{ item.name }}</p>
         </div>
       </div>
     </div>
@@ -17,29 +18,68 @@
 <script lang="ts" setup>
 const a = "images/err.png";
 const b = "images/download.png";
-const items = [
-  {
-    name: "Firefox",
-    icon: "images/ff.png",
-    link: "http://www.firefox.com.cn/",
-  },
-  {
-    name: "Microsoft Edge",
-    icon: "images/eg.png",
-    link: "https://www.microsoft.com/en-us/edge",
-  },
-  // {
-  //   icon: "images/safar.png",
-  //   link: "https://www.apple.com/safari/",
-  // },
-  {
-    name: "Chrome",
-    icon: "images/chrome.png",
-    link: "https://www.google.com/chrome/",
-  },
-];
+
+// 识别国产操作系统逻辑(示例覆盖常见标识,可根据需要补充)
+function isDomesticOS() {
+  const userAgent = navigator.userAgent.toLowerCase();
+  const platform = navigator.platform.toLowerCase();
+  console.log(userAgent, platform, "浏览器标识");
+  // 统信 UOS、银河麒麟、深度 Deepin、中标麒麟等标识
+  return (
+    /uos|kylin|deepin|neokylin/.test(userAgent) ||
+    /linux/.test(platform) ||
+    /国产|中国/.test(userAgent)
+  );
+}
+
+// 国产浏览器
+const items = isDomesticOS()
+  ? [
+      {
+        name: "Chromiun",
+        icon: "./images/browser_Chromium.png",
+        link: "./images/browser_Chromium.png",
+      },
+      {
+        name: "奇安信可信浏览器",
+        icon: "./images/browser_Qianxin.png",
+        link: "./images/browser_Qianxin.png",
+      },
+      {
+        name: "360安全浏览器",
+        icon: "./images/browser_360.png",
+        link: "./images/browser_360.png",
+      },
+      {
+        name: "火狐",
+        icon: "./images/browser_Firefox.png",
+        link: "./images/browser_Firefox.png",
+      },
+    ]
+  : [
+      {
+        name: "Firefox",
+        icon: "images/ff.png",
+        link: "http://www.firefox.com.cn/",
+      },
+      {
+        name: "Microsoft Edge",
+        icon: "images/eg.png",
+        link: "https://www.microsoft.com/en-us/edge",
+      },
+      // {
+      //   icon: "images/safar.png",
+      //   link: "https://www.apple.com/safari/",
+      // },
+      {
+        name: "Chrome",
+        icon: "images/chrome.png",
+        link: "https://www.google.com/chrome/",
+      },
+    ];
 
 const useClickHandler = (link: string) => {
+  return;
   console.log(link);
   window.open(link);
 };
@@ -57,6 +97,7 @@ const useClickHandler = (link: string) => {
   .content {
     color: #999;
     text-align: center;
+
     > img {
       width: 200px;
     }
@@ -80,15 +121,13 @@ const useClickHandler = (link: string) => {
 
   p {
     color: #999;
-    cursor: pointer;
-    display: flex;
-    align-items: center;
-    img {
-      width: 16px;
-    }
+    width: 100%;
+    text-align: center;
   }
+
   > div {
     margin: 0 20px;
+
     > img {
       width: 70px !important;
     }

+ 9 - 2
src/components/tagging/sign-new.vue

@@ -29,9 +29,9 @@
           <template v-if="defStyleType.id !== taggingStyle?.typeId && tagging.part">
             <p><span>遗留部位:</span>{{ tagging.part }}</p>
           </template>
-          <div class="p" v-if="tagging.desc">
+          <div class="p" v-if="tagging.desc" v-show="showDesc">
             <span v-if="defStyleType.id !== taggingStyle?.typeId"> 特征描述: </span>
-            <div v-html="tagging.desc"></div>
+            <div v-html="tagging.desc" ref="desc"></div>
           </div>
           <template v-if="defStyleType.id !== taggingStyle?.typeId">
             <p v-if="tagging.method"><span>提取方法:</span>{{ tagging.method }}</p>
@@ -91,6 +91,13 @@ const emit = defineEmits<{
   ): void;
 }>();
 
+const desc = ref<HTMLDivElement>();
+const showDesc = computed(() => {
+  const a = desc.value?.innerText.trim();
+  console.error("--aaa->", desc.value, a);
+  return a;
+});
+
 const audio = ref();
 watchEffect(() => {
   if (props.show && audio.value) {

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

@@ -151,9 +151,15 @@ const typeFilterScenes = computed(() => {
   return typeScenes;
 });
 
-const cache = {} as any
+let cache = {} as any
+watchEffect(() => {
+  if (!visible.value) {
+    cache = {}
+  }
+})
 
 const selects = ref<Key[]>(selectIds.value);
+watchEffect(() => console.error(selects.value), {flush: 'sync'})
 const rowSelection: any = ref({
   selectedRowKeys: selects,
 

+ 5 - 2
src/sdk/association/animation.ts

@@ -31,7 +31,7 @@ import { Pos } from "@/utils/event";
 import Subtitle from "@/components/subtitle/index.vue";
 import { Size } from "@/components/drawing/dec";
 import router, { RoutesName } from "@/router";
-import { isEdit, paths } from "@/store";
+import { isEdit, isTemploraryID, paths } from "@/store";
 import { Color } from "three";
 import { custom, showAMsStack } from "@/env";
 
@@ -80,7 +80,10 @@ export const addAM = (data: AnimationModel): Promise<AnimationModel3D> => {
         });
         am.bus.on("loadDone", () => {
           amMap[key].am = am;
-          am.putInFrontOfCam();
+          if (isTemploraryID(data.id)) {
+          console.error('putInFrontOfCam', data.id)
+            am.putInFrontOfCam();
+          }
           console.log("0.0", am);
         });
       }

+ 5 - 2
src/sdk/cover/index.js

@@ -1110,13 +1110,16 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                     }
 
                     msg = Potree.Common.CloneObject(msg) 
-                    console.log(model.name, msg)
+                    //console.log(model.name, msg)
                     bus.emit('transformChanged', msg)
                 }
                 model.addEventListener('transformChanged', (e) => {
                     emitTran(e)
                 })
-                emitTran({byControl:true}) //保存初始
+                setTimeout(()=>{
+                    emitTran({byControl:true}) //保存初始
+                },1) //刚loadDone还没开始监听所以延时
+                
             }
             
             

+ 1 - 1
src/store/sys.ts

@@ -42,7 +42,7 @@ watchEffect(() => (document.title = title.value));
 
 let currentTempIndex = 0;
 export const isTemploraryID = (id: string) =>
-  id.includes("__currentTempIndex__");
+  typeof id === 'string' && id.includes("__currentTempIndex__");
 export const createTemploraryID = () =>
   `__currentTempIndex__${currentTempIndex++}`;
 

+ 12 - 4
src/utils/index.ts

@@ -304,6 +304,8 @@ export function isFirefoxBelow(targetVersion = "115.9") {
     for (const b of navigator.userAgentData.brands) {
       if (typeof b.brand !== "string") continue;
 
+
+      // Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.200 Safari/537.36 Qaxbrowser
       const ver = b.version || "";
       if (/firefox/i.test(b.brand)) {
         return compareVersionStrings(ver, '115.9') < 0;
@@ -318,10 +320,16 @@ export function isFirefoxBelow(targetVersion = "115.9") {
   // 回退到 userAgent 字符串
   const ua = navigator.userAgent || "";
   // Firefox 的 UA 通常包含 "Firefox/<version>"
-  const m = ua.match(/Firefox\/([0-9]+(?:\.[0-9]+)*)/i);
-  if (m && m[1]) {
-    const ver = m[1];
-    return compareVersionStrings(ver, targetVersion) < 0;
+  const fm = ua.match(/Firefox\/([0-9]+(?:\.[0-9]+)*)/i);
+  if (fm && fm[1]) {
+    const ver = fm[1];
+    return compareVersionStrings(ver, '115.9') < 0;
+  }
+
+  const cm = ua.match(/Chrome\/([0-9]+(?:\.[0-9]+)*)/i);
+  if (cm && cm[1]) {
+    const ver = cm[1];
+    return compareVersionStrings(ver, '108') < 0;
   }
 
   // 不是 Firefox 或版本未知

+ 10 - 1
src/views/tagging/hot/edit.vue

@@ -134,7 +134,15 @@
               <span>
                 {{ tagging.audioName }}
               </span>
-              <ui-icon class="icon" @click.stop="tagging.audio = ''" type="del" ctrl />
+              <ui-icon
+                class="icon"
+                @click.stop="
+                  tagging.audio = '';
+                  tagging.audioName = '';
+                "
+                type="del"
+                ctrl
+              />
             </p>
           </template>
         </ui-input>
@@ -353,6 +361,7 @@ const audioChange = (file: LocalImageFile) => {
     tagging.value.audioName = file.file.name;
   }
   tagging.value.audio = data;
+  console.log("audioChange", data);
 };
 
 type LocalImageFile = { file: File; preview: string } | Tagging["images"][number];