| | |
| | | <u-image :src="spSvg" class="icon" width="16" height="16"></u-image> |
| | | <view class="name">{{approvalRecord.flightPlanName}}</view> |
| | | </view> |
| | | <view class="status">{{approvalRecord.planApprovalStatus || ''}}</view> |
| | | <view class="status" :class="getStatusClass(approvalRecord.planApprovalStatus)"> |
| | | {{ approvalRecord.planApprovalStatusLabel || ''}} |
| | | </view> |
| | | </view> |
| | | <view class="txt">飞行器:{{approvalRecord.device || ''}}</view> |
| | | <view class="txt">飞行任务:{{approvalRecord.flightTaskType || ''}}</view> |
| | | <view class="txt">飞行器:{{approvalRecord.spacecraftLabel || '无'}}</view> |
| | | <view class="txt">飞行任务:{{approvalRecord.flightTaskTypeLabel || ''}}</view> |
| | | <view class="txt">飞行起飞时间:{{approvalRecord.actualTakeoffTime || ''}}</view> |
| | | <view class="txt">飞行降落时间:{{approvalRecord.actualLandingTime || ''}}</view> |
| | | </view> |
| | |
| | | import { flightPlanPageInfoApi } from '@/api/index.js' |
| | | import fxsqSvg from '@/static/images/fly-apply.png' |
| | | import mysbSvg from '@/static/images/my-sb.png' |
| | | import { ref } from 'vue' |
| | | import { ref } from 'vue' |
| | | import { aircraftInfoPageInfoOfMyApi } from '@/api/index' |
| | | |
| | | // 获取store中的数据 字典 |
| | | import { useAppStore, useUserStore } from "@/store"; |
| | | const appStore = useAppStore() |
| | | |
| | | |
| | | function gridClick(index) { |
| | |
| | | } |
| | | } |
| | | |
| | | const getStatusClass = (status) => { |
| | | switch (status) { |
| | | case '0': |
| | | return 'Sorange' |
| | | case '99': |
| | | return 'Sgreen' |
| | | case '-1': |
| | | return 'Sred' |
| | | case '1': |
| | | return 'Sblue' |
| | | default: |
| | | return '' |
| | | } |
| | | } |
| | | |
| | | // 获取飞行器信息 |
| | | const aircraftInfoList = ref([]) |
| | | async function getAircraftInfo() { |
| | | try { |
| | | const res = await aircraftInfoPageInfoOfMyApi({ |
| | | current: 1, |
| | | size: 1000, |
| | | }) |
| | | aircraftInfoList.value = res.data.data.records.map(item => ({ |
| | | label: item.name, |
| | | value: item.id, |
| | | })) |
| | | } catch (error) { |
| | | console.error('获取飞行器信息失败:', error) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 审批记录是很多条 |
| | | const approvalRecords = ref([]) |
| | | const formParams = ref({ |
| | |
| | | try { |
| | | const res = await flightPlanPageInfoApi(formParams.value) |
| | | const newData = res.data.data.records || [] |
| | | // 处理字典数据 |
| | | newData.forEach(item => { |
| | | item.spacecraftLabel = aircraftInfoList.value.find(info => info.value === item.spacecraftId)?.label || '无' |
| | | item.planApprovalStatusLabel = appStore.flyActivityStatus.find(status => status.dictValue === item.planApprovalStatus)?.dictLabel || '无' |
| | | item.flightTaskTypeLabel = appStore.taskType.find(type => type.dictValue === item.flightTaskType)?.dictLabel || '无' |
| | | }) |
| | | // 如果是第一页,直接替换数据;否则追加数据 |
| | | if (formParams.value.current === 1) { |
| | | approvalRecords.value = newData |
| | |
| | | url: '/subPackages/flightApplication/details?id=' + item.id, |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | |
| | | |
| | | onMounted(async () => { |
| | | await getAircraftInfo() |
| | | getApprovalRecords() |
| | | }) |
| | | </script> |
| | |
| | | } |
| | | .name-status { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | // justify-content: space-between; |
| | | margin-bottom: 20rpx; |
| | | .name-image { |
| | | width: calc(100% - 120rpx); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | .u-image { |
| | | width: 32rpx; |
| | |
| | | font-size: 32rpx; |
| | | color: #1D2129; |
| | | margin-left: 6rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | .status { |
| | | width: 100rpx; |
| | | text-align: center; |
| | | line-height: 40rpx; |
| | | background: #FF9604; |
| | | line-height: 44rpx; |
| | | height: 44rpx; |
| | | border-radius: 2px 2px 2px 2px; |
| | | font-weight: 500; |
| | | font-size: 24rpx; |
| | | color: #FFFFFF; |
| | | padding: 0 6rpx; |
| | | |
| | | &.Sorange { |
| | | background: #FF9604; |
| | | } |
| | | &.Sred { |
| | | background: #F8422A; |
| | | } |
| | | &.Sgreen { |
| | | background: #17A836; |
| | | } |
| | | &.Sblue { |
| | | background: #1D6FE9; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .txt { |
| | | font-weight: 400; |