|
@@ -29,7 +29,7 @@
|
|
scrollbar-always-on
|
|
scrollbar-always-on
|
|
:row-class-name="flightContainerRowClass"
|
|
:row-class-name="flightContainerRowClass"
|
|
:cell-class-name="flightContainerCellClass"
|
|
:cell-class-name="flightContainerCellClass"
|
|
- :column-props="{ formatter: tableFormatter }"
|
|
|
|
|
|
+ :column-props="{ formatter }"
|
|
sequence
|
|
sequence
|
|
@cell-click="flightContainerCellClickHandler"
|
|
@cell-click="flightContainerCellClickHandler"
|
|
/>
|
|
/>
|
|
@@ -37,7 +37,11 @@
|
|
</div>
|
|
</div>
|
|
<div class="waybill-list-wrapper">
|
|
<div class="waybill-list-wrapper">
|
|
<div class="waybill-list-header">
|
|
<div class="waybill-list-header">
|
|
- <!-- <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" /> -->
|
|
|
|
|
|
+ <CommonSwitch
|
|
|
|
+ :flag="UTCFlag"
|
|
|
|
+ label="开启UTC"
|
|
|
|
+ @update:flag="flag => timeZoneStore.toggleUTCFlag(flag)"
|
|
|
|
+ />
|
|
<!-- <el-button
|
|
<!-- <el-button
|
|
class="button-sqaure"
|
|
class="button-sqaure"
|
|
:icon="Refresh"
|
|
:icon="Refresh"
|
|
@@ -65,7 +69,7 @@
|
|
:columns="waybillTableColumns"
|
|
:columns="waybillTableColumns"
|
|
:row-class-name="flightWaybillRowClass"
|
|
:row-class-name="flightWaybillRowClass"
|
|
:cell-class-name="flightWaybillCellClass"
|
|
:cell-class-name="flightWaybillCellClass"
|
|
- :column-props="{ formatter: tableFormatter }"
|
|
|
|
|
|
+ :column-props="{ formatter }"
|
|
:filter-sort-options="filterSortOptions"
|
|
:filter-sort-options="filterSortOptions"
|
|
sequence
|
|
sequence
|
|
@cell-click="flightWaybillCellClickHandler"
|
|
@cell-click="flightWaybillCellClickHandler"
|
|
@@ -85,7 +89,7 @@ import Search from '@/components/search/index.vue'
|
|
import { CaretRight } from '@element-plus/icons-vue'
|
|
import { CaretRight } from '@element-plus/icons-vue'
|
|
import ContainerWaybillDialog from './ContainerWaybillDialog.vue'
|
|
import ContainerWaybillDialog from './ContainerWaybillDialog.vue'
|
|
import SimpleTable from '@/components/SimpleTable/index.vue'
|
|
import SimpleTable from '@/components/SimpleTable/index.vue'
|
|
-// import CommonSwitch from '../../components/CommonSwitch/index.vue'
|
|
|
|
|
|
+import CommonSwitch from '../../components/CommonSwitch/index.vue'
|
|
import ColumnSet from '@/components/ColumnSet/index.vue'
|
|
import ColumnSet from '@/components/ColumnSet/index.vue'
|
|
import { useTable } from '../../hooks/useTable'
|
|
import { useTable } from '../../hooks/useTable'
|
|
import { useTableColumnSet } from '@/hooks/useTableColumnSet'
|
|
import { useTableColumnSet } from '@/hooks/useTableColumnSet'
|
|
@@ -94,6 +98,7 @@ import { useTableStyle } from '../../hooks/useTableStyle'
|
|
import { useTableCellClick } from '../../hooks/useTableCellClick'
|
|
import { useTableCellClick } from '../../hooks/useTableCellClick'
|
|
import { useFlightInfo } from './useFlightInfo'
|
|
import { useFlightInfo } from './useFlightInfo'
|
|
import { useLoop } from '@/hooks/useLoop'
|
|
import { useLoop } from '@/hooks/useLoop'
|
|
|
|
+import { useTimeZoneStore } from '@/store/timeZone'
|
|
import { CommonTableFormatter, CommonValue } from '~/common'
|
|
import { CommonTableFormatter, CommonValue } from '~/common'
|
|
import { datetimeToTime } from '@/utils/validate'
|
|
import { datetimeToTime } from '@/utils/validate'
|
|
|
|
|
|
@@ -121,12 +126,15 @@ const dataContent = [
|
|
// landingAirport,
|
|
// landingAirport,
|
|
] as string[]
|
|
] as string[]
|
|
|
|
|
|
|
|
+const timeZoneStore = useTimeZoneStore()
|
|
|
|
+const { UTCFlag } = storeToRefs(timeZoneStore)
|
|
|
|
+
|
|
const {
|
|
const {
|
|
flightInfoItems,
|
|
flightInfoItems,
|
|
flightInfo,
|
|
flightInfo,
|
|
computedFlightInfo,
|
|
computedFlightInfo,
|
|
getFlightInfo,
|
|
getFlightInfo,
|
|
-} = useFlightInfo(props.name, dataContent)
|
|
|
|
|
|
+} = useFlightInfo(props.name, dataContent, UTCFlag)
|
|
|
|
|
|
const airLine = toRef(flightInfo, 'flightinfo')
|
|
const airLine = toRef(flightInfo, 'flightinfo')
|
|
|
|
|
|
@@ -150,12 +158,7 @@ watchEffect(() => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-const tableFormatter: CommonTableFormatter = (
|
|
|
|
- row,
|
|
|
|
- column,
|
|
|
|
- cellValue,
|
|
|
|
- index
|
|
|
|
-) => {
|
|
|
|
|
|
+const formatter: CommonTableFormatter = (row, column, cellValue, index) => {
|
|
const value = String(cellValue ?? '').trim()
|
|
const value = String(cellValue ?? '').trim()
|
|
if (column.property === 'execResult') {
|
|
if (column.property === 'execResult') {
|
|
// const execResult = Number(cellValue)
|
|
// const execResult = Number(cellValue)
|
|
@@ -166,7 +169,7 @@ const tableFormatter: CommonTableFormatter = (
|
|
return '通过'
|
|
return '通过'
|
|
}
|
|
}
|
|
if (column.property.includes('Time')) {
|
|
if (column.property.includes('Time')) {
|
|
- return datetimeToTime(value, flightDate as CommonValue)
|
|
|
|
|
|
+ return datetimeToTime(value, flightDate as CommonValue, unref(UTCFlag))
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
[
|
|
[
|
|
@@ -196,7 +199,11 @@ const tableFormatter: CommonTableFormatter = (
|
|
// } else {
|
|
// } else {
|
|
// return datetimeToTime(value, flightDate as CommonValue)
|
|
// return datetimeToTime(value, flightDate as CommonValue)
|
|
// }
|
|
// }
|
|
- const time = datetimeToTime(value, flightDate as CommonValue)
|
|
|
|
|
|
+ const time = datetimeToTime(
|
|
|
|
+ value,
|
|
|
|
+ flightDate as CommonValue,
|
|
|
|
+ unref(UTCFlag)
|
|
|
|
+ )
|
|
return time ? `位置:--\n结果:通过\n时间:${time}` : ''
|
|
return time ? `位置:--\n结果:通过\n时间:${time}` : ''
|
|
}
|
|
}
|
|
if (column.property === 'nodeCode') {
|
|
if (column.property === 'nodeCode') {
|
|
@@ -216,8 +223,6 @@ const tableFormatter: CommonTableFormatter = (
|
|
|
|
|
|
useLoop([getFlightInfo, getContainerTableData, getWaybillTableData], 'flight')
|
|
useLoop([getFlightInfo, getContainerTableData, getWaybillTableData], 'flight')
|
|
|
|
|
|
-// const UTCFlag = ref(true)
|
|
|
|
-
|
|
|
|
const { columnChecked } = useTableColumnSet(waybillTableColumns)
|
|
const { columnChecked } = useTableColumnSet(waybillTableColumns)
|
|
|
|
|
|
const waybillTableRef = ref<InstanceType<typeof SimpleTable> | null>(null)
|
|
const waybillTableRef = ref<InstanceType<typeof SimpleTable> | null>(null)
|