From f414daa1d1362ed1bd22b79b5fec7b50a6833d5e Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Thu, 21 Sep 2023 09:33:37 +0800
Subject: [PATCH] 代码提交
---
src/components/common/sidebar.vue | 2
src/api/http/config.ts | 4 +-
src/pages/page-web/projects/project_list/index.vue | 2
src/pages/page-web/projects/wayline.vue | 29 +++++++++++++-
yarn.lock | 38 +++++++++++++++++++
src/pages/page-web/projects/tsa.vue | 4 +-
src/pages/page-web/projects/workspace.vue | 2
7 files changed, 72 insertions(+), 9 deletions(-)
diff --git a/src/api/http/config.ts b/src/api/http/config.ts
index 4e5a9c0..b4a9d25 100644
--- a/src/api/http/config.ts
+++ b/src/api/http/config.ts
@@ -11,8 +11,8 @@
// baseURL: 'https://dev.jxpskj.com:36789', // This url must end with "/". Example: 'http://192.168.1.1:6789/'
// ws: 'ws//127.0.0.1:6789/api/v1/ws',
// ws://192.168.1.198:1883/
- websocketURL: 'ws://192.168.1.198:6789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
- // websocketURL: 'wss://dev.jxpskj.com:36789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
+ // websocketURL: 'ws://192.168.1.198:6789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
+ websocketURL: 'wss://dev.jxpskj.com:36789/api/v1/ws', // Example: 'ws://192.168.1.198:6789/api/v1/ws'
// livestreaming
// RTMP Note: This IP is the address of the streaming server. If you want to see livestream on web page, you need to convert the RTMP stream to WebRTC stream.
diff --git a/src/components/common/sidebar.vue b/src/components/common/sidebar.vue
index 576a251..a9be91d 100644
--- a/src/components/common/sidebar.vue
+++ b/src/components/common/sidebar.vue
@@ -54,7 +54,7 @@
const root = getRoot()
const options = [
{ key: 0, label: '团队', path: '/' + ERouterName.TSA, icon: 'TeamOutlined' },
- { key: 1, label: '直播', path: '/' + ERouterName.LIVESTREAM, icon: 'VideoCameraOutlined' },
+ // { key: 1, label: '直播', path: '/' + ERouterName.LIVESTREAM, icon: 'VideoCameraOutlined' },
{ key: 2, label: '标注', path: '/' + ERouterName.LAYER, icon: 'EnvironmentOutlined' },
{ key: 3, label: '媒体库', path: '/' + ERouterName.MEDIA, icon: 'PictureOutlined' },
{ key: 4, label: '航线库', path: '/' + ERouterName.WAYLINE, icon: 'NodeIndexOutlined' },
diff --git a/src/pages/page-web/projects/project_list/index.vue b/src/pages/page-web/projects/project_list/index.vue
index ac8b103..f755835 100644
--- a/src/pages/page-web/projects/project_list/index.vue
+++ b/src/pages/page-web/projects/project_list/index.vue
@@ -39,7 +39,7 @@
width: 370px;
max-height: 100vh;
background-color: black;
- color: $text-white-basic;
+ color: $text-white-basic !important;
}
.right_content {
diff --git a/src/pages/page-web/projects/tsa.vue b/src/pages/page-web/projects/tsa.vue
index e8e8a34..a9ec36e 100644
--- a/src/pages/page-web/projects/tsa.vue
+++ b/src/pages/page-web/projects/tsa.vue
@@ -1,5 +1,5 @@
<template>
- <div class="project-tsa-wrapper ">
+ <div class="project-tsa-wrapper">
<div>
<a-row>
<a-col :span="1"></a-col>
@@ -428,7 +428,7 @@
}
.ant-collapse>.ant-collapse-item>.ant-collapse-header {
- color: white;
+ color: white !important;
border: 0;
padding-left: 14px;
}
diff --git a/src/pages/page-web/projects/wayline.vue b/src/pages/page-web/projects/wayline.vue
index ccbe417..aa9e67f 100644
--- a/src/pages/page-web/projects/wayline.vue
+++ b/src/pages/page-web/projects/wayline.vue
@@ -1,6 +1,6 @@
<template>
<div class="project-wayline-wrapper height-100">
- <a-spin :spinning="loading" :delay="300" tip="downloading" size="large">
+ <a-spin :spinning="loading" :delay="300" tip="加载中" size="large">
<div style="height: 50px; line-height: 50px; border-bottom: 1px solid #4f4f4f; font-weight: 450;">
<a-row>
<a-col :span="1"></a-col>
@@ -95,6 +95,8 @@
import { CURRENT_CONFIG } from '/@/api/http/config'
import { load } from '@amap/amap-jsapi-loader'
import { getRoot } from '/@/root'
+import kmz from '/@/assets/kmz/test.kmz'
+import togeojson from '@mapbox/togeojson'
const loading = ref(false)
const store = useMyStore()
@@ -187,6 +189,18 @@
function selectRoute (wayline: WaylineFile) {
store.commit('SET_SELECT_WAYLINE_INFO', wayline)
+ console.log(wayline, 'wayline')
+ downloadWaylineFile(workspaceId, wayline.id).then(async res => {
+ if (!res) {
+ return
+ }
+ console.log(res, 'res')
+ const data = new Blob([res], { type: 'application/kmz' })
+ // downloadFile(data, fileName + '.kmz')
+ await analysisKMLFile(data)
+ }).finally(() => {
+ loading.value = false
+ })
}
function onScroll (e: any) {
@@ -196,7 +210,18 @@
getWaylines()
}
}
-
+// 解析kml文件
+const analysisKMLFile = file => {
+ const reader = new FileReader()
+ reader.readAsText(file, 'utf-8')
+ reader.onload = function (e) {
+ const xml = new DOMParser().parseFromString(e.target.result, 'text/xml')
+ const geojson = togeojson.kml(xml, {
+ style: true
+ })
+ console.log(geojson, 'geojson')
+ }
+}
interface FileItem {
uid: string;
name?: string;
diff --git a/src/pages/page-web/projects/workspace.vue b/src/pages/page-web/projects/workspace.vue
index 5dbff55..feec675 100644
--- a/src/pages/page-web/projects/workspace.vue
+++ b/src/pages/page-web/projects/workspace.vue
@@ -136,7 +136,7 @@
.main-content {
flex: 1;
- color: $text-white-basic;
+ color: $text-white-basic !important;
width: 285px;
}
}
diff --git a/yarn.lock b/yarn.lock
index 9ee6a64..26c4ab6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -485,6 +485,15 @@
resolved "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+"@mapbox/togeojson@^0.16.1":
+ version "0.16.1"
+ resolved "https://registry.npmmirror.com/@mapbox/togeojson/-/togeojson-0.16.1.tgz#bdf3b9abcc96c7addaae390ed8c09832b5bf1b38"
+ integrity sha512-oejrJH2N4GpexaJyK6+lo6GrmCc1k9M9ThG6vPwIWwtbbHs6p6pogzv2WwKMiNeAHuA8FPAxl3DI9QBvEAybJQ==
+ dependencies:
+ concat-stream "~2.0.0"
+ minimist "1.2.8"
+ xmldom "~0.6.0"
+
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz"
@@ -1421,6 +1430,16 @@
buffer-from "^1.0.0"
inherits "^2.0.3"
readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
+concat-stream@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmmirror.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1"
+ integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==
+ dependencies:
+ buffer-from "^1.0.0"
+ inherits "^2.0.3"
+ readable-stream "^3.0.2"
typedarray "^0.0.6"
constant-case@^3.0.4:
@@ -3202,6 +3221,11 @@
dependencies:
brace-expansion "^2.0.1"
+minimist@1.2.8:
+ version "1.2.8"
+ resolved "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
+ integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
+
minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz"
@@ -3773,6 +3797,15 @@
version "3.6.0"
resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz"
integrity sha1-M3u9o63AcGvT4CRCaihtS0sskZg=
+ dependencies:
+ inherits "^2.0.3"
+ string_decoder "^1.1.1"
+ util-deprecate "^1.0.1"
+
+readable-stream@^3.0.2:
+ version "3.6.2"
+ resolved "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
+ integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
@@ -4892,6 +4925,11 @@
safe-buffer "~5.1.0"
ultron "~1.1.0"
+xmldom@~0.6.0:
+ version "0.6.0"
+ resolved "https://registry.npmmirror.com/xmldom/-/xmldom-0.6.0.tgz#43a96ecb8beece991cef382c08397d82d4d0c46f"
+ integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==
+
xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1:
version "4.0.2"
resolved "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz"
--
Gitblit v1.9.3