| | |
| | | <SelectOutlined /> |
| | | </a-button> |
| | | </a-upload> |
| | | <a-button type="text" style="color: white" @click="addWaylineDialogShow = true"> |
| | | <a-button type="text" v-if="!isPointListOpen" style="color: white" @click="addWaylineDialogShow = true"> |
| | | <template #icon> |
| | | <PlusOutlined /> |
| | | </template> |
| | |
| | | import { message } from 'ant-design-vue' |
| | | import { onMounted, UnwrapRef, reactive, ref } from 'vue' |
| | | import routeEdit from './components/route-edit/index.vue' |
| | | import { deleteWaylineFile, downloadWaylineFile, getWaylineFiles, importKmzFile, getWayLineFile } from '/@/api/wayline' |
| | | import { deleteWaylineFile, downloadWaylineFile, getWaylineFiles, importKmzFile, getWayLineFile, renameWaylineFile } from '/@/api/wayline' |
| | | import { ELocalStorageKey, ERouterName } from '/@/types' |
| | | import { EDeviceType } from '/@/types/device' |
| | | import { useMyStore } from '/@/store' |
| | |
| | | pagination.page++ |
| | | getWaylines() |
| | | }, 1000) |
| | | console.log(workspaceId.value) |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | |
| | | removeAllPoint() |
| | | // removeById('clickBox') |
| | | store.commit('SET_WAYLINE_INFO', { |
| | | isShow: false, |
| | | wayline: {}, |
| | | position: null, |
| | | isShow: false |
| | | }) |
| | | }) |
| | | |
| | |
| | | }) |
| | | // 清除选中点柱形和隐藏按钮 |
| | | store.commit('SET_WAYLINE_INFO', { |
| | | isShow: false, |
| | | wayline: {}, |
| | | position: null, |
| | | isShow: false |
| | | }) |
| | | // isPointListOpen.value = !isPointListOpen.value |
| | | } |
| | |
| | | function backPage () { |
| | | isPointListOpen.value = false |
| | | store.commit('SET_WAYLINE_INFO', { |
| | | isShow: false, |
| | | wayline: {}, |
| | | position: 0, |
| | | isShow: false |
| | | }) |
| | | } |
| | | |
| | |
| | | createWayline(values).then((createRes: any) => { |
| | | if (createRes) { |
| | | store.commit('SET_WAYLINE_KMZPATH', '') |
| | | isPointListOpen.value = !isPointListOpen.value |
| | | isPointListOpen.value = true |
| | | closeAddWaylineDialog() |
| | | addWaylineDialogShow.value = false |
| | | } else { |
| | | message.error('创建航线失败,错误码:', createRes) |
| | | } |
| | |
| | | editVisible.value = true |
| | | } |
| | | |
| | | const handleEditName = () => { |
| | | const handleEditName = async () => { |
| | | const renameRes = await renameWaylineFile(workspaceId.value, currentWayLine.value.id, currentWayLine.value.name) |
| | | if (renameRes.code !== 0) return message.error(renameRes.message) |
| | | message.success('修改文件名成功') |
| | | editVisible.value = false |
| | | } |
| | | </script> |