Commit 021e5077 by liujinbo

详情

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