| | |
| | | }) |
| | | |
| | | const root = getRoot() |
| | | const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId)! |
| | | const workspaceId = computed(() => store.state.common.projectId) |
| | | const deleteTip = ref(false) |
| | | const deleteWaylineId = ref<string>('') |
| | | const canRefresh = ref(true) |
| | |
| | | return |
| | | } |
| | | canRefresh.value = false |
| | | getWaylineFiles(workspaceId, { |
| | | getWaylineFiles(workspaceId.value, { |
| | | page: pagination.page, |
| | | page_size: pagination.page_size, |
| | | order_by: 'update_time desc' |
| | |
| | | |
| | | function downloadWayline (waylineId: string, fileName: string) { |
| | | loading.value = true |
| | | downloadWaylineFile(workspaceId, waylineId).then(res => { |
| | | downloadWaylineFile(workspaceId.value, waylineId).then(res => { |
| | | if (!res) { |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | function selectRoute (wayline: WaylineFile) { |
| | | store.commit('SET_SELECT_WAYLINE_INFO', wayline) |
| | | loading.value = true |
| | | downloadWaylineFile(workspaceId.value, wayline.id).then(res => { |
| | | store.commit('SET_SELECT_WAYLINE_INFO', wayline) |
| | | console.log(res, 'res') |
| | | }).finally(() => { |
| | | loading.value = false |
| | | }) |
| | | } |
| | | |
| | | function onScroll (e: any) { |
| | |
| | | fileList.value.forEach(async (file: FileItem) => { |
| | | const fileData = new FormData() |
| | | fileData.append('file', file, file.name) |
| | | await importKmzFile(workspaceId, fileData).then((res) => { |
| | | await importKmzFile(workspaceId.value, fileData).then((res) => { |
| | | if (res.code === 0) { |
| | | message.success(`${file.name} file uploaded successfully`) |
| | | canRefresh.value = true |