From 91f425a9e4c11016dccd78186a4ab0dec3c49870 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Wed, 27 Mar 2024 17:50:29 +0800
Subject: [PATCH] update

---
 src/components/waylinetool/event-edit.vue |  110 +++++++++++--------------------------------------------
 1 files changed, 22 insertions(+), 88 deletions(-)

diff --git a/src/components/waylinetool/event-edit.vue b/src/components/waylinetool/event-edit.vue
index c708160..a9b1b8b 100644
--- a/src/components/waylinetool/event-edit.vue
+++ b/src/components/waylinetool/event-edit.vue
@@ -12,34 +12,7 @@
         </div>
       </div>
       <div class="event-edit">
-        <!-- 单拍 -->
-        <template v-if="currentPointEvent.aciton.key === 'takePhoto'">
-          <div class="take-photo">
-            <div class="title">
-              <span
-                :style="{
-                  color: isTakePhotoNameShow || takePhotoSetting.fileSuffix ? 'rgba(255,255,255,0.4)' : '#fff',
-                }"
-                >DJI_YYYYMMDDhhmm_XXX_</span
-              >
-              <span @click="isTakePhotoNameShow = !isTakePhotoNameShow"><EditOutlined /></span>
-            </div>
-            <div class="title-name-input" v-if="isTakePhotoNameShow">
-              <div class="input"><a-input size="small" v-model:value="takePhotoSetting.fileSuffix"></a-input></div>
-              <div class="btn">
-                <span class="check"><CheckOutlined /></span>
-                <span class="close"><CloseOutlined /></span>
-              </div>
-            </div>
-            <div class="photo-format">
-              <a-button type="primary" shape="round" size="small" @click="photoFormatClick('wide')">广角照片</a-button>
-              <a-button type="primary" shape="round" size="small" @click="photoFormatClick('zoom')">变焦照片</a-button>
-              <a-button type="primary" shape="round" size="small" @click="photoFormatClick('global')"
-                >跟随全局</a-button
-              >
-            </div>
-          </div>
-        </template>
+        <takePhoto v-model:serial="serial" v-if="currentPointEvent.aciton.key === 'takePhoto'" />
       </div>
     </div>
     <div class="map-box"></div>
@@ -48,10 +21,10 @@
 
 <script lang="ts" setup>
 import _ from 'lodash'
-import { DeleteOutlined, EditOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons-vue'
+import { DeleteOutlined } from '@ant-design/icons-vue'
 import { useMyStore } from '/@/store'
-import { actionList } from '/@/utils/cesium/use-map-draw'
 import { template as xmlTemplate } from '/@/utils/cesium/use-kmz-tsa'
+import takePhoto from './component/take-photo.vue'
 
 const store = useMyStore()
 // 事件编辑是否显示
@@ -87,51 +60,7 @@
   }
 })
 
-// 单拍
-const isTakePhotoNameShow = ref<boolean>(false)
-const takePhotoSetting = reactive({
-  fileSuffix: '',
-  payloadLensIndex: '',
-  useGlobalPayloadLensIndex: 0,
-})
-const photoFormatClick = (value: string) => {
-  if (value === 'global') {
-    takePhotoSetting.useGlobalPayloadLensIndex = 1
-  } else {
-    let formats = takePhotoSetting.payloadLensIndex.split(',')
-    const index = formats.findIndex((item: string) => item === value)
-    if (index === -1) {
-      if (takePhotoSetting.payloadLensIndex === '') {
-        formats = [value]
-      } else {
-        formats.push(value)
-      }
-    } else {
-      formats.splice(index, 1)
-    }
-    takePhotoSetting.payloadLensIndex = formats.join(',')
-  }
-  addActionParam(takePhotoSetting)
-}
-
 const handleDelAction = () => {}
-
-// 加入事件参数
-const addActionParam = <T extends { [key: string] : string }, >(params: T): void => {
-  const obj = _.cloneDeep(params)
-  const placemarks = xmlTemplate.value.Folder.Placemark
-  let aciton = placemarks[serial.placemark].actionGroup?.action
-  if (Array.isArray(aciton)) {
-    aciton = aciton[serial.action]
-  }
-  console.log(aciton)
-  const actionActuatorFuncParam = aciton.actionActuatorFuncParam
-  // Object.keys(obj).forEach((key: string) => {
-  //   if (!obj[key]) {
-  //     delete obj[key]
-  //   }
-  // })
-}
 </script>
 
 <style lang="scss" scoped>
@@ -184,7 +113,7 @@
       height: calc(100% - 50px);
       padding: 15px;
       overflow: auto;
-      // 单排
+      // 单拍
       .take-photo {
         .title {
           display: flex;
@@ -230,19 +159,24 @@
             }
           }
         }
-        .photo-format {
-          margin-top: 20px;
-          display: flex;
-          justify-content: flex-start;
-          .ant-btn {
-            margin-left: 10px;
-            font-weight: bold;
-            &:first-child {
-              margin: 0;
-            }
-            &:nth-child(3) {
-              margin-left: auto;
-            }
+      }
+
+      .btn-group {
+        margin-top: 20px;
+        display: flex;
+        justify-content: flex-start;
+        button {
+          margin-left: 10px;
+          font-weight: bold;
+          background-color: #409eff;
+          border-radius: 999px;
+          border: 0;
+          padding: 0 10px 0 10px;
+          &:first-child {
+            margin: 0;
+          }
+          &:nth-child(3) {
+            margin-left: auto;
           }
         }
       }

--
Gitblit v1.9.3