feat: refs #6123 enhance VnColumn and ZoneControl optimized data fetching

This commit is contained in:
Pablo Natek 2025-05-09 10:07:56 +02:00
parent 52ac804c1d
commit 8b598eba86
2 changed files with 13 additions and 4 deletions

View File

@ -129,6 +129,7 @@ const defaultComponents = {
forceAttrs: {
label,
autofocus: true,
size: 'sm',
},
events: {
blur: () => emit('blur'),
@ -154,6 +155,9 @@ const defaultComponents = {
},
toggle: {
component: markRaw(QToggle),
forceAttrs: {
size: 'sm',
},
},
};

View File

@ -95,10 +95,15 @@ const columns = computed(() => [
component: 'checkbox',
cellEvent: {
'update:modelValue': async (value, oldValue, row) => {
const filter = {
where: {
zoneFk: row.zoneFk,
type: 'day',
dated: row.landed,
},
};
const zoneEvent = await axios.get('ZoneEvents', {
zoneFk: row.zoneFk,
type: 'day',
dated: row.landed,
params: { filter: JSON.stringify(filter) },
});
console.log('zoneEvent: ', zoneEvent);
@ -132,7 +137,7 @@ function expressAsPercent(value) {
function progressStyle(value) {
if (value < 1 && value) return 'color: var(--q-negative)';
return 'color: var(--q-positive)';
if (value === 1) return 'color: var(--q-positive)';
}
</script>
<template>