* добавил переход при клике по отделению
This commit is contained in:
@@ -3,6 +3,7 @@ import {NDataTable, NFlex, NText, NDatePicker} from 'naive-ui'
|
|||||||
import AppLayout from "../../Layouts/AppLayout.vue";
|
import AppLayout from "../../Layouts/AppLayout.vue";
|
||||||
import {h, ref} from "vue";
|
import {h, ref} from "vue";
|
||||||
import DatePickerQuery from "../../Components/DatePickerQuery.vue";
|
import DatePickerQuery from "../../Components/DatePickerQuery.vue";
|
||||||
|
import {Link, usePage} from "@inertiajs/vue3";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@@ -34,7 +35,28 @@ const columns = ref([
|
|||||||
justify: "center"
|
justify: "center"
|
||||||
}, h(NText, { style: 'font-weight: 600;' }, row.groupName))
|
}, h(NText, { style: 'font-weight: 600;' }, row.groupName))
|
||||||
}
|
}
|
||||||
return row.department
|
|
||||||
|
// Получаем текущие query параметры
|
||||||
|
const { url } = usePage()
|
||||||
|
const currentUrl = new URL(url, window.location.origin)
|
||||||
|
const searchParams = currentUrl.searchParams
|
||||||
|
|
||||||
|
// Берем startAt и endAt из текущего URL
|
||||||
|
const startAt = searchParams.get('startAt')
|
||||||
|
const endAt = searchParams.get('endAt')
|
||||||
|
|
||||||
|
const linkData = {}
|
||||||
|
|
||||||
|
if (startAt)
|
||||||
|
linkData.startAt = startAt
|
||||||
|
if (endAt)
|
||||||
|
linkData.endAt = endAt
|
||||||
|
|
||||||
|
return h(Link, {
|
||||||
|
href: `/report`,
|
||||||
|
data: linkData,
|
||||||
|
class: 'underline decoration-dashed'
|
||||||
|
}, row.department)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user