Commit 58d844b6 by liujinbo

信息通报-兼容其他模板展示

parent 8ad2b684
......@@ -16,3 +16,45 @@ export const getAircraftTerminalsApi = (data, 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
})
}
/*
* 获取天气信息
* /basicinfo/findWeatherSynopsesMessages
* {airportCode: "WUH"}
* [取最后一条数据] weatherInfoTxt-天气明朗 temperature-温度
*
*
* 获取航班任务-定时执行
* /flighting/getFlightTask
* {catchId: 9435439}
*
* 获取飞往目的地列表
* /flighting/getFlyToApplets
*
*
* */
<template>
<!-- 航班号+航空图标 -->
<image
:style="{visibility: airlinePic ? 'visible' : 'hidden'}"
class="flight-no-image"
:src="airlinePic || HnaPic"
:style="{
visibility: airlinePic ? 'visible' : 'hidden',
...ps.style
}"
:src="airlinePic"
mode="widthFix" />
<text>{{ ps.flightNo }}</text>
<text v-if="ps.flightNo">{{ ps.flightNo }}</text>
</template>
<script setup>
......@@ -13,15 +15,27 @@ import { computed } from 'vue'
import HnaPic from 'mocpStatic/image/monitor/hna.png'
import { airlinePicMapping } from './components/airlinePicMapping'
const ps = defineProps(['flightNo', 'airline'])
const airlinePic = computed(function() {
return airlinePicMapping[ps.airline]
const ps = defineProps({
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>
<style lang="scss" scoped>
.flight-no-image {
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
</style>
<style lang="scss" scoped></style>
......@@ -15,7 +15,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
isInbound: 1,
ac: '',//机号
flightNo: '',//航班号
flightNo: 'GS7857',//航班号 临时测试用,ljb
acOwns2: '',
acTerminals1: '',
......@@ -23,31 +23,36 @@ const useFlightSupportStore = defineStore('flightSupport', {
acs1: ''
},
screenData: {
terminal: '',//航站
terminal: 'WUH',//航站
acType: '',//机型
acOwn: ''//航司
},
details: undefined,
listTab,
listScreen,
listScreenCurrent: 1
listScreenCurrent: 1,
details: undefined,
filterDetailsList: [],
filterDetailsCurrentIndex: 0
}
},
getters: {
getSearchData(state) {
getSearchData (state) {
const userStore = useUserStore()
return {...state.searchData, ...state.screenData, terminal: userStore.userInfo?.terminal || 'WUH'}
},
getSelectedList(state) {
getSelectedList (state) {
return state.listTab.filter(item => item.selected)
},
getTerminal() {
getTerminal () {
const userStore = useUserStore()
return userStore.userInfo?.terminal || 'WUH'
},
getDetailsCurrentMsg (state) {
return state.filterDetailsList[state.filterDetailsCurrentIndex]
}
},
actions: {
resetScreenForm() {
resetScreenForm () {
const userStore = useUserStore()
this.screenData = {
terminal: userStore.userInfo?.terminal || 'WUH',
......@@ -55,7 +60,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
acOwn: ''
}
},
setStateScreen(state) {
setStateScreen (state) {
const userStore = useUserStore()
this.screenData = {
terminal: state.terminal || userStore.userInfo?.terminal || 'WUH',
......@@ -64,7 +69,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
}
},
// 设置列表tab筛选数据
setListTabSelected(args) {
setListTabSelected (args) {
this.listTab = this.listTab.map(item => {
const that = args.find(args => args == item.label)
return {
......@@ -75,18 +80,18 @@ const useFlightSupportStore = defineStore('flightSupport', {
}
},
// 配置持久化
persist: false
/*persist: {
// persist: false
persist: {
// 调整为兼容多端的API
storage: {
setItem(key, value) {
setItem (key, value) {
uni.setStorageSync(key, value)
},
getItem(key) {
getItem (key) {
return uni.getStorageSync(key)
}
}
}*/
}
})
export default useFlightSupportStore
......@@ -2,7 +2,7 @@ import { ref, computed } from 'vue'
const dayForMilliseconds = 24 * 3600 * 1000
export function decideTimeRange(inputNum) {
export function decideTimeRange (inputNum) {
const d = new Date(inputNum)
d.setHours(5, 0, 0, 0)
return {
......@@ -29,6 +29,10 @@ export const listScreen = [
{name: '无航班', value: 2}
]
export const followAcTagAll = [
'未接收', '已接收', '已出发', '已到位', '已登机'
]
export const fightListTime = ['etdChn', 'atdChn', 'etaChn', 'ataChn']
export const fightListPlanTime = ['staChn', 'schTime']
export const finishedStatus = ['ARR', 'NDR', 'ATA']
......
<template>
<view class="globalDetailsModel detailsBasicInfo">
<view class="title">BH9999</view>
<view class="title">{{ getDetailsCurrentMsg.flightNo }}</view>
<view class="basicInfoDep flex flex-between">
<view>
<text>CKG</text>
<text class="m-x-6">重庆江北</text>
<text>T3</text>
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.depStn] }}</text>
<!--<text class="m-x-6">重庆江北</text>-->
<!--<text>T3</text>-->
</view>
<view>
<text>WUh</text>
<text>武汉天河</text>
<text>T2</text>
<!--<text>{{ getDetailsCurrentMsg.arrStn }}</text>-->
<text>{{ baseStore.getTerminalObject[getDetailsCurrentMsg.arrStn] }}</text>
<!--<text>T2</text>-->
</view>
</view>
<view class="basicInfoTime flex flex-between">
<text>19:59</text>
<text>{{ atdChnValue }}</text>
<image class="timeFlightIcon" :src="FlightImage" />
<text>20:59</text>
<text>{{ ataChnValue }}</text>
</view>
<view class="basicInfoTimePlan flex flex-between">
<view>
<text>计划</text>
<text>5/9</text>
<text>16:59</text>
<text class="MM">{{ timeStampFormat(getDetailsCurrentMsg.stdChn, {format: 'MM/DD'}) }}</text>
<text>{{ timeStampFormat(getDetailsCurrentMsg.stdChn, {format: 'HH:mm'}) }}</text>
</view>
<view>
<text>5/9</text>
<text>17:59</text>
<text>{{ timeStampFormat(getDetailsCurrentMsg.staChn, {format: 'MM/DD'}) }}</text>
<text class="MM">{{ timeStampFormat(getDetailsCurrentMsg.staChn, {format: 'HH:mm'}) }}</text>
<text>计划</text>
</view>
</view>
</view>
<DetailsFollowCrewItem title="跟机人员" :list="followCrewList" />
<DetailsFollowCrewItem title="跟机人员" :list="getDetailsCurrentMsg.mfollowAcLists" />
</template>
<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 DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
import useFlightSupportStore from 'mocp/store/flight-support'
import { storeToRefs } from 'pinia'
import useBaseStore from 'mocp/store/base'
const followCrewList = ref([
{name: '斯柯达'},
{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>
......
......@@ -8,15 +8,16 @@
class="followCrewItem flex flex-between"
>
<view class="flex">
<image class="img" :src="FlightImage" />
<!--<image class="img" :src="FlightImage" />-->
<view>
<view>{{ item.name }}</view>
<view class="status">维修员</view>
<view>{{ item.uname }}</view>
<!--<view class="status">维修员</view>-->
</view>
</view>
<view class="flex">
<up-icon class="rtIcon" name="checkmark-circle-fill" size="20" :color="$mocp-success-6" />
<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>
</view>
</view>
</view>
......
<template>
<view class="globalDetailsModel detailsFollowingCrew detailsOtherInfo">
<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?.depStnList" title="起飞当日" :msg="ps.weatherMsg.depStnList" />
</view>
<DetailsWeather v-if="ps.weatherMsg?.arrStnList" title="落地当日" :msg="ps.weatherMsg.arrStnList" />
<DetailsFollowCrewItem title="跟机机务" :list="followCrewList" />
<DetailsFollowCrewItem title="机组人员" :list="followCrewList" />
</template>
<script setup>
import { ref } from 'vue'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import { ref, onMounted } from 'vue'
import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
import DetailsWeather from './DetailsWeather.vue'
const ps = defineProps({
weatherMsg: {
type: Object,
default: () => {}
}
})
const followCrewList = ref([
{name: '斯柯达'},
......
<template>
<swiper
class="swiperCont"
:current="1"
:current="filterDetailsCurrentIndex || 0"
active-class="swiper-active"
previous-margin="20rpx"
next-margin="380rpx"
@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="title">{{ item.flightNo }}</view>
<view class="flex swiperInfo">
......@@ -16,8 +16,8 @@
<text>{{ item.arrStn }}</text>
</view>
<view class="flex swiperInfo">
<text>{{ item.stdChn }}</text>
<text>{{ item.staChn }}</text>
<text>{{ timeStampFormat(item.stdChn, {format: 'HH:mm'}) }}</text>
<text>{{ timeStampFormat(item.staChn, {format: 'HH:mm'}) }}</text>
</view>
</view>
</swiper-item>
......@@ -28,20 +28,22 @@
<script setup>
import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import useFlightSupportStore from 'mocp/store/flight-support'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
const flightSupportStore = useFlightSupportStore()
const {filterDetailsList, filterDetailsCurrentIndex} = storeToRefs(flightSupportStore)
const ps = defineProps({
currentAllRelatedFlights: {
filterDetailsList: {
type: Array,
default: []
}
})
const swiperChange = (e) => {
console.log(e, e.detail.current)
filterDetailsCurrentIndex.value = e.detail.current
}
</script>
<style lang="scss" scoped>
......
<template>
<view class="globalDetailsModel detailsFollowingCrew detailsOtherInfo">
<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">({{ title }})</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>
</view>
</template>
<script setup>
import { computed, 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'
const ps = defineProps({
title: {
type: String,
default: '起飞当日'
},
msg: {
type: Object,
default: () => ({})
}
})
console.log('ps.msg', ps.msg)
const followCrewList = ref([
{name: '斯柯达'},
{name: '花飘万家雪'},
{name: '花样百出'}
])
</script>
<style lang="scss" scoped>
@import '../constants/details';
</style>
......@@ -34,7 +34,6 @@
</template>
<script setup>
import { computed } from 'vue'
import Day from 'mocp/utils/dayjs'
import useFlightSupportStore from 'mocp/store/flight-support'
......@@ -42,9 +41,10 @@ import { allInBoundMode, currentInBoundModeForFlightTablePage, decideReleaseStat
import GlobalFlightNo from 'mocp/components/global-flight-no/global-flight-no.vue'
import RenderTime from '../components/RenderTime.vue'
import { fightListPlanTime } from 'mocp/utils/getFlightList'
import { rowClicked } from '../utils/jumpSlingleFlight'
import { storeToRefs } from 'pinia'
const flightSupportStore = useFlightSupportStore()
const {details} = storeToRefs(flightSupportStore)
const listTab = flightSupportStore.listTab
const ps = defineProps({
......@@ -57,7 +57,7 @@ const ps = defineProps({
const msg = computed(() => {
if (!ps.itemMsg) return {}
const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In
const isCurrentIn = currentInBoundModeForFlightTablePage.value == allInBoundMode.In
const filterListTab = listTab.filter(item => !!item.selected)
return filterListTab.map(item => {
......@@ -74,7 +74,7 @@ const msg = computed(() => {
}
}
// 出发地
if (item.keyValue == 'depStn') {
if (item.keyValue == 'place') {
return {
...defaultObj,
data: isCurrentIn ?
......@@ -111,7 +111,13 @@ 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>
<style lang="scss" scoped>
@import '../constants/flightSupportList';
......
......@@ -177,6 +177,10 @@
.basicInfoTimePlan {
font-size: 12px;
color: $mocp-text-4;
.MM {
margin: 0 12rpx;
}
}
}
......
......@@ -3,18 +3,21 @@
<view class="flightSupportDetails">
<view class="details_header">
<view class="header_no flex">
<image class="flight-no-image" :src="HnaPic" mode="widthFix" />
<text>B9999</text>
<global-flight-no
:airline="details.airlineCode"
:style="flightNoStyle"
/>
<text>{{ details.ac }}</text>
</view>
<view class="header_info flex">
<text class="margin-r-32">机型:A999</text>
<text>机位:HG99</text>
<text class="margin-r-32">机型:{{ details.acTypeGc }}</text>
<text>机位:{{ details.airlineCode }}</text>
</view>
</view>
<view class="details_swiper">
<detailsSwiper :currentAllRelatedFlights="currentAllRelatedFlights" />
<detailsSwiper :filterDetailsList="filterDetailsList" />
</view>
<view class="details_tab">
......@@ -26,12 +29,13 @@
class="f-flex-1 tabItem"
:class="index == tabCurrent ? 'active' : ''"
>
{{ item }}--{{ tabCurrent }}
{{ item }}-{{ tabCurrent }}
</view>
</view>
<detailsFlightInfo v-if="tabCurrent === 0" />
<detailsOtherInfo v-else />
<detailsOtherInfo v-else :weatherMsg="weatherMsg" />
</view>
</view>
</global-page>
......@@ -40,40 +44,92 @@
<script setup>
import { ref, reactive } from 'vue'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import useBaseStore from 'mocp/store/base'
import useFlightSupportStore from 'mocp/store/flight-support'
import { onUnload } from '@dcloudio/uni-app'
import HnaPic from 'mocpStatic/image/air-company/hnhk.png'
import { onLoad } from '@dcloudio/uni-app'
import { getFListApi, getReleaseListApi, findWeatherSynopsesMessagesApi } 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 currentAllRelatedFlights = reactive([
{
flightNo: 'B7777',
depStn: 'AKG',
arrStn: 'WUH',
stdChn: '16:16',
staChn: '17:17'
},
{
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 flightSupportStore = useFlightSupportStore()
const {
searchData,
details,
filterDetailsList,
filterDetailsCurrentIndex,
getDetailsCurrentMsg
} = storeToRefs(flightSupportStore)
const tabList = ['航班信息', '其他信息']
const tabCurrent = ref(0)
const flightNoStyle = {
'width': '64rpx',
'height': '64rpx',
'marginRight': '16rpx'
}
const weatherMsg = ref()
onLoad(() => {
getAllFlightsByAc()
getWeatherMsg()
})
const getAllFlightsByAc = async () => {
const params = {
acs2: details.value.ac,
// pageSize: 100,
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})))
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
}
}
})
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 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(weatherMsg.value)
}
</script>
<style lang="scss" scoped>
@import '../constants/details';
......
......@@ -91,6 +91,7 @@ const transformData = (data) => {
}
return q
}).flat()
console.log('@@listMsg', listMsg)
return listMsg
}
......@@ -103,9 +104,8 @@ const subsectionChange = (e) => {
searchData.value.isOut = e
currentInBoundModeForFlightTablePage.value = e
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) {
console.log(currentInBoundModeForFlightTablePage.value, allInBoundMode.In, ind)
listTab.value[ind].label = isCurrentIn ? '出发地' : '目的地'
}
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'
export const allInBoundMode = {
In: 1,
Out: 2
In: 0,
Out: 1
}
export const currentInBoundModeForFlightTablePage = ref(allInBoundMode.In)
......@@ -12,7 +12,7 @@ export const currentInBoundModeForFlightSinglePage = ref(allInBoundMode.In)
export function decideReleaseStatus(v) {
let allReleases = v.releases
let manualReleases = allReleases.filter(a => a.isUserAdd)
if (currentInBoundModeForFlightTablePage.value + 1 === allInBoundMode.Out) {
if (currentInBoundModeForFlightTablePage.value === allInBoundMode.Out) {
manualReleases = manualReleases.filter(a => a.isOut)
allReleases = allReleases.filter(a => a.isOut)
} 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
<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,7 +19,8 @@
@handleRightClick="handleRightClick"
>
<template #="{ item }">
<view
<inforDisclosureItem :item="item" />
<!--<view
@tap="goDetails(item)"
class="item"
>
......@@ -57,7 +58,7 @@
</text>
</view>
</view>
</view>
</view>-->
</template>
</global-page-swiper>
......@@ -70,12 +71,11 @@ import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app'
import { getMocinfoListApi } from 'mocp/api/inforDisclosure'
import { getParamsByType } from 'mocp/hooks/use-params/useParams'
import inforDisclosureItem from './components/inforDisClosureItem.vue'
//跳转
const inforDisclosureStore = useInforDisclosureStore()
const {searchData} = storeToRefs(inforDisclosureStore)
const tabList = [
{
name: '当前通报',
......@@ -87,12 +87,6 @@ const tabList = [
}
]
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/inforDisclosure/details', {id: data.id}).then(() => {
inforDisclosureStore.setState('details', data)
})
}
const transformData = (data) => {
const GuaranteeStageList = getParamsByType('GuaranteeStage')
const OperationPhaseList = getParamsByType('OperationPhase')
......@@ -154,7 +148,4 @@ onUnload(() => {
uni.$off('inforDisclosureReload')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
@import './constants/inforDisclosure.scss';
</style>
<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