Filtri avanzati a scomparsa
This commit is contained in:
@@ -259,6 +259,7 @@ export default defineComponent({
|
||||
const colclicksel = ref(null)
|
||||
|
||||
const selected: any = ref([])
|
||||
const showfilteradv = ref(false) // filtri avanzati
|
||||
|
||||
const filter = ref(0)
|
||||
const filtergrp = ref(costanti.MY_GROUPS)
|
||||
@@ -284,6 +285,10 @@ export default defineComponent({
|
||||
refresh()
|
||||
})
|
||||
|
||||
watch(() => showfilteradv.value, (newval: any, from: any) => {
|
||||
tools.setCookie('s_adv', newval)
|
||||
})
|
||||
|
||||
watch(() => props.filtercustom, (to: any, from: any) => {
|
||||
console.log('filtercustom', to)
|
||||
refresh()
|
||||
@@ -896,6 +901,8 @@ export default defineComponent({
|
||||
|
||||
myvertical.value = props.vertical
|
||||
myvertical.value = tools.getCookie('myv_' + props.prop_mytable, props.vertical)
|
||||
|
||||
showfilteradv.value = tools.getCookie('s_adv', false)
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
@@ -1485,6 +1492,7 @@ export default defineComponent({
|
||||
getValueExtra,
|
||||
shared_consts,
|
||||
getLabelFooterByRow,
|
||||
showfilteradv,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -105,9 +105,15 @@
|
||||
<div v-if="searchList"
|
||||
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `">
|
||||
<span v-for="(item, index) in searchList" :key="index">
|
||||
<div class="text-center" v-if="(item.type === costanti.FieldType.separator)">
|
||||
<q-btn rounded size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'" label="Filtri Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
|
||||
<q-separator class="q-my-sm"></q-separator>
|
||||
</div>
|
||||
|
||||
<CMySelect
|
||||
:col="fieldsTable.getColByTable(mytable, item.key)"
|
||||
v-if="(item.type === costanti.FieldType.select) || (item.type === costanti.FieldType.select_by_server)"
|
||||
v-show="(item.filteradv && showfilteradv) || !item.filteradv"
|
||||
:label="labelcombo(item)"
|
||||
v-model:value="item.value"
|
||||
@update:value="searchval(item.value, item.table)"
|
||||
@@ -131,6 +137,7 @@
|
||||
|
||||
<CMySelect
|
||||
v-if="item.type === costanti.FieldType.multiselect_by_server"
|
||||
v-show="(item.filteradv && showfilteradv) || !item.filteradv"
|
||||
:col="fieldsTable.getColByTable(mytable, item.key)"
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
@@ -153,6 +160,7 @@
|
||||
|
||||
<q-select
|
||||
v-if="(item.type === costanti.FieldType.multiselect)"
|
||||
v-show="(item.filteradv && showfilteradv) || !item.filteradv"
|
||||
v-model="item.arrvalue"
|
||||
label-color="primary"
|
||||
:label="labelcombo(item)"
|
||||
@@ -212,10 +220,12 @@
|
||||
<div v-if="(prop_search || canEdit)"
|
||||
class="row justify-center vertical-middle">
|
||||
|
||||
<div v-if="prop_search" class="q-mr-sm">
|
||||
<div v-if="prop_search" class="q-mr-sm full-width">
|
||||
<q-input
|
||||
v-model="search" filled dense type="search" debounce="500" :hint="hint"
|
||||
v-on:keyup.enter="doSearch">
|
||||
|
||||
v-on:keyup.enter="doSearch"
|
||||
>
|
||||
<template v-slot:after>
|
||||
<q-btn v-if="mytable" dense label="" color="primary" @click="refresh" icon="search"></q-btn>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user