Commit 37efb866 by pangchong

Merge branch 'master' of 122.112.146.86:pangchong/mocp-uniapp

parents fbf9bc9f 1aa663e7
...@@ -16,3 +16,45 @@ export const getAircraftTerminalsApi = (data, config) => { ...@@ -16,3 +16,45 @@ export const getAircraftTerminalsApi = (data, config) => {
config config
}) })
} }
export const getFListApi = (data, config) => {
return http({
method: 'POST',
url: '/flighting/getFList',
data,
config
})
}
export const getReleaseListApi = (data, config) => {
return http({
method: 'POST',
url: '/flighting/getReleaseList',
data,
config
})
}
export const findWeatherSynopsesMessagesApi = (data, config) => {
return http({
method: 'POST',
url: '/basicinfo/findWeatherSynopsesMessages',
data,
config
})
}
export const getFcArrangeApi = (data, config) => {
return http({
method: 'POST',
url: '/basicinfo/Aircraft/getFcArrange',
data,
config
})
}
/*
* 获取航班任务-定时执行
* /flighting/getFlightTask
* {catchId: 9435439}
*
* 获取飞往目的地列表
* /flighting/getFlyToApplets
* */
import { http } from 'mocp/utils/http'
export const userTasksApi = (data, config) => {
return http({
method: 'POST',
url: '/flighting/userTasks',
data,
config
})
}
...@@ -45,6 +45,10 @@ const getImage = computed(() => { ...@@ -45,6 +45,10 @@ const getImage = computed(() => {
.airline { .airline {
display: flex; display: flex;
align-items: center; align-items: center;
:deep( .u-image__image){
display: block;
}
.txt { .txt {
margin-left: 8rpx; margin-left: 8rpx;
} }
......
<template> <template>
<!-- 航班号+航空图标 --> <!-- 航班号+航空图标 -->
<image <image
:style="{visibility: airlinePic ? 'visible' : 'hidden'}" :style="{
class="flight-no-image" visibility: airlinePic ? 'visible' : 'hidden',
:src="airlinePic || HnaPic" ...ps.style
}"
:src="airlinePic"
mode="widthFix" /> mode="widthFix" />
<text>{{ ps.flightNo }}</text> <text v-if="ps.flightNo">{{ ps.flightNo }}</text>
</template> </template>
<script setup> <script setup>
...@@ -13,15 +15,27 @@ import { computed } from 'vue' ...@@ -13,15 +15,27 @@ import { computed } from 'vue'
import HnaPic from 'mocpStatic/image/monitor/hna.png' import HnaPic from 'mocpStatic/image/monitor/hna.png'
import { airlinePicMapping } from './components/airlinePicMapping' import { airlinePicMapping } from './components/airlinePicMapping'
const ps = defineProps(['flightNo', 'airline']) const ps = defineProps({
const airlinePic = computed(function() { airline: {
return airlinePicMapping[ps.airline] type: String,
default: HnaPic
},
flightNo: {
type: [String, Number],
default: ''
},
style: {
type: Object,
default: () => {
return {
'width': '22rpx',
'height': '22rpx',
'marginRight': '6rpx'
}
}
}
}) })
const airlinePic = computed(() => airlinePicMapping[ps.airline])
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
.flight-no-image {
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
</style>
...@@ -11,17 +11,20 @@ ...@@ -11,17 +11,20 @@
<!-- 自定义导航栏 --> <!-- 自定义导航栏 -->
<global-navbar :title="title" v-if="showNavbar" :bgColor="navbgColor" :color="navColor"> <global-navbar :title="title" v-if="showNavbar" :bgColor="navbgColor" :color="navColor">
<template #left v-if="pages.length > 1 && showNavLeft"> <template #left v-if="pages.length > 1 && showNavLeft">
<up-icon v-if="navLeftType == 'icon'" :name="navLeftIcon" size="16" @tap="handleLeftClick" :color="navColor"></up-icon> <up-icon v-if="navLeftType == 'icon'" :name="navLeftIcon" size="16" @tap="handleLeftClick"
:color="navColor"></up-icon>
<view v-if="navLeftType == 'text'" class="cancel" @tap="handleLeftClick">{{ navLeftText }}</view> <view v-if="navLeftType == 'text'" class="cancel" @tap="handleLeftClick">{{ navLeftText }}</view>
</template> </template>
<template #right v-if="showNavRight"> <template #right v-if="showNavRight">
<global-button type="text" size="small" v-if="navRightType == 'text'" @tap="handleRightClick"> <global-button type="text" size="small" v-if="navRightType == 'text'" @tap="handleRightClick">
{{ navRightText }} {{ navRightText }}
</global-button> </global-button>
<global-button type="primary" size="small" v-if="navRightType == 'button'" style="padding: 0 32rpx" @tap="handleRightClick"> <global-button type="primary" size="small" v-if="navRightType == 'button'" style="padding: 0 32rpx"
@tap="handleRightClick">
{{ navRightText }} {{ navRightText }}
</global-button> </global-button>
<global-icon v-if="navRightType == 'icon'" :icon="navRightIcon" @tap="handleRightClick"></global-icon> <global-icon v-if="navRightType == 'icon'" :icon="navRightIcon"
@tap="handleRightClick"></global-icon>
</template> </template>
</global-navbar> </global-navbar>
<!-- tab切换 --> <!-- tab切换 -->
...@@ -97,7 +100,7 @@ ...@@ -97,7 +100,7 @@
import { computed, nextTick, onUnmounted, ref, watch } from 'vue' import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
// 获取屏幕边界到安全区域距离 // 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync() const {safeAreaInsets} = uni.getSystemInfoSync()
const es = defineEmits(['handleLeftClick', 'handleRightClick', 'handleFooterClick', 'handleChooseData']) const es = defineEmits(['handleLeftClick', 'handleRightClick', 'handleFooterClick', 'handleChooseData'])
const ps = defineProps({ const ps = defineProps({
background: { background: {
...@@ -309,11 +312,10 @@ const getStyle = computed(() => { ...@@ -309,11 +312,10 @@ const getStyle = computed(() => {
//监听选择 //监听选择
const chooseValue = ref([]) const chooseValue = ref([])
watch(chooseValue, (value) => { watch(chooseValue, (value) => {
let data = value.map((index) => pagingArr.value[current.value]?.getDataList[index]) let data = value.map((index) => pagingArr.value[current.value]?.dataList[index])
if (ps.mapFieldName) { if (ps.mapFieldName) {
data = data.map((v) => v[ps.mapFieldName]).join(ps.mapFieldSplit) data = data.map((v) => v[ps.mapFieldName]).join(ps.mapFieldSplit)
} }
console.log(data)
es('handleChooseData', data) es('handleChooseData', data)
}) })
const current = ref(ps.current) const current = ref(ps.current)
......
...@@ -23,31 +23,36 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -23,31 +23,36 @@ const useFlightSupportStore = defineStore('flightSupport', {
acs1: '' acs1: ''
}, },
screenData: { screenData: {
terminal: '',//航站 terminal: 'WUH',//航站
acType: '',//机型 acType: '',//机型
acOwn: ''//航司 acOwn: ''//航司
}, },
details: undefined,
listTab, listTab,
listScreen, listScreen,
listScreenCurrent: 1 listScreenCurrent: 1,
details: undefined,
filterDetailsList: [],
filterDetailsCurrentIndex: 0
} }
}, },
getters: { getters: {
getSearchData(state) { getSearchData (state) {
const userStore = useUserStore() const userStore = useUserStore()
return {...state.searchData, ...state.screenData, terminal: userStore.userInfo?.terminal || 'WUH'} return {...state.searchData, ...state.screenData, terminal: userStore.userInfo?.terminal || 'WUH'}
}, },
getSelectedList(state) { getSelectedList (state) {
return state.listTab.filter(item => item.selected) return state.listTab.filter(item => item.selected)
}, },
getTerminal() { getTerminal () {
const userStore = useUserStore() const userStore = useUserStore()
return userStore.userInfo?.terminal || 'WUH' return userStore.userInfo?.terminal || 'WUH'
},
getDetailsCurrentMsg (state) {
return state.filterDetailsList[state.filterDetailsCurrentIndex]
} }
}, },
actions: { actions: {
resetScreenForm() { resetScreenForm () {
const userStore = useUserStore() const userStore = useUserStore()
this.screenData = { this.screenData = {
terminal: userStore.userInfo?.terminal || 'WUH', terminal: userStore.userInfo?.terminal || 'WUH',
...@@ -55,7 +60,7 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -55,7 +60,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
acOwn: '' acOwn: ''
} }
}, },
setStateScreen(state) { setStateScreen (state) {
const userStore = useUserStore() const userStore = useUserStore()
this.screenData = { this.screenData = {
terminal: state.terminal || userStore.userInfo?.terminal || 'WUH', terminal: state.terminal || userStore.userInfo?.terminal || 'WUH',
...@@ -64,7 +69,7 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -64,7 +69,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
} }
}, },
// 设置列表tab筛选数据 // 设置列表tab筛选数据
setListTabSelected(args) { setListTabSelected (args) {
this.listTab = this.listTab.map(item => { this.listTab = this.listTab.map(item => {
const that = args.find(args => args == item.label) const that = args.find(args => args == item.label)
return { return {
...@@ -75,18 +80,18 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -75,18 +80,18 @@ const useFlightSupportStore = defineStore('flightSupport', {
} }
}, },
// 配置持久化 // 配置持久化
persist: false // persist: false
/*persist: { persist: {
// 调整为兼容多端的API // 调整为兼容多端的API
storage: { storage: {
setItem(key, value) { setItem (key, value) {
uni.setStorageSync(key, value) uni.setStorageSync(key, value)
}, },
getItem(key) { getItem (key) {
return uni.getStorageSync(key) return uni.getStorageSync(key)
} }
} }
}*/ }
}) })
export default useFlightSupportStore export default useFlightSupportStore
...@@ -5,10 +5,10 @@ const useInforDisclosureStore = defineStore('inforDisclosure', { ...@@ -5,10 +5,10 @@ const useInforDisclosureStore = defineStore('inforDisclosure', {
return { return {
searchData: { searchData: {
state: 1, state: 1,
machineNumber: '', machine_number: '',
planeModel: '', planeModel: '',
aviation: '', aviation: '',
terminal: '', termin: '',
startTime: '', startTime: '',
guarantee: '', guarantee: '',
rlease_state: '', rlease_state: '',
...@@ -21,13 +21,13 @@ const useInforDisclosureStore = defineStore('inforDisclosure', { ...@@ -21,13 +21,13 @@ const useInforDisclosureStore = defineStore('inforDisclosure', {
}, },
getters: {}, getters: {},
actions: { actions: {
resetForm() { resetForm () {
this.searchData = { this.searchData = {
state: 1, state: 1,
machineNumber: '', machine_number: '',
planeModel: '', planeModel: '',
aviation: '', aviation: '',
terminal: '', termin: '',
startTime: '', startTime: '',
guarantee: '', guarantee: '',
rlease_state: '', rlease_state: '',
...@@ -36,7 +36,7 @@ const useInforDisclosureStore = defineStore('inforDisclosure', { ...@@ -36,7 +36,7 @@ const useInforDisclosureStore = defineStore('inforDisclosure', {
professional: '' professional: ''
} }
}, },
setState(...args) { setState (...args) {
this.$patch({[args[0]]: args[1]}) this.$patch({[args[0]]: args[1]})
} }
}, },
...@@ -45,10 +45,10 @@ const useInforDisclosureStore = defineStore('inforDisclosure', { ...@@ -45,10 +45,10 @@ const useInforDisclosureStore = defineStore('inforDisclosure', {
persist: { persist: {
// 调整为兼容多端的API // 调整为兼容多端的API
storage: { storage: {
setItem(key, value) { setItem (key, value) {
uni.setStorageSync(key, value) uni.setStorageSync(key, value)
}, },
getItem(key) { getItem (key) {
return uni.getStorageSync(key) return uni.getStorageSync(key)
} }
} }
......
import { defineStore } from 'pinia'
import useUserStore from 'mocp/store/user'
const useInforDisclosureStore = defineStore('supportedTask', {
state: () => {
return {
searchData: {},
details: undefined
}
},
getters: {},
actions: {
resetForm () {
const userStore = useUserStore()
this.searchData.realUserId = userStore.userInfo.id
},
setState (...args) {
this.$patch({[args[0]]: args[1]})
}
},
// 配置持久化
persist: false
})
export default useInforDisclosureStore
...@@ -2,6 +2,7 @@ import { defineStore } from 'pinia' ...@@ -2,6 +2,7 @@ import { defineStore } from 'pinia'
import { ref } from 'vue' import { ref } from 'vue'
const menuList = ref([ const menuList = ref([
{id: 15, name: '我的跟机', icon: 'khjl', group: '运行品质', count: 0, url: '/panel/supported-task/list'},
{id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/inforDisclosure/search'}, {id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/inforDisclosure/search'},
{id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0, url: '/panel/fleet/search'}, {id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0, url: '/panel/fleet/search'},
{id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0, url: '/panel/support-application/search'}, {id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0, url: '/panel/support-application/search'},
...@@ -29,11 +30,11 @@ const useUserStore = defineStore('user', { ...@@ -29,11 +30,11 @@ const useUserStore = defineStore('user', {
}, },
getters: { getters: {
//获取全部菜单 //获取全部菜单
getMenuList() { getMenuList () {
return menuList.value return menuList.value
}, },
//获取分组菜单 //获取分组菜单
getGroupMenuList(state) { getGroupMenuList (state) {
return state.getMenuList.reduce((groups, item) => { return state.getMenuList.reduce((groups, item) => {
// 如果该组不存在,则创建一个新组 // 如果该组不存在,则创建一个新组
if (!groups[item.group]) { if (!groups[item.group]) {
...@@ -45,7 +46,7 @@ const useUserStore = defineStore('user', { ...@@ -45,7 +46,7 @@ const useUserStore = defineStore('user', {
}, {}) }, {})
}, },
//获取当前登录用户的首页菜单 //获取当前登录用户的首页菜单
getHomeMenuList(state) { getHomeMenuList (state) {
const homeMenuList = state.allHomeMenuList.find((item) => item.userId == state.userInfo?.id)?.homeMenuList const homeMenuList = state.allHomeMenuList.find((item) => item.userId == state.userInfo?.id)?.homeMenuList
const ids = [] const ids = []
homeMenuList.forEach((item) => { homeMenuList.forEach((item) => {
...@@ -56,7 +57,7 @@ const useUserStore = defineStore('user', { ...@@ -56,7 +57,7 @@ const useUserStore = defineStore('user', {
}, },
actions: { actions: {
//用户登录 //用户登录
setUserInfo(data) { setUserInfo (data) {
this.token = data.token this.token = data.token
this.userInfo = data this.userInfo = data
//加入用户首页菜单信息 //加入用户首页菜单信息
...@@ -65,7 +66,7 @@ const useUserStore = defineStore('user', { ...@@ -65,7 +66,7 @@ const useUserStore = defineStore('user', {
this.allHomeMenuList.push({ this.allHomeMenuList.push({
userId: this.userInfo.id, userId: this.userInfo.id,
homeMenuList: this.getMenuList.map((item) => { homeMenuList: this.getMenuList.map((item) => {
return { id: item.id } return {id: item.id}
}) })
}) })
} }
...@@ -73,14 +74,14 @@ const useUserStore = defineStore('user', { ...@@ -73,14 +74,14 @@ const useUserStore = defineStore('user', {
uni.$mocpJump.redirectTo('/tab/index') uni.$mocpJump.redirectTo('/tab/index')
}, },
//退出登录 //退出登录
handleLogOut() { handleLogOut () {
this.token = '' this.token = ''
this.userInfo = undefined this.userInfo = undefined
//返回登录页面 //返回登录页面
uni.$mocpJump.redirectTo('/login/index') uni.$mocpJump.redirectTo('/login/index')
}, },
//修改用户首页菜单 //修改用户首页菜单
changeHomeMenuList(menuList) { changeHomeMenuList (menuList) {
const index = this.allHomeMenuList.findIndex((item) => item.userId == this.userInfo.id) const index = this.allHomeMenuList.findIndex((item) => item.userId == this.userInfo.id)
this.allHomeMenuList[index].homeMenuList = menuList this.allHomeMenuList[index].homeMenuList = menuList
} }
...@@ -89,10 +90,10 @@ const useUserStore = defineStore('user', { ...@@ -89,10 +90,10 @@ const useUserStore = defineStore('user', {
persist: { persist: {
// 调整为兼容多端的API // 调整为兼容多端的API
storage: { storage: {
setItem(key, value) { setItem (key, value) {
uni.setStorageSync(key, value) uni.setStorageSync(key, value)
}, },
getItem(key) { getItem (key) {
return uni.getStorageSync(key) return uni.getStorageSync(key)
} }
} }
......
...@@ -2,7 +2,7 @@ import { ref, computed } from 'vue' ...@@ -2,7 +2,7 @@ import { ref, computed } from 'vue'
const dayForMilliseconds = 24 * 3600 * 1000 const dayForMilliseconds = 24 * 3600 * 1000
export function decideTimeRange(inputNum) { export function decideTimeRange (inputNum) {
const d = new Date(inputNum) const d = new Date(inputNum)
d.setHours(5, 0, 0, 0) d.setHours(5, 0, 0, 0)
return { return {
...@@ -29,6 +29,10 @@ export const listScreen = [ ...@@ -29,6 +29,10 @@ export const listScreen = [
{name: '无航班', value: 2} {name: '无航班', value: 2}
] ]
export const followAcTagAll = [
'未接收', '已接收', '已出发', '已到位', '已登机'
]
export const fightListTime = ['etdChn', 'atdChn', 'etaChn', 'ataChn'] export const fightListTime = ['etdChn', 'atdChn', 'etaChn', 'ataChn']
export const fightListPlanTime = ['staChn', 'schTime'] export const fightListPlanTime = ['staChn', 'schTime']
export const finishedStatus = ['ARR', 'NDR', 'ATA'] export const finishedStatus = ['ARR', 'NDR', 'ATA']
......
...@@ -4,7 +4,7 @@ const baseURL = 'https://hna-platform.anyremote.cn' //测试 ...@@ -4,7 +4,7 @@ const baseURL = 'https://hna-platform.anyremote.cn' //测试
// 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()
} }
...@@ -47,6 +47,7 @@ export const httpInterceptor = (options) => { ...@@ -47,6 +47,7 @@ export const httpInterceptor = (options) => {
apiPwd: 'Ifar$2_0160_525_Mocp', apiPwd: 'Ifar$2_0160_525_Mocp',
requestFrom: '6', requestFrom: '6',
realUserId: userStore.userInfo?.id realUserId: userStore.userInfo?.id
// 1806609951173058561 1806609983825715202 1806609992679890946
} }
} }
} }
...@@ -84,7 +85,7 @@ export const httpInterceptor = (options) => { ...@@ -84,7 +85,7 @@ export const httpInterceptor = (options) => {
} }
// 添加 token 请求头标识 // 添加 token 请求头标识
if (userStore.token) { if (userStore.token) {
options.header.Authorization = `Bearer ${userStore.token}` options.header.Authorization = `Bearer ${ userStore.token }`
} }
console.log('接口请求信息:', options) console.log('接口请求信息:', options)
return options return options
...@@ -98,7 +99,7 @@ export const http = (options) => { ...@@ -98,7 +99,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 +126,7 @@ export const http = (options) => { ...@@ -125,7 +126,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)
......
...@@ -178,6 +178,12 @@ ...@@ -178,6 +178,12 @@
} }
}, },
{ {
"path": "pages/modules/mocp/panel/supported-task/list",
"style": {
"navigationBarTitleText": "我的跟机"
}
},
{
"path": "pages/modules/mocp/panel/inforDisclosure/search", "path": "pages/modules/mocp/panel/inforDisclosure/search",
"style": { "style": {
"navigationBarTitleText": "信息通报查询" "navigationBarTitleText": "信息通报查询"
......
...@@ -31,9 +31,15 @@ ...@@ -31,9 +31,15 @@
<view class="details-footer"> <view class="details-footer">
<view class="fleetDescribe">处理措施:</view> <view class="fleetDescribe">处理措施:</view>
<view class="describeCont">{{ details.handle || '无' }}</view> <view class="describeCont">{{ details.handle || '无' }}</view>
<view class="footerData occurrenceData">发生日期:{{ timeStampFormat(details.sendingTime, { format: 'YYYY-MM-DD' }) }}</view> <view class="footerData occurrenceData">
<view class="footerData occurrenceData">填报时间:{{ timeStampFormat(details.creationTime, { format: 'YYYY-MM-DD' }) }}</view> 发生日期:{{ timeStampFormat(details.sendingTime, {format: 'YYYY-MM-DD'}) }}
</view> </view>
<view class="footerData occurrenceData">
填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }}
</view>
</view>
</view> </view>
</template> </template>
</global-page> </global-page>
...@@ -46,7 +52,7 @@ import { timeStampFormat } from 'mocp/utils/tool' ...@@ -46,7 +52,7 @@ import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict' import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
const fleetStore = useFleetStore() const fleetStore = useFleetStore()
const { details } = storeToRefs(fleetStore) const {details} = storeToRefs(fleetStore)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../work-assignment/constants/details.scss'; @import '../work-assignment/constants/details.scss';
......
<template> <template>
<view class="globalDetailsModel detailsBasicInfo"> <view class="globalDetailsModel detailsBasicInfo">
<view class="title">BH9999</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>CKG</text> <text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.arrStn] }}</text>
<text class="m-x-6">重庆江北</text>
<text>T3</text>
</view>
<view>
<text>WUh</text>
<text>武汉天河</text>
<text>T2</text>
</view>
</view> </view>
<view class="basicInfoTime flex flex-between"> <view class="basicInfoTime flex flex-between">
<text>19:59</text> <text>{{ atdChnValue }}</text>
<image class="timeFlightIcon" :src="FlightImage" /> <image class="timeFlightIcon" :src="FlightImage" />
<text>20:59</text> <text>{{ ataChnValue }}</text>
</view> </view>
<view class="basicInfoTimePlan flex flex-between"> <view class="basicInfoTimePlan flex flex-between">
<view> <view>
<text>计划</text> <text>计划</text>
<text>5/9</text> <text class="MM">{{ timeStampFormat(getDetailsCurrentMsg.stdChn, {format: 'MM/DD'}) }}</text>
<text>16:59</text> <text>{{ timeStampFormat(getDetailsCurrentMsg.stdChn, {format: 'HH:mm'}) }}</text>
</view> </view>
<view> <view>
<text>5/9</text> <text>{{ timeStampFormat(getDetailsCurrentMsg.staChn, {format: 'MM/DD'}) }}</text>
<text>17:59</text> <text class="MM">{{ timeStampFormat(getDetailsCurrentMsg.staChn, {format: 'HH:mm'}) }}</text>
<text>计划</text> <text>计划</text>
</view> </view>
</view> </view>
</view> </view>
<DetailsFollowCrewItem title="跟机人员" :list="followCrewList" /> <DetailsFollowCrewItem title="跟机人员" :list="getDetailsCurrentMsg.mfollowAcLists" />
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { computed, ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png' import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue' import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
import useFlightSupportStore from 'mocp/store/flight-support'
const followCrewList = ref([ import { storeToRefs } from 'pinia'
{name: '斯柯达'}, import useBaseStore from 'mocp/store/base'
{name: '花飘万家雪'},
{name: '花样百出'} const baseStore = useBaseStore()
]) const flightSupportStore = useFlightSupportStore()
const {getDetailsCurrentMsg} = storeToRefs(flightSupportStore)
const atdChnValue = computed(() => {
const time = getDetailsCurrentMsg.value?.atdChn || getDetailsCurrentMsg.value.etdChn
return time ? timeStampFormat(time, {format: 'HH:mm'}) : '--:--'
})
const ataChnValue = computed(() => {
const time = getDetailsCurrentMsg.value?.ataChn || getDetailsCurrentMsg.value.etaChn
return time ? timeStampFormat(time, {format: 'HH:mm'}) : '--:--'
})
</script> </script>
......
<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"
class="followCrewItem flex flex-between" class="followCrewItem flex flex-between"
> >
<view class="flex"> <view class="flex">
<image class="img" :src="FlightImage" /> <!--<image class="img" :src="FlightImage" />-->
<view> <view>
<view>{{ item.name }}</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 class="rtIcon" name="checkmark-circle-fill" size="20" :color="$mocp-success-6" /> <template v-if="item.followStatus != undefined">
<text>已登机</text> <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> </view>
</view> </view>
<global-empty v-else />
</view> </view>
......
<template> <template>
<view class="globalDetailsModel detailsFollowingCrew detailsOtherInfo"> <DetailsWeather v-if="ps.weatherMsg?.depStnList" title="起飞当日" :msg="ps.weatherMsg.depStnList" />
<view class="font-700 flex">
<image class="timeFlightIcon" :src="FlightImage" />
<view>
<text class="m-x-6">重庆江北</text>
<text>CKG</text>
</view>
</view>
<view class="flex waterCont">
<image class="weatherIcon" :src="FlightImage" />
<view>
<view class="waterTp"></view>
<view>
<text class="waterTemp font-700">16°/30°</text>
<text class="waterText">(起飞当日)</text>
</view>
</view>
</view>
<view class="flex flex-between waterInfo">
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="FlightImage" />
<text>能见度</text>
</view>
<view>5000m</view>
</view>
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="FlightImage" />
<text>风速</text>
</view>
<view>5公里/小时</view>
</view>
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="FlightImage" />
<text>PM2.5</text>
</view>
<view>18优</view>
</view>
</view>
<DetailsWeather v-if="ps.weatherMsg?.arrStnList" title="落地当日" :msg="ps.weatherMsg.arrStnList" />
</view> <DetailsFollowCrewItem title="跟机机务" :list="FcArrangeMsg.crwStewardInf" />
<DetailsFollowCrewItem title="跟机机务" :list="followCrewList" />
<DetailsFollowCrewItem title="机组人员" :list="followCrewList" />
<DetailsFollowCrewItem title="机组人员" :list="FcArrangeMsg.crwPilotInf" />
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref, onMounted } from 'vue'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue' import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
import DetailsWeather from './DetailsWeather.vue'
const followCrewList = ref([
{name: '斯柯达'}, const ps = defineProps({
{name: '花飘万家雪'}, weatherMsg: {
{name: '花样百出'} type: Object,
]) default: () => {
return {
depStnList: [], arrStnList: []
}
}
},
FcArrangeMsg: {
type: Object,
default: () => {
return {
crwPilotInf: [], crwStewardInf: []
}
}
}
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<swiper <swiper
class="swiperCont" class="swiperCont"
:current="1" :current="filterDetailsCurrentIndex || 0"
active-class="swiper-active" active-class="swiper-active"
previous-margin="20rpx" previous-margin="20rpx"
next-margin="380rpx" next-margin="380rpx"
@change="swiperChange" @change="swiperChange"
> >
<swiper-item v-for="(item, index) in currentAllRelatedFlights" :key="item.flightNo"> <swiper-item v-for="item in filterDetailsList" :key="item.id">
<view class="swiperItem"> <view class="swiperItem">
<view class="title">{{ item.flightNo }}</view> <view class="title">{{ item.flightNo }}</view>
<view class="flex swiperInfo"> <view class="flex swiperInfo">
<text>{{ item.depStn }}</text> <text>{{ item.depStn }}</text>
<image class="renderTime" :src="FlightImage" /> <image class="renderTime" :src="fly01" />
<text>{{ item.arrStn }}</text> <text>{{ item.arrStn }}</text>
</view> </view>
<view class="flex swiperInfo"> <view class="flex swiperInfo">
<text>{{ item.stdChn }}</text> <text>{{ timeStampFormat(item.stdChn, {format: 'HH:mm'}) }}</text>
<text>{{ item.staChn }}</text> <text>{{ timeStampFormat(item.staChn, {format: 'HH:mm'}) }}</text>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
...@@ -28,20 +28,23 @@ ...@@ -28,20 +28,23 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import useFlightSupportStore from 'mocp/store/flight-support' import useFlightSupportStore from 'mocp/store/flight-support'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png' import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import fly01 from 'mocpStatic/image/flight-support/fly01.png'
const flightSupportStore = useFlightSupportStore()
const {filterDetailsList, filterDetailsCurrentIndex} = storeToRefs(flightSupportStore)
const ps = defineProps({ const ps = defineProps({
currentAllRelatedFlights: { filterDetailsList: {
type: Array, type: Array,
default: [] default: []
} }
}) })
const swiperChange = (e) => { const swiperChange = (e) => {
console.log(e, e.detail.current) filterDetailsCurrentIndex.value = e.detail.current
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template>
<view class="globalDetailsModel detailsFollowingCrew detailsOtherInfo">
<view class="font-700 flex">
<image class="timeFlightIcon" :src="title == '起飞当日' ? fly02 : fly03" />
<view>
<text class="m-x-6">
{{ baseStore.getTerminalObject[title == '起飞当日' ? getDetailsCurrentMsg.depStn : getDetailsCurrentMsg.arrStn]
}}
</text>
</view>
</view>
<view class="flex waterCont">
<image class="weatherIcon" :src="weatherIconFn(msg.weatherInfoTxt)" />
<view>
<view class="waterTp" v-html="msg.weatherInfoTxt"></view>
<view>
<text class="waterTemp font-700">{{ msg.temperature }}°</text>
<text class="waterText">({{ title }})</text>
</view>
</view>
</view>
<view class="flex flex-between waterInfo">
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="visibility" />
<text>能见度</text>
</view>
<view>{{ msg.visibility }}m</view>
</view>
<view>
<view class="flex waterInfoItem">
<image class="weatherSubIcon" :src="windFs" />
<text>风速</text>
</view>
<view>{{ parseInt(msg.windFs) }} 米/秒</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import useBaseStore from 'mocp/store/base'
import { parseInt } from 'lodash'
import fly02 from 'mocpStatic/image/flight-support/fly02.png'
import fly03 from 'mocpStatic/image/flight-support/fly03.png'
import PM from 'mocpStatic/image/flight-support/PM.png'
import visibility from 'mocpStatic/image/flight-support/visibility.png'
import windFs from 'mocpStatic/image/flight-support/windFs.png'
import useFlightSupportStore from 'mocp/store/flight-support'
import { storeToRefs } from 'pinia'
import { weatherIconFn } from '../utils/weatherIcon'
const flightSupportStore = useFlightSupportStore()
const {getDetailsCurrentMsg} = storeToRefs(flightSupportStore)
const baseStore = useBaseStore()
const {title, msg} = defineProps({
title: {
type: String,
default: '起飞当日'
},
msg: {
type: Object,
default: () => ({})
}
})
</script>
<style lang="scss" scoped>
@import '../constants/details';
</style>
<template> <template>
<view v-if="msg?.length" @tap="rowClicked(ps.itemMsg)" class="tableRow flex" :class="ps.itemMsg.isFinished ? 'mocp-bg-fill-4' : ''"> <view
<view v-for="(item, index) of msg" :key="index" class="rowItem u-line-1 text-center" :style="{ flex: item.flex }"> v-if="msg?.length"
<global-airline-image :width="20" :height="20" v-if="item.keyValue === 'flightNo'" :code="item.airlineCode"> @tap="rowClicked(ps.itemMsg)"
class="tableRow flex"
:class="ps.itemMsg.isFinished ? 'mocp-bg-fill-4' : ''"
>
<view
v-for="(item, index) of msg"
:key="index"
class="rowItem u-line-1 text-center"
:style="{flex: item.flex}"
>
<global-airline-image :width="20" :height="20" class="text-center" v-if="item.keyValue === 'flightNo'"
:code="item.airlineCode">
{{ item.data }} {{ item.data }}
</global-airline-image> </global-airline-image>
<RenderTime v-else-if="item.keyValue === 'time'" :item="ps.itemMsg" /> <RenderTime
v-else-if="item.keyValue === 'time'"
:item="ps.itemMsg"
/>
<view v-else-if="item.keyValue == 'status'" :class="item.color"> <view
v-else-if="item.keyValue == 'status'"
:class="item.color">
{{ item.data }} {{ item.data }}
</view> </view>
...@@ -23,24 +39,26 @@ import useFlightSupportStore from 'mocp/store/flight-support' ...@@ -23,24 +39,26 @@ import useFlightSupportStore from 'mocp/store/flight-support'
import { allInBoundMode, currentInBoundModeForFlightTablePage, decideReleaseStatus } from '../utils/currentInBoundMode' import { allInBoundMode, currentInBoundModeForFlightTablePage, decideReleaseStatus } from '../utils/currentInBoundMode'
import RenderTime from '../components/RenderTime.vue' import RenderTime from '../components/RenderTime.vue'
import { fightListPlanTime } from 'mocp/utils/getFlightList' import { fightListPlanTime } from 'mocp/utils/getFlightList'
import { rowClicked } from '../utils/jumpSlingleFlight' import { storeToRefs } from 'pinia'
const flightSupportStore = useFlightSupportStore() const flightSupportStore = useFlightSupportStore()
const {details} = storeToRefs(flightSupportStore)
const listTab = flightSupportStore.listTab const listTab = flightSupportStore.listTab
const ps = defineProps({ const ps = defineProps({
itemMsg: { itemMsg: {
type: Object, type: Object,
default: () => {} default: () => {
}
} }
}) })
const msg = computed(() => { const msg = computed(() => {
if (!ps.itemMsg) return {} if (!ps.itemMsg) return {}
const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In const isCurrentIn = currentInBoundModeForFlightTablePage.value == allInBoundMode.In
const filterListTab = listTab.filter((item) => !!item.selected) const filterListTab = listTab.filter(item => !!item.selected)
return filterListTab.map((item) => { return filterListTab.map(item => {
const defaultObj = { const defaultObj = {
keyValue: item.keyValue, keyValue: item.keyValue,
flex: item.flex, flex: item.flex,
...@@ -54,17 +72,21 @@ const msg = computed(() => { ...@@ -54,17 +72,21 @@ const msg = computed(() => {
} }
} }
// 出发地 // 出发地
if (item.keyValue == 'depStn') { if (item.keyValue == 'place') {
return { return {
...defaultObj, ...defaultObj,
data: isCurrentIn ? ps.itemMsg.depStn : ps.itemMsg.arrStn data: isCurrentIn ?
ps.itemMsg.depStn :
ps.itemMsg.arrStn
} }
} }
// 计划 // 计划
if (fightListPlanTime.includes(item.keyValue)) { if (fightListPlanTime.includes(item.keyValue)) {
return { return {
...defaultObj, ...defaultObj,
data: isCurrentIn ? Day(ps.itemMsg.staChn).format('HH:mm') : Day(ps.itemMsg.stdChn).format('HH:mm') data: isCurrentIn ?
Day(ps.itemMsg.staChn).format('HH:mm') :
Day(ps.itemMsg.stdChn).format('HH:mm')
} }
} }
// 状态 // 状态
...@@ -86,6 +108,14 @@ const msg = computed(() => { ...@@ -86,6 +108,14 @@ const msg = computed(() => {
} }
}) })
}) })
const rowClicked = (currentMsg) => {
console.log('****', currentMsg)
if (!currentMsg.ac) return uni.$mocpMessage.error('航班已取消')
details.value = currentMsg
console.log('@@@@details', details.value)
uni.$mocpJump.navigateTo('/panel/flight-support/flight-support-details/index')
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../constants/flightSupportList'; @import '../constants/flightSupportList';
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
.header_no { .header_no {
font-size: 66rpx; font-size: 66rpx;
.airlineImg {
margin-left: 16rpx;
}
} }
.header_info { .header_info {
...@@ -101,8 +104,8 @@ ...@@ -101,8 +104,8 @@
} }
.renderTime { .renderTime {
width: 30rpx; width: 47rpx;
height: 30rpx; height: 26rpx;
} }
} }
...@@ -144,6 +147,12 @@ ...@@ -144,6 +147,12 @@
} }
} }
.tab-content {
margin-top: 0;
flex: auto;
overflow-y: auto;
}
.btn_lf { .btn_lf {
margin-right: 46rpx; margin-right: 46rpx;
} }
...@@ -177,6 +186,10 @@ ...@@ -177,6 +186,10 @@
.basicInfoTimePlan { .basicInfoTimePlan {
font-size: 12px; font-size: 12px;
color: $mocp-text-4; color: $mocp-text-4;
.MM {
margin: 0 12rpx;
}
} }
} }
...@@ -184,8 +197,8 @@ ...@@ -184,8 +197,8 @@
padding-bottom: 24rpx; padding-bottom: 24rpx;
.timeFlightIcon { .timeFlightIcon {
width: 40rpx; width: 48rpx;
height: 40rpx; height: 48rpx;
} }
.waterCont { .waterCont {
...@@ -212,8 +225,8 @@ ...@@ -212,8 +225,8 @@
} }
.weatherSubIcon { .weatherSubIcon {
width: 24rpx; width: 26rpx;
height: 24rpx; height: 26rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
&.flex-3 { &.flex-3 {
flex: 3; flex: 3;
} }
.text-center {
justify-content: center;
}
} }
} }
} }
......
...@@ -3,18 +3,22 @@ ...@@ -3,18 +3,22 @@
<view class="flightSupportDetails"> <view class="flightSupportDetails">
<view class="details_header"> <view class="details_header">
<view class="header_no flex"> <view class="header_no flex">
<image class="flight-no-image" :src="HnaPic" mode="widthFix" /> <global-airline-image
<text>B9999</text> :width="64" :height="64"
:code="details.airlineCode">
<text class="airlineImg"></text>
</global-airline-image>
<text>{{ details.ac }}</text>
</view> </view>
<view class="header_info flex"> <view class="header_info flex">
<text class="margin-r-32">机型:A999</text> <text class="margin-r-32">机型:{{ details.acTypeGc }}</text>
<text>机位:HG99</text> <text>机位:{{ details.airlineCode }}</text>
</view> </view>
</view> </view>
<view class="details_swiper"> <view class="details_swiper">
<detailsSwiper :currentAllRelatedFlights="currentAllRelatedFlights" /> <detailsSwiper :filterDetailsList="filterDetailsList" />
</view> </view>
<view class="details_tab"> <view class="details_tab">
...@@ -26,54 +30,148 @@ ...@@ -26,54 +30,148 @@
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 />
<detailsOtherInfo v-else :weatherMsg="weatherMsg" :FcArrangeMsg="FcArrangeMsg" />
</scroll-view>
</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 { cloneDeep } from 'lodash'
import useBaseStore from 'mocp/store/base'
import useFlightSupportStore from 'mocp/store/flight-support' import useFlightSupportStore from 'mocp/store/flight-support'
import { onUnload } from '@dcloudio/uni-app' import { onLoad } from '@dcloudio/uni-app'
import HnaPic from 'mocpStatic/image/air-company/hnhk.png' 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 { followAcTagAll } from 'mocp/utils/getFlightList'
const currentAllRelatedFlights = reactive([ const {safeAreaInsets} = uni.getSystemInfoSync()
{ const flightSupportStore = useFlightSupportStore()
flightNo: 'B7777', const {
depStn: 'AKG', searchData,
arrStn: 'WUH', details,
stdChn: '16:16', filterDetailsList,
staChn: '17:17' filterDetailsCurrentIndex,
}, getDetailsCurrentMsg
{ } = storeToRefs(flightSupportStore)
flightNo: 'B8888',
depStn: 'VGF',
arrStn: 'JHY',
stdChn: '18:18',
staChn: '19:19'
},
{
flightNo: 'B9999',
depStn: 'ERG',
arrStn: 'MHG',
stdChn: '20:20',
staChn: '21:21'
}
])
const tabList = ['航班信息', '其他信息'] const tabList = ['航班信息', '其他信息']
const tabCurrent = ref(0) const tabCurrent = ref(0)
onLoad(() => {
getAllFlightsByAc()
})
const getAllFlightsByAc = async () => {
const params = {
acs2: details.value.ac,
// pageSize: 100,
startT: searchData.value.startT,
stopT: searchData.value.stopT
}
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})))
if (allReleases.every(a => Array.isArray(a.data))) {
allReleases.forEach((q, w) => {
list[w].releases = q.data
})
} else {
uni.$mocpMessage.error('请求异常')
}
list = list.map(item => {
if (!item.mfollowAcLists || !item.mfollowAcLists.length) {
return {...item}
} else {
const mfollowAcLists = []
for (let followAcItem of item.mfollowAcLists) {
mfollowAcLists.push({
...followAcItem,
followStatusValue: followAcTagAll[followAcItem.followStatus]
})
}
return {
...item,
mfollowAcLists
}
}
})
filterDetailsCurrentIndex.value = list.findIndex(a => a.depStn === details.value.depStn && a.stdChn === details.value.stdChn)
filterDetailsList.value = list
}
}
const weatherMsg = ref()
const FcArrangeMsg = ref()
watchEffect(async () => {
const msg = {
depStnList: [],
arrStnList: []
}
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}
)
if (arrStnRes.code == '200') msg.arrStnList = arrStnRes.data[arrStnRes.data.length - 1]
weatherMsg.value = msg
// 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>
@import '../constants/details'; @import '../constants/details';
......
...@@ -91,6 +91,7 @@ const transformData = (data) => { ...@@ -91,6 +91,7 @@ const transformData = (data) => {
} }
return q return q
}).flat() }).flat()
console.log('@@listMsg', listMsg)
return listMsg return listMsg
} }
...@@ -103,9 +104,8 @@ const subsectionChange = (e) => { ...@@ -103,9 +104,8 @@ const subsectionChange = (e) => {
searchData.value.isOut = e searchData.value.isOut = e
currentInBoundModeForFlightTablePage.value = e currentInBoundModeForFlightTablePage.value = e
const ind = listTab.value.findIndex((item) => item.label == '出发地' || item.label == '目的地') const ind = listTab.value.findIndex((item) => item.label == '出发地' || item.label == '目的地')
const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In const isCurrentIn = currentInBoundModeForFlightTablePage.value == allInBoundMode.In
if (ind > -1) { if (ind > -1) {
console.log(currentInBoundModeForFlightTablePage.value, allInBoundMode.In, ind)
listTab.value[ind].label = isCurrentIn ? '出发地' : '目的地' listTab.value[ind].label = isCurrentIn ? '出发地' : '目的地'
} }
paging.value.reload() paging.value.reload()
......
import { ref } from 'vue'
import { allInBoundMode, currentInBoundModeForFlightSinglePage } from './currentInBoundMode'
import { disableUpdateInTimeForTasks } from './scheduledReload'
export const fromTablePartIdentifierProps = ref({
depStn: '',
stdChn: ''
})
export const timeRangeSpecifier = ref(0)
export const currentAllRelatedFlights = ref([])
export const currentFlightDataPassAlong = ref({})
export const isFetchingDataInFlightSingle = ref(false)
export const currentFlightSingleHandlingAc = ref('')
export const currentSelectedIndexInAllRelatedFlights = ref(0)
export const currentFlightSingleHandlingAcType = ref('')
export const currentAirlineCode = ref('')
let initialIndexConfig = 0
let initialType = allInBoundMode.In
/*export function setUpInitialSwitchConfig() {
initialIndexConfig = currentSelectedIndexInAllRelatedFlights.value
initialType = currentInBoundModeForFlightSinglePage.value
}*/
export function beforeJumpSingleFlightHandleFunc(ac, identifier, inBoundMode, airlineCode) {
currentAllRelatedFlights.value = []
currentFlightDataPassAlong.value = {}
currentFlightSingleHandlingAc.value = ac
fromTablePartIdentifierProps.value = identifier
currentInBoundModeForFlightSinglePage.value = inBoundMode
currentAirlineCode.value = airlineCode
}
/*export function currentSelectedIndexInAllRelatedFlightsChanged(v) {
disableUpdateInTimeForTasks()
currentSelectedIndexInAllRelatedFlights.value = v
currentFlightDataPassAlong.value = currentAllRelatedFlights.value[v]
if (v === initialIndexConfig) {
currentInBoundModeForFlightSinglePage.value = initialType
} else if (v === initialIndexConfig + 1) {
currentInBoundModeForFlightSinglePage.value = initialType === allInBoundMode.In ? allInBoundMode.Out : allInBoundMode.In
}
}*/
import { ref } from 'vue' import { ref } from 'vue'
export const allInBoundMode = { export const allInBoundMode = {
In: 1, In: 0,
Out: 2 Out: 1
} }
export const currentInBoundModeForFlightTablePage = ref(allInBoundMode.In) export const currentInBoundModeForFlightTablePage = ref(allInBoundMode.In)
...@@ -12,7 +12,7 @@ export const currentInBoundModeForFlightSinglePage = ref(allInBoundMode.In) ...@@ -12,7 +12,7 @@ export const currentInBoundModeForFlightSinglePage = ref(allInBoundMode.In)
export function decideReleaseStatus(v) { export function decideReleaseStatus(v) {
let allReleases = v.releases let allReleases = v.releases
let manualReleases = allReleases.filter(a => a.isUserAdd) let manualReleases = allReleases.filter(a => a.isUserAdd)
if (currentInBoundModeForFlightTablePage.value + 1 === allInBoundMode.Out) { if (currentInBoundModeForFlightTablePage.value === allInBoundMode.Out) {
manualReleases = manualReleases.filter(a => a.isOut) manualReleases = manualReleases.filter(a => a.isOut)
allReleases = allReleases.filter(a => a.isOut) allReleases = allReleases.filter(a => a.isOut)
} else { } else {
......
import { timeRangeSpecifier, beforeJumpSingleFlightHandleFunc } from './currentAllRelatedFlights'
import { currentInBoundModeForFlightTablePage, allInBoundMode } from './currentInBoundMode'
export const rowClicked = (currentMsg) => {
console.log('****', currentMsg)
if (!currentMsg.ac) return uni.$mocpMessage.error('航班已取消')
timeRangeSpecifier.value = 0
beforeJumpSingleFlightHandleFunc(currentMsg.ac, {
depStn: currentMsg.depStn,
stdChn: currentMsg.stdChn
},
currentInBoundModeForFlightTablePage.value,
currentMsg.airlineCode
)
uni.$mocpJump.navigateTo('/panel/flight-support/flight-support-details/index')
}
\ No newline at end of file
let shouldTimelyUpdate = false
let clearlyTimeout = 0
const TimeIntervalJob = 5000
export function disableUpdateInTimeForTasks() {
clearTimeout(clearlyTimeout)
shouldTimelyUpdate = false
clearlyTimeout = setTimeout(function() {
shouldTimelyUpdate = true
}, TimeIntervalJob)
}
\ No newline at end of file
import SunCloud from 'mocpStatic/image/flight-support/Sun.png'
import rain from 'mocpStatic/image/flight-support/rain.png'
import Cloud from 'mocpStatic/image/flight-support/Cloud.png'
import snow from 'mocpStatic/image/flight-support/snow.png'
const weatherMsg = {
'晴': SunCloud,
'雨': rain,
'阴': Cloud,
'雪': snow
}
export const weatherIconFn = (txt) => {
const text = txt.replace(/<[^>]*>?/gm, '')
let weather
for (let item in weatherMsg) {
if (text.indexOf(item) > -1) {
weather = weatherMsg[item]
}
}
return weather || SunCloud
}
<template>
<view
@tap="goDetails(item)"
class="item"
>
<view class="item-title">
<view class="left">
<custom-state :value="item.status?.toUpperCase()" />
</view>
<view class="right inforDisTags">
<global-tag
v-for="tagItem of item.tags"
:key="tagItem.text"
:type="tagItem.type" class="txt">
{{ tagItem.text }}
</global-tag>
</view>
</view>
<view class="item-content u-line-3">
<view class="inforDis">
<text v-if="item.machineNumber">机号:{{ item.machineNumber }}</text>
<text v-if="item.ATA">ATA:{{ item.ata }}</text>
</view>
<text>{{ item.faultDescription || '无' }}</text>
</view>
<view class="item-footer inforDisFooter">
<view class="label">
<global-icon icon="calendar" />
<text class="txt">
{{ item.time }}
</text>
</view>
<view class="label right">
<global-icon icon="idcard" />
<text class="txt">
值班人员:{{ item.filledBy }}
</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import useInforDisclosureStore from 'mocp/store/inforDisclosure'
import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app'
import { getMocinfoListApi } from 'mocp/api/inforDisclosure'
import { getParamsByType } from 'mocp/hooks/use-params/useParams'
const ps = defineProps({
item: {
type: Object,
default: () => ({})
}
})
const {item} = ps
//跳转
const inforDisclosureStore = useInforDisclosureStore()
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/inforDisclosure/details', {id: data.id}).then(() => {
inforDisclosureStore.setState('details', data)
})
}
//刷新
const paging = ref()
uni.$on('inforDisclosureReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('inforDisclosureReload')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
@import '../constants/inforDisclosure.scss';
</style>
...@@ -19,45 +19,7 @@ ...@@ -19,45 +19,7 @@
@handleRightClick="handleRightClick" @handleRightClick="handleRightClick"
> >
<template #="{ item }"> <template #="{ item }">
<view <inforDisclosureItem :item="item" />
@tap="goDetails(item)"
class="item"
>
<view class="item-title">
<view class="left">
<custom-state :value="item.status?.toUpperCase()" />
</view>
<view class="right inforDisTags">
<global-tag
v-for="tagItem of item.tags"
:key="tagItem.text"
:type="tagItem.type" class="txt">
{{ tagItem.text }}
</global-tag>
</view>
</view>
<view class="item-content u-line-3">
<view class="inforDis">
<text v-if="item.machineNumber">机号:{{ item.machineNumber }}</text>
<text v-if="item.ATA">ATA:{{ item.ata }}</text>
</view>
<text>{{ item.faultDescription || '无' }}</text>
</view>
<view class="item-footer inforDisFooter">
<view class="label">
<global-icon icon="calendar" />
<text class="txt">
{{ item.time }}
</text>
</view>
<view class="label right">
<global-icon icon="idcard" />
<text class="txt">
值班人员:{{ item.filledBy }}
</text>
</view>
</view>
</view>
</template> </template>
</global-page-swiper> </global-page-swiper>
...@@ -70,12 +32,11 @@ import { storeToRefs } from 'pinia' ...@@ -70,12 +32,11 @@ import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app' import { onUnload } from '@dcloudio/uni-app'
import { getMocinfoListApi } from 'mocp/api/inforDisclosure' import { getMocinfoListApi } from 'mocp/api/inforDisclosure'
import { getParamsByType } from 'mocp/hooks/use-params/useParams' import { getParamsByType } from 'mocp/hooks/use-params/useParams'
import inforDisclosureItem from './components/inforDisClosureItem.vue'
//跳转 //跳转
const inforDisclosureStore = useInforDisclosureStore() const inforDisclosureStore = useInforDisclosureStore()
const {searchData} = storeToRefs(inforDisclosureStore) const {searchData} = storeToRefs(inforDisclosureStore)
const tabList = [ const tabList = [
{ {
name: '当前通报', name: '当前通报',
...@@ -87,12 +48,6 @@ const tabList = [ ...@@ -87,12 +48,6 @@ const tabList = [
} }
] ]
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/inforDisclosure/details', {id: data.id}).then(() => {
inforDisclosureStore.setState('details', data)
})
}
const transformData = (data) => { const transformData = (data) => {
const GuaranteeStageList = getParamsByType('GuaranteeStage') const GuaranteeStageList = getParamsByType('GuaranteeStage')
const OperationPhaseList = getParamsByType('OperationPhase') const OperationPhaseList = getParamsByType('OperationPhase')
...@@ -108,7 +63,6 @@ const transformData = (data) => { ...@@ -108,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+?$/, ''),
...@@ -154,7 +108,4 @@ onUnload(() => { ...@@ -154,7 +108,4 @@ onUnload(() => {
uni.$off('inforDisclosureReload') uni.$off('inforDisclosureReload')
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
@import 'mocpStatic/css/list.scss';
@import './constants/inforDisclosure.scss';
</style>
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
labelWidth="auto"> labelWidth="auto">
<up-form-item <up-form-item
label="机号" label="机号"
prop="machineNumber" prop="machine_number"
:borderBottom="true"> :borderBottom="true">
<global-picker <global-picker
pickAlign="right" pickAlign="right"
v-model="formData.machineNumber" v-model="formData.machine_number"
:options="deviceNumList" :options="deviceNumList"
clearable clearable
filter filter
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
/> />
</up-form-item> </up-form-item>
<up-form-item label="航站" prop="terminal" :borderBottom="true"> <up-form-item label="航站" prop="termin" :borderBottom="true">
<global-picker <global-picker
pickAlign="right" pickAlign="right"
v-model="formData.terminal" v-model="formData.termin"
clearable clearable
:options="baseStore.getTerminalSelect" :options="baseStore.getTerminalSelect"
filter filter
......
<template>
<view
class="item"
>
<view class="item-title">
<view class="left">
<custom-state :value="item.status?.toUpperCase()" />
</view>
<view class="right inforDisTags">
<global-tag
v-for="tagItem of item.tags"
:key="tagItem.text"
:type="tagItem.type" class="txt">
{{ tagItem.text }}
</global-tag>
</view>
</view>
<view class="item-content u-line-3">
<view class="inforDis">
<text v-if="item.machineNumber">机号:{{ item.machineNumber }}</text>
<text v-if="item.ATA">ATA:{{ item.ata }}</text>
</view>
<text>{{ item.faultDescription || '无' }}</text>
</view>
<view class="item-footer inforDisFooter">
<view class="label">
<global-icon icon="calendar" />
<text class="txt">
{{ item.time }}
</text>
</view>
<view class="label right">
<global-icon icon="idcard" />
<text class="txt">
值班人员:{{ item.filledBy }}
</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const ps = defineProps({
item: {
type: Object,
default: () => ({})
}
})
const {item} = ps
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
</style>
<template>
<global-page-swiper
title="我的跟机"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchData"
:api="userTasksApi"
:padding="24"
:transformData="transformData"
:tabList="tabList"
tabValueField="state"
tabsWidth="50%"
chooseDataType="checkbox"
@handleChooseData="handleChooseData"
>
<template #="{ item }">
<supportedTaskItem :item="itemMsg" />
</template>
</global-page-swiper>
</template>
<script setup>
import { ref } from 'vue'
import useSupportedTaskStore from 'mocp/store/supportedTask'
import { storeToRefs } from 'pinia'
import { userTasksApi } from 'mocp/api/supportedTask'
import supportedTaskItem from './components/supportedTaskItem.vue'
//跳转
const supportedTaskStore = useSupportedTaskStore()
const {searchData} = storeToRefs(supportedTaskStore)
const tabList = [
{
name: '今日及次日后跟机任务',
value: 1
},
{
name: '历史跟机任务',
value: 2
}
]
const transformData = (data) => {
console.log('@@mappedData', data)
return [
{
followStatus: 1,//跟机状态
aaa: 1,//跟机航班日期
bbb: 1,//起飞时间
ccc: 1,//跟机航站
ddd: 1,//航司
eee: 1,//航班号
fff: 1,//飞机号
ggg: 1//机型
}
]
}
const handleChooseData = (data) => {
console.log('@@', data)
}
</script>
<style lang="scss" scoped></style>
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