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: {
|
forceAttrs: {
|
||||||
label,
|
label,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
size: 'sm',
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
blur: () => emit('blur'),
|
blur: () => emit('blur'),
|
||||||
|
@ -154,6 +155,9 @@ const defaultComponents = {
|
||||||
},
|
},
|
||||||
toggle: {
|
toggle: {
|
||||||
component: markRaw(QToggle),
|
component: markRaw(QToggle),
|
||||||
|
forceAttrs: {
|
||||||
|
size: 'sm',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,15 @@ const columns = computed(() => [
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
cellEvent: {
|
cellEvent: {
|
||||||
'update:modelValue': async (value, oldValue, row) => {
|
'update:modelValue': async (value, oldValue, row) => {
|
||||||
|
const filter = {
|
||||||
|
where: {
|
||||||
|
zoneFk: row.zoneFk,
|
||||||
|
type: 'day',
|
||||||
|
dated: row.landed,
|
||||||
|
},
|
||||||
|
};
|
||||||
const zoneEvent = await axios.get('ZoneEvents', {
|
const zoneEvent = await axios.get('ZoneEvents', {
|
||||||
zoneFk: row.zoneFk,
|
params: { filter: JSON.stringify(filter) },
|
||||||
type: 'day',
|
|
||||||
dated: row.landed,
|
|
||||||
});
|
});
|
||||||
console.log('zoneEvent: ', zoneEvent);
|
console.log('zoneEvent: ', zoneEvent);
|
||||||
|
|
||||||
|
@ -132,7 +137,7 @@ function expressAsPercent(value) {
|
||||||
|
|
||||||
function progressStyle(value) {
|
function progressStyle(value) {
|
||||||
if (value < 1 && value) return 'color: var(--q-negative)';
|
if (value < 1 && value) return 'color: var(--q-negative)';
|
||||||
return 'color: var(--q-positive)';
|
if (value === 1) return 'color: var(--q-positive)';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue