| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 我的空域查询 |
| | | export const droneFlightTaskApi = data => { |
| | | return request({ |
| | | url: `/webservice/droneFlightTask/pageInfoOfMy`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import LeafletMap from '@/appComponents/LeafletMap/index.vue' |
| | | import LeafletMap from '@/appComponents/LeafletMap/indexWX.vue' |
| | | import SearchBar from './searchBar.vue' |
| | | import { useRoute } from 'vue-router' |
| | | const route = useRoute() |
| | |
| | | |
| | | <van-list v-else :finished="finished" :finished-text="finishedText"> |
| | | <div class="list-item" v-for="item in list" :key="item" @click="flyToAddress(item)"> |
| | | <div class="name">{{ item.airspaceName }}</div> |
| | | <div class="name">{{ item.taskName }}</div> |
| | | <div class="item"> |
| | | <div class="laber">空域管制时间</div> |
| | | <div class="value">{{item.createTime}}</div> |
| | | <div class="value"> |
| | | <div>{{item.plannedStartTime}}</div> |
| | | <div>{{item.plannedEndTime}}</div> |
| | | </div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="laber">空域管制类型</div> |
| | |
| | | import { showToast } from 'vant' |
| | | import _ from 'lodash' |
| | | import { searchWithPlugin } from '@/utils/util' |
| | | import { getAirspaceDetail } from '@/api/map/address' |
| | | import { droneFlightTaskApi } from '@/api/map/address' |
| | | import { useStore } from 'vuex' |
| | | import EventBus from '@/utils/eventBus' |
| | | import { gcj02ToWgs84 } from '@/utils/coordinateTransformation' |
| | |
| | | |
| | | // 使用新接口搜索地址 |
| | | const searchWithNewAPI = () => { |
| | | // 获取微信小程序带过来的头部参数 |
| | | console.log(route.query, '9999') |
| | | // 构建请求参数,搜索框为空时不传递airspaceName |
| | | const params = { |
| | | current: 1, |
| | | size: 9999 |
| | | size: 10, |
| | | taskName: route.query.taskName || '', |
| | | status: '', |
| | | // id: route.query.id || '', |
| | | } |
| | | if (searchVal.value.trim() !== '') { |
| | | params.airspaceName = searchVal.value |
| | | params.taskName = searchVal.value |
| | | } |
| | | |
| | | getAirspaceDetail(params).then(res => { |
| | | droneFlightTaskApi(params).then(res => { |
| | | const data = res.data.data.records || [] |
| | | if (data && data.length > 0) { |
| | | list.value = data |
| | |
| | | }) |
| | | } |
| | | |
| | | // 我的空域查询 |
| | | export const droneFlightTaskApi = data => { |
| | | return request({ |
| | | url: `/webservice/droneFlightTask/pageInfoOfMy`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | | // 设备列表 |
| | | export const aircraftInfoPageInfoOfMyApi = data => { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // 我的设备 |
| | | export const myDevicePageInfoApi = params => { |
| | | return request({ |
| | | url: `/webservice/aircraftInfo/queryById/${params.id}`, |
| | | method: 'post', |
| | | params, |
| | | }) |
| | | } |
| | | // // 我的设备 |
| | | // export const myDevicePageInfoApi = params => { |
| | | // return request({ |
| | | // url: `/webservice/aircraftInfo/queryById/${params.id}`, |
| | | // method: 'post', |
| | | // params, |
| | | // }) |
| | | // } |
| | | |
| | | // 飞行申请列表 |
| | | export const flightPlanPageInfoApi = data => { |
| | |
| | | data, |
| | | }) |
| | | } |
| | | // 飞行申请详情 |
| | | export const flightPlanDetailsApi = id => { |
| | | return request({ |
| | | url: `/webservice/flightPlan/queryById/${id}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 航空器注册 |
| | | export const aircraftInfoSaveApi = data => { |
| | |
| | | url: `/webservice/aircraftInfo/save`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | // 注册器详情 |
| | | export const aircraftInfoDetailsApi = id => { |
| | | return request({ |
| | | url: `/webservice/aircraftInfo/queryById/${id}`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 下拉接口数据-飞行类型 |
| | | export const proTypeApi = () => { |
| | | return request({ |
| | | url: `/system/dict/data/type/pro_type`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 申报 警务 文旅 |
| | | export const flightTaskApi = () => { |
| | | return request({ |
| | | url: `/system/dict/data/type/flight_task`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 飞行规则 |
| | | export const flightRulesApi = () => { |
| | | return request({ |
| | | url: `/system/dict/data/type/flight_rules`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 飞行规则 视距内飞行 |
| | | export const flightModeApi = () => { |
| | | return request({ |
| | | url: `/system/dict/data/type/flight_mode`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // 飞行计划 一般 紧急 |
| | | export const flightPlanApi = () => { |
| | | return request({ |
| | | url: `/system/dict/data/type/flight_plan`, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 无人机厂商 |
| | | export const manufacturerInfoApi = data => { |
| | | return request({ |
| | | url: `/webservice/webservice/manufacturerInfo/pageInfo`, |
| | | method: 'post', |
| | | data, |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "flightApplication/details", |
| | | "style": { |
| | | "navigationBarTitleText": "飞行详情" |
| | | } |
| | | }, |
| | | { |
| | | "path": "deviceRegistration/add", |
| | | "style": { |
| | | "navigationBarTitleText": "飞行器注册" |
| | | } |
| | | }, |
| | | { |
| | | "path": "deviceRegistration/details", |
| | | "style": { |
| | | "navigationBarTitleText": "飞行器详情" |
| | | } |
| | | }, |
| | | { |
| | | "path": "regulationsDetail/details", |
| | | "style": { |
| | | "navigationBarTitleText": "详情" |
| | |
| | | <view class="content"> |
| | | <view class="title">飞行设备</view> |
| | | <u-list :style="{ height: 'calc(100vh - 160rpx)' }" @scrolltolower="scrolltolower" :lower-threshold="50"> |
| | | <view class="card" v-for="(item, index) in equipmentList" :key="index"> |
| | | <view class="card" v-for="(item, index) in equipmentList" :key="index" @click="handleClick(item)"> |
| | | <view class="left"> |
| | | <u-image :src="droneSvg" mode="aspectFill" :width="70" :height="90"></u-image> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, ref } from 'vue' |
| | | import { onHide, onShow, onLoad } from "@dcloudio/uni-app"; |
| | | import lbPng from '@/static/images/lb.png' |
| | | import addSvg from '@/static/images/add.png' |
| | | import droneSvg from '@/static/images/drone.png' |
| | | import { myDevicePageInfoApi, aircraftInfoPageInfoOfMyApi } from '@/api/index.js' |
| | | import { aircraftInfoPageInfoOfMyApi } from '@/api/index.js' |
| | | const equipmentList = ref([]) |
| | | const noticeTitle = ref('') |
| | | const formParams = ref({ |
| | |
| | | console.error('获取设备列表失败:', error) |
| | | } |
| | | } |
| | | // 我的设备详情 |
| | | const getMyDeviceDetail = async (id) => { |
| | | try { |
| | | const res = await myDevicePageInfoApi({ id }) |
| | | if (res.code === 200) { |
| | | // 处理设备详情数据 |
| | | } |
| | | } catch (error) { |
| | | console.error('获取我的设备详情失败:', error) |
| | | } |
| | | // 设备详情 |
| | | const handleClick = (item) => { |
| | | uni.navigateTo({ |
| | | url: '/subPackages/deviceRegistration/details?id=' + item.id, |
| | | }) |
| | | } |
| | | |
| | | // 新增设备 |
| | | const addEquipment = () => { |
| | | uni.navigateTo({ |
| | | url: '/subPackages/deviceRegistration/add', |
| | | }) |
| | | } |
| | | |
| | | function scrolltolower() { |
| | | formParams.value.current++ |
| | | // 停止不刷新 |
| | |
| | | } |
| | | getEquipmentList() |
| | | } |
| | | onMounted(() => { |
| | | // onMounted(() => { |
| | | // getEquipmentList() |
| | | // }) |
| | | onShow(() => { |
| | | // 每次页面显示时重置为第一页并重新加载数据 |
| | | formParams.value.current = 1 |
| | | getEquipmentList() |
| | | }) |
| | | </script> |
| | |
| | | import flfgPng from '@/static/images/flfg.png' |
| | | import zczdPng from '@/static/images/zczd.png' |
| | | import docSvg from '@/static/images/doc.png' |
| | | import { sysNoticePageInfoApi, flightAirspacePageInfoApi } from '@/api/index' |
| | | import { sysNoticePageInfoApi, droneFlightTaskApi } from '@/api/index' |
| | | const lbList = reactive([]); |
| | | // lbPng 轮播图 5次 |
| | | for (let i = 0; i < 5; i++) { |
| | |
| | | // 获取空域信息列表 |
| | | async function getFlightAirspaceList() { |
| | | try { |
| | | const res = await flightAirspacePageInfoApi({ |
| | | const res = await droneFlightTaskApi({ |
| | | current: 1, |
| | | size: 10, |
| | | }) |
| | | announcementList.value = res.data.data.records.slice(0, 3).map(item => ({ |
| | | ...item, |
| | | title: item.airspaceName, |
| | | title: item.taskName, |
| | | description: item.remark, |
| | | time: item.createTime, |
| | | num: item.num, |
| | |
| | | // 跳转到空域信息详情页 |
| | | function airspaceClick(item) { |
| | | uni.navigateTo({ |
| | | url: '/subPackages/regulationsDetail/details?id=' + item.id, |
| | | url: '/subPackages/airspaceInformation/index?taskName=' + item.taskName, |
| | | }) |
| | | } |
| | | // 跳转到法律政策详情页 |
| | |
| | | <script setup> |
| | | import { getWebViewUrl } from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | import { onHide, onShow } from "@dcloudio/uni-app"; |
| | | import { onHide, onShow, onLoad } from "@dcloudio/uni-app"; |
| | | // const viewUrl = getWebViewUrl("/defaultMap"); |
| | | |
| | | let envParam = ""; |
| | |
| | | // #endif |
| | | |
| | | const updateKey = ref(0); |
| | | const viewUrl = computed(() => { |
| | | return getWebViewUrl("/airMap", { |
| | | isWeb: envParam, |
| | | updateKey: updateKey.value, |
| | | }); |
| | | }); |
| | | const viewUrl = ref('') |
| | | // computed(() => { |
| | | // return getWebViewUrl("/airMap", { |
| | | // isWeb: envParam, |
| | | // updateKey: updateKey.value, |
| | | // }); |
| | | // }); |
| | | |
| | | const onPostMessage = (data) => { |
| | | // #ifdef MP-WEIXIN |
| | | if (data.type === "scanCode") { |
| | | } else if (data.type === "jumpAddWork") { |
| | | } else if (data.type === "jumpMapNav") { |
| | | //事件导航 |
| | | } else if (data.type === "workid") { |
| | | //事件详情 |
| | | } |
| | | // #endif |
| | | |
| | | // #ifndef MP-WEIXIN |
| | | if (data.type === "scanCode") { |
| | | uni.navigateTo({ |
| | | url: "/subPackages/qrCode/index", |
| | | }); |
| | | } else if (data.type === "jumpAddWork") { |
| | | //新建任务 |
| | | const encodedData = encodeURIComponent(JSON.stringify(data.rowItem)); |
| | | uni.setStorageSync("webview_params", encodedData); |
| | | uni.navigateTo({ |
| | | url: `/subPackages/taskDetail/addTask/index`, |
| | | }); |
| | | } else if (data.type === "jumpMapNav") { |
| | | //事件导航 |
| | | uni.navigateTo({ |
| | | url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`, |
| | | }); |
| | | } else if (data.type === "workid") { |
| | | //事件详情 |
| | | uni.navigateTo({ |
| | | url: `/subPackages/workDetail/index?eventNum=${data.eventNum}`, |
| | | }); |
| | | } |
| | | // #endif |
| | | console.log('4444', data) |
| | | }; |
| | | |
| | | onShow(() => { |
| | | // #ifndef MP-WEIXIN |
| | | onShow(() => {}); |
| | | |
| | | // #endif |
| | | }); |
| | | onLoad((queryParams) => { |
| | | viewUrl.value = getWebViewUrl("/airMap", { |
| | | taskName: queryParams.taskName || '', |
| | | }); |
| | | }) |
| | | |
| | | onHide(() => { |
| | | updateKey.value = updateKey.value + 1; |
| | |
| | | <u-form-item |
| | | label="持有人" |
| | | labelWidth="200rpx" |
| | | prop="aircraftName" |
| | | prop="holder" |
| | | :borderBottom="true" |
| | | ref="item1" |
| | | > |
| | | <u-input |
| | | v-model="formParams.aircraftName" |
| | | v-model="formParams.holder" |
| | | border="none" |
| | | placeholder="请输入" |
| | | ></u-input> |
| | |
| | | @cancel="isShowRegion = false" |
| | | ></u-cascader> |
| | | </u-form> |
| | | <u-button @click="submitForm" color="#1D6FE9">提交</u-button> |
| | | <u-button :disabled="isSubmitDisabled" @click="submitForm" color="#1D6FE9">提交</u-button> |
| | | <!-- <u-button class="submit-button-wrapper" color="#1D6FE9" size="large" @click="submitForm"> |
| | | 注册 |
| | | </u-button> --> |
| | | </view> |
| | | </template> |
| | | <script setup> |
| | | import { aircraftInfoSaveApi,uploadFileApi,areaDataApi } from '@/api/index' |
| | | import { aircraftInfoSaveApi,uploadFileApi, areaDataApi, proTypeApi, manufacturerInfoApi } from '@/api/index' |
| | | import { ref, computed, onMounted } from 'vue' |
| | | import dayjs from 'dayjs' |
| | | |
| | |
| | | // 所属区域确认 |
| | | const onRegionConfirm = (e) => { |
| | | console.log(e,'888') |
| | | formParams.value.region = e?.join(',')[2] || '' // 用逗号分隔的区域码 |
| | | formParams.value.region = e[2] || '' // 用逗号分隔的区域码 |
| | | // 通过arrRegion的数组值为[36,3608,360824] 从areaData里面反查出名称 |
| | | const regionNames = findRegionNamesByCodes(e, areaData.value) |
| | | console.log(regionNames, '77777') |
| | | formParams.value.regionText = regionNames.join('-') || '' // 用连字符连接的区域名称 |
| | | isShowRegion.value = false |
| | | isShowRegion.value = false |
| | | } |
| | | // 是否有保险 |
| | | const actionsHasInsurance = ref([ |
| | |
| | | } |
| | | // 飞行器厂商 |
| | | const showManufacturer = ref(false); |
| | | const manufacturerList = ref([ |
| | | { |
| | | label: 'A厂商', |
| | | value: 'A厂商' |
| | | }, |
| | | { |
| | | label: 'B厂商', |
| | | value: 'B厂商' |
| | | }, |
| | | ]) |
| | | const manufacturerList = ref([]) |
| | | // 选择飞行器厂商 |
| | | const onPickerConfirmManufacturer = (e) => { |
| | | const selected = e.value[0] |
| | |
| | | } |
| | | // 飞行器型号 |
| | | const showType = ref(false); |
| | | const typeList = ref([ |
| | | { |
| | | label: 'A型号', |
| | | value: 'A型号' |
| | | }, |
| | | { |
| | | label: 'B型号', |
| | | value: 'B型号' |
| | | }, |
| | | ]) |
| | | const typeList = ref([]) |
| | | // 选择飞行器型号 |
| | | const onPickerConfirmType = (e) => { |
| | | const selected = e.value[0] |
| | |
| | | }); |
| | | } |
| | | // 提交表单 |
| | | const isSubmitDisabled = ref(false) |
| | | const submitForm = async () => { |
| | | try { |
| | | if (await formRef.value.validate()) { |
| | | isSubmitDisabled.value = true |
| | | const res = await aircraftInfoSaveApi(formParams.value) |
| | | if (res.data.code === 200) { |
| | | isSubmitDisabled.value = false |
| | | uni.showToast({ |
| | | title: '航空器注册成功', |
| | | icon: 'success' |
| | |
| | | // 这里可以添加额外的失败处理逻辑 |
| | | } |
| | | } |
| | | // 获取飞行器类型 |
| | | function getProTypeApi() { |
| | | proTypeApi().then(res => { |
| | | typeList.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel, |
| | | value: item.dictValue |
| | | })) |
| | | }) |
| | | } |
| | | // 获取无人机厂商 |
| | | function getManufacturerInfoApi() { |
| | | manufacturerInfoApi({ |
| | | current: 1, |
| | | size: 1000, |
| | | }).then(res => { |
| | | manufacturerList.value = res.data.data.records.map(item => ({ |
| | | ...item, |
| | | label: item.unitName, |
| | | value: item.id, |
| | | })) |
| | | }) |
| | | } |
| | | onMounted(async () => { |
| | | getProTypeApi() |
| | | getManufacturerInfoApi() |
| | | // 动态导入xzqhData,确保在使用前已初始化 |
| | | const { xzqhData } = await import('@/static/xzqh/index') |
| | | // console.log(xzqhData,'9999') |
| | | // xzqhData.map 循环三层 |
| | | // 第一层:省份 |
| | | // 第二层:城市 |
| | | // 第三层:区县 |
| | | areaData.value = xzqhData |
| | | // xzqhData.map(item => ({ |
| | | // label: item.name, |
| | | // value: item.code, |
| | | // children: item.children.map(child => ({ |
| | | // label: child.name, |
| | | // value: child.code, |
| | | // children: child.children?.map(district => ({ |
| | | // label: district.name, |
| | | // value: district.code |
| | | // })) || [] |
| | | // })) |
| | | // })) |
| | | // console.log(areaData.value, '8888') |
| | | |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"> |
| | |
| | | @cancel="isShowFlightRouteInfo = false" |
| | | /> |
| | | </u-form> |
| | | <u-button @click="submitForm" color="#1D6FE9">飞行申请</u-button> |
| | | <u-button :disabled="isSubmitDisabled" @click="submitForm" color="#1D6FE9">飞行申请</u-button> |
| | | <!-- 飞任务类型 --> |
| | | <view class="attention"> |
| | | 注:新增空域/航线/飞手等前往吉安市低空经济服务一体化 |
| | |
| | | </view> |
| | | </template> |
| | | <script setup> |
| | | import { flightPlanSaveApi, flightRoutePageInfoApi, aircraftInfoPageInfoOfMyApi, pilotInfoPageInfoOfMyApi, flightAirspacePageInfoApi, uploadFileApi } from '@/api/index' |
| | | import { flightPlanSaveApi, |
| | | flightRoutePageInfoApi, |
| | | aircraftInfoPageInfoOfMyApi, |
| | | pilotInfoPageInfoOfMyApi, |
| | | droneFlightTaskApi, |
| | | uploadFileApi, |
| | | flightTaskApi,flightRulesApi,flightModeApi,flightPlanApi |
| | | } from '@/api/index' |
| | | import { ref, computed, onMounted } from 'vue' |
| | | import dayjs from 'dayjs' |
| | | |
| | |
| | | planType: '', // 计划类型 |
| | | planTypeText: '', // 计划类型文本 |
| | | contactPerson: '', // 联系人 |
| | | contactPhon: '', // 联系人电话 |
| | | contactPhone: '', // 联系人电话 |
| | | undertaker: '', // 承办人 |
| | | undertakerPhone: '', // 承办人电话 |
| | | timeRange: '', // 时间范围 |
| | |
| | | contactPerson: [ |
| | | { required: true, message: '请输入联系人', trigger: 'blur' } |
| | | ], |
| | | contactPhon: [ |
| | | contactPhone: [ |
| | | // 验证手机号码 |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | const reg = /^1[3456789]\d{9}$/ |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请输入正确的手机号码')) |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | }, |
| | | { required: true, message: '请输入联系人电话', trigger: 'blur' } |
| | | ], |
| | | undertaker: [ |
| | | { required: true, message: '请输入承办人', trigger: 'blur' } |
| | | ], |
| | | undertakerPhone: [ |
| | | // 验证手机号码 |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | const reg = /^1[3456789]\d{9}$/ |
| | | if (!reg.test(value)) { |
| | | callback(new Error('请输入正确的手机号码')) |
| | | } else { |
| | | callback() |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | }, |
| | | { required: true, message: '请输入承办人联系电话', trigger: 'blur' } |
| | | ], |
| | | startTime: [ |
| | |
| | | }) |
| | | // 任务类型 |
| | | const isShowFlightTaskType = ref(false) |
| | | const actionsFlightTaskType = [ |
| | | { |
| | | label: '警务', |
| | | value: '警务', |
| | | }, |
| | | { |
| | | label: '文旅', |
| | | value: '文旅', |
| | | }, |
| | | { |
| | | label: '航拍', |
| | | value: '航拍', |
| | | }, |
| | | { |
| | | label: '物流', |
| | | value: '物流', |
| | | }, |
| | | { |
| | | label: '巡检', |
| | | value: '巡检', |
| | | }, |
| | | { |
| | | label: '植保', |
| | | value: '植保', |
| | | }, |
| | | ] |
| | | const actionsFlightTaskType = ref([]) |
| | | const onPickerFlightTaskType = (e) => { |
| | | const selected = e.value[0] |
| | | formParams.value.flightTaskType = selected.value |
| | |
| | | |
| | | // 飞行规则 |
| | | const isShowFlightRule = ref(false) |
| | | const actionsFlightRule = [ |
| | | { |
| | | label: '目视餡相飞行规则(VFR)', |
| | | value: '目视餡相飞行规则(VFR)', |
| | | }, |
| | | { |
| | | label: '仪表飞行规则(IFR)', |
| | | value: '仪表飞行规则(IFR)', |
| | | }, |
| | | ] |
| | | const actionsFlightRule = ref([]) |
| | | const onPickerFlightRule = (e) => { |
| | | const selected = e.value[0] |
| | | formParams.value.flightRule = selected.value |
| | |
| | | } |
| | | // 飞行方式 |
| | | const isShowFlightMode = ref(false) |
| | | const actionsFlightMode = [ |
| | | { |
| | | label: '视距内飞行 (VLOS)', |
| | | value: '视距内飞行 (VLOS)', |
| | | }, |
| | | { |
| | | label: '超视距飞行(BVLOS)', |
| | | value: '超视距飞行(BVLOS)', |
| | | }, |
| | | ] |
| | | const actionsFlightMode = ref([]) |
| | | const onPickerFlightMode = (e) => { |
| | | const selected = e.value[0] |
| | | formParams.value.flightMode = selected.value |
| | |
| | | } |
| | | // 计划类型 |
| | | const isShowPlanType = ref(false) |
| | | const actionsPlanType = [ |
| | | { |
| | | label: '一般', |
| | | value: '0', |
| | | }, |
| | | { |
| | | label: '紧急', |
| | | value: '1', |
| | | } |
| | | ] |
| | | const actionsPlanType = ref([]) |
| | | const onPickerPlanType = (e) => { |
| | | const selected = e.value[0] |
| | | formParams.value.planType = selected.value |
| | |
| | | const isShowAirspaceInfo = ref(false) |
| | | const airspaceInfoList = ref([]) |
| | | function getAirspaceInfo() { |
| | | flightAirspacePageInfoApi({ |
| | | droneFlightTaskApi({ |
| | | current: 1, |
| | | size: 1000, |
| | | }).then(res => { |
| | | airspaceInfoList.value = res.data.data.records.map(item => ({ |
| | | label: item.airspaceName || '暂无', |
| | | label: item.taskName || '暂无', |
| | | value: item.id, |
| | | })) |
| | | }) |
| | |
| | | current: 1, |
| | | size: 1000, |
| | | }).then(res => { |
| | | console.log(res.data.data, '0000') |
| | | flightRouteInfoList.value = res.data.data.records.map(item => ({ |
| | | label: item.name, |
| | | value: item.id, |
| | |
| | | }); |
| | | }); |
| | | }; |
| | | const isSubmitDisabled = ref(false) |
| | | // 提交表单 |
| | | const submitForm = async () => { |
| | | await formRef.value.validate() |
| | | |
| | | isSubmitDisabled.value = true |
| | | flightPlanSaveApi(formParams.value).then(res => { |
| | | if (res.data.code === 200) { |
| | | isSubmitDisabled.value = true |
| | | uni.showToast({ |
| | | title: '提交成功', |
| | | icon: 'success', |
| | |
| | | } |
| | | }) |
| | | } |
| | | // 获取任务类型 |
| | | function getTaskType() { |
| | | flightTaskApi().then(res => { |
| | | actionsFlightTaskType.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | }) |
| | | } |
| | | // 获取飞行模式 |
| | | function getFlightMode() { |
| | | flightModeApi().then(res => { |
| | | actionsFlightMode.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | }) |
| | | } |
| | | // 获取飞行规则 |
| | | function getFlightRules() { |
| | | flightRulesApi().then(res => { |
| | | actionsFlightRule.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | }) |
| | | } |
| | | // 获取飞行计划 |
| | | function getFlightPlan() { |
| | | flightPlanApi().then(res => { |
| | | actionsPlanType.value = res.data.data.map(item => ({ |
| | | ...item, |
| | | label: item.dictLabel || '暂无', |
| | | value: item.dictValue || '暂无', |
| | | })) |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | // getProTypeApi() |
| | | getTaskType() |
| | | getFlightMode() |
| | | getFlightRules() |
| | | getFlightPlan() |
| | | getAircraftInfo() |
| | | getPilotInfo() |
| | | getAirspaceInfo() |
| | |
| | | 审批记录 |
| | | </view> |
| | | <u-list :style="{ height: 'calc(100vh - 240rpx)' }" @scrolltolower="scrolltolower" :lower-threshold="50"> |
| | | <view class="approvalRecord" v-for="(approvalRecord,approvalRecordIndex) in approvalRecords" :key="approvalRecordIndex"> |
| | | <view class="approvalRecord" v-for="(approvalRecord,approvalRecordIndex) in approvalRecords" :key="approvalRecordIndex" @click="handleClick(approvalRecord)"> |
| | | <view class="name-status"> |
| | | <view class="name-image"> |
| | | <u-image :src="spSvg" class="icon" width="16" height="16"></u-image> |
| | |
| | | } |
| | | getApprovalRecords() |
| | | } |
| | | // 点击审批记录跳转详情页 |
| | | function handleClick(item) { |
| | | uni.navigateTo({ |
| | | url: '/subPackages/flightApplication/details?id=' + item.id, |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | getApprovalRecords() |
| | | }) |