diff --git a/.cursor/rules/init.mdc b/.cursor/rules/init.mdc index 7e61260..3a2c34f 100644 --- a/.cursor/rules/init.mdc +++ b/.cursor/rules/init.mdc @@ -4,3 +4,5 @@ globs: alwaysApply: true --- 请使用中文回答我的问题 + +项目中使用了vue3、element-plus \ No newline at end of file diff --git a/src/api/task.ts b/src/api/task.ts index 1268bbf..2f07414 100644 --- a/src/api/task.ts +++ b/src/api/task.ts @@ -1,14 +1,13 @@ import http from "@/http" import { to } from "await-to-js" -/**航点数据 */ -export const queryPointRoutePreviewParam = (taskId: number) => to( - http.get("/pro_api/foreign/task/queryPointRoutePreviewParam", { - params: { taskId } -})) + +/**获取航线列表 */ +export const queryFlightRoutes = (params: any) => to( + http.get('/api/flight-routes', { params }) +) -/**航面数据 */ -export const queryRegionalPlanningPreviewParam = (taskId: number) => to( - http.get('/pro_api/foreign/task/queryRegionalPlanningPreviewParam', { - params: { taskId } -})) +/**获取航点航线预览参数*/ +export const queryWaypointRoutePreview= (params: any) => to( + http.get('/api/waypoint-route-preview', { params }) +) diff --git a/src/assets/img/end_point.svg b/src/assets/img/end_point.svg new file mode 100644 index 0000000..88b03ff --- /dev/null +++ b/src/assets/img/end_point.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/start_point.svg b/src/assets/img/start_point.svg new file mode 100644 index 0000000..daecdf4 --- /dev/null +++ b/src/assets/img/start_point.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/zfControlPlatform/eventList/index.vue b/src/components/zfControlPlatform/eventList/index.vue index f4d9d5f..a24c46a 100644 --- a/src/components/zfControlPlatform/eventList/index.vue +++ b/src/components/zfControlPlatform/eventList/index.vue @@ -14,7 +14,7 @@
- +
@@ -28,6 +28,7 @@ import { ref } from "vue" import titleView from "@/components/zfControlPlatform/titleView/index.vue" import selectView from "@/components/selectView/index.vue" import eventItem from "@/components/zfControlPlatform/eventList/eventItem.vue" +const scrollbarRef = ref() const eventType = ref() const options = ref([ { @@ -52,6 +53,10 @@ const options = ref([ }, ]) +const handleScroll = (e: any) => { + const scrollbar = scrollbarRef.value; + scrollbar.setScrollLeft(scrollbar.wrapRef.scrollLeft + (-e.wheelDelta)) +} \ No newline at end of file diff --git a/src/http/index.ts b/src/http/index.ts index 91bb6ef..cbfd74a 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -9,14 +9,14 @@ const request = axios.create({ }) request.interceptors.request.use((config) => { - config.headers.Authorization = userInfoStore.token + config.headers.Authorization = `Bearer ${userInfoStore.token}` return config }) request.interceptors.response.use( (res: AxiosResponse) => { if (res.data.code === 200) { - return res.data + return res.data.data } else { ElMessage({ type: "error", diff --git a/src/types/task.ts b/src/types/task.ts new file mode 100644 index 0000000..0bb8741 --- /dev/null +++ b/src/types/task.ts @@ -0,0 +1,12 @@ +export interface TaskItem { + description: string; + edit: boolean; + id: string; + loading_name: string; + name: string; + route_id: string; + type: string; + uav_loading_id: string; + update_time: string | null; + username: string | null; +}