<template>
|
<view class="flightApplication-add">
|
|
<u-form labelPosition="top" :model="formParams" :rules="rules" ref="formRef">
|
<view class="title form-title">基本信息</view>
|
<u-form-item
|
label="飞行计划"
|
labelWidth="200rpx"
|
prop="flightPlanName"
|
:borderBottom="true"
|
ref="item1"
|
required
|
>
|
<u-input v-model="formParams.flightPlanName" border="none" placeholder="请输入"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="任务类型"
|
labelWidth="230rpx"
|
prop="flightTaskType"
|
:borderBottom="true"
|
ref="item2"
|
required
|
@click="isShowFlightTaskType = true"
|
>
|
<u-input
|
v-model="formParams.flightTaskTypeText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="飞行规则"
|
labelWidth="230rpx"
|
prop="flightRule"
|
:borderBottom="true"
|
ref="item2"
|
required
|
@click="isShowFlightRule = true"
|
>
|
<u-input
|
v-model="formParams.flightRuleText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="飞行方式"
|
labelWidth="200rpx"
|
prop="flightMode"
|
:borderBottom="true"
|
ref="item1"
|
@click="isShowFlightMode = true"
|
required
|
>
|
<u-input
|
v-model="formParams.flightModeText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="飞行活动开始日期"
|
labelWidth="260rpx"
|
prop="flightStartTime"
|
:borderBottom="true"
|
ref="item1"
|
@click="isShowStartTime = true"
|
required
|
>
|
<u-input v-model="formParams.flightStartTime" border="none" placeholder="请选择日期" suffixIcon="calendar"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="飞行活动结束日期"
|
labelWidth="260rpx"
|
prop="flightEndTime"
|
:borderBottom="true"
|
ref="item1"
|
@click="isShowEndTime = true"
|
required
|
>
|
<u-input v-model="formParams.flightEndTime" border="none" placeholder="请选择日期" suffixIcon="calendar"></u-input>
|
</u-form-item>
|
|
<u-form-item
|
label="计划类型"
|
labelWidth="200rpx"
|
prop="planType"
|
:borderBottom="true"
|
ref="item1"
|
required
|
@click="isShowPlanType = true"
|
>
|
<u-input
|
v-model="formParams.planTypeText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="联系人"
|
labelWidth="200rpx"
|
prop="contactPerson"
|
:borderBottom="true"
|
required
|
ref="item1"
|
>
|
<u-input v-model="formParams.contactPerson" border="none" placeholder="请输入"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="联系电话"
|
labelWidth="200rpx"
|
prop="contactPhone"
|
:borderBottom="true"
|
required
|
ref="item1"
|
>
|
<u-input v-model="formParams.contactPhone" border="none" placeholder="请输入"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="承办人"
|
labelWidth="200rpx"
|
prop="undertaker"
|
:borderBottom="true"
|
required
|
ref="item1"
|
>
|
<u-input v-model="formParams.undertaker" border="none" placeholder="请输入"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="承办人联系电话"
|
labelWidth="300rpx"
|
prop="undertakerPhone"
|
:borderBottom="true"
|
required
|
ref="item1"
|
>
|
<u-input v-model="formParams.undertakerPhone" border="none" placeholder="请输入"></u-input>
|
</u-form-item>
|
<u-form-item
|
label="临时空域批件"
|
labelWidth="200rpx"
|
prop="aircraftName"
|
:borderBottom="true"
|
ref="item1"
|
>
|
<template #label>
|
<view class="custom-label">
|
<text>临时空域批件</text>
|
<text class="label-tip">(建议文件大小100M内,仅支持pdf、jpg、jpeg、png等格式)</text>
|
</view>
|
</template>
|
<u-input v-model="formParams.tempAirspaceApprovalText" border="none" readonly placeholder="请选择"></u-input>
|
<template #right>
|
<u-upload
|
@afterRead="afterRead"
|
@delete="deletePic"
|
name="6"
|
multiple
|
:maxCount="1"
|
width="250"
|
height="150"
|
>
|
<view class="upload">上传文件</view>
|
</u-upload>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="气象条件"
|
labelWidth="200rpx"
|
prop="weatherCondition"
|
:borderBottom="true"
|
ref="item1"
|
>
|
<u-input
|
v-model="formParams.weatherCondition"
|
border="none"
|
placeholder="请输入"
|
></u-input>
|
</u-form-item>
|
<view class="title form-title">飞行器/飞手</view>
|
<u-form-item
|
label="飞行器"
|
labelWidth="230rpx"
|
prop="spacecraftText"
|
:borderBottom="true"
|
required
|
ref="item2"
|
@click="isShowAircraftInfo = true"
|
>
|
<u-input
|
v-model="formParams.spacecraftText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="飞手"
|
labelWidth="230rpx"
|
prop="pilotText"
|
:borderBottom="true"
|
ref="item2"
|
required
|
@click="isShowPilotInfo = true"
|
>
|
<u-input
|
v-model="formParams.pilotText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<view class="title form-title">空域/航线/场点</view>
|
<u-form-item
|
label="空域"
|
labelWidth="230rpx"
|
prop="airspaceId"
|
:borderBottom="true"
|
ref="item2"
|
required
|
@click="isShowAirspaceInfo = true"
|
>
|
<u-input
|
v-model="formParams.airspaceText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<u-form-item
|
label="航线"
|
labelWidth="230rpx"
|
prop="selectedRouteId"
|
:borderBottom="true"
|
ref="item2"
|
required
|
@click="isShowFlightRouteInfo = true"
|
>
|
<u-input
|
v-model="formParams.routeText"
|
disabled
|
disabledColor="#ffffff"
|
placeholder="请选择"
|
border="none"
|
></u-input>
|
<template #right>
|
<up-icon
|
name="arrow-down"
|
></up-icon>
|
</template>
|
</u-form-item>
|
<!-- <u-button class="submit-button-wrapper" color="#1D6FE9" size="large" @click="submitForm">
|
飞行申请
|
</u-button> -->
|
<u-picker
|
:show="isShowFlightTaskType"
|
:columns="[actionsFlightTaskType]"
|
keyName="label"
|
@confirm="onPickerFlightTaskType"
|
@cancel="isShowFlightTaskType = false"
|
/>
|
<!-- 飞行规则 -->
|
<u-picker
|
:show="isShowFlightRule"
|
:columns="[actionsFlightRule]"
|
keyName="label"
|
@confirm="onPickerFlightRule"
|
@cancel="isShowFlightRule = false"
|
/>
|
<!-- 飞行方式 -->
|
<u-picker
|
:show="isShowFlightMode"
|
:columns="[actionsFlightMode]"
|
keyName="label"
|
@confirm="onPickerFlightMode"
|
@cancel="isShowFlightMode = false"
|
/>
|
<!-- 计划类型 -->
|
<u-picker
|
:show="isShowPlanType"
|
:columns="[actionsPlanType]"
|
keyName="label"
|
@confirm="onPickerPlanType"
|
@cancel="isShowPlanType = false"
|
/>
|
<u-datetime-picker
|
:show="isShowStartTime"
|
v-model="startTime"
|
mode="datetime"
|
:min-date="minDate"
|
:formatter="formatter"
|
@confirm="onConfirmStartTime"
|
@cancel="isShowStartTime = false"
|
></u-datetime-picker>
|
<u-datetime-picker
|
:show="isShowEndTime"
|
v-model="endTime"
|
mode="datetime"
|
:min-date="minDate"
|
:formatter="formatter"
|
@confirm="onConfirmEndTime"
|
@cancel="isShowEndTime = false"
|
></u-datetime-picker>
|
<!-- <u-calendar :show="isShowTimeRange" mode="date" @confirm="onConfirmTimeRange" @close="isShowTimeRange = false" :close-on-click-overlay="true"></u-calendar> -->
|
<!-- <u-calendar :show="isShowTimeRange" mode="range" @confirm="onConfirmTimeRange" @close="isShowTimeRange = false" :close-on-click-overlay="true" :allow-same-day="true" :show-time="true" time-format="HH:mm:ss"></u-calendar> -->
|
<!-- 飞行器 -->
|
<!-- <u-picker
|
:show="isShowAircraftInfo"
|
:columns="[aircraftInfoList]"
|
keyName="label"
|
@confirm="onPickerAircraftInfo"
|
@cancel="isShowAircraftInfo = false"
|
/> -->
|
<u-popup
|
:show="isShowAircraftInfo"
|
mode="bottom"
|
round="20"
|
@close="isShowAircraftInfo = false"
|
>
|
<scroll-view scroll-y>
|
<view class="select-header">
|
<view>请选择飞行器</view>
|
<view class="select-header-btn">
|
<view class="cancel-btn" @click="isShowAircraftInfo = false">取消</view>
|
<view @click="onPickerAircraftInfo">确定</view>
|
</view>
|
</view>
|
<view class="select-content">
|
<up-checkbox-group
|
v-model="formParams.spacecraftId"
|
placement="column"
|
@change="checkboxChange"
|
>
|
<up-checkbox
|
:customStyle="{marginBottom: '8px'}"
|
v-for="(item, index) in aircraftInfoList"
|
:key="item.id"
|
:label="item.label"
|
:name="item.value"
|
>
|
</up-checkbox>
|
</up-checkbox-group>
|
</view>
|
</scroll-view>
|
</u-popup>
|
<!-- 飞手 -->
|
<!-- <u-picker
|
:show="isShowPilotInfo"
|
:columns="[pilotInfoList]"
|
keyName="label"
|
@confirm="onPickerPilotInfo"
|
@cancel="isShowPilotInfo = false"
|
/> -->
|
<u-popup
|
:show="isShowPilotInfo"
|
mode="bottom"
|
round="20"
|
@close="isShowPilotInfo = false"
|
>
|
<scroll-view scroll-y>
|
<view class="select-header">
|
<view>请选择飞手</view>
|
<view class="select-header-btn">
|
<view class="cancel-btn" @click="isShowPilotInfo = false">取消</view>
|
<view @click="onPickerPilotInfo">确定</view>
|
</view>
|
</view>
|
<view class="select-content">
|
<up-checkbox-group
|
v-model="formParams.pilotId"
|
placement="column"
|
@change="checkboxPilotChange"
|
>
|
<up-checkbox
|
:customStyle="{marginBottom: '8px'}"
|
v-for="(item, index) in pilotInfoList"
|
:key="item.id"
|
:label="item.label"
|
:name="item.value"
|
>
|
</up-checkbox>
|
</up-checkbox-group>
|
</view>
|
</scroll-view>
|
</u-popup>
|
<!-- 空域 -->
|
<u-picker
|
:show="isShowAirspaceInfo"
|
:columns="[airspaceInfoList]"
|
keyName="label"
|
@confirm="onPickerAirspaceInfo"
|
@cancel="isShowAirspaceInfo = false"
|
/>
|
<!-- 航线 -->
|
<u-picker
|
:show="isShowFlightRouteInfo"
|
:columns="[flightRouteInfoList]"
|
keyName="label"
|
@confirm="onPickerFlightRouteInfo"
|
@cancel="isShowFlightRouteInfo = false"
|
/>
|
</u-form>
|
<u-button :disabled="isSubmitDisabled" @click="submitForm" color="#1D6FE9">飞行申请</u-button>
|
<!-- 飞任务类型 -->
|
<view class="attention">
|
注:新增空域/航线/飞手等前往吉安市低空经济服务一体化
|
</view>
|
</view>
|
</template>
|
<script setup>
|
import {
|
flightPlanSaveApi,
|
flightRoutePageInfoApi,
|
aircraftInfoPageInfoOfMyApi,
|
pilotInfoPageInfoOfMyApi,
|
droneFlightTaskApi,
|
uploadFileApi
|
} from '@/api/index'
|
import { ref, computed, onMounted } from 'vue'
|
import dayjs from 'dayjs'
|
|
// 获取store中的数据 字典
|
import { useAppStore, useUserStore } from "@/store";
|
const appStore = useAppStore()
|
|
const formRef = ref(null);
|
const formParams = ref({
|
flightPlanNo: '', //飞行计划编号
|
flightPlanName: '', // 飞行计划名称
|
flightTaskType: '', // 飞行任务类型
|
flightTaskTypeText: '', // 飞行任务类型文本
|
flightRule: '', // 飞行规则
|
flightRuleText: '', // 飞行规则文本
|
flightMode: '', // 飞行方式
|
flightModeText: '', // 飞行方式文本
|
tempAirspaceApproval: '', // 临时空域批件
|
tempAirspaceApprovalText: '', // 临时空域批件文本
|
planType: '', // 计划类型
|
planTypeText: '', // 计划类型文本
|
contactPerson: '', // 联系人
|
contactPhone: '', // 联系人电话
|
undertaker: '', // 承办人
|
undertakerPhone: '', // 承办人电话
|
timeRange: '', // 时间范围
|
flightStartTime: '', // 飞行活动开始时间
|
flightEndTime: '', // 飞行活动结束时间
|
weatherCondition: '', // 气象条件
|
spacecraftId: [], // 航天器id
|
spacecraftText: '', // 航天器文本
|
pilotId: [], // 飞手id
|
pilotText: '', // 飞手文本
|
airspaceId: '', // 空域id
|
airspaceText: '', // 空域文本
|
selectedRouteId: '', // 航线id
|
routeText: '', // 航线文本
|
})
|
const rules = ref({
|
flightPlanName: [
|
{ required: true, message: '请输入飞行计划名称', trigger: 'blur' }
|
],
|
flightTaskType: [
|
{ required: true, message: '请选择飞行任务类型', trigger: 'change' }
|
],
|
flightRule: [
|
{ required: true, message: '请选择飞行规则', trigger: 'change' }
|
],
|
flightMode: [
|
{ required: true, message: '请选择飞行方式', trigger: 'change' }
|
],
|
contactPerson: [
|
{ required: true, message: '请输入联系人', trigger: 'blur' }
|
],
|
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: [
|
{ required: true, message: '请选择飞行活动开始时间', trigger: 'change' }
|
],
|
endTime: [
|
{ required: true, message: '请选择飞行活动结束时间', trigger: 'change' }
|
],
|
spacecraftText: [
|
{ required: true, message: '请选择飞行器', trigger: 'change' }
|
],
|
pilotText: [
|
{ required: true, message: '请选择飞手', trigger: 'change' }
|
],
|
airspaceId: [
|
{ required: true, message: '请选择空域', trigger: 'change' }
|
],
|
selectedRouteId: [
|
{ required: true, message: '请选择航线', trigger: 'change' }
|
],
|
})
|
// 任务类型
|
const isShowFlightTaskType = ref(false)
|
const actionsFlightTaskType = ref(appStore.getTaskType)
|
const onPickerFlightTaskType = (e) => {
|
const selected = e.value[0]
|
formParams.value.flightTaskType = selected.value
|
formParams.value.flightTaskTypeText = selected.label
|
isShowFlightTaskType.value = false
|
}
|
|
// 飞行规则
|
const isShowFlightRule = ref(false)
|
const actionsFlightRule = ref(appStore.getFlightRules)
|
const onPickerFlightRule = (e) => {
|
const selected = e.value[0]
|
formParams.value.flightRule = selected.value
|
formParams.value.flightRuleText = selected.label
|
isShowFlightRule.value = false
|
}
|
// 飞行方式
|
const isShowFlightMode = ref(false)
|
const actionsFlightMode = ref(appStore.getFlightMode)
|
const onPickerFlightMode = (e) => {
|
const selected = e.value[0]
|
formParams.value.flightMode = selected.value
|
formParams.value.flightModeText = selected.label
|
isShowFlightMode.value = false
|
}
|
// 计划类型
|
const isShowPlanType = ref(false)
|
const actionsPlanType = ref(appStore.getFlightPlan)
|
const onPickerPlanType = (e) => {
|
const selected = e.value[0]
|
formParams.value.planType = selected.value
|
formParams.value.planTypeText = selected.label
|
isShowPlanType.value = false
|
}
|
// 是否显示开始时间选择器
|
const isShowStartTime = ref(false)
|
// 是否显示结束时间选择器
|
const isShowEndTime = ref(false)
|
const minDate = ref(Date.now()); // 设置最小日期为当前时间戳
|
const startTime = ref(Date.now()); // 设置默认值为当前时间戳
|
const endTime = ref(Date.now()); // 设置默认值为当前时间戳
|
|
const onConfirmStartTime = (e) => {
|
formParams.value.flightStartTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
|
isShowStartTime.value = false
|
}
|
const onConfirmEndTime = (e) => {
|
formParams.value.flightEndTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
|
isShowEndTime.value = false
|
}
|
|
|
|
// 获取飞行器信息
|
const isShowAircraftInfo = ref(false)
|
const aircraftInfoList = ref([])
|
function getAircraftInfo() {
|
aircraftInfoPageInfoOfMyApi({
|
current: 1,
|
size: 1000,
|
}).then(res => {
|
aircraftInfoList.value = res.data.data.records.map(item => ({
|
label: item.name || '暂无',
|
value: item.id,
|
}))
|
})
|
}
|
// const onPickerAircraftInfo = (e) => {
|
// const selected = e.value[0]
|
// formParams.value.spacecraftId = selected.value
|
// formParams.value.aircraftText = selected.label
|
// isShowAircraftInfo.value = false
|
// }
|
function checkboxChange(val) {
|
formParams.value.spacecraftId = val.join(',')
|
formParams.value.spacecraftText = aircraftInfoList.value.filter(item => val.includes(item.value)).map(item => item.label).join(',')
|
}
|
const onPickerAircraftInfo = () => {
|
isShowAircraftInfo.value = false
|
}
|
// 获取飞手信息
|
const isShowPilotInfo = ref(false)
|
const pilotInfoList = ref([])
|
function getPilotInfo() {
|
pilotInfoPageInfoOfMyApi({
|
current: 1,
|
size: 1000,
|
}).then(res => {
|
pilotInfoList.value = res.data.data.records.map(item => ({
|
label: item.name || '暂无',
|
value: item.id,
|
}))
|
})
|
}
|
function checkboxPilotChange(val) {
|
formParams.value.pilotId = val.join(',')
|
formParams.value.pilotText = pilotInfoList.value.filter(item => val.includes(item.value)).map(item => item.label).join(',')
|
}
|
const onPickerPilotInfo = (e) => {
|
// const selected = e.value[0]
|
// formParams.value.pilotId = selected.value
|
// formParams.value.pilotText = selected.label
|
isShowPilotInfo.value = false
|
}
|
// 获取空域信息
|
const isShowAirspaceInfo = ref(false)
|
const airspaceInfoList = ref([])
|
function getAirspaceInfo() {
|
droneFlightTaskApi({
|
current: 1,
|
size: 1000,
|
}).then(res => {
|
airspaceInfoList.value = res.data.data.records.map(item => ({
|
label: item.taskName || '暂无',
|
value: item.id,
|
}))
|
})
|
}
|
const onPickerAirspaceInfo = (e) => {
|
const selected = e.value[0]
|
formParams.value.airspaceId = selected.value
|
formParams.value.airspaceText = selected.label
|
isShowAirspaceInfo.value = false
|
}
|
// 获取航线信息
|
const isShowFlightRouteInfo = ref(false)
|
const flightRouteInfoList = ref([])
|
function getFlightRouteInfo() {
|
flightRoutePageInfoApi({
|
current: 1,
|
size: 1000,
|
}).then(res => {
|
flightRouteInfoList.value = res.data.data.records.map(item => ({
|
label: item.name,
|
value: item.id,
|
}))
|
})
|
}
|
const onPickerFlightRouteInfo = (e) => {
|
const selected = e.value[0]
|
formParams.value.selectedRouteId = selected.value
|
formParams.value.routeText = selected.label
|
isShowFlightRouteInfo.value = false
|
}
|
|
// 文件上传处理
|
const afterRead = (event) => {
|
// 获取上传的文件对象
|
const file = event.file;
|
console.log('上传的文件:', file);
|
|
// 显示加载提示
|
uni.showLoading({
|
title: '上传中...'
|
});
|
|
// 准备上传参数
|
const uploadParams = {
|
name: 'file', // 服务器端接收文件的字段名
|
file: file, // 传入文件对象
|
filePath: file.path || file.url, // 文件路径
|
};
|
|
// 调用上传文件接口
|
uploadFileApi(uploadParams).then(res => {
|
uni.hideLoading();
|
|
console.log('上传成功结果:', res);
|
|
// 根据接口返回的数据结构处理结果
|
if (res.data && res.data.code === 200) {
|
// 假设接口返回的数据结构是 { url, fileName } 等
|
const uploadResult = res.data.data;
|
|
// 更新表单数据,将上传结果展示在input内
|
formParams.value.tempAirspaceApprovalText = uploadResult.fileName || uploadResult.url || '文件上传成功';
|
|
// 可以将完整的上传信息保存到表单中,以便提交时使用
|
formParams.value.tempAirspaceApproval = uploadResult.fileUrl || '文件上传成功';
|
|
uni.showToast({
|
title: '上传成功',
|
icon: 'success'
|
});
|
} else {
|
uni.showToast({
|
title: res.msg || '上传失败',
|
icon: 'none'
|
});
|
}
|
}).catch(err => {
|
uni.hideLoading();
|
console.error('上传失败:', err);
|
uni.showToast({
|
title: '上传失败',
|
icon: 'none'
|
});
|
});
|
};
|
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',
|
duration: 2000
|
})
|
// 跳转申请列表页
|
uni.navigateTo({
|
url: '/subPackages/flightApplication/index',
|
})
|
} else {
|
uni.showToast({
|
title: res.msg || '提交失败',
|
icon: 'none',
|
duration: 2000
|
})
|
}
|
}).finally(() => {
|
isSubmitDisabled.value = false
|
})
|
}
|
|
const formatter = (type, value) => {
|
if (type === 'year') return `${value}年`;
|
if (type === 'month') return `${value}月`;
|
if (type === 'day') return `${value}日`;
|
if (type === 'hour') return `${value}时`;
|
if (type === 'minute') return `${value}分`;
|
return value;
|
};
|
|
onMounted(() => {
|
// getProTypeApi()
|
// getTaskType()
|
// getFlightMode()
|
// getFlightRules()
|
// getFlightPlan()
|
getAircraftInfo()
|
getPilotInfo()
|
getAirspaceInfo()
|
getFlightRouteInfo()
|
})
|
</script>
|
<style scoped lang="scss">
|
.flightApplication-add {
|
width: 100%;
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
.title {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 17px;
|
color: #222324;
|
padding-left: 24rpx;
|
}
|
.form-title {
|
margin-bottom: 24rpx;
|
padding-left: 0rpx !important;
|
}
|
:deep(.u-button) {
|
width: 80%;
|
padding: 28rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
// margin-bottom: 20rpx;
|
}
|
:deep(.u-toolbar__wrapper__confirm) {
|
color: #1D6FE9;
|
}
|
.custom-label {
|
.label-tip {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 18rpx;
|
color: #3A3A3A;
|
}
|
}
|
|
.attention {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 12px;
|
color: #1D6FE9;
|
margin: 40rpx 0;
|
text-align: center;
|
}
|
.select-wrapper {
|
position: relative;
|
width: 100%;
|
|
.select-icon {
|
position: absolute;
|
right: 20rpx;
|
top: 50%;
|
transform: translateY(-50%);
|
color: #999;
|
font-size: 24rpx;
|
pointer-events: none;
|
}
|
}
|
|
.upload {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 15px;
|
color: #1D6FE9;
|
}
|
:deep(.u-form) {
|
flex: 1;
|
display: flex;
|
flex-direction: column;
|
overflow-y: auto;
|
box-sizing: border-box;
|
padding: 24rpx;
|
}
|
.submit-button-wrapper {
|
padding: 28rpx;
|
// width: 80%;
|
// height: 100rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
}
|
:deep(.u-form-item) {
|
margin-bottom: 20rpx;
|
padding: 16rpx 24rpx 18rpx 24rpx;
|
border-radius: 6px 6px 6px 6px;
|
background: white;
|
:deep(.u-line) {
|
border-bottom: 1px solid #EFEFEF;
|
}
|
:deep(.u-input) {
|
width: 100%;
|
height: 80rpx;
|
border-radius: 8rpx;
|
padding: 0 20rpx;
|
background-color: #f5f5f5;
|
|
&::placeholder {
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #D2D2D2;
|
}
|
}
|
|
.clickable-input {
|
width: 100%;
|
cursor: pointer;
|
}
|
|
:deep(.u-form-item__label) {
|
margin-bottom: 20rpx;
|
// font-weight: bold;
|
// color: #333;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #222324;
|
}
|
|
:deep(.u-form-item__required) {
|
color: #FF2600;
|
margin-right: 8rpx;
|
}
|
}
|
|
.uni-scroll-view {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.select-header {
|
display: flex;
|
justify-content: space-between;
|
padding: 20rpx 20rpx;
|
font-size: 32rpx;
|
color: #222324;
|
.select-header-btn {
|
display: flex;
|
font-size: 28rpx;
|
color: #1D6FE9;
|
.cancel-btn {
|
color: #86909C;
|
margin-right: 20rpx;
|
}
|
}
|
}
|
|
.select-content {
|
height: 600rpx;
|
text-align: center;
|
padding: 20rpx 20rpx;
|
}
|
}
|
</style>
|