GuLiMmo
2023-12-01 d63e1aaf1d33925b534e5fc9a708160cd13c0874
src/pages/page-web/projects/wayline.vue
@@ -187,7 +187,7 @@
const selectedPoint = ref<number | null>(null)
// 对应事件
const eventList: any = reactive<{
const eventList = reactive<{
  key: string,
  name: string,
  icon?: string
@@ -206,6 +206,16 @@
    key: 'stopRecord',
    name: '结束录像',
    icon: getResource('waylinetool/camera-off.png'),
  },
  {
    key: 'time',
    name: '开始等时间隔拍照',
    icon: getResource('waylinetool/shoot1.png'),
  },
  {
    key: 'distance',
    name: '开始等距间隔拍照',
    icon: getResource('waylinetool/shoot2.png'),
  },
  {
    key: 'zoom',
@@ -550,6 +560,8 @@
      const actionGroupReg = /<wpml:actionGroup>([\s\S]*?)<\/wpml:actionGroup>/g
      // 查找单个事件reg
      const actionRegx = /<wpml:action>([\s\S]*?)<\/wpml:action>/g
      // 获取shootType
      const shootTypeRegx = /<wpml:shootType>([\s\S]*?)<\/wpml:shootType>/g
      // 当前kmz文件航点
      const kmlPoints = kml.match(regx)
      kmlPoints?.forEach((point: string, index: number) => {
@@ -566,6 +578,15 @@
          })
          tragetPointArr.value[index].eventList = eventArr
        }
        // 获取当前是否存在拍照模式
        const pointShootTypeKML = point.match(shootTypeRegx)
        if (pointShootTypeKML) {
          pointShootTypeKML.forEach((type: string) => {
            eventList.forEach((item: any) => {
              type.includes(item.key) && eventArr.push(item)
            })
          })
        }
      })
    })
}