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