Commit 8ad2b684 by liujinbo

信息通报修改列表传参

parent 0fdd825b
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', '发动机', '结构', '无'])
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
:transformData="transformData" :transformData="transformData"
> >
<template #default="{ item }"> <template #default="{ item }">
<view v-for="item in dataList" :key="item.keyValue" class="inforDisclosureItem flex"> <view class="inforDisclosureItem flex">
<TableTow :itemMsg="item" /> <TableTow :itemMsg="item" />
</view> </view>
</template> </template>
...@@ -59,7 +59,7 @@ import { currentInBoundModeForFlightTablePage, allInBoundMode } from './utils/cu ...@@ -59,7 +59,7 @@ import { currentInBoundModeForFlightTablePage, allInBoundMode } from './utils/cu
const paging = ref(null) const paging = ref(null)
const flightSupportStore = useFlightSupportStore() const flightSupportStore = useFlightSupportStore()
const { searchData, getSearchData, listScreen, getSelectedList, listTab } = storeToRefs(flightSupportStore) const {searchData, getSearchData, listScreen, getSelectedList, listTab} = storeToRefs(flightSupportStore)
const handleRightClick = () => { const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/flight-support/components/Screen') uni.$mocpJump.navigateTo('/panel/flight-support/components/Screen')
...@@ -67,8 +67,7 @@ const handleRightClick = () => { ...@@ -67,8 +67,7 @@ const handleRightClick = () => {
const transformData = (data) => { const transformData = (data) => {
const currentTime = Date.now() const currentTime = Date.now()
const listMsg = data const listMsg = data?.reduce(
?.reduce(
(q, w) => { (q, w) => {
if (finishedStatus.includes(w.status)) { if (finishedStatus.includes(w.status)) {
w.isFinished = true w.isFinished = true
...@@ -84,16 +83,14 @@ const transformData = (data) => { ...@@ -84,16 +83,14 @@ const transformData = (data) => {
return q return q
}, },
[[], [], []] [[], [], []]
) ).map((q, w) => {
.map((q, w) => {
if (w === 0) { if (w === 0) {
q.sort((a, s) => { q.sort((a, s) => {
return Math.abs(currentTime - a.stdChn) - Math.abs(currentTime - s.stdChn) return Math.abs(currentTime - a.stdChn) - Math.abs(currentTime - s.stdChn)
}) })
} }
return q return q
}) }).flat()
.flat()
return listMsg return listMsg
} }
......
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
navRightIcon="saixuan-01" navRightIcon="saixuan-01"
@handleRightClick="handleRightClick" @handleRightClick="handleRightClick"
> >
<template #="{ dataList }"> <template #="{ item }">
<view <view
v-for="item in dataList"
:key="item.id"
@tap="goDetails(item)" @tap="goDetails(item)"
class="item" class="item"
> >
...@@ -90,7 +88,6 @@ const tabList = [ ...@@ -90,7 +88,6 @@ const tabList = [
] ]
const goDetails = (data) => { const goDetails = (data) => {
console.log(data)
uni.$mocpJump.navigateTo('/panel/inforDisclosure/details', {id: data.id}).then(() => { uni.$mocpJump.navigateTo('/panel/inforDisclosure/details', {id: data.id}).then(() => {
inforDisclosureStore.setState('details', data) inforDisclosureStore.setState('details', data)
}) })
...@@ -110,8 +107,8 @@ const transformData = (data) => { ...@@ -110,8 +107,8 @@ 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+?$/, ''),
...@@ -140,13 +137,13 @@ const transformData = (data) => { ...@@ -140,13 +137,13 @@ const transformData = (data) => {
professionalValue: MajorCategoryList[Number(item.professional)]?.label professionalValue: MajorCategoryList[Number(item.professional)]?.label
} }
}) })
console.log('@@mappedData', mappedData[0]) console.log('@@mappedData', mappedData)
return mappedData return mappedData
} }
//筛选 //筛选
const handleRightClick = () => { const handleRightClick = () => {
uni.$mocpJump.navigateTo('/panel/inforDisclosure/search') uni.$mocpJump.redirectTo('/panel/inforDisclosure/search')
} }
//刷新 //刷新
const paging = ref() const paging = ref()
......
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