Ver Fonte

修复bug7-1am

liujiejie há 11 meses atrás
pai
commit
b5db287f44

BIN
dist-dev.zip


+ 3 - 2
src/components/MenuTag.vue

@@ -21,9 +21,10 @@
             :effect="$route.name === tag.name ? 'dark' : 'plain'"
             class="tagBox"
             :class="{
-              'selected-tag':
-                $route.name === tag.name || $route.name === 'cockpitManage',
               'unselected-tag': $route.name !== tag.name,
+              'selected-tag':
+                $route.name === tag.name ||
+                (tag.name === 'home' && $route.name === '驾驶舱'),
             }"
             @contextmenu.native.prevent="handleClickContextMenu($event, tag, i)"
             @click="handleTagClick($event, tag)"

+ 2 - 2
src/components/map/index.vue

@@ -184,8 +184,8 @@ export default {
         new TileLayer({
           source: new XYZ({
             // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
-            url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
-            // url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
+            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
           }),
         }),
         new VectorLayer({

+ 1 - 1
src/store/menuTag.js

@@ -2,7 +2,7 @@ const state = {
   tagList: [
     {
       path: "/home/cockpitManage",
-      name: "home",
+      name: "驾驶舱",
       label: "驾驶舱",
     },
   ], // 标签列表

+ 4 - 3
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-07-01 13:54:48
+ * @LastEditTime: 2024-07-01 15:04:16
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -147,6 +147,7 @@
             "
             class="col_content"
           >
+            <!-- <div>{{ file.fileAddr }}</div> -->
             <iframe
               v-if="getFileType(file.fileAddr) === 'html'"
               :src="file.fileAddr"
@@ -355,9 +356,9 @@ export default {
     },
     getFileType(url) {
       // 使用 URL 对象解析 URL
-      const parsedUrl = new URL(url);
       // 获取路径名部分
-      let pathname = parsedUrl.pathname;
+      console.log(url.split("/"), 'url.split("/")');
+      let pathname = url.split("/").pop();
       // 截取路径名,去除加密乱码字符部分
       const index = pathname.indexOf(".html");
       if (index !== -1) {