feat(web-admin): open vehicle edit dialog from editId query
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7f54923acf
commit
64f14814bd
2 files changed
+10
No files matched your search
@@ -556,6 +556,7 @@ import SystemViewDialog, {
|
||||
} from '@/components/business/system-view-dialog/index.vue'
|
||||
import { loadPersonnelWithCerts } from '@/composables/usePlVehicleViewDetail'
|
||||
import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
import { useRouteEditIdOpen } from '@/composables/useRouteEditIdOpen'
|
||||
import { pickBxData, pickBxPageResult } from '@/utils/http/bx'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
@@ -1248,6 +1249,10 @@ async function handleEdit(row: Vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
useRouteEditIdOpen(async (id) => {
|
||||
await handleEdit({ id } as Vehicle)
|
||||
})
|
||||
|
||||
async function handleSubmit() {
|
||||
const valid = await formRef.value.validate().catch(() => false)
|
||||
if (!valid || !validateSubTables()) return
|
||||
|
||||
@@ -570,6 +570,7 @@ import SystemViewDialog, {
|
||||
type ViewSection
|
||||
} from '@/components/business/system-view-dialog/index.vue'
|
||||
import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
import { useRouteEditIdOpen } from '@/composables/useRouteEditIdOpen'
|
||||
import { pickBxData, pickBxPageResult } from '@/utils/http/bx'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
@@ -1303,6 +1304,10 @@ async function handleEdit(row: Vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
useRouteEditIdOpen(async (id) => {
|
||||
await handleEdit({ id } as Vehicle)
|
||||
})
|
||||
|
||||
async function handleSubmit() {
|
||||
const valid = await formRef.value.validate().catch(() => false)
|
||||
if (!valid || !validateSubTables()) return
|
||||
|
||||
Reference in new issue
Block a user