|
@@ -8,7 +8,9 @@ import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
import { transportationMode } from '@/components/TransportationMode'
|
|
import { transportationMode } from '@/components/TransportationMode'
|
|
|
import { useThemeStore } from '@/stores/modules/theme'
|
|
import { useThemeStore } from '@/stores/modules/theme'
|
|
|
|
|
+import { useVisitedRowState } from '@/stores/modules/visitedRow'
|
|
|
|
|
|
|
|
|
|
+const visitedRowState = useVisitedRowState()
|
|
|
const themeStore = useThemeStore()
|
|
const themeStore = useThemeStore()
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -401,6 +403,7 @@ const handleCellDblclick = ({ row }: any) => {
|
|
|
path: '/booking/detail',
|
|
path: '/booking/detail',
|
|
|
query: { a: row.__serial_no, _schemas: row._schemas, status: row.Status }
|
|
query: { a: row.__serial_no, _schemas: row._schemas, status: row.Status }
|
|
|
})
|
|
})
|
|
|
|
|
+ visitedRowState.setBookingTableData(row['__serial_no'])
|
|
|
}
|
|
}
|
|
|
// 点击link字段是时
|
|
// 点击link字段是时
|
|
|
const handleLinkClick = (row: any, column: any) => {
|
|
const handleLinkClick = (row: any, column: any) => {
|
|
@@ -409,6 +412,7 @@ const handleLinkClick = (row: any, column: any) => {
|
|
|
path: '/booking/detail',
|
|
path: '/booking/detail',
|
|
|
query: { a: row.__serial_no, _schemas: row._schemas, status: row.Status }
|
|
query: { a: row.__serial_no, _schemas: row._schemas, status: row.Status }
|
|
|
})
|
|
})
|
|
|
|
|
+ visitedRowState.setBookingTableData(row['__serial_no'])
|
|
|
} else if (column.title === 'HBL No.') {
|
|
} else if (column.title === 'HBL No.') {
|
|
|
router.push({
|
|
router.push({
|
|
|
path: '/tracking/detail',
|
|
path: '/tracking/detail',
|
|
@@ -442,6 +446,13 @@ const handleTableMenuClick = () => {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 修改已查看详情行的样式
|
|
|
|
|
+const handleRowClassName = ({ row }: any) => {
|
|
|
|
|
+ if (visitedRowState.bookingTableData.includes(row['__serial_no'])) {
|
|
|
|
|
+ return 'visited-row'
|
|
|
|
|
+ }
|
|
|
|
|
+ return ''
|
|
|
|
|
+}
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
searchTableData,
|
|
searchTableData,
|
|
|
getLoadingData,
|
|
getLoadingData,
|
|
@@ -478,6 +489,7 @@ defineExpose({
|
|
|
v-vloading="tableLoadingTable || tableLoadingColumn"
|
|
v-vloading="tableLoadingTable || tableLoadingColumn"
|
|
|
:height="props.height"
|
|
:height="props.height"
|
|
|
:style="{ border: 'none' }"
|
|
:style="{ border: 'none' }"
|
|
|
|
|
+ :row-class-name="handleRowClassName"
|
|
|
v-bind="bookingTable"
|
|
v-bind="bookingTable"
|
|
|
@cell-dblclick="handleCellDblclick"
|
|
@cell-dblclick="handleCellDblclick"
|
|
|
@checkbox-change="handleCheckboxChange"
|
|
@checkbox-change="handleCheckboxChange"
|