Commit 021e5077 by liujinbo

详情

parent db40d35a
......@@ -42,19 +42,19 @@ export const findWeatherSynopsesMessagesApi = (data, config) => {
config
})
}
export const getFcArrangeApi = (data, config) => {
return http({
method: 'POST',
url: '/basicinfo/Aircraft/getFcArrange',
data,
config
})
}
/*
* 获取天气信息
* /basicinfo/findWeatherSynopsesMessages
* {airportCode: "WUH"}
* [取最后一条数据] weatherInfoTxt-天气明朗 temperature-温度
*
*
* 获取航班任务-定时执行
* /flighting/getFlightTask
* {catchId: 9435439}
*
* 获取飞往目的地列表
* /flighting/getFlyToApplets
*
*
* */
......@@ -15,7 +15,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
isInbound: 1,
ac: '',//机号
flightNo: 'GS7857',//航班号 临时测试用,ljb
flightNo: '',//航班号
acOwns2: '',
acTerminals1: '',
......
......@@ -4,7 +4,7 @@ import useUserStore from 'mocp/store/user'
const baseURL = 'https://moc.hnatechnic.com/api'//生产
class ServiceLoading {
open(loading) {
open (loading) {
if (loading || loading === '') {
let loadingText = '加载中'
if (typeof loading === 'string' && loading !== '') {
......@@ -17,7 +17,7 @@ class ServiceLoading {
}
}
close(loading) {
close (loading) {
if (loading || loading === '') {
uni.hideLoading()
}
......@@ -98,7 +98,7 @@ export const http = (options) => {
return new Promise((resolve, reject) => {
uni.request({
...options,
success(res) {
success (res) {
console.log('接口响应结果:', res)
serviceLoading.close(loading)
const statusCode = res.statusCode
......@@ -125,7 +125,7 @@ export const http = (options) => {
reject(res)
}
},
fail(err) {
fail (err) {
serviceLoading.close(loading)
uni.$mocpMessage.error('网络错误,换个网络试试')
reject(err)
......
......@@ -2,16 +2,8 @@
<view class="globalDetailsModel detailsBasicInfo">
<view class="title">{{ getDetailsCurrentMsg.flightNo }}</view>
<view class="basicInfoDep flex flex-between">
<view>
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.depStn] }}</text>
<!--<text class="m-x-6">重庆江北</text>-->
<!--<text>T3</text>-->
</view>
<view>
<!--<text>{{ getDetailsCurrentMsg.arrStn }}</text>-->
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.arrStn] }}</text>
<!--<text>T2</text>-->
</view>
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.depStn] }}</text>
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.arrStn] }}</text>
</view>
<view class="basicInfoTime flex flex-between">
......@@ -35,8 +27,6 @@
</view>
<DetailsFollowCrewItem title="跟机人员" :list="getDetailsCurrentMsg.mfollowAcLists" />
</template>
<script setup>
......
<template>
<view class="globalDetailsModel detailsFollowingCrew">
<view class="font-700">{{ title }}</view>
<view class="followCrewCont">
<view v-if="list && list.length" class="followCrewCont">
<view
v-for="item of list"
:key="item.name"
......@@ -11,16 +11,20 @@
<!--<image class="img" :src="FlightImage" />-->
<view>
<view>{{ item.uname }}</view>
<!--<view class="status">维修员</view>-->
<!--<view class="status">{{ item.kind }}</view>-->
</view>
</view>
<view class="flex">
<up-icon v-if="item.followStatus > 0" class="rtIcon" name="checkmark-circle-fill" size="20"
:color="$mocp-success-6" />
<text>{{ item.followStatusValue }}</text>
<template v-if="item.followStatus != undefined">
<up-icon v-if="item.followStatus > 0" class="rtIcon" name="checkmark-circle-fill" size="20"
:color="$mocp-success-6" />
<text>{{ item.followStatusValue }}</text>
</template>
<text>发信息</text>
</view>
</view>
</view>
<global-empty v-else />
</view>
......
......@@ -3,9 +3,9 @@
<DetailsWeather v-if="ps.weatherMsg?.arrStnList" title="落地当日" :msg="ps.weatherMsg.arrStnList" />
<DetailsFollowCrewItem title="跟机机务" :list="followCrewList" />
<DetailsFollowCrewItem title="跟机机务" :list="FcArrangeMsg.crwStewardInf" />
<DetailsFollowCrewItem title="机组人员" :list="followCrewList" />
<DetailsFollowCrewItem title="机组人员" :list="FcArrangeMsg.crwPilotInf" />
</template>
<script setup>
......@@ -16,7 +16,19 @@ import DetailsWeather from './DetailsWeather.vue'
const ps = defineProps({
weatherMsg: {
type: Object,
default: () => {}
default: () => {
return {
depStnList: [], arrStnList: []
}
}
},
FcArrangeMsg: {
type: Object,
default: () => {
return {
crwPilotInf: [], crwStewardInf: []
}
}
}
})
......
......@@ -3,16 +3,15 @@
<view class="font-700 flex">
<image class="timeFlightIcon" :src="FlightImage" />
<view>
<text class="m-x-6">重庆江北</text>
<text>CKG</text>
<text class="m-x-6">{{ baseStore.getTerminalObject[msg.airportCode] }}</text>
</view>
</view>
<view class="flex waterCont">
<image class="weatherIcon" :src="FlightImage" />
<view>
<view class="waterTp"></view>
<view class="waterTp">{{ msg.weatherInfoTxt }}</view>
<view>
<text class="waterTemp font-700">16°/30°</text>
<text class="waterTemp font-700">{{ msg.temperature }}°</text>
<text class="waterText">({{ title }})</text>
</view>
</view>
......@@ -23,22 +22,22 @@
<image class="weatherSubIcon" :src="FlightImage" />
<text>能见度</text>
</view>
<view>5000m</view>
<view>{{ msg.visibility }}m</view>
</view>
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="FlightImage" />
<text>风速</text>
</view>
<view>5公里/小时</view>
<view>{{ parseInt(msg.windFs) }} 米/秒</view>
</view>
<view>
<!--<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="FlightImage" />
<text>PM2.5</text>
</view>
<view>18优</view>
</view>
<view>??18优</view>
</view>-->
</view>
......@@ -48,13 +47,14 @@
</template>
<script setup>
import { computed, ref } from 'vue'
import { ref } from 'vue'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
import { onLoad } from '@dcloudio/uni-app'
import { findWeatherSynopsesMessagesApi } from 'mocp/api/flight-support'
import useBaseStore from 'mocp/store/base'
import { parseInt } from 'lodash'
const baseStore = useBaseStore()
const ps = defineProps({
const {title, msg} = defineProps({
title: {
type: String,
default: '起飞当日'
......@@ -65,7 +65,7 @@ const ps = defineProps({
}
})
console.log('ps.msg', ps.msg)
console.log('msg', msg)
const followCrewList = ref([
{name: '斯柯达'},
{name: '花飘万家雪'},
......
......@@ -144,6 +144,12 @@
}
}
.tab-content {
margin-top: 0;
flex: auto;
overflow-y: auto;
}
.btn_lf {
margin-right: 46rpx;
}
......
......@@ -29,30 +29,41 @@
class="f-flex-1 tabItem"
:class="index == tabCurrent ? 'active' : ''"
>
{{ item }}-{{ tabCurrent }}
{{ item }}
</view>
</view>
<scroll-view
class="tab-content"
:scroll-y="true"
:style="{ height: `calc(100vh - 690rpx - ${safeAreaInsets?.top + 'px'} - ${safeAreaInsets?.bottom + 'px'})` }">
<detailsFlightInfo v-if="tabCurrent === 0" />
<detailsFlightInfo v-if="tabCurrent === 0" />
<detailsOtherInfo v-else :weatherMsg="weatherMsg" :FcArrangeMsg="FcArrangeMsg" />
</scroll-view>
<detailsOtherInfo v-else :weatherMsg="weatherMsg" />
</view>
</view>
</global-page>
</template>
<script setup>
import { ref, reactive } from 'vue'
import { ref, watchEffect } from 'vue'
import { storeToRefs } from 'pinia'
import useFlightSupportStore from 'mocp/store/flight-support'
import { onLoad } from '@dcloudio/uni-app'
import { getFListApi, getReleaseListApi, findWeatherSynopsesMessagesApi } from 'mocp/api/flight-support'
import {
getFListApi,
getReleaseListApi,
findWeatherSynopsesMessagesApi,
getFcArrangeApi
} from 'mocp/api/flight-support'
import detailsSwiper from '../components/DetailsSwiper.vue'
import detailsFlightInfo from '../components/DetailsFlightInfo.vue'
import detailsOtherInfo from '../components/DetailsOtherInfo.vue'
import GlobalFlightNo from 'mocp/components/global-flight-no/global-flight-no.vue'
import { followAcTagAll } from 'mocp/utils/getFlightList'
const {safeAreaInsets} = uni.getSystemInfoSync()
const flightSupportStore = useFlightSupportStore()
const {
searchData,
......@@ -68,11 +79,9 @@ const flightNoStyle = {
'height': '64rpx',
'marginRight': '16rpx'
}
const weatherMsg = ref()
onLoad(() => {
getAllFlightsByAc()
getWeatherMsg()
})
const getAllFlightsByAc = async () => {
......@@ -82,7 +91,6 @@ const getAllFlightsByAc = async () => {
startT: searchData.value.startT,
stopT: searchData.value.stopT
}
console.log('92@@details.value', details.value)
let {list} = await getFListApi(params, {loading: true})
if (list && list.length) {
const allReleases = await Promise.all(list.map(a => getReleaseListApi({catchId: a.catchId}, {loading: true})))
......@@ -110,25 +118,64 @@ const getAllFlightsByAc = async () => {
}
}
})
console.log('87@@', list)
filterDetailsCurrentIndex.value = list.findIndex(a => a.depStn === details.value.depStn && a.stdChn === details.value.stdChn)
filterDetailsList.value = list
console.log('90@@', filterDetailsCurrentIndex.value)
}
}
const getWeatherMsg = async () => {
const weatherMsg = ref()
const FcArrangeMsg = ref()
watchEffect(async () => {
const msg = {
depStnList: [],
arrStnList: []
}
const depStnRes = await findWeatherSynopsesMessagesApi({airportCode: getDetailsCurrentMsg.value.depStn}, {loading: true})
const depStnRes = await findWeatherSynopsesMessagesApi(
{airportCode: getDetailsCurrentMsg.value?.depStn},
{loading: true}
)
if (depStnRes.code == '200') msg.depStnList = depStnRes.data[depStnRes.data.length - 1]
const arrStnRes = await findWeatherSynopsesMessagesApi({airportCode: getDetailsCurrentMsg.value.arrStn}, {loading: true})
const arrStnRes = await findWeatherSynopsesMessagesApi(
{airportCode: getDetailsCurrentMsg.value?.arrStn},
{loading: true}
)
if (arrStnRes.code == '200') msg.arrStnList = arrStnRes.data[arrStnRes.data.length - 1]
weatherMsg.value = msg
console.log(weatherMsg.value)
}
// console.log('getDetailsCurrentMsg', getDetailsCurrentMsg.value)
const FcArrangeParams = {
ac: getDetailsCurrentMsg.value?.ac,
arrStn: getDetailsCurrentMsg.value?.arrStn,
datopChn: getDetailsCurrentMsg.value?.flightDate,
depStn: getDetailsCurrentMsg.value?.depStn,
flightNo: getDetailsCurrentMsg.value?.flightNo,
stdChn: getDetailsCurrentMsg.value?.stdChn
}
const FcRes = await getFcArrangeApi(FcArrangeParams, {loading: true})
if (FcRes.code == '200' && FcRes.data) {
const crwPilotInf = FcRes.data.crwPilotInf.replace(/s/g, '').split(';').map(function(item) {
const nv = item.split(':')
return {
uname: nv[0],
tel: nv[1],
kind: '机组人员'
}
})
const crwStewardInf = FcRes.data.crwStewardInf.replace(/s/g, '').split(';').map(function(item) {
const nv = item.split(':')
return {
uname: nv[0],
tel: nv[1],
kind: '跟机机务'
}
})
FcArrangeMsg.value = {
crwPilotInf,
crwStewardInf
}
}
console.log('FcRes', FcArrangeMsg.value)
})
</script>
<style lang="scss" scoped>
......
......@@ -63,7 +63,6 @@ const transformData = (data) => {
return q
}, [])
const mappedData = data.map(item => {
return {
...item,
time: item.creationTime.replace(/-/g, '/').replace(/:\d+?$/, ''),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment