FILTRO CITTA Sopra ogni pagina !

This commit is contained in:
Surya Paolo
2022-12-01 16:55:22 +01:00
parent 9010c0ff37
commit bf1e9fc982
26 changed files with 900 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs, computed } from 'vue'
import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs, computed, inject } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { tools } from '../../store/Modules/tools'
@@ -326,6 +326,9 @@ export default defineComponent({
const myvertical = ref(props.vertical)
//const myselector = inject('myselector', {})
const myselector = computed(() => globalStore.myselector)
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
// console.log('valoriopt', item.table)
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
@@ -338,6 +341,21 @@ export default defineComponent({
return lab
})
watch(() => globalStore.myselector, (value: any, oldval: any) => {
console.log('******* CGRIDTABLEREC : globalStore.myselector', globalStore.myselector)
console.log(' . value', value)
const rec = searchList.value.find((myrec) => myrec.table === globalStore.myselector.table) // check if exist
if (rec) {
rec.value = globalStore.myselector.data
}
if (value) {
refresh()
}
},
)
watch(() => searchList.value, (to: any, from: any) => {
// console.log('watch searchlist', to)
if (searchList.value && !changetable.value) {
@@ -353,14 +371,6 @@ export default defineComponent({
}
})
watch(() => props.prop_mycolumns, (to: any, from: any) => {
// console.log('watch searchlist', to)
if (myvertical.value !== props.vertical) {
myvertical.value = props.vertical
refresh()
}
})
watch(() => showfilter.value, (newval: any, from: any) => {
tools.setCookie('s_adv', newval ? '1' : '0')
})
@@ -2098,6 +2108,7 @@ export default defineComponent({
myinfscroll,
t,
exportTable,
myselector,
}
}
})