feat: refs #6123 enhance VnColumn and ZoneControl optimized data fetching
This commit is contained in:
parent
52ac804c1d
commit
8b598eba86
|
@ -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',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue