| | |
| | | import docSvg from '@/static/images/doc.png' |
| | | import lbBottomPng from '@/static/images/lb_bottom.png' |
| | | import { sysNoticePageInfoApi, droneFlightTaskApi } from '@/api/index' |
| | | import { flightTaskApi,flightRulesApi,flightModeApi,flightPlanApi,flyActivityStatusApi,proTypeApi} from '@/api/index' |
| | | |
| | | import { useAppStore } from "@/store"; |
| | | const appStore = useAppStore() |
| | | |
| | | const lbList = reactive([]); |
| | | // lbPng 轮播图 5次 |
| | | for (let i = 0; i < 5; i++) { |
| | |
| | | announcementList.value = res.data.data.records.map(item => ({ |
| | | ...item, |
| | | title: item.taskName, |
| | | description: item.remark, |
| | | description: item.noticeDesc, |
| | | time: item.createTime, |
| | | num: item.num, |
| | | like: item.like, |
| | |
| | | current: 1, |
| | | size: 3, |
| | | noticeType: val, |
| | | isAsc: true |
| | | }) |
| | | // 只需要取前3条 公告 |
| | | if (val === 1) { |
| | |
| | | }) |
| | | } |
| | | |
| | | // 获取任务类型 |
| | | const actionsFlightTaskType = ref([]) |
| | | function getTaskType() { |
| | | flightTaskApi().then(res => { |
| | | actionsFlightTaskType.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setTaskType(actionsFlightTaskType.value) |
| | | }) |
| | | } |
| | | // 获取飞行模式 |
| | | const actionsFlightMode = ref([]) |
| | | function getFlightMode() { |
| | | flightModeApi().then(res => { |
| | | actionsFlightMode.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setFlightMode(actionsFlightMode.value) |
| | | }) |
| | | } |
| | | // 获取飞行规则 |
| | | const actionsFlightRule = ref([]) |
| | | function getFlightRules() { |
| | | flightRulesApi().then(res => { |
| | | actionsFlightRule.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setFlightRules(actionsFlightRule.value) |
| | | }) |
| | | } |
| | | // 获取飞行计划 |
| | | const actionsPlanType = ref([]) |
| | | function getFlightPlan() { |
| | | flightPlanApi().then(res => { |
| | | actionsPlanType.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setFlightPlan(actionsPlanType.value) |
| | | }) |
| | | } |
| | | // 获取审批状态 |
| | | const flyActivityStatus = ref([]) |
| | | function getFlyActivityStatus() { |
| | | flyActivityStatusApi().then(res => { |
| | | flyActivityStatus.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setFlyActivityStatus(flyActivityStatus.value) |
| | | }) |
| | | } |
| | | |
| | | // 获取飞行器类型 |
| | | const typeList = ref([]) |
| | | function getProTypeApi() { |
| | | proTypeApi().then(res => { |
| | | typeList.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | // 存储到store |
| | | appStore.setProType(typeList.value) |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getFlightAirspaceList() |
| | | getSysNoticeList(2) |
| | | getSysNoticeList(1) |
| | | |
| | | // 获取字典 |
| | | getTaskType() |
| | | getFlightMode() |
| | | getFlightRules() |
| | | getFlightPlan() |
| | | getFlyActivityStatus() |
| | | getProTypeApi() |
| | | }) |
| | | </script> |
| | | |
| | |
| | | justify-content: space-between; |
| | | font-weight: 400; |
| | | font-size: 13px; |
| | | color: #86909C; |
| | | color: #86909C; |
| | | margin-top: 10rpx; |
| | | } |
| | | } |