| | |
| | | const selectedPoint = ref<number | null>(null) |
| | | |
| | | // 对应事件 |
| | | const eventList: any = reactive<{ |
| | | const eventList = reactive<{ |
| | | key: string, |
| | | name: string, |
| | | icon?: string |
| | |
| | | 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', |
| | |
| | | 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) => { |
| | |
| | | }) |
| | | 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) |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } |