Browse Source

fix: reload task data when switching management tabs

Tabs only updated the query view and never re-fetched, so plans,
executions and routes stayed stale until full remount.
main
xiaosi 2 weeks ago
parent
commit
d963a32bd0
  1. 17
      src/views/TasksView/TasksView.vue

17
src/views/TasksView/TasksView.vue

@ -390,11 +390,24 @@ const recordColumns = [
watch( watch(
() => route.query.view, () => route.query.view,
(v) => { if (v) view.value = v }
(v) => {
if (v && v !== view.value) view.value = String(v)
},
) )
// tab query
watch(view, (v, prev) => {
if (!v || v === prev) return
const next = String(v)
if (route.query.view !== next) {
router.push({ name: 'tasks', query: { view: next } })
}
load()
})
function setView(v) { function setView(v) {
router.push({ name: 'tasks', query: { view: v } })
if (v == null || v === '') return
view.value = String(v)
} }
const TASK_STATUS = { const TASK_STATUS = {

Loading…
Cancel
Save