From 8beddbb9e9e3c5cbb1a0155fe22d96ed962e99a6 Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Wed, 07 May 2025 18:32:49 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-web-manage

---
 /dev/null                                     |    0 
 src/views/tickets/orderLog.vue                |   17 +++++---
 public/img/bg/index_logo2.png                 |    0 
 src/assets/map_images/Startingpointicon.png   |    0 
 index.html                                    |    2 
 src/components/map-container/mapContainer.vue |   39 +++++++++++++++++++
 src/assets/map_images/EndPointicon.png        |    0 
 src/styles/common.scss                        |   28 ++++++++++++-
 8 files changed, 76 insertions(+), 10 deletions(-)

diff --git a/index.html b/index.html
index 7528eae..eb060ef 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
   <meta name="mobile-web-app-capable" content="yes" />
   <meta name="apple-mobile-web-app-status-bar-style" content="black" />
   <meta name="format-detection" content="telephone=no" />
-  <link rel="icon" href="/img/bg/index_logo.png" />
+  <link rel="icon" href="/img/bg/index_logo2.png" />
   <link rel="stylesheet" href="/iconfont/index.css" />
   <link rel="stylesheet" href="/iconfont/avue/iconfont.css" />
   <link rel="stylesheet" href="/iconfont/saber/iconfont.css" />
diff --git a/public/img/bg/index_logo.png b/public/img/bg/index_logo.png
deleted file mode 100644
index 43577c7..0000000
--- a/public/img/bg/index_logo.png
+++ /dev/null
Binary files differ
diff --git a/public/img/bg/index_logo2.png b/public/img/bg/index_logo2.png
new file mode 100644
index 0000000..738596e
--- /dev/null
+++ b/public/img/bg/index_logo2.png
Binary files differ
diff --git a/src/assets/map_images/EndPointicon.png b/src/assets/map_images/EndPointicon.png
new file mode 100644
index 0000000..eb54b86
--- /dev/null
+++ b/src/assets/map_images/EndPointicon.png
Binary files differ
diff --git a/src/assets/map_images/Startingpointicon.png b/src/assets/map_images/Startingpointicon.png
new file mode 100644
index 0000000..e79d9a6
--- /dev/null
+++ b/src/assets/map_images/Startingpointicon.png
Binary files differ
diff --git a/src/components/map-container/mapContainer.vue b/src/components/map-container/mapContainer.vue
index 73ff5fa..f1b9be9 100644
--- a/src/components/map-container/mapContainer.vue
+++ b/src/components/map-container/mapContainer.vue
@@ -24,10 +24,14 @@
 import { nextTick, onMounted, onUnmounted } from 'vue'
 import { read } from 'xlsx'
 
+import startPng from '@/assets/map_images/Startingpointicon.png'
+import endPng from '@/assets/map_images/EndPointicon.png'
+
 window.$viewer = null
 window.$Cesium = null
 let pointLayer = null
 let polylineLayer = null
+let pointHtmlLayer = null
 
 const { VITE_APP_BASE } = import.meta.env
 // import * as Cesium from 'cesium'
@@ -82,6 +86,8 @@
     window.$viewer?.addLayer(pointLayer)
     polylineLayer = new DC.VectorLayer('polylineLayer')
     window.$viewer?.addLayer(polylineLayer)
+    pointHtmlLayer = new DC.HtmlLayer('pointHtmlLayer')
+    window.$viewer?.addLayer(pointHtmlLayer)
 
     isViewerReady.value = true
 }
@@ -125,6 +131,7 @@
  */
 function addPolyline (data) {
     if (polylineLayer) polylineLayer.clear()
+    if (pointHtmlLayer) pointHtmlLayer.clear()
 
     if (data.length === 0) return
 
@@ -145,6 +152,38 @@
     })
     polylineLayer.addOverlay(polyline)
 
+
+    data.forEach((item, index) => {
+        const [lng, lat] = item
+        let position = new DC.Position(lng, lat)
+
+        console.log(lng, lat)
+        let billboard = null
+
+        if (index === 0) {
+            billboard = new DC.Billboard(position, startPng)
+        }
+
+        if (index === data.length - 1) {
+            billboard = new DC.Billboard(position, endPng)
+        }
+
+
+        billboard && (billboard.size = [20, 20])
+        billboard && (billboard.setStyle({
+            "pixelOffset": { "x": 0, "y": -8 }
+        }))
+        billboard && polylineLayer.addOverlay(billboard)
+
+        if (index !== 0 && index !== data.length - 1) {
+            let divIcon = new DC.DivIcon(
+                position,
+                `<div class="point-icon-box">${index}</div>`
+            )
+            pointHtmlLayer.addOverlay(divIcon)
+        }
+    })
+
     const line = turf.lineString(positionStr.split(';').map(i => i.split(',')))
     const bbox = turf.bbox(line)
     const bboxPolygon = turf.bboxPolygon(bbox)
diff --git a/src/styles/common.scss b/src/styles/common.scss
index 75458d0..df04e57 100644
--- a/src/styles/common.scss
+++ b/src/styles/common.scss
@@ -13,8 +13,7 @@
 .avue-sidebar,
 .avue-top,
 .avue-logo,
-.avue-layout
-.login-logo,
+.avue-layout .login-logo,
 .avue-main {
   transition: all .3s;
 }
@@ -32,7 +31,9 @@
       height: $top_height;
       display: flex;
 
-      .avue-menu, .el-menu-item, .el-sub-menu__title {
+      .avue-menu,
+      .el-menu-item,
+      .el-sub-menu__title {
         height: $top_height;
         line-height: $top_height;
       }
@@ -57,6 +58,7 @@
 }
 
 .avue--collapse {
+
   .avue-sidebar,
   .avue-logo {
     width: $sidebar_collapse;
@@ -130,3 +132,23 @@
 @import './media.scss';
 //滚动条样式
 @include scrollBar;
+
+
+// 地图区域html标签样式调整
+.div-icon {
+  padding: 0px !important;
+  border: none !important;
+  background: transparent !important;
+  border-radius: 50% !important;
+
+  .point-icon-box {
+    width: 28px;
+    height: 28px;
+    line-height: 28px;
+    text-align: center;
+    font-size: 16px;
+    color: #fff;
+    background: rgb(255, 186, 0);
+    border-radius: 50%;
+  }
+}
\ No newline at end of file
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index e5353bb..7590566 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -87,8 +87,8 @@
                     @click="rejectDetail(row.id)">驳回原因</el-button>
                 </div>
                 <!--草稿-->
-                <div v-if="row.status == 0 && userInfo.user_id == row.create_user">
-                  <el-button class="edit-btn" type="text" icon="el-icon-edit-outline"
+                <div>
+                  <el-button class="edit-btn" type="text" icon="el-icon-edit"
                     @click="handleViewDetail(row)">编辑</el-button>
                   <el-button class="publish-btn" type="text" icon="el-icon-position"
                     @click="userPublishPush(row.id)">发布</el-button>
@@ -189,7 +189,7 @@
 
         <el-row>
           <div class="add-box-btns">
-            <el-button type="danger" @click="submitForm(1)">发布</el-button>
+            <el-button type="danger" @click="submitForm(1)">发起</el-button>
             <el-button type="primary" @click="submitForm(0)">存草稿</el-button>
           </div>
         </el-row>
@@ -923,7 +923,7 @@
 
       this.detailVisible = true
 
-      this.initMapLine()
+      this.initMapLine(data.device_map_infos)
     },
     async handleCheckDetail (row) {
       const response = await orderLogDetails(row.id)
@@ -936,7 +936,7 @@
       // 更新机巢列表
       this.device_sns = data.device_list
       this.detailVisibleCopy = true
-      this.initMapLine()
+      this.initMapLine(data.device_map_infos)
     },
     //导出
     async exportData () {
@@ -1010,7 +1010,7 @@
       this.initMapLine()
     },
 
-    initMapLine () {
+    initMapLine (infos = {}) {
       let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id)
 
       if (!currentLine) return
@@ -1038,6 +1038,11 @@
           return item.Point.coordinates.split(',')
         })
 
+        if (JSON.stringify(infos) != '{}') positions.unshift([
+          infos[0].longitude,
+          infos[0].latitude,
+        ])
+
         this.$nextTick(() => {
           if (this.$refs.MapContainer && this.$refs.MapContainer.initAddEntity) {
             this.$refs.MapContainer.initAddEntity('polyline', positions)

--
Gitblit v1.9.3