Commit b3b28341 by liujinbo

机队状态

parent 70e48218
import { http } from 'mocp/utils/http'
export const getFleetListApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/getFleetList',
data,
config
})
}
export const WorkTaskIsSuccessApi = (data, config) => {
return http({
method: 'POST',
url: '/workbench/WorkTaskIsSuccess',
data,
config
})
}
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<script setup> <script setup>
import { computed } from 'vue' import { computed } from 'vue'
import HnaPic from '../../../static/mocp/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', 'width']) const ps = defineProps(['flightNo', 'airline'])
const airlinePic = computed(function() { const airlinePic = computed(function() {
return airlinePicMapping[ps.airline] return airlinePicMapping[ps.airline]
}) })
......
...@@ -36,7 +36,6 @@ const ps = defineProps({ ...@@ -36,7 +36,6 @@ const ps = defineProps({
default: '#f00' default: '#f00'
} }
}) })
console.log(ps.navBarBackground)
const getTitleStyle = computed(() => { const getTitleStyle = computed(() => {
return { return {
color: '#4e5969', color: '#4e5969',
......
...@@ -24,6 +24,9 @@ const getStyle = computed(() => { ...@@ -24,6 +24,9 @@ const getStyle = computed(() => {
if (ps.value == 'CLOSE') { if (ps.value == 'CLOSE') {
_style.color = '#F53F3F' _style.color = '#F53F3F'
} }
if (ps.value == 'OI') {
_style.color = '#00B42A'
}
if (ps.value == '跟踪') { if (ps.value == '跟踪') {
_style.color = '#00B42A' _style.color = '#00B42A'
} }
......
// 建议以文件名首字母作为前缀te_
export const fleet_state = [
{label: 'OPEN', value: '1'},
{label: 'OI', value: '2'},
{label: 'CLOSE', value: '3'}
]
...@@ -4,3 +4,4 @@ export * from './move-decision' ...@@ -4,3 +4,4 @@ export * from './move-decision'
export * from './technology-evaluation' export * from './technology-evaluation'
export * from './work-assignment' export * from './work-assignment'
export * from './aog' export * from './aog'
export * from './fleet'
...@@ -60,18 +60,27 @@ const useBaseStore = defineStore('base', { ...@@ -60,18 +60,27 @@ const useBaseStore = defineStore('base', {
//章节下拉数据 //章节下拉数据
getAllATASelect(state) { getAllATASelect(state) {
return state.selectList.ATAList.map((q) => ({ return state.selectList.ATAList.map((q) => ({
label: q.label + `(${q.zstortGc})`, label: q.label + `(${ q.zstortGc })`,
value: q.label, value: q.label,
id: q.id id: q.id
})) }))
}, },
getATASelect(state) { getATASelect(state, e) {
return uniqueArray( return uniqueArray(
state.selectList.ATAList.map((q) => ({ state.selectList.ATAList.map((q) => ({
label: q.label, label: q.label,
value: q.label value: q.label
})) }))
) )
},
getATAChecked: (state) => {
return (model) => {
const selectATAList = state.selectList.ATAList.filter(item => item.zstortGc == model)
return selectATAList.map((q) => ({
label: q.label,
value: q.label
}))
}
} }
}, },
actions: { actions: {
...@@ -109,10 +118,7 @@ const useBaseStore = defineStore('base', { ...@@ -109,10 +118,7 @@ const useBaseStore = defineStore('base', {
async getAirLinesList() { async getAirLinesList() {
const res = await getAirLinesListApi({}) const res = await getAirLinesListApi({})
if (res.code == 200) { if (res.code == 200) {
this.selectList.airlineCodeList = res.data this.selectList.airlineCodeList = res.data.filter((a) => a.sortId !== '0').sort((q, w) => Number(q.sortId) - Number(w.sortId)).map((z) => ({
.filter((a) => a.sortId !== '0')
.sort((q, w) => Number(q.sortId) - Number(w.sortId))
.map((z) => ({
value: z.zOP2, value: z.zOP2,
label: z.zOP2, label: z.zOP2,
name: z.zCNAME20, name: z.zCNAME20,
...@@ -159,11 +165,11 @@ const useBaseStore = defineStore('base', { ...@@ -159,11 +165,11 @@ const useBaseStore = defineStore('base', {
pageSize: 100, pageSize: 100,
realName realName
} }
getAdminListApi(params, { loading: true }).then((res) => { getAdminListApi(params, {loading: true}).then((res) => {
if (res.code == 200) { if (res.code == 200) {
const selectList = res.data.list.map((item) => { const selectList = res.data.list.map((item) => {
return { return {
label: `${item.nickname}(${(item.enetAccount || '无易网号') + '-' + (item.deptFullName || '无机构')})`, label: `${ item.nickname }(${ (item.enetAccount || '无易网号') + '-' + (item.deptFullName || '无机构') })`,
value: item.id value: item.id
} }
}) })
......
import { defineStore } from 'pinia'
import Day from 'mocp/utils/dayjs'
const currentTime = Day(new Date())
const dateEnd = currentTime.format('YYYY-MM-DD')
const useFleetStore = defineStore('fleet', {
state: () => {
return {
searchData: {
aviation: '',
machineNumber: '',
model: '',
ata: '',
state: '1',
startTime: '',
stopTime: '',
isTime: 2,
isUpdateTime: 2,
dateEnd
},
details: undefined
}
},
getters: {},
actions: {
resetForm() {
this.searchData = {
aviation: '',
machineNumber: '',
model: '',
ata: '',
state: '1',
startTime: '',
stopTime: '',
isTime: 2,
isUpdateTime: 2,
dateEnd
}
},
setState(...args) {
this.$patch({[args[0]]: args[1]})
}
},
// 配置持久化
persist: false
})
export default useFleetStore
import { defineStore, storeToRefs } from 'pinia' import { defineStore } from 'pinia'
import useUserStore from 'mocp/store/user' import useUserStore from 'mocp/store/user'
import { decideTimeRange, listTab, listScreen } from 'mocp/utils/getFlightList' import { decideTimeRange, listTab, listScreen } from 'mocp/utils/getFlightList'
import Day from 'mocp/utils/dayjs' import Day from 'mocp/utils/dayjs'
const userStore = useUserStore()
const {startT, stopT} = decideTimeRange(new Date().getTime()) const {startT, stopT} = decideTimeRange(new Date().getTime())
const useFlightSupportStore = defineStore('flightSupport', { const useFlightSupportStore = defineStore('flightSupport', {
...@@ -24,7 +23,7 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -24,7 +23,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
acs1: '' acs1: ''
}, },
screenData: { screenData: {
terminal: userStore.userInfo.terminal || 'WUH',//航站 terminal: '',//航站
acType: '',//机型 acType: '',//机型
acOwn: ''//航司 acOwn: ''//航司
}, },
...@@ -36,30 +35,37 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -36,30 +35,37 @@ const useFlightSupportStore = defineStore('flightSupport', {
}, },
getters: { getters: {
getSearchData(state) { getSearchData(state) {
return {...state.searchData, ...state.screenData} const userStore = useUserStore()
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() {
const userStore = useUserStore()
return userStore.userInfo?.terminal || 'WUH'
} }
}, },
actions: { actions: {
resetScreenForm() { resetScreenForm() {
const userStore = useUserStore()
this.screenData = { this.screenData = {
terminal: userStore.userInfo.terminal || 'WUH', terminal: userStore.userInfo?.terminal || 'WUH',
acType: '', acType: '',
acOwn: '' acOwn: ''
} }
}, },
setStateScreen(state) { setStateScreen(state) {
const userStore = useUserStore()
this.screenData = { this.screenData = {
terminal: state.terminal || userStore.userInfo.terminal || 'WUH', terminal: state.terminal || userStore.userInfo?.terminal || 'WUH',
acType: state.acType, acType: state.acType,
acOwn: state.acOwn acOwn: state.acOwn
} }
}, },
// 设置列表tab筛选数据 // 设置列表tab筛选数据
setListTabSelected(args) { setListTabSelected(args) {
this.listTab = 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 {
...item, ...item,
...@@ -69,8 +75,8 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -69,8 +75,8 @@ const useFlightSupportStore = defineStore('flightSupport', {
} }
}, },
// 配置持久化 // 配置持久化
// persist: false persist: false
persist: { /*persist: {
// 调整为兼容多端的API // 调整为兼容多端的API
storage: { storage: {
setItem(key, value) { setItem(key, value) {
...@@ -80,7 +86,7 @@ const useFlightSupportStore = defineStore('flightSupport', { ...@@ -80,7 +86,7 @@ const useFlightSupportStore = defineStore('flightSupport', {
return uni.getStorageSync(key) return uni.getStorageSync(key)
} }
} }
} }*/
}) })
export default useFlightSupportStore export default useFlightSupportStore
import { defineStore } from 'pinia'
import Day from 'mocp/utils/dayjs'
const currentTime = Day(new Date())
const dateEnd = currentTime.format('YYYY-MM-DD')
const useInforDisclosureStore = defineStore('inforDisclosure', {
state: () => {
return {
searchData: {
machineNumber: '',
planeModel: '',
aviation: '',
terminal: '',
startTime: '',//填报日期-当前日期
guarantee: '',//保障阶段0 1 2
rlease_state: '',//完成状态0123
function_Info: '',//运行阶段012
failure_state: '',//故障状态
professional: ''//专业类别
},
details: undefined
}
},
getters: {},
actions: {
resetForm() {
this.searchData = {
machineNumber: '',
planeModel: '',
aviation: '',
terminal: '',
startTime: '',
guarantee: '',
rlease_state: '',
function_Info: '',
failure_state: '',
professional: ''
}
},
setState(...args) {
this.$patch({[args[0]]: args[1]})
}
},
// 配置持久化
persist: false
})
export default useInforDisclosureStore
import { defineStore } from 'pinia'
const useInformationDisclosureStore = defineStore('informationDisclosure', {
state: () => {
return {
searchData: {
state: null,
presenter: '',
seat: '',
workType: 1,
startTime: null,
stopTime: null
},
details: undefined
}
},
getters: {},
actions: {
resetForm() {
this.searchData = {
state: null,
presenter: '',
seat: '',
workType: 1,
startTime: null,
stopTime: null
}
},
setState(...args) {
this.$patch({ [args[0]]: args[1] })
}
},
// 配置持久化
persist: false
})
export default useInformationDisclosureStore
...@@ -2,28 +2,28 @@ import { defineStore } from 'pinia' ...@@ -2,28 +2,28 @@ import { defineStore } from 'pinia'
import { ref } from 'vue' import { ref } from 'vue'
const menuList = ref([ const menuList = ref([
{ id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/information-disclosure/list' }, {id: 1, name: '信息通报', icon: 'xxtb', group: '技术支援', count: 12, url: '/panel/inforDisclosure/search'},
{ id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0 }, {id: 2, name: '机队状态', icon: 'jdzt', group: '技术支援', count: 0, url: '/panel/fleet/search'},
{ id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0 }, {id: 3, name: '支援申请', icon: 'zysq', group: '技术支援', count: 0},
{ id: 4, name: '工作指令', icon: 'gzzl', group: '技术支援', count: 0, url: '/panel/work-assignment/search' }, {id: 4, name: '工作指令', icon: 'gzzl', group: '技术支援', count: 0, url: '/panel/work-assignment/search'},
{ id: 5, name: '技术评估', icon: 'jspg', group: '技术支援', count: 0, url: '/panel/technology-evaluation/list' }, {id: 5, name: '技术评估', icon: 'jspg', group: '技术支援', count: 0, url: '/panel/technology-evaluation/list'},
{ id: 6, name: '运行调查', icon: 'yxdc', group: '维修控制', count: 0 }, {id: 6, name: '运行调查', icon: 'yxdc', group: '维修控制', count: 0},
{ id: 7, name: '运行决策', icon: 'yxjc', group: '维修控制', count: 0, url: '/panel/move-decision/list' }, {id: 7, name: '运行决策', icon: 'yxjc', group: '维修控制', count: 0, url: '/panel/move-decision/list'},
{ id: 8, name: '布置工作', icon: 'bzgz', group: '维修控制', count: 0, url: '/panel/assign-work/search' }, {id: 8, name: '布置工作', icon: 'bzgz', group: '维修控制', count: 0, url: '/panel/assign-work/search'},
{ id: 9, name: '航站管理', icon: 'hzgl', group: '航站管理', count: 0 }, {id: 9, name: '航站管理', icon: 'hzgl', group: '航站管理', count: 0},
{ id: 10, name: '协议单位', icon: 'xydw', group: '航站管理', count: 0 }, {id: 10, name: '协议单位', icon: 'xydw', group: '航站管理', count: 0},
{ id: 11, name: '不正常事件', icon: 'bzcsj', group: '运行品质', count: 0 }, {id: 11, name: '不正常事件', icon: 'bzcsj', group: '运行品质', count: 0},
{ id: 12, name: '考核记录', icon: 'khjl', group: '运行品质', count: 0, url: '/panel/appraisal-record/list' }, {id: 12, name: '考核记录', icon: 'khjl', group: '运行品质', count: 0, url: '/panel/appraisal-record/list'},
{ id: 13, name: 'AOG任务', icon: 'AOG', group: '运行品质', count: 0, url: '/panel/aog/search' }, {id: 13, name: 'AOG任务', icon: 'AOG', group: '运行品质', count: 0, url: '/panel/aog/search'},
{ id: 14, name: 'MCO', icon: 'MCO', group: '运行品质', count: 0 }, {id: 14, name: 'MCO', icon: 'MCO', group: '运行品质', count: 0},
{ id: 15, name: '航班保障', icon: 'hbbz', group: '运行品质', count: 0, url: '/panel/flight-support/list' } {id: 15, name: '航班保障', icon: 'hbbz', group: '运行品质', count: 0, url: '/panel/flight-support/list'}
]) ])
const useUserStore = defineStore('user', { const useUserStore = defineStore('user', {
state: () => { state: () => {
return { return {
token: '', token: '',
userInfo: undefined, //用户信息 userInfo: undefined, //用户信息
allMenuItem: { id: 999, name: '全部菜单', icon: 'all', group: '', count: 0 }, allMenuItem: {id: 999, name: '全部菜单', icon: 'all', group: '', count: 0},
allHomeMenuList: [] //所有登录用户的首页菜单信息 allHomeMenuList: [] //所有登录用户的首页菜单信息
} }
}, },
...@@ -65,7 +65,7 @@ const useUserStore = defineStore('user', { ...@@ -65,7 +65,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}
}) })
}) })
} }
......
...@@ -12,15 +12,15 @@ export function decideTimeRange(inputNum: number) { ...@@ -12,15 +12,15 @@ export function decideTimeRange(inputNum: number) {
} }
export const listTab = ref([ export const listTab = ref([
{label: '航班号', key: 'flightNo', flex: 3, selected: true}, {label: '航班号', keyValue: 'flightNo', flex: 3, selected: true},
{label: '机号', key: 'ac', flex: 2, selected: true}, {label: '机号', keyValue: 'ac', flex: 2, selected: true},
{label: '机型', key: 'acTypeGc', flex: 2, selected: true}, {label: '机型', keyValue: 'acTypeGc', flex: 2, selected: true},
{label: '机位', key: 'parkPlace', flex: 2, selected: false}, {label: '机位', keyValue: 'parkPlace', flex: 2, selected: false},
{label: '出发地', key: 'place', flex: 2, selected: true},//place {label: '出发地', keyValue: 'place', flex: 2, selected: true},//place
{label: '预/实', key: 'time', flex: 2, selected: true},//etaChn ataChn : etdChn atdChn time {label: '预/实', keyValue: 'time', flex: 2, selected: true},//etaChn ataChn : etdChn atdChn time
{label: '计划', key: 'staChn', flex: 2, selected: true},//staChn schTime {label: '计划', keyValue: 'staChn', flex: 2, selected: true},//staChn schTime
{label: '特殊任务', key: 'isSpecialTask', flex: 2, selected: false}, {label: '特殊任务', keyValue: 'isSpecialTask', flex: 2, selected: false},
{label: '状态', key: 'status', flex: 2, selected: true} {label: '状态', keyValue: 'status', flex: 2, selected: true}
]) ])
export const listScreen = [ export const listScreen = [
......
import { ref, computed } from 'vue'
// 保障阶段
export const guaranteeList = ref(['航前', '过站', '航后', '无'])
// 完成状态
export const rleaseStateList = ref(['未放行', '正常放行', 'MEL/CDL放行', '其他依据放行'])
// 运行阶段
export const functionInfoList = ref(['起飞', '巡航', '下降', '上客时', '关舱后', '启动后', '推出后', '滑行中', '无'])
// 故障状态
export const failureStateList = ref(['故障排除', '办理保留', '作废', 'open', '无'])
// 专业类别
export const professionalList = ref(['ME', 'AV', 'CA', '发动机', '结构', '无'])
...@@ -178,9 +178,27 @@ ...@@ -178,9 +178,27 @@
} }
}, },
{ {
"path": "pages/modules/mocp/panel/information-disclosure/list", "path": "pages/modules/mocp/panel/inforDisclosure/search",
"style": { "style": {
"navigationBarTitleText": "信息通报" "navigationBarTitleText": "信息通报查询"
}
},
{
"path": "pages/modules/mocp/panel/inforDisclosure/list",
"style": {
"navigationBarTitleText": "信息通报列表"
}
},
{
"path": "pages/modules/mocp/panel/inforDisclosure/details",
"style": {
"navigationBarTitleText": "信息通报详情"
}
},
{
"path": "pages/modules/mocp/panel/inforDisclosure/addDetails",
"style": {
"navigationBarTitleText": "追加信息通报"
} }
}, },
{ {
...@@ -208,6 +226,24 @@ ...@@ -208,6 +226,24 @@
} }
}, },
{ {
"path": "pages/modules/mocp/panel/fleet/search",
"style": {
"navigationBarTitleText": "机队状态查询"
}
},
{
"path": "pages/modules/mocp/panel/fleet/list",
"style": {
"navigationBarTitleText": "机队状态列表"
}
},
{
"path": "pages/modules/mocp/panel/fleet/details",
"style": {
"navigationBarTitleText": "机队状态详情"
}
},
{
"path": "pages/modules/mocp/panel/technology-evaluation/list", "path": "pages/modules/mocp/panel/technology-evaluation/list",
"style": { "style": {
"navigationBarTitleText": "技术评估" "navigationBarTitleText": "技术评估"
......
.fleetTxt {
font-size: 14px;
color: $mocp-text-4;
}
.fleetItemCont {
font-size: 15px;
color: $mocp-text-4;
}
.fleetDetails {
font-size: 14px;
.fleetATA {
font-size: 14px;
border-bottom: none;
.ataCont {
padding-bottom: 20rpx;
border-bottom: none;
}
}
.fleetDescribe {
font-size: 14px;
margin: 20rpx 0;
}
.describeCont {
color: $mocp-text-3;
font-size: 14px;
}
.footerData {
margin-top: 12rpx;
}
}
<template>
<global-page :padding="24" title="机队状态网详情">
<template v-if="details">
<view class="details fleetDetails">
<view class="details-header">
<view class="details-header-top">
<view class="left">
<custom-state
:value="useGetDictByValue('wa_state', details.state)"
:size="32" />
</view>
<view class="right">
<global-tag :type="useGetDictByValue('wa_isSuccessType', details.isSuccess)">
{{ useGetDictByValue('wa_isSuccess', details.isSuccess) }}
</global-tag>
</view>
</view>
<view class="details-header-bottom">
<view class="left">
<global-icon class="left-icon" icon="Vector" size="24" color="#DD4012"></global-icon>
<view class="txt">
{{ details.aviation }} {{ details.machineNumber }} {{ details.model }}
</view>
</view>
</view>
</view>
<view class="details-body fleetATA">
<view class="details-body-content ataCont">
<text>ATA章节:{{ details.ata }}</text>
<view class="fleetDescribe">故障描述:</view>
<view class="describeCont">{{ details.faultDescribe || '无' }}</view>
</view>
</view>
<view class="details-footer">
<view class="fleetDescribe">处理措施:</view>
<view class="describeCont">{{ details.handle || '无' }}</view>
<view class="footerData occurrenceData">
发生日期:{{ timeStampFormat(details.sendingTime, {format: 'YYYY-MM-DD'}) }}
</view>
<view class="footerData occurrenceData">
填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }}
</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import useFleetStore from 'mocp/store/fleet'
import { storeToRefs } from 'pinia'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
const fleetStore = useFleetStore()
const {details} = storeToRefs(fleetStore)
</script>
<style lang="scss" scoped>
@import '../work-assignment/constants/details.scss';
@import './constants/fleet.scss';
</style>
<template>
<global-page
title="机队状态网"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchData"
showNavRight
navRightType="icon"
navRightIcon="saixuan-01"
@handleRightClick="handleRightClick"
:api="getFleetListApi"
:padding="24"
>
<template #="{ dataList }">
<view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)">
<view class="item-title">
<view class="left">
<custom-state :value="useGetDictByValue('fleet_state', item.state)"></custom-state>
<text class="txt u-line-1 fleetTxt" v-if="item.machineNumber">
{{ item.machineNumber }}
</text>
</view>
</view>
<view class="item-content u-line-3 fleetItemCont">
{{ item.faultDescribe || '无' }}
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useFleetStore from 'mocp/store/fleet'
import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app'
import { getFleetListApi } from 'mocp/api/fleet'
//跳转
const fleetStore = useFleetStore()
const {searchData} = storeToRefs(fleetStore)
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/fleet/details', {id: data.id}).then(() => {
fleetStore.setState('details', data)
})
}
//筛选
const handleRightClick = () => {
uni.$mocpJump.redirectTo('/panel/fleet/search')
}
//刷新
const paging = ref()
uni.$on('fleetReload', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('fleetReload')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
@import './constants/fleet.scss';
</style>
<template>
<global-page title="筛选">
<view class="search-form">
<up-form
labelPosition="left"
labelWidth="auto">
<up-form-item
label="状态"
prop="state"
:borderBottom="true">
<global-picker
v-model="formData.state"
pickAlign="right"
clearable
dictkey="fleet_state"
/>
</up-form-item>
<up-form-item
label="航司"
prop="aviation"
:borderBottom="true">
<global-picker
v-model="formData.aviation"
pickAlign="right"
:options="baseStore.getAirlineSelect"
clearable
filter
/>
</up-form-item>
<up-form-item
label="机号"
prop="machineNumber"
:borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.machineNumber"
:options="deviceNumList"
clearable
filter
/>
</up-form-item>
<up-form-item
label="机型"
prop="model"
:borderBottom="true">
<global-picker
v-model="formData.model"
pickAlign="right"
:options="baseStore.getTypeSelect"
clearable
filter
/>
</up-form-item>
<up-form-item
v-if="formData.model != ''"
label="ATA章节"
prop="ata"
:borderBottom="true">
<global-picker
v-model="formData.ata"
pickAlign="right"
:options="baseStore.getATAChecked(formData.model)"
clearable
filter
/>
</up-form-item>
<up-form-item
label="发生日期(开始)"
prop="startTime"
:borderBottom="true">
<global-date
v-model="formData.startTime"
pickAlign="right"
clearable
/>
</up-form-item>
<up-form-item
label="发生日期(结束)"
prop="stopTime"
:borderBottom="true">
<global-date
v-model="formData.stopTime"
pickAlign="right"
clearable
/>
</up-form-item>
</up-form>
</view>
<template #bottom>
<view class="footer-btn">
<up-row gutter="10">
<up-col span="6">
<global-button
type="primary"
plain
size="large"
:radius="5"
@tap="handleReset">
重置
</global-button>
</up-col>
<up-col span="6">
<global-button
type="primary"
size="large"
:radius="5"
@tap="handleConfirm">
确定
</global-button>
</up-col>
</up-row>
</view>
</template>
</global-page>
</template>
<script setup>
import useBaseStore from 'mocp/store/base'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import { ref } from 'vue'
import useFleetStore from 'mocp/store/fleet'
//获取下拉框选项
const baseStore = useBaseStore()
const {selectList: {deviceNumList}} = useBaseStore()
const fleetStore = useFleetStore()
//获取查询表单数据
const {searchData} = storeToRefs(fleetStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
fleetStore.resetForm()
uni.$mocpJump.navigateTo('/panel/fleet/list')
uni.$emit('fleetReload')
}
const handleConfirm = () => {
fleetStore.setState('searchData', formData.value)
uni.$mocpJump.navigateTo('/panel/fleet/list')
uni.$emit('fleetReload')
}
</script>
<style
lang="scss"
scoped>
.search-form {
padding: 24rpx 24rpx 0 24rpx;
background: #fff;
}
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</style>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<template #default> <template #default>
<view class="custom-title">推荐显示7个选项</view> <view class="custom-title">推荐显示7个选项</view>
<up-checkbox-group <up-checkbox-group
v-if="listTab?.length"
v-model="checkboxValue" v-model="checkboxValue"
placement="column" placement="column"
class="custom-checkbox" class="custom-checkbox"
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<up-checkbox <up-checkbox
class="checkbox-item" class="checkbox-item"
v-for="(item, index) in listTab" v-for="(item, index) in listTab"
:key="index" :key="item.key"
:label="item.label" :label="item.label"
:name="item.label" :name="item.label"
shape="circle" shape="circle"
...@@ -42,7 +43,7 @@ import { cloneDeep } from 'lodash' ...@@ -42,7 +43,7 @@ import { cloneDeep } from 'lodash'
const flightSupportStore = useFlightSupportStore() const flightSupportStore = useFlightSupportStore()
const { listTab } = storeToRefs(flightSupportStore) const {listTab} = storeToRefs(flightSupportStore)
const checkboxValue = ref([]) const checkboxValue = ref([])
watch( watch(
...@@ -56,6 +57,7 @@ watch( ...@@ -56,6 +57,7 @@ watch(
) )
onMounted(() => { onMounted(() => {
console.log('59', listTab.value)
checkboxValue.value = listTab.value.filter(item => item.selected).map(item => item.label) checkboxValue.value = listTab.value.filter(item => item.selected).map(item => item.label)
}) })
......
<template>
<view class="globalDetailsModel detailsBasicInfo">
<view class="title">BH9999</view>
<view class="basicInfoDep flex flex-between">
<view>
<text>CKG</text>
<text class="m-x-6">重庆江北</text>
<text>T3</text>
</view>
<view>
<text>WUh</text>
<text>武汉天河</text>
<text>T2</text>
</view>
</view>
<view class="basicInfoTime flex flex-between">
<text>19:59</text>
<image class="timeFlightIcon" :src="FlightImage" />
<text>20:59</text>
</view>
<view class="basicInfoTimePlan flex flex-between">
<view>
<text>计划</text>
<text>5/9</text>
<text>16:59</text>
</view>
<view>
<text>5/9</text>
<text>17:59</text>
<text>计划</text>
</view>
</view>
</view>
<DetailsFollowCrewItem title="跟机人员" :list="followCrewList" />
</template>
<script setup>
import { ref } from 'vue'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
import DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
const followCrewList = ref([
{name: '斯柯达'},
{name: '花飘万家雪'},
{name: '花样百出'}
])
</script>
<style lang="scss" scoped>
@import '../constants/details';
</style>
<template>
<view class="globalDetailsModel detailsFollowingCrew">
<view class="font-700">{{ title }}</view>
<view class="followCrewCont">
<view
v-for="item of list"
:key="item.name"
class="followCrewItem flex flex-between"
>
<view class="flex">
<image class="img" :src="FlightImage" />
<view>
<view>{{ item.name }}</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>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref, toRefs } from 'vue'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
const ps = defineProps({
title: {
type: String,
default: '123'
},
list: {
type: Array,
default: () => ({})
}
})
const {title, list} = toRefs(ps)
</script>
<style lang="scss" scoped>
@import '../constants/details';
</style>
<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>
</view>
<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 DetailsFollowCrewItem from './DetailsFollowCrewItem.vue'
const followCrewList = ref([
{name: '斯柯达'},
{name: '花飘万家雪'},
{name: '花样百出'}
])
</script>
<style lang="scss" scoped>
@import '../constants/details';
</style>
<template> <template>
<swiper <swiper
class="swiperCont" class="swiperCont"
:current="2" :current="1"
active-class="swiper-active" active-class="swiper-active"
previous-margin="20rpx" previous-margin="20rpx"
next-margin="380rpx" next-margin="380rpx"
mode="round" @change="swiperChange"
> >
<swiper-item v-for="(item, index) in currentAllRelatedFlights" :key="index"> <swiper-item v-for="(item, index) in currentAllRelatedFlights" :key="item.flightNo">
<view class="swiperItem"> <view class="swiperItem">
<text class="title">{{ item.flightNo }}</text> <view class="title">{{ item.flightNo }}</view>
<view class="flex swiperInfo">
<text>{{ item.depStn }}</text>
<image class="renderTime" :src="FlightImage" />
<text>{{ item.arrStn }}</text>
</view>
<view class="flex swiperInfo">
<text>{{ item.stdChn }}</text>
<text>{{ item.staChn }}</text>
</view>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -18,10 +27,11 @@ ...@@ -18,10 +27,11 @@
</template> </template>
<script setup> <script setup>
import { ref, defineProps } from 'vue' import { ref } from 'vue'
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 { cloneDeep } from 'lodash'
import FlightImage from 'mocpStatic/image/monitor/flight-pane.png'
const ps = defineProps({ const ps = defineProps({
currentAllRelatedFlights: { currentAllRelatedFlights: {
...@@ -31,7 +41,7 @@ const ps = defineProps({ ...@@ -31,7 +41,7 @@ const ps = defineProps({
}) })
const swiperChange = (e) => { const swiperChange = (e) => {
console.log(e, e.current) console.log(e, e.detail.current)
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<view <view
@tap="rowClicked(msg.globalMsg)" v-if="msg?.length"
@tap="rowClicked(ps.itemMsg)"
class="tableRow flex" class="tableRow flex"
:class="msg.globalMsg.isFinished ? 'mocp-bg-fill-4' : ''" :class="ps.itemMsg.isFinished ? 'mocp-bg-fill-4' : ''"
> >
<view <view
v-for="(item, index) of msg.filterMsg" v-for="(item, index) of msg"
:key="index" :key="index"
class="rowItem u-line-1 text-center" class="rowItem u-line-1 text-center"
:style="{flex: item.flex}" :style="{flex: item.flex}"
> >
<global-flight-no <global-flight-no
v-if="item.key === 'flightNo'" v-if="item.keyValue === 'flightNo'"
:flightNo="item.data" :flightNo="item.data"
:airline="item.airlineCode" :airline="item.airlineCode"
:flex="item.flex"
/> />
<RenderTime <RenderTime
v-else-if="item.key === 'time'" v-else-if="item.keyValue === 'time'"
:item="msg.globalMsg" :item="ps.itemMsg"
/> />
<view <view
v-else-if="item.key == 'status'" v-else-if="item.keyValue == 'status'"
:class="item.color"> :class="item.color">
{{ item.data }} {{ item.data }}
</view> </view>
...@@ -34,91 +34,84 @@ ...@@ -34,91 +34,84 @@
</template> </template>
<script setup> <script setup>
import { ref, computed } from 'vue'
import { storeToRefs } from 'pinia' import { computed } from 'vue'
import Day from 'mocp/utils/dayjs' import Day from 'mocp/utils/dayjs'
import useFlightSupportStore from 'mocp/store/flight-support' import useFlightSupportStore from 'mocp/store/flight-support'
import { decideReleaseStatus } from '../utils/currentInBoundMode' import { allInBoundMode, currentInBoundModeForFlightTablePage, decideReleaseStatus } from '../utils/currentInBoundMode'
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 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 { rowClicked } from '../utils/jumpSlingleFlight'
import { currentInBoundModeForFlightTablePage, allInBoundMode } from '../utils/currentInBoundMode'
const flightSupportStore = useFlightSupportStore() const flightSupportStore = useFlightSupportStore()
const {listTab} = storeToRefs(flightSupportStore) const listTab = flightSupportStore.listTab
const ps = defineProps({ const ps = defineProps({
item: { itemMsg: {
type: Object, type: Object,
default: () => ({}) default: () => {
}
} }
}) })
// 组装列表数据
const msg = computed(() => { const msg = computed(() => {
if (!ps.itemMsg) return {}
const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In const isCurrentIn = currentInBoundModeForFlightTablePage.value + 1 == allInBoundMode.In
const filterListTab = listTab.value.filter(item => !!item.selected) const filterListTab = listTab.filter(item => !!item.selected)
const filterMsg = filterListTab.map(item => {
return filterListTab.map(item => {
const defaultObj = { const defaultObj = {
key: item.key, keyValue: item.keyValue,
flex: item.flex, flex: item.flex,
data: ps.item[item.key] data: ps.itemMsg[item.keyValue]
} }
// 航班号 // 航班号
if (item.key == 'flightNo') { if (item.keyValue == 'flightNo') {
return { return {
...defaultObj, ...defaultObj,
airlineCode: ps.item['airlineCode'] airlineCode: ps.itemMsg['airlineCode']
} }
} }
// 出发地 // 出发地
if (item.key == 'depStn') { if (item.keyValue == 'depStn') {
console.log()
return { return {
...defaultObj, ...defaultObj,
data: isCurrentIn ? data: isCurrentIn ?
ps.item.depStn : ps.itemMsg.depStn :
ps.item.arrStn ps.itemMsg.arrStn
} }
} }
// 计划 // 计划
if (fightListPlanTime.includes(item.key)) { if (fightListPlanTime.includes(item.keyValue)) {
console.log()
return { return {
...defaultObj, ...defaultObj,
data: isCurrentIn ? data: isCurrentIn ?
Day(ps.item.staChn).format('HH:mm') : Day(ps.itemMsg.staChn).format('HH:mm') :
Day(ps.item.stdChn).format('HH:mm') Day(ps.itemMsg.stdChn).format('HH:mm')
} }
} }
// 状态 // 状态
if (item.key == 'status') { if (item.keyValue == 'status') {
return { return {
...defaultObj, ...defaultObj,
...decideReleaseStatus(ps.item) ...decideReleaseStatus(ps.itemMsg)
} }
} }
// 特殊任务 // 特殊任务
if (item.key == 'isSpecialTask') { if (item.keyValue == 'isSpecialTask') {
const current = ps.item
console.log(current)
return { return {
...defaultObj, ...defaultObj,
data: current.isVip || current.isHighlandFlights || current.fltType === 'I' ? '特殊' : '' data: ps.itemMsg.isVip || ps.itemMsg.isHighlandFlights || ps.itemMsg.fltType === 'I' ? '特殊' : ''
} }
} }
return { return {
...defaultObj ...defaultObj
} }
}) })
return {
globalMsg: ps.item,
filterMsg
}
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../constants/flightSupportList'; @import '../constants/flightSupportList';
......
@charset "utf-8"; @charset "utf-8";
@import "../constants/flightSupportList.scss"; @import "../constants/flightSupportList.scss";
.margin-r-32 { .globalDetailsModel {
margin-right: 32rpx; font-size: 14px;
background: $mocp-text-1;
box-shadow: 2px 0 20px 0 rgba(0, 0, 0, 0.05);
border-radius: 6rpx;
}
.detailsFollowingCrew {
margin: 32rpx 0 0 0;
padding: 32rpx 32rpx 2rpx 32rpx;
.followCrewCont {
margin-top: 32rpx;
.followCrewItem {
margin-bottom: 36rpx;
.img {
width: 68rpx;
height: 68rpx;
border-radius: 50%;
margin-right: 16rpx;
background-color: $mocp-primary-1;
}
.status {
color: $mocp-text-3;
font-size: 12px;
}
.rtIcon {
color: $mocp-success-6;
margin-right: 12rpx;
}
}
}
} }
.flightSupportDetails { .flightSupportDetails {
background-color: $mocp-primary-7; background-color: $mocp-primary-7;
.margin-r-32 {
margin-right: 32rpx;
}
.font-700 {
font-weight: 700;
}
.m-x-6 {
margin: 0 12rpx;
}
.details_header { .details_header {
padding: 32rpx 0 0 32rpx; padding: 32rpx 0 0 32rpx;
color: #fff; color: #fff;
...@@ -44,7 +90,24 @@ ...@@ -44,7 +90,24 @@
.title { .title {
font-size: 32rpx; font-size: 32rpx;
padding: 12rpx 0 12rpx 0;
} }
.swiperInfo {
font-size: 12px;
color: $mocp-text-5;
justify-content: space-between;
margin-top: 12rpx;
}
.renderTime {
width: 30rpx;
height: 30rpx;
}
}
&.swiper-active {
color: #0e42d2;
} }
} }
} }
...@@ -53,26 +116,114 @@ ...@@ -53,26 +116,114 @@
width: 100%; width: 100%;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: $mocp-fill-1;
border-radius: 36rpx 36rpx 0 0; border-radius: 36rpx 36rpx 0 0;
background: $mocp-fill-1;
box-shadow: 2px 0 20px 0 rgba(24, 57, 107, 0.05);
.tabCont {
padding: 8rpx;
background: $mocp-text-1;
.tabItem {
flex: 1;
font-size: 14px;
font-weight: 400;
text-align: center;
color: $mocp-text-4;
padding: 30rpx 0;
border-radius: 6rpx;
&:first-child {
margin-right: 46rpx;
}
&.active {
color: $mocp-text-1;
background: $mocp-primary-7;
}
}
}
.btn_lf { .btn_lf {
margin-right: 46rpx; margin-right: 46rpx;
} }
} }
}
.scrollItem { .detailsBasicInfo {
width: 50vw; margin: 24rpx 0 32rpx 0;
height: 168rpx; padding: 32rpx;
margin-right: 20rpx;
background-color: #f00; .title {
border-radius: 10rpx; font-size: 40rpx;
} font-weight: 700;
}
.basicInfoDep {
margin-top: 28rpx;
}
.basicInfoTime {
font-size: 64rpx;
font-weight: 700;
color: $mocp-text-5;
margin: 12rpx 0 24rpx 0;
.timeFlightIcon {
width: 54rpx;
height: 54rpx;
}
}
.basicInfoTimePlan {
font-size: 12px;
color: $mocp-text-4;
}
}
.detailsOtherInfo {
padding-bottom: 24rpx;
.timeFlightIcon {
width: 40rpx;
height: 40rpx;
}
.waterCont {
margin: 22rpx 0 64rpx 0;
.waterTp {
margin-bottom: 12rpx;
}
.waterTemp {
font-size: 48rpx;
margin-right: 12rpx;
}
.waterText {
font-size: 28rpx;
}
}
.weatherIcon {
width: 114rpx;
height: 114rpx;
margin-right: 44rpx;
}
.weatherSubIcon {
width: 24rpx;
height: 24rpx;
margin-right: 16rpx;
}
.waterInfo {
.waterInfoItem {
color: $mocp-text-3;
margin-bottom: 22rpx;
}
}
}
.flight-single-swiper {
width: 100%;
height: 300rpx;
background-color: #ff0000;
} }
...@@ -20,15 +20,21 @@ ...@@ -20,15 +20,21 @@
<detailsSwiper :currentAllRelatedFlights /> <detailsSwiper :currentAllRelatedFlights />
</view> </view>
<view class="details_tab flex"> <view class="details_tab">
<global-button <view class="tabCont flex">
<view
v-for="(item, index) of tabList" v-for="(item, index) of tabList"
:key="index" :key="item"
@click="tabCurrent = index" @click="tabCurrent = index"
:type="tabCurrent == index ? 'primary' : 'info'" size="large" :radius="10" class="f-flex-1 tabItem" :class="index == tabCurrent ? 'active' : ''"
class="f-flex-1" :class="index == 0 ? 'btn_lf' : ''"> >
{{ item }}--{{ tabCurrent }} {{ item }}--{{ tabCurrent }}
</global-button> </view>
</view>
<detailsFlightInfo v-if="tabCurrent === 0" />
<detailsOtherInfo v-else />
</view> </view>
</view> </view>
...@@ -45,22 +51,31 @@ import useFlightSupportStore from 'mocp/store/flight-support' ...@@ -45,22 +51,31 @@ import useFlightSupportStore from 'mocp/store/flight-support'
import { onUnload } from '@dcloudio/uni-app' import { onUnload } from '@dcloudio/uni-app'
import HnaPic from 'mocpStatic/image/air-company/hnhk.png' import HnaPic from 'mocpStatic/image/air-company/hnhk.png'
import detailsSwiper from '../components/DetailsSwiper.vue' import detailsSwiper from '../components/DetailsSwiper.vue'
import detailsFlightInfo from '../components/DetailsFlightInfo.vue'
import detailsOtherInfo from '../components/DetailsOtherInfo.vue'
const currentAllRelatedFlights = reactive([ const currentAllRelatedFlights = reactive([
{ {
flightNo: 'B5555' flightNo: 'B7777',
}, depStn: 'AKG',
{ arrStn: 'WUH',
flightNo: 'B6666' stdChn: '16:16',
}, staChn: '17:17'
{
flightNo: 'B7777'
}, },
{ {
flightNo: 'B8888' flightNo: 'B8888',
depStn: 'VGF',
arrStn: 'JHY',
stdChn: '18:18',
staChn: '19:19'
}, },
{ {
flightNo: 'B9999' flightNo: 'B9999',
depStn: 'ERG',
arrStn: 'MHG',
stdChn: '20:20',
staChn: '21:21'
} }
]) ])
const tabList = ['航班信息', '其他信息'] const tabList = ['航班信息', '其他信息']
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<template #="{ dataList }"> <template #="{ dataList }">
<view <view
v-for="item in dataList" v-for="item in dataList"
:key="item.id" :key="item.keyValue"
class="inforDisclosureItem flex"> class="inforDisclosureItem flex">
<TableTow :item="item" /> <TableTow :itemMsg="item" />
</view> </view>
</template> </template>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="flex listTopTab text-center"> <view class="flex listTopTab text-center">
<view <view
v-for="item of getSelectedList" v-for="item of getSelectedList"
:key="item.label" :key="item.id"
class="topTabItem" class="topTabItem"
:style="{flex: item.flex}"> :style="{flex: item.flex}">
{{ item.label }} {{ item.label }}
...@@ -75,7 +75,7 @@ const handleRightClick = () => { ...@@ -75,7 +75,7 @@ const handleRightClick = () => {
const localPagingCB = (data) => { const localPagingCB = (data) => {
const currentTime = Date.now() const currentTime = Date.now()
const listMsg = data.reduce((q, w) => { const listMsg = data?.reduce((q, w) => {
if (finishedStatus.includes(w.status)) { if (finishedStatus.includes(w.status)) {
w.isFinished = true w.isFinished = true
q[2].push(w) q[2].push(w)
...@@ -98,7 +98,6 @@ const localPagingCB = (data) => { ...@@ -98,7 +98,6 @@ const localPagingCB = (data) => {
return q return q
}) })
.flat() .flat()
console.log('**listMsg**', listMsg)
return listMsg return listMsg
} }
......
<template>
<global-page :padding="24" title="机队状态网详情">
<template v-if="details">
<view class="details fleetDetails">
<view class="details-header">
<view class="details-header-top">
<view class="left">
<custom-state
:value="useGetDictByValue('wa_state', details.state)"
:size="32" />
</view>
<view class="right">
<global-tag :type="useGetDictByValue('wa_isSuccessType', details.isSuccess)">
{{ useGetDictByValue('wa_isSuccess', details.isSuccess) }}
</global-tag>
</view>
</view>
<view class="details-header-bottom">
<view class="left">
<global-icon class="left-icon" icon="Vector" size="24" color="#DD4012"></global-icon>
<view class="txt">
{{ details.aviation }} {{ details.machineNumber }} {{ details.model }}
</view>
</view>
</view>
</view>
<view class="details-body fleetATA">
<view class="details-body-content ataCont">
<text>ATA章节:{{ details.ata }}</text>
<view class="fleetDescribe">故障描述:</view>
<view class="describeCont">{{ details.faultDescribe || '无' }}</view>
</view>
</view>
<view class="details-footer">
<view class="fleetDescribe">处理措施:</view>
<view class="describeCont">{{ details.handle || '无' }}</view>
<view class="footerData occurrenceData">
发生日期:{{ timeStampFormat(details.sendingTime, {format: 'YYYY-MM-DD'}) }}
</view>
<view class="footerData occurrenceData">
填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }}
</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import useFleetStore from 'mocp/store/fleet'
import { storeToRefs } from 'pinia'
import useUserStore from 'mocp/store/user'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { ref } from 'vue'
import { getFleetListApi } from 'mocp/api/fleet'
import { WorkTaskIsSuccessApi } from 'mocp/api/work-assignment'
import Day from 'mocp/utils/dayjs'
const fleetStore = useFleetStore()
const {details} = storeToRefs(fleetStore)
console.log(details, details.value.creationTime, timeStampFormat('1721810489517', {format: 'YYYY-MM-DD'}))
</script>
<style lang="scss" scoped>
@import '../work-assignment/constants/details.scss';
@import './constants/fleet.scss';
</style>
<template>
<global-page :padding="24" title="机队状态网详情">
<template v-if="details">
<view class="details fleetDetails">
<view class="details-header">
<view class="details-header-top">
<view class="left">
<custom-state
:value="useGetDictByValue('wa_state', details.state)"
:size="32" />
</view>
<view class="right">
<global-tag :type="useGetDictByValue('wa_isSuccessType', details.isSuccess)">
{{ useGetDictByValue('wa_isSuccess', details.isSuccess) }}
</global-tag>
</view>
</view>
<view class="details-header-bottom">
<view class="left">
<global-icon class="left-icon" icon="Vector" size="24" color="#DD4012"></global-icon>
<view class="txt">
{{ details.aviation }} {{ details.machineNumber }} {{ details.model }}
</view>
</view>
</view>
</view>
<view class="details-body fleetATA">
<view class="details-body-content ataCont">
<text>ATA章节:{{ details.ata }}</text>
<view class="fleetDescribe">故障描述:</view>
<view class="describeCont">{{ details.faultDescribe || '无' }}</view>
</view>
</view>
<view class="details-footer">
<view class="fleetDescribe">处理措施:</view>
<view class="describeCont">{{ details.handle || '无' }}</view>
<view class="footerData occurrenceData">
发生日期:{{ timeStampFormat(details.sendingTime, {format: 'YYYY-MM-DD'}) }}
</view>
<view class="footerData occurrenceData">
填报时间:{{ timeStampFormat(details.creationTime, {format: 'YYYY-MM-DD'}) }}
</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import useFleetStore from 'mocp/store/fleet'
import { storeToRefs } from 'pinia'
import useUserStore from 'mocp/store/user'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import { ref } from 'vue'
import { getFleetListApi } from 'mocp/api/fleet'
import { WorkTaskIsSuccessApi } from 'mocp/api/work-assignment'
import Day from 'mocp/utils/dayjs'
const fleetStore = useFleetStore()
const {details} = storeToRefs(fleetStore)
console.log(details, details.value.creationTime, timeStampFormat('1721810489517', {format: 'YYYY-MM-DD'}))
</script>
<style lang="scss" scoped>
@import '../work-assignment/constants/details.scss';
@import './constants/fleet.scss';
</style>
<template>
<global-page
title="机队状态网"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchData"
showNavRight
navRightType="icon"
navRightIcon="saixuan-01"
@handleRightClick="handleRightClick"
:api="getFleetListApi"
:padding="24"
>
<template #="{ dataList }">
<view class="item" v-for="item in dataList" :key="item.id" @tap="goDetails(item)">
<view class="item-title">
<view class="left">
<custom-state :value="useGetDictByValue('fleet_state', item.state)"></custom-state>
<text class="txt u-line-1 fleetTxt" v-if="item.machineNumber">
{{ item.machineNumber }}
</text>
</view>
</view>
<view class="item-content u-line-3 fleetItemCont">
{{ item.faultDescribe || '无' }}
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
import { timeStampFormat } from 'mocp/utils/tool'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useInforDisclosureStore from 'mocp/store/inforDisclosure'
import { storeToRefs } from 'pinia'
import { onUnload } from '@dcloudio/uni-app'
import { getFleetListApi } from 'mocp/api/fleet'
//跳转
const fleetStore = useFleetStore()
const {searchData} = storeToRefs(fleetStore)
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/fleet/details', {id: data.id}).then(() => {
fleetStore.setState('details', data)
})
}
//筛选
const handleRightClick = () => {
uni.$mocpJump.redirectTo('/panel/fleet/search')
}
//刷新
const paging = ref()
uni.$on('inforDisclosure', () => {
paging.value?.reload()
})
onUnload(() => {
uni.$off('inforDisclosure')
})
</script>
<style lang="scss" scoped>
@import 'mocpStatic/css/list.scss';
@import './constants/fleet.scss';
</style>
<template>
<global-page title="筛选">
<view class="search-form">
<up-form
labelPosition="left"
labelWidth="auto">
<up-form-item
label="机号"
prop="machineNumber"
:borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.machineNumber"
:options="deviceNumList"
clearable
filter
/>
</up-form-item>
<up-form-item
label="机型"
prop="planeModel"
:borderBottom="true">
<global-picker
v-model="formData.planeModel"
pickAlign="right"
:options="baseStore.getTypeSelect"
clearable
filter
/>
</up-form-item>
<up-form-item
label="航司"
prop="aviation"
:borderBottom="true">
<global-picker
v-model="formData.aviation"
pickAlign="right"
:options="baseStore.getAirlineSelect"
clearable
filter
/>
</up-form-item>
<up-form-item label="航站" prop="terminal" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.terminal"
clearable
:options="baseStore.getTerminalSelect"
filter
></global-picker>
</up-form-item>
<up-form-item
label="填报日期"
prop="startTime"
:borderBottom="true">
<global-date
v-model="formData.startTime"
pickAlign="right"
clearable
/>
</up-form-item>
<up-form-item label="保障阶段" prop="guarantee" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.guarantee"
clearable
:options="getParamsByType('GuaranteeStage')"
filter
></global-picker>
</up-form-item>
<up-form-item label="完成状态" prop="guarantee" :borderBottom="true">
<global-picker
pickAlign="right"
v-model="formData.guarantee"
clearable
:options="getParamsByType('GuaranteeStage')"
filter
></global-picker>
</up-form-item>
</up-form>
</view>
<template #bottom>
<view class="footer-btn">
<up-row gutter="10">
<up-col span="6">
<global-button
type="primary"
plain
size="large"
:radius="5"
@tap="handleReset">
重置
</global-button>
</up-col>
<up-col span="6">
<global-button
type="primary"
size="large"
:radius="5"
@tap="handleConfirm">
确定
</global-button>
</up-col>
</up-row>
</view>
</template>
</global-page>
</template>
<script setup>
import useBaseStore from 'mocp/store/base'
import { storeToRefs } from 'pinia'
import { cloneDeep } from 'lodash'
import { ref } from 'vue'
import useInforDisclosureStore from 'mocp/store/inforDisclosure'
import { getParamsByType } from 'mocp/hooks/use-params/useParams'
//获取下拉框选项
const baseStore = useBaseStore()
const {selectList: {deviceNumList}} = useBaseStore()
const inforDisclosureStore = useInforDisclosureStore()
//获取查询表单数据
const {searchData} = storeToRefs(inforDisclosureStore)
const formData = ref(cloneDeep(searchData.value))
const handleReset = () => {
inforDisclosureStore.resetForm()
uni.$mocpJump.navigateTo('/panel/inforDisclosure/list')
uni.$emit('inforDisclosureReload')
}
const handleConfirm = () => {
inforDisclosureStore.setState('searchData', formData.value)
uni.$mocpJump.navigateTo('/panel/inforDisclosure/list')
uni.$emit('inforDisclosureReload')
}
</script>
<style
lang="scss"
scoped>
.search-form {
padding: 24rpx 24rpx 0 24rpx;
background: #fff;
}
.footer-btn {
padding: 24rpx 32rpx;
background-color: #fff;
}
</style>
@charset "utf-8";
.inforDisclosureItem {
padding: 24rpx;
margin-bottom: 16rpx;
border-radius: 12rpx;
.top {
justify-content: space-between;
}
}
.flex {
display: flex;
align-items: center;
}
<script setup>
</script>
<template>
</template>
<style scoped lang="scss">
</style>
\ No newline at end of file
<template>
<global-page
title="信息通报"
isDataList
refresherEnabled
loadingMoreEnabled
auto
ref="paging"
:params="searchData"
navRightType="icon"
navRightIcon="saixuan-01"
@handleRightClick="handleRightClick"
:api="getArrangeWorkListApi"
:padding="24"
>
<template #="{ dataList }">
<view
v-for="(item, index) in dataList"
:key="item.id"
class="inforDisclosureItem flex mocp-bg-fill-4">
<view class="top">
<view class="flex">{{ item.presenter }}</view>
</view>
</view>
</template>
</global-page>
</template>
<script setup>
import { ref } from 'vue'
//临时调用接口
import { getArrangeWorkListApi } from 'mocp/api/assign-work'
import useInformationDisclosureStore from 'mocp/store/information-disclosure'
import { storeToRefs } from 'pinia'
const informationDisclosureStore = useInformationDisclosureStore()
const { searchData } = storeToRefs(informationDisclosureStore)
const handleRightClick = () => {
console.log('handleRightClick information-disclosure', informationDisclosureStore)
}
</script>
<style scoped lang="scss">
@import './constants/inforDisclosureList';
</style>
\ No newline at end of file
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