| | |
| | | }); |
| | | }) |
| | | console.log(this.treeData) |
| | | this.dialogVisible = false |
| | | // const dealArr = this.submitDealData() |
| | | const transformed = this.treeData.map((ground, index) => { |
| | | const pointNumber = index + 1; |
| | |
| | | longitude: ground.longitude, |
| | | pointNumber: 1, |
| | | targetName: ground.label, |
| | | actions:child.actions.map((item, index) => ({ |
| | | actionIndex: index.toString(), |
| | | actionType: typeDictionary[item.type] || "", // 如果类型不存在字典中,默认空字符串 |
| | | actionValue: item.extra.value |
| | | })) |
| | | // actions:child.actions.map((item, index) => ({ |
| | | // actionIndex: index.toString(), |
| | | // actionType: typeDictionary[item.type] || "", // 如果类型不存在字典中,默认空字符串 |
| | | // actionValue: item.extra.value |
| | | // })) |
| | | actions:child.actions.map(action => { |
| | | console.log(action) |
| | | switch (action.type) { |
| | | case "悬停": |
| | | return { hoverTime: parseFloat(action.extra.value) }; |
| | | case "变倍": |
| | | return { zoom: parseFloat(action.extra.value) }; |
| | | case "开始录像": |
| | | return { startRecord: true }; |
| | | case "结束录像": |
| | | return { stopRecord: true }; |
| | | case "拍照": |
| | | // const [takePhotoType, useGlobalImageFormat] = action.actionValue.split('-'); |
| | | return { |
| | | takePhotoType: 0, |
| | | useGlobalImageFormat: 0 |
| | | }; |
| | | default: |
| | | return {}; |
| | | } |
| | | }) |
| | | } |
| | | ], |
| | | latitude: child.latitude, |
| | |
| | | message: '新增模板成功', |
| | | type: 'success' |
| | | }) |
| | | this.dialogVisible = false |
| | | this.$emit('on-submit') |
| | | this.$emit('close') |
| | | } |