Merge branch 'develop' of http://s16s652780.51mypc.cn:49896/r/yskj/iot_drone_web into develop
4 files modified
1 files added
| | |
| | | import { TaskType, TaskStatus, OutOfControlAction } from '/@/types/task' |
| | | import { WaylineType } from '/@/types/wayline' |
| | | |
| | | const HTTP_PREFIX = '/wayline/api/v1' |
| | | const HTTP_PREFIX = 'drone/waylineFile' |
| | | |
| | | // Get Wayline Files |
| | | export const getWaylineFiles = async function (wid: string, body: {}): Promise<IWorkspaceResponse<any>> { |
| | |
| | | |
| | | // Upload Wayline file |
| | | export const importKmzFile = async function (workspaceId: string, file: {}): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/workspaces/${workspaceId}/waylines/file/upload` |
| | | const url = `api/${HTTP_PREFIX}/upload` |
| | | const result = await request.post(url, file, { |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data', |
| | |
| | | import { status, projectCard } from './data' |
| | | import { del, edit } from '/@/api/project-page' |
| | | import { Modal, message } from 'ant-design-vue' |
| | | import { useMyStore} from "/@/store"; |
| | | const store = useMyStore() |
| | | const router = useRouter() |
| | | const emit = defineEmits(['refreshList', 'update:modelValue']) |
| | | const props = defineProps({ |
| | |
| | | |
| | | const goDetail = (item: any) => { |
| | | console.log(11) |
| | | store.commit('SET_PROJECT_ID', item.id) |
| | | router.push({ |
| | | name: ERouterName.WORKSPACE, |
| | | query: { id: item.id } |
| | |
| | | |
| | | const loading = ref(false) |
| | | const store = useMyStore() |
| | | const projectId = store.state.common.projectId |
| | | const pagination :IPage = { |
| | | page: 1, |
| | | total: -1, |
| | |
| | | fileList.value.forEach(async (file: FileItem) => { |
| | | const fileData = new FormData() |
| | | fileData.append('file', file, file.name) |
| | | await importKmzFile(workspaceId, fileData).then((res) => { |
| | | await importKmzFile(projectId, fileData).then((res) => { |
| | | if (res.code === 0) { |
| | | message.success(`${file.name} file uploaded successfully`) |
| | | canRefresh.value = true |
| New file |
| | |
| | | import { MutationTree } from 'vuex' |
| | | |
| | | const state = () => ({ |
| | | projectId: null as string | null |
| | | }) |
| | | export type RootStateType = ReturnType<typeof state> |
| | | const mutations: MutationTree<RootStateType> = { |
| | | SET_PROJECT_ID (state, projectId: string) { |
| | | state.projectId = projectId |
| | | }, |
| | | } |
| | | export default { |
| | | state, |
| | | mutations |
| | | } |
| | |
| | | import getter from './getters' |
| | | import { DevicesCmdExecuteInfo } from '/@/types/device-cmd' |
| | | import map from './map' |
| | | import common from "/@/store/common"; |
| | | |
| | | const initStateFunc = () => ({ |
| | | Layers: [ |
| | |
| | | actions, |
| | | modules: { |
| | | getter, |
| | | map |
| | | map, |
| | | common |
| | | }, |
| | | } |
| | | |